:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #64748b;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-light: #f8fafc;
    --text-dim: #94a3b8;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #eab308;
    --border: #334155;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

a {color: var(--primary); text-decoration: none;}
a:hover {text-decoration: underline;}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

/* --- Components --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    background: var(--primary);
    color: white;
    transition: background 0.2s;
}
.btn:hover {background: var(--primary-dark); text-decoration: none;}
.btn-danger {background: var(--danger);}
.btn-sm {padding: 0.25rem 0.5rem; font-size: 0.875rem;}
.btn-outline {background: transparent; border: 1px solid var(--border);}
.btn-outline:hover {background: var(--border);}

input, select {
    background: #020617;
    border: 1px solid var(--border);
    color: white;
    padding: 0.5rem;
    border-radius: 0.375rem;
    width: 100%;
    box-sizing: border-box;
}

/* FIX: Ensure dropdown options are readable */
option {
    background-color: white;
    color: black;
}

/* --- Status Indicators --- */
.status-dot {
    height: 10px;
    width: 10px;
    border-radius: 50%;
    display: inline-block;
    background: var(--secondary);
}
.status-dot.active {background: var(--success); box-shadow: 0 0 8px var(--success);}
.status-dot.speaking {background: var(--primary); box-shadow: 0 0 8px var(--primary);}

/* --- VU Meter --- */
.vu-meter {
    height: 6px;
    background: #333;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 1rem;
}
.vu-bar {
    height: 100%;
    width: 0%;
    background: var(--success);
    transition: width 0.05s ease-out;
}

/* --- Utilities --- */
.text-sm {font-size: 0.875rem;}
.text-dim {color: var(--text-dim);}
.flex {display: flex; gap: 0.5rem; align-items: center;}
.justify-between {justify-content: space-between;}
.mt-4 {margin-top: 1rem;}
.mb-2 {margin-bottom: 0.5rem;}

/* --- Landing Page --- */
.hero {
    text-align: center;
    padding: 4rem 1rem;
}
.hero h1 {font-size: 3rem; margin-bottom: 1rem;}

/* --- Room / Player --- */
.player-container {
    max-width: 600px;
    margin: 2rem auto;
}
.subtitle-box {
    background: black;
    color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    min-height: 150px;
    font-size: 1.5rem;
    text-align: center;
    line-height: 1.4;
    margin-top: 1rem;
}
.subtitle-interim {color: #aaa; font-style: italic;}

.room-list {list-style: none; padding: 0;}
.room-item {
    display: block;
    background: var(--bg-card);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    transition: transform 0.2s;
}
.room-item:hover {transform: translateY(-2px); border-color: var(--primary);}

/* --- Forms --- */
.inline-edit {
    background: transparent;
    border: none;
    border-bottom: 1px dashed var(--secondary);
    width: auto;
    font-weight: bold;
    padding: 0;
}
.inline-edit:focus {outline: none; border-bottom: 1px solid var(--primary);}