﻿/* CvComponents.css —— 通用组件(Modal/菜单/裁剪舞台等) */

/* 弹窗 Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

    .modal.show {
        display: flex;
    }

.modal-card {
    width: min(840px, 92vw);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-head {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--cv-border);
}

.modal-body {
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
}

.modal-foot {
    padding: 12px 16px;
    border-top: 1px solid var(--cv-border);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

@media (max-width:1200px) {
    .modal-body {
        grid-template-columns: 1fr;
    }
}

/* 三点菜单 */
.more {
    position: absolute;
    right: 6px;
    top: 24px;
    width: 26px;
    height: 26px;
    border: 1px solid var(--cv-border);
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
}

.menu {
    position: absolute;
    right: 6px;
    top: 56px;
    min-width: 140px;
    background: #fff;
    border: 1px solid var(--cv-border);
    border-radius: 8px;
    display: none;
    z-index: 5;
    box-shadow: 0 6px 16px rgba(0,0,0,.08);
    padding: 6px;
}

    .menu button {
        width: 100%;
        text-align: left;
        padding: 8px 10px;
        border: 0;
        background: #fff;
        border-radius: 6px;
        cursor: pointer;
    }

        .menu button:hover {
            background: #f3f4f6;
        }

/* 头像/裁剪舞台（按你现有结构复用） */
.avatar-box {
    width: 120px;
    height: 120px;
    border: 1px solid var(--cv-border);
    border-radius: 12px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
}

    .avatar-box img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.avatar-ph {
    font-size: 42px;
    color: #9ca3af;
}

.stage-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.stage {
    width: 420px;
    height: 420px;
    background: #6b7280;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

    .stage img {
        user-select: none;
        -webkit-user-drag: none;
        position: absolute;
        left: 50%;
        top: 50%;
        transform-origin: center center;
    }

.grid::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(transparent 33.33%, rgba(255,255,255,.25) 33.33%, rgba(255,255,255,.25) 66.66%, transparent 66.66%), linear-gradient(90deg, transparent 33.33%, rgba(255,255,255,.25) 33.33%, rgba(255,255,255,.25) 66.66%, transparent 66.66%);
    background-size: 100% 33.33%, 33.33% 100%;
}

.ctrls {
    display: grid;
    gap: 10px;
    align-content: start;
}

.row-ctrl {
    display: grid;
    grid-template-columns: 68px 1fr 36px;
    align-items: center;
    gap: 8px;
}

    .row-ctrl input[type=range] {
        width: 100%;
    }

/* 小屏舞台尺寸 */
@media (max-width:1200px) {
    .stage {
        width: 86vw;
        height: 86vw;
        max-width: 520px;
        max-height: 520px;
    }
}
