:root {
    --primary-color: #ffc107;
    --bg-dark: #121212;
    --bg-card: #1e1e1e;
    --text-light: #e0e0e0;
    --accent-red: #ff4d4d;
    --text-dim: #aaa;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
}

h1 { margin: 0; color: var(--primary-color); font-style: italic; font-size: 1.5rem; }
h2 { margin: 0; }
h3 { color: var(--text-light); border-left: 4px solid var(--primary-color); padding-left: 10px; margin-bottom: 15px; }

a { text-decoration: none; color: inherit; }
.back-btn { color: var(--text-dim); font-weight: bold; }
.back-btn:hover { color: var(--primary-color); }

/* Banner */
.banner {
    background: linear-gradient(45deg, #b91d1d, #f59e0b);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
    color: white;
}
.banner h2 { font-size: 1.8rem; margin-bottom: 5px; }
.banner p { margin: 0; opacity: 0.9; }

/* Live List Grid */
.live-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.live-card {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
}

.live-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.2);
}

.card-thumb {
    height: 160px;
    background-color: #333;
    position: relative;
    overflow: hidden;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-status {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-red);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.card-info {
    padding: 15px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    font-size: 0.9rem;
    color: var(--text-dim);
    display: flex;
    justify-content: space-between;
}

/* Player Page */
.player-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    margin-bottom: 20px;
}

video { width: 100%; height: 100%; object-fit: contain; }

.live-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--accent-red);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

.room-info {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.room-info h2 { font-size: 1.5rem; margin-bottom: 10px; }
.room-info .location { color: var(--primary-color); margin-bottom: 5px; }
.room-info .stats { color: var(--text-dim); }

.log-panel {
    background: #111;
    padding: 15px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.85rem;
    color: #666;
    height: 100px;
    overflow-y: auto;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Loading Spinner */
.loading-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #333;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
