/* ============ 全局样式（会议主题） ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #0d0d0d;
    color: #fff;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

/* ============ 按钮 - 液态玻璃风格 ============ */
.btn {
    padding: 10px 22px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
}

.btn:hover {
    background: rgba(255,255,255,0.18);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn-primary {
    background: rgba(0,110,255,0.6);
    border-color: rgba(0,110,255,0.4);
    color: white;
}

.btn-primary:hover {
    background: rgba(0,110,255,0.8);
}

.btn-secondary {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
}

.btn-danger {
    background: rgba(255,77,79,0.7);
    border-color: rgba(255,77,79,0.4);
    color: white;
}

.btn-danger:hover {
    background: rgba(255,77,79,0.9);
}

.btn-outline {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
}

.btn-outline:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.4);
    color: #fff;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
    border-radius: 10px;
}

.btn-block {
    width: 100%;
}

/* ============ 首页 ============ */
.landing-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
}

.landing-container {
    text-align: center;
    max-width: 800px;
    padding: 40px;
}

.landing-header {
    margin-bottom: 50px;
}

.logo {
    font-size: 64px;
    margin-bottom: 16px;
}

.landing-header h1 {
    font-size: 36px;
    color: white;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 16px;
    color: rgba(255,255,255,0.6);
}

.role-cards {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.role-card {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 40px 30px;
    width: 280px;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s;
}

.role-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.1);
    border-color: rgba(0,110,255,0.5);
}

.role-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.role-card h2 {
    font-size: 22px;
    margin-bottom: 10px;
}

.role-card p {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 20px;
}

.role-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.client-card .role-tag {
    background: rgba(0,110,255,0.2);
    color: #4d94ff;
}

.support-card .role-tag {
    background: rgba(82,196,26,0.2);
    color: #52c41a;
}

.landing-footer {
    margin-top: 40px;
    color: rgba(255,255,255,0.4);
    font-size: 13px;
}

/* ============ 等待/接入页面 ============ */
.waiting-screen, .join-screen {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
}

.waiting-card, .join-card {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.waiting-icon, .join-icon {
    font-size: 56px;
    margin-bottom: 20px;
}

.waiting-card h2, .join-card h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #fff;
}

.connection-code {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 8px;
    color: #006eff;
    background: rgba(0,110,255,0.1);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-family: "Courier New", monospace;
}

.waiting-tip, .join-tip {
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    margin-bottom: 20px;
}

.waiting-status {
    color: #faad14;
    font-size: 14px;
    margin-bottom: 24px;
    animation: pulse 1.5s infinite;
}

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

.code-input {
    width: 100%;
    padding: 16px;
    font-size: 28px;
    text-align: center;
    letter-spacing: 8px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    margin-bottom: 20px;
    font-family: "Courier New", monospace;
    background: rgba(255,255,255,0.05);
    color: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.code-input:focus {
    border-color: #006eff;
}

.error-msg {
    color: #ff4d4f;
    font-size: 13px;
    margin-top: 12px;
}

.back-link {
    display: block;
    margin-top: 20px;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    font-size: 13px;
}

.back-link:hover {
    color: #006eff;
}

/* ============ 会议主界面 ============ */
.connected-screen {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
}

/* 顶部信息栏 */
.meeting-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: opacity 0.3s;
}

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

.meeting-title {
    font-size: 15px;
    font-weight: 600;
}

.meeting-code {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.1);
    padding: 3px 10px;
    border-radius: 4px;
}

.recording-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4d4f;
    animation: pulse 1.5s infinite;
}

.meeting-time {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    font-variant-numeric: tabular-nums;
}

/* 主内容区 */
.meeting-main {
    flex: 1;
    display: flex;
    position: relative;
    overflow: hidden;
}

