/* --- HIGH-END TECH AESTHETIC --- */
:root {
    --bg-color: #030303;
    --accent-cyan: #00f2ff;
    --accent-purple: #bd00ff;
    --accent-error: #ff0055;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-dim: rgba(255, 255, 255, 0.3);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --panel-bg: rgba(10, 10, 10, 0.6);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    user-select: none;
}

/* --- UI LAYER --- */
#ui-layer {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; /* Allows click-through to 3D scene */
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px;
}

/* --- HEADER --- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.brand {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: #fff;
    text-transform: uppercase;
    mix-blend-mode: exclusion;
}

.version {
    font-size: 0.6rem;
    color: var(--accent-cyan);
    font-weight: 400;
    margin-left: 10px;
    background: rgba(0, 242, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.status-panel {
    text-align: right;
}

.status-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 5px;
}

.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background-color: #333;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.status-dot.healthy {
    background-color: #00ff88;
    box-shadow: 0 0 8px #00ff88;
}

.status-dot.busy {
    background-color: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
    animation: blink 0.5s infinite alternate;
}

.status-text {
    font-family: 'Courier Prime', monospace;
    font-size: 0.65rem;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.track-info {
    font-family: 'Courier Prime', monospace;
    font-size: 0.75rem;
    color: var(--accent-cyan);
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 5px rgba(0, 242, 255, 0.3);
}

/* --- CHAT PANEL --- */
.chat-panel {
    position: absolute;
    top: 100px;
    left: 30px;
    bottom: 120px;
    width: 320px;
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.panel-header {
    padding: 15px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--text-dim);
    text-transform: uppercase;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.2s;
}

.icon-btn:hover {
    color: var(--text-primary);
}

.chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Custom Scrollbar */
.chat-history::-webkit-scrollbar {
    width: 4px;
}
.chat-history::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 2px;
}

/* Messages */
.message {
    font-size: 0.85rem;
    line-height: 1.4;
    max-width: 90%;
    animation: fadeIn 0.3s ease;
}

.message.user {
    align-self: flex-end;
    color: var(--text-secondary);
    text-align: right;
    margin-left: auto;
}

.message.assistant {
    align-self: flex-start;
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.1);
}

.message.system {
    align-self: center;
    font-size: 0.7rem;
    color: var(--text-dim);
    font-style: italic;
    text-align: center;
    margin-top: 10px;
}

.role-label {
    font-size: 0.6rem;
    margin-bottom: 2px;
    opacity: 0.5;
    text-transform: uppercase;
}

/* --- BOTTOM BAR (Footer) --- */
.footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 20px;
    pointer-events: none;
}

/* Left: Text Input */
.footer-left {
    pointer-events: auto;
}

.input-group {
    display: flex;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 5px;
    backdrop-filter: blur(5px);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group:focus-within {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
}

#text-input {
    background: transparent;
    border: none;
    color: white;
    padding: 10px 15px;
    width: 100%;
    font-family: 'Inter', sans-serif;
    outline: none;
    font-size: 0.9rem;
}

#send-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--accent-cyan);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#send-btn:hover {
    background: var(--accent-cyan);
    color: #000;
}

/* Center: Record Button */
.footer-center {
    display: flex;
    justify-content: center;
    pointer-events: auto;
}

.main-ctrl-btn {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    outline: none;
}

.main-ctrl-btn:hover, .main-ctrl-btn.active {
    border-color: var(--accent-cyan);
    background: rgba(0, 242, 255, 0.05);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.2);
    width: 90px;
    height: 90px;
}

.main-ctrl-btn.active .mic-icon {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px var(--accent-cyan);
}

.main-ctrl-btn.activated {
    border-color: var(--accent-purple);
    background: rgba(189, 0, 255, 0.1);
    box-shadow: 0 0 30px rgba(189, 0, 255, 0.4);
    width: 90px;
    height: 90px;
}

.main-ctrl-btn.activated .mic-icon {
    color: var(--accent-purple);
    text-shadow: 0 0 10px var(--accent-purple);
}

.main-ctrl-btn.recording {
    border-color: var(--accent-error);
    background: rgba(255, 0, 85, 0.1);
    box-shadow: 0 0 30px rgba(255, 0, 85, 0.3);
    animation: pulse 1.5s infinite;
}

.mic-icon {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s;
}

.main-ctrl-btn.recording .mic-icon {
    color: var(--accent-error);
}

.btn-label {
    position: absolute;
    bottom: -25px;
    font-size: 0.6rem;
    letter-spacing: 2px;
    color: var(--text-dim);
    white-space: nowrap;
}

