* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a2e;
    color: #eee;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    padding: 1rem;
    background: #16213e;
    border-bottom: 2px solid #0f3460;
}

header h1 {
    font-size: 1.8rem;
    color: #e0e0e0;
}

/* Navigation */
nav {
    margin-top: 0.5rem;
}

.nav-link {
    display: inline-block;
    padding: 0.4rem 1rem;
    margin: 0 0.25rem;
    color: #aaa;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s;
}

.nav-link:hover {
    background: #0f3460;
    color: #eee;
}

.nav-link.active {
    background: #0f3460;
    color: #e94560;
    font-weight: 600;
}

/* Detected language badge */
.detected-lang {
    font-size: 0.8rem;
    color: #4ec9b0;
    font-weight: 400;
}

main {
    flex: 1;
    display: flex;
    gap: 1rem;
    padding: 1rem;
}

/* Speaker panels side by side */
.speaker-panel {
    flex: 1;
    background: #16213e;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 2px solid #0f3460;
}

.panel-header {
    padding: 1rem;
    background: #0f3460;
}

.panel-header h2 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: #e94560;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.controls label {
    font-size: 0.9rem;
    color: #ccc;
}

.lang-select {
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    border: 1px solid #444;
    background: #1a1a2e;
    color: #eee;
    font-size: 0.9rem;
}

.mic-btn {
    padding: 0.5rem 1.2rem;
    border: none;
    border-radius: 8px;
    background: #28a745;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.mic-btn:hover {
    background: #218838;
}

.mic-btn.active {
    background: #dc3545;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Transcript area */
.transcript-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
    overflow-y: auto;
}

.transcript-block {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.transcript-block h3 {
    font-size: 0.95rem;
    color: #aaa;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.transcript-block.translation h3 {
    color: #e94560;
}

.transcript-text {
    flex: 1;
    background: #111;
    border-radius: 8px;
    padding: 1rem;
    font-size: 1.6rem;
    line-height: 1.5;
    overflow-y: auto;
    min-height: 120px;
}

.transcript-block.translation .transcript-text {
    font-size: 2rem;
    font-weight: 600;
    color: #ffd700;
}

/* Status bar */
.status {
    padding: 0.5rem 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: #888;
    border-top: 1px solid #0f3460;
}

/* Footer */
footer {
    text-align: center;
    padding: 0.75rem;
    background: #16213e;
    border-top: 2px solid #0f3460;
}

.clear-btn {
    padding: 0.5rem 2rem;
    border: 1px solid #555;
    border-radius: 8px;
    background: transparent;
    color: #ccc;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.clear-btn:hover {
    background: #333;
}

/* Interim (partial) text styling */
.interim {
    color: #888;
    font-style: italic;
}

/* Unified page config bar */
.unified-config {
    padding: 1rem;
    background: #16213e;
    border-bottom: 2px solid #0f3460;
    text-align: center;
}

.unified-config .controls {
    justify-content: center;
}