/* 屏幕共享区域 */
.screen-area {
    flex: 1;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.screen-placeholder {
    text-align: center;
    color: rgba(255,255,255,0.4);
}

.placeholder-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.screen-placeholder p {
    margin-bottom: 20px;
    font-size: 15px;
}

.screen-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen-container video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.fullscreen-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.screen-container:hover .fullscreen-btn {
    opacity: 1;
}

.fullscreen-btn:hover {
    background: rgba(0,110,255,0.8);
    border-color: #006eff;
}

/* 全屏状态 */
.screen-container:fullscreen {
    background: #000;
}

.screen-container:fullscreen video {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

.screen-container:-webkit-full-screen {
    background: #000;
}

.screen-container:-webkit-full-screen video {
    width: 100%;
    height: 100%;
}

.annotation-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.support-screen-area .annotation-canvas {
    pointer-events: auto;
    cursor: crosshair;
}

/* 标注工具栏 */
.annotation-toolbar {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30,30,40,0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    z-index: 50;
}

.tool-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.tool-btn:hover {
    background: rgba(255,255,255,0.1);
}

.tool-btn.active {
    background: rgba(0,110,255,0.3);
}

.tool-divider {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,0.15);
    margin: 0 4px;
}

.color-picker {
    display: flex;
    gap: 6px;
}

.color-btn {
    width: 22px;
    height: 22px;
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.color-btn.active {
    border-color: #fff;
    transform: scale(1.15);
}

/* 底部控制栏 */
.control-bar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    transition: opacity 0.3s, transform 0.3s;
}

.control-bar.hidden-bar {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    pointer-events: none;
}

.control-bar.collapsed {
    display: none !important;
}

.expand-btn {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(20,20,30,0.85);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.expand-btn:hover {
    background: rgba(0,110,255,0.8);
    border-color: #006eff;
}

.ctrl-btn {
    width: 56px;
    height: 56px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 20px;
    cursor: pointer;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: #fff;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.ctrl-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}

.ctrl-btn.active {
    background: rgba(0,122,255,0.6);
    border-color: rgba(0,122,255,0.4);
    box-shadow: 0 4px 20px rgba(0,122,255,0.4);
}

.ctrl-btn.danger {
    background: rgba(255,59,48,0.7);
    border-color: rgba(255,59,48,0.4);
    width: 64px;
    height: 56px;
    border-radius: 20px;
    font-size: 20px;
    box-shadow: 0 4px 20px rgba(255,59,48,0.4);
}

.ctrl-btn.danger:hover {
    background: rgba(255,59,48,0.9);
    box-shadow: 0 8px 30px rgba(255,59,48,0.5);
}

.ctrl-btn .badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: #ff4d4f;
    border-radius: 50%;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.ctrl-divider {
    width: 1px;
    height: 32px;
    background: rgba(255,255,255,0.15);
    margin: 0 4px;
}

.ctrl-label {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    white-space: nowrap;
}

/* 聊天面板 */
.chat-panel {
    width: 320px;
    background: rgba(30,30,50,0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255,255,255,0.15);
    display: flex;
    flex-direction: column;
    transition: width 0.3s, margin 0.3s;
}

.chat-panel.collapsed {
    width: 0;
    overflow: hidden;
    border-left: none;
}

.chat-header {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
}

.chat-close:hover {
    color: #fff;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.system-msg {
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    padding: 4px 0;
}

.msg-bubble {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}

.msg-mine {
    align-self: flex-end;
    background: #006eff;
    color: white;
    border-bottom-right-radius: 2px;
}

.msg-other {
    align-self: flex-start;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-bottom-left-radius: 2px;
}

.msg-time {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 4px;
}

.chat-input-area {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    gap: 8px;
}

.chat-input-area input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.chat-input-area input:focus {
    border-color: #006eff;
}

.chat-input-area input::placeholder {
    color: rgba(255,255,255,0.3);
}

/* 状态提示 */
.status-toast {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    z-index: 200;
    animation: fadeInOut 2s ease;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    85% { opacity: 1; }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* ============ 响应式（手机竖屏） ============ */
@media (max-width: 768px) {
    .meeting-main {
        flex-direction: column;
    }

    .screen-area {
        flex: 1;
        min-height: 0;
    }

    .chat-panel {
        width: 100%;
        height: 35vh;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.08);
    }

    .chat-panel.collapsed {
        height: 0;
        border-top: none;
    }

    .control-bar {
        bottom: calc(35vh + 12px);
        padding: 8px 14px;
        gap: 8px;
    }

    .control-bar.chat-open {
        bottom: 12px;
    }

    .ctrl-btn {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .ctrl-btn.danger {
        width: 52px;
        height: 44px;
        font-size: 18px;
    }

    .annotation-toolbar {
        top: 50px;
        padding: 4px 6px;
    }

    .tool-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .color-btn {
        width: 18px;
        height: 18px;
    }

    .meeting-header {
        padding: 8px 12px;
    }

    .meeting-title {
        font-size: 13px;
    }

    .role-cards {
        flex-direction: column;
        align-items: center;
    }

    .role-card {
        width: 90%;
        padding: 24px 20px;
    }

    .connection-code {
        font-size: 32px;
        letter-spacing: 4px;
        padding: 14px;
    }

    .waiting-card, .join-card {
        padding: 30px 20px;
    }

    .placeholder-icon {
        font-size: 40px;
    }
}

@media (max-width: 480px) {
    .ctrl-label {
        display: none;
    }

    .meeting-code {
        display: none;
    }
}