/* Right: Frequency Monitor */
.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
}

.monitor-label {
    font-family: 'Courier Prime', monospace;
    font-size: 0.6rem;
    color: var(--text-dim);
    margin-bottom: 5px;
    letter-spacing: 1px;
}

#mini-monitor {
    border-bottom: 1px solid var(--accent-cyan);
    border-left: 1px solid var(--glass-border);
    background: linear-gradient(to top, rgba(0, 242, 255, 0.05), transparent);
}

/* 3D Canvas */
#canvas-container {
    position: absolute;
    top: 0; left: 0;
    z-index: 1;
}

/* Animations */
@keyframes blink {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 0, 85, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(255, 0, 85, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 0, 85, 0); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .chat-panel {
        left: 0; bottom: 0; top: auto;
        width: 100%; height: 40%;
         border-radius: 12px 12px 0 0;
        background: rgba(10, 10, 10, 0.9);
    }
    .footer {
        position: absolute;
        bottom: 20px;
        width: 100%;
        padding: 0 20px;
        z-index: 20;
    }
}

/* =====================================================
   监控视频面板 - 科技感设计
   ===================================================== */

/* 监控面板容器 - 右侧悬浮 */
.monitors-container {
    position: absolute;
    top: 100px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 15;
    pointer-events: auto;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    padding-right: 10px;
}

/* 监控面板 - 科技风格 */
.monitor-panel {
    position: relative;
    background: linear-gradient(135deg, rgba(0, 20, 30, 0.85) 0%, rgba(0, 10, 20, 0.95) 100%);
    border: 1px solid rgba(0, 242, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    min-width: 380px;
}

/* 科技感角落装饰 */
.monitor-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    opacity: 0.8;
    animation: scanline 2s linear infinite;
}

.monitor-panel::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 242, 255, 0.5), transparent);
}

/* 四个角落的科技装饰 */
.monitor-corner {
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid var(--accent-cyan);
    opacity: 0.8;
}

.monitor-corner.tl { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.monitor-corner.tr { top: 8px; right: 8px; border-left: none; border-bottom: none; }
.monitor-corner.bl { bottom: 8px; left: 8px; border-right: none; border-top: none; }
.monitor-corner.br { bottom: 8px; right: 8px; border-left: none; border-top: none; }

.monitor-panel:hover {
    border-color: var(--accent-cyan);
    box-shadow: 
        0 0 30px rgba(0, 242, 255, 0.2),
        inset 0 0 30px rgba(0, 242, 255, 0.05);
    transform: translateX(-5px);
}

.monitor-panel:hover .monitor-corner {
    opacity: 1;
    border-color: var(--accent-purple);
}

/* 视频容器 */
.monitor-video-container {
    position: relative;
    width: 100%;
    height: 200px;
    background: #000;
    overflow: hidden;
}

/* 扫描线效果 */
.monitor-video-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 242, 255, 0.03) 2px,
            rgba(0, 242, 255, 0.03) 4px
        );
    pointer-events: none;
    z-index: 5;
}

/* 网格叠加效果 */
.monitor-video-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 242, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 4;
}

.monitor-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.05) saturate(1.1);
}

/* 监控信息栏 */
.monitor-info-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 36px;
    background: linear-gradient(to bottom, rgba(0, 20, 30, 0.95), rgba(0, 20, 30, 0.7));
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    z-index: 20;
    border-bottom: 1px solid rgba(0, 242, 255, 0.15);
}

.monitor-info-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 监控图标 */
.monitor-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.monitor-id {
    font-family: 'Courier Prime', monospace;
    font-size: 0.65rem;
    color: rgba(0, 242, 255, 0.6);
    letter-spacing: 2px;
}

.monitor-name {
    font-size: 0.85rem;
    color: #fff;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
}

/* 监控按钮组 */
.monitor-info-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.monitor-btn {
    background: rgba(0, 242, 255, 0.08);
    border: 1px solid rgba(0, 242, 255, 0.25);
    color: var(--accent-cyan);
    width: 26px;
    height: 26px;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.monitor-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 242, 255, 0.2), transparent);
    transition: left 0.4s ease;
}

.monitor-btn:hover::before {
    left: 100%;
}

.monitor-btn:hover {
    background: rgba(0, 242, 255, 0.2);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
    color: #fff;
}

.monitor-btn:active {
    transform: scale(0.95);
}

.monitor-btn.active {
    background: rgba(0, 242, 255, 0.3);
    border-color: var(--accent-cyan);
    color: #fff;
}

