:root {
    --primary-color: #3498db;
    --bg-color: #0f172a;
    --sidebar-bg: rgba(30, 41, 59, 0.7);
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 播放器区域 */
#player-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
    position: relative;
}

.plyr {
    width: 100%;
    height: 100%;
}

/* 侧边栏设计 */
#sidebar {
    width: 350px;
    background: var(--sidebar-bg);
    backdrop-filter: blur(12px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    text-align: center;
}

.camera-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

/* 摄像头卡片 */
.camera-item {
    padding: 16px;
    margin-bottom: 12px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
}

.camera-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.camera-item.active {
    border-color: var(--primary-color);
    background: rgba(52, 152, 219, 0.1);
}

.camera-name {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.camera-info {
    font-size: 0.85rem;
    color: var(--text-dim);
    display: flex;
    justify-content: space-between;
}

/* 滚动条美化 */
.camera-list::-webkit-scrollbar {
    width: 6px;
}

.camera-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    #sidebar {
        width: 100%;
        height: 40%;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    #player-container {
        height: 60%;
    }
}