/* Meeting2 - 纯 PHP 版本样式 */

:root {
    --bg-primary: #0f141f;
    --bg-secondary: #1a1f2e;
    --bg-tertiary: #252b3d;
    --text-primary: #eef0ff;
    --text-secondary: #9ea3c8;
    --primary-color: #7b61f0;
    --primary-hover: #6a52d9;
    --danger-color: #ef4444;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --border-color: #3a4260;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0f141f 0%, #1a1f2e 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
}

.page {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* 顶部栏 */
.meeting-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.meeting-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-dot {
    color: var(--primary-color);
    font-size: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.brand-text h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.brand-text p {
    font-size: 12px;
    color: var(--text-secondary);
}

.meeting-status {
    display: flex;
    gap: 8px;
}

.status-chip {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(123, 97, 240, 0.2);
    color: var(--primary-color);
    border: 1px solid rgba(123, 97, 240, 0.3);
}

.status-chip.danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
    border-color: rgba(239, 68, 68, 0.3);
}

/* 主布局 */
.meeting-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* 左侧摄像头列表 */
.camera-sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 16px;
    overflow-y: auto;
    flex-shrink: 0;
}

.camera-sidebar h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.camera-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.camera-tile {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.camera-tile-local {
    margin-bottom: 8px;
}

.video-box {
    width: 100%;
    aspect-ratio: 4/3;
    background: var(--bg-tertiary);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.video-box video,
.video-box iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sidebar-box {
    aspect-ratio: 16/9;
}

.empty-box {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.user-name {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

/* 主舞台区域 */
.stage-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px;
    overflow: hidden;
}

.stage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.stage-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.stage-switches {
    display: flex;
    gap: 8px;
}

.stage-switch {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.stage-switch:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.stage-switch.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.stage-box {
    flex: 1;
    background: var(--bg-tertiary);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    position: relative;
}

.stage-view {
    width: 100%;
    height: 100%;
    display: none;
}

.stage-view.active {
    display: block;
}

.stage-view video,
.stage-view iframe {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* 控制按钮 */
.stage-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.icon-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 100px;
    justify-content: center;
}

.icon-btn:hover {
    background: var(--bg-primary);
    border-color: var(--primary-color);
}

.icon-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.icon-btn.warn {
    background: var(--danger-color);
    border-color: var(--danger-color);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

.icon-label {
    font-size: 13px;
}

/* 美颜面板 */
.mediapipe-panel {
    margin-top: 16px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
}

.mediapipe-panel-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-weight: 600;
}

.mediapipe-close {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.mediapipe-close:hover {
    background: var(--bg-primary);
}

.mediapipe-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    gap: 16px;
}

.mediapipe-row input[type="range"] {
    flex: 1;
    max-width: 200px;
    height: 4px;
    -webkit-appearance: none;
    background: var(--bg-secondary);
    border-radius: 2px;
    outline: none;
}

.mediapipe-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    border: 1px solid var(--border-color);
}

.modal-content h3 {
    margin-bottom: 8px;
    font-size: 18px;
}

.modal-content > p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn:hover {
    border-color: var(--primary-color);
    background: var(--bg-primary);
}

.modal-btn.cancel {
    margin-top: 16px;
    border-color: rgba(123, 97, 240, 0.35);
    background: transparent;
    color: var(--text-secondary);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .meeting-layout {
        flex-direction: column;
    }

    .camera-sidebar {
        width: 100%;
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .stage-controls {
        gap: 8px;
    }

    .icon-btn {
        min-width: 80px;
        padding: 10px 14px;
    }

    .icon-label {
        display: none;
    }
}