/* 状态指示器 */
.monitor-status-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 28px;
    background: linear-gradient(to top, rgba(0, 20, 30, 0.95), rgba(0, 20, 30, 0.7));
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    z-index: 20;
    border-top: 1px solid rgba(0, 242, 255, 0.15);
}

.monitor-status {
    font-family: 'Courier Prime', monospace;
    font-size: 0.6rem;
    padding: 3px 10px;
    border-radius: 2px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.monitor-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.monitor-status.status-online {
    background: rgba(0, 255, 136, 0.15);
    border: 1px solid rgba(0, 255, 136, 0.4);
    color: #00ff88;
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
}

.monitor-status.status-online::before {
    background: #00ff88;
    box-shadow: 0 0 8px #00ff88;
    animation: blink 1s ease-in-out infinite;
}

.monitor-status.status-loading {
    background: rgba(0, 242, 255, 0.15);
    border: 1px solid rgba(0, 242, 255, 0.4);
    color: var(--accent-cyan);
}

.monitor-status.status-loading::before {
    background: var(--accent-cyan);
    animation: blink 0.5s ease-in-out infinite;
}

.monitor-status.status-error {
    background: rgba(255, 0, 85, 0.15);
    border: 1px solid rgba(255, 0, 85, 0.4);
    color: var(--accent-error);
}

.monitor-status.status-error::before {
    background: var(--accent-error);
    box-shadow: 0 0 8px var(--accent-error);
    animation: blink 0.3s ease-in-out infinite;
}

.monitor-status.status-offline {
    background: rgba(128, 128, 128, 0.15);
    border: 1px solid rgba(128, 128, 128, 0.4);
    color: #808080;
}

/* 监控时间戳 */
.monitor-timestamp {
    font-family: 'Courier Prime', monospace;
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
}

/* 缓冲加载动画 */
.monitor-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 15;
}

.loading-dots {
    display: flex;
    gap: 6px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: loadPulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loadPulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.loading-text {
    font-family: 'Courier Prime', monospace;
    font-size: 0.65rem;
    color: var(--accent-cyan);
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* 动画关键帧 */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes scanline {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 监控面板动画 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.monitor-panel {
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 滚动条样式 */
.monitors-container::-webkit-scrollbar {
    width: 3px;
}

.monitors-container::-webkit-scrollbar-track {
    background: rgba(0, 242, 255, 0.05);
    border-radius: 2px;
}

.monitors-container::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-purple));
    border-radius: 2px;
}

.monitors-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--accent-purple), var(--accent-cyan));
}

/* 监控控制菜单 - 科技风格 */
.monitor-menu {
    position: absolute;
    top: 100px;
    right: 30px;
    background: linear-gradient(135deg, rgba(0, 20, 30, 0.95) 0%, rgba(0, 10, 20, 0.98) 100%);
    border: 1px solid rgba(0, 242, 255, 0.3);
    border-radius: 4px;
    padding: 0;
    z-index: 14;
    backdrop-filter: blur(15px);
    min-width: 220px;
    overflow: hidden;
}

.monitor-menu-header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 242, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.monitor-menu-header::before {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan);
    animation: pulse 2s ease-in-out infinite;
}

.monitor-menu-title {
    font-size: 0.75rem;
    color: var(--accent-cyan);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
}

.monitor-menu-item {
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 2px solid transparent;
    position: relative;
}

.monitor-menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent-cyan);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.monitor-menu-item:hover {
    background: rgba(0, 242, 255, 0.1);
    color: #fff;
    border-left-color: var(--accent-cyan);
    padding-left: 20px;
}

.monitor-menu-item:hover::before {
    transform: scaleY(1);
}

.monitor-menu-item i {
    width: 18px;
    text-align: center;
    color: var(--accent-cyan);
    font-size: 0.85rem;
}

.monitor-menu-item:hover i {
    text-shadow: 0 0 10px var(--accent-cyan);
}

.monitor-menu-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 242, 255, 0.3), transparent);
    margin: 4px 0;
}

/* 监控切换开关 */
.monitor-toggle {
    position: relative;
    width: 44px;
    height: 22px;
    background: rgba(0, 242, 255, 0.1);
    border: 1px solid rgba(0, 242, 255, 0.3);
    border-radius: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.monitor-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: var(--accent-cyan);
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px var(--accent-cyan);
}

.monitor-toggle.active {
    background: rgba(0, 242, 255, 0.3);
    border-color: var(--accent-cyan);
}

.monitor-toggle.active::after {
    left: 24px;
}

/* 监控数据指标 */
.monitor-metrics {
    display: flex;
    gap: 16px;
    padding: 8px 16px;
    border-top: 1px solid rgba(0, 242, 255, 0.15);
    background: rgba(0, 10, 20, 0.5);
}

.monitor-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.monitor-metric-label {
    font-family: 'Courier Prime', monospace;
    font-size: 0.5rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.monitor-metric-value {
    font-family: 'Courier Prime', monospace;
    font-size: 0.7rem;
    color: var(--accent-cyan);
    font-weight: 600;
}

/* 摄像头缩放级别样式 */
.zoom-fullscreen,
.fullscreen-active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 9999 !important;
    max-width: none !important;
    background: #000 !important;
}

.zoom-fullscreen .monitor-video-container {
    height: calc(100% - 120px) !important;
}

/* 全屏模式下的退出按钮提示 */
.zoom-fullscreen .monitor-info-bar,
.fullscreen-active .monitor-info-bar {
    background: rgba(0, 0, 0, 0.7) !important;
    border-bottom: 1px solid rgba(0, 242, 255, 0.5) !important;
}

/* 全屏模式退出提示 */
.zoom-fullscreen::before,
.fullscreen-active::before {
    content: 'Press ESC to exit fullscreen or click outside';
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 20, 30, 0.9);
    color: var(--accent-cyan);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.85rem;
    z-index: 10000;
    pointer-events: none;
    animation: fadeInOut 3s ease-in-out;
}

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

.zoom-large {
    position: fixed !important;
    bottom: 20px;
    right: 20px;
    width: 800px !important;
    height: 600px !important;
    z-index: 500;
    box-shadow: 0 0 50px rgba(0, 242, 255, 0.4) !important;
    border-color: var(--accent-cyan) !important;
}

.zoom-large .monitor-video-container {
    height: 520px !important;
}

.zoom-medium {
    width: 600px !important;
    height: 450px !important;
    z-index: 100;
}

.zoom-medium .monitor-video-container {
    height: 380px !important;
}

.zoom-small {
    width: 400px !important;
    height: 300px !important;
    z-index: 10;
}

.zoom-small .monitor-video-container {
    height: 240px !important;
}

.zoom-normal {
    position: relative !important;
    width: auto !important;
    height: auto !important;
    z-index: auto !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
}

.zoom-normal .monitor-video-container {
    height: 200px !important;
}

/* Markdown 样式 */
.message-content.markdown {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.message-content.markdown h1,
.message-content.markdown h2,
.message-content.markdown h3,
.message-content.markdown h4,
.message-content.markdown h5,
.message-content.markdown h6 {
    margin: 12px 0 8px 0;
    color: var(--accent-cyan);
    font-weight: 600;
}

.message-content.markdown h1 { font-size: 1.5em; }
.message-content.markdown h2 { font-size: 1.3em; }
.message-content.markdown h3 { font-size: 1.1em; }

.message-content.markdown p {
    margin: 8px 0;
}

.message-content.markdown ul,
.message-content.markdown ol {
    margin: 8px 0;
    padding-left: 24px;
}

.message-content.markdown li {
    margin: 4px 0;
}

.message-content.markdown code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier Prime', monospace;
    font-size: 0.9em;
    color: var(--accent-cyan);
}

.message-content.markdown pre {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-radius: 4px;
    padding: 12px;
    margin: 8px 0;
    overflow-x: auto;
}

.message-content.markdown pre code {
    background: none;
    padding: 0;
    display: block;
}

.message-content.markdown blockquote {
    border-left: 3px solid var(--accent-cyan);
    padding-left: 12px;
    margin: 8px 0;
    opacity: 0.8;
}

.message-content.markdown strong {
    font-weight: 600;
}

.message-content.markdown em {
    font-style: italic;
}

.message-content.markdown a {
    color: var(--accent-cyan);
    text-decoration: none;
    border-bottom: 1px dotted var(--accent-cyan);
}

.message-content.markdown a:hover {
    text-decoration: underline;
}

.message-content.markdown table {
    border-collapse: collapse;
    margin: 8px 0;
    width: 100%;
}

.message-content.markdown table td,
.message-content.markdown table th {
    border: 1px solid rgba(0, 242, 255, 0.2);
    padding: 8px;
}

.message-content.markdown table th {
    background: rgba(0, 242, 255, 0.1);
    color: var(--accent-cyan);
}

.message-content.markdown hr {
    border: none;
    border-top: 1px solid rgba(0, 242, 255, 0.2);
    margin: 12px 0;
}

.message-content.markdown img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    border-radius: 4px;
    margin: 8px 0;
    display: block;
}
