/* 
 * Normalized CSS for Debate Moderator 
 * Auto-extracted from app.html
 */

:root {
    --font-primary: 'Montserrat', 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Courier New', monospace;
    --bg-main: #121212;
    --bg-panel: #1a1a1a;
    --bg-card: #1e1e1e;
    --accent-blue: #4dadff;
    --text-main: #e0e0e0;
    --text-muted: #888;
    --text-subtle: #aaa;
    --border-color: #333;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-primary);
    overflow: hidden;
}

/* --- Extracted Inline Styles --- */
#timer-wrapper {
    background: #121212;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Montserrat', 'Segoe UI', Roboto, sans-serif;
    transition: all 0.3s ease;
    height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

#top-bar {
    width: 100%;
    background: #1a1a1a;
    padding: 15px 30px;
    border-bottom: 2px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 150 !important;
    box-sizing: border-box;
}

.auto-style-1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    margin-left: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.auto-style-1:hover {
    transform: scale(1.05);
}

.auto-style-2 {
    max-height: 40px;
    margin-bottom: 5px;
}

.auto-style-3 {
    font-weight: bold;
    color: #4dadff;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 2px;
    text-align: center;
}

#topic-display-area {
    text-align: right;
    flex-grow: 1;
    margin-left: 40px;
    margin-right: 10px;
}

.auto-style-4 {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 3px;
    letter-spacing: 1px;
}

#live-topic-text {
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    line-height: 1.1;
    border-right: 6px solid #4dadff;
    padding-right: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

#phase-info {
    font-size: 14px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: none;
    margin-top: 8px;
    padding-right: 15px;
}

#speaker-name {
    color: #4dadff;
    font-weight: bold;
}

#middle-section {
    flex: 1;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 20px;
    box-sizing: border-box;
}

/* Luxury Broadcast Overlays: Time's Up & Session Concluded */
#alarm-overlay,
#completion-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, rgba(14, 18, 28, 0.88) 0%, rgba(6, 8, 12, 0.96) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 9998;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    padding: 24px;
}

#alarm-overlay {
    background: radial-gradient(circle at center, rgba(42, 10, 16, 0.9) 0%, rgba(8, 9, 14, 0.97) 100%);
}

.overlay-stage-card {
    width: 100%;
    max-width: 580px;
    background: linear-gradient(165deg, rgba(24, 28, 40, 0.95) 0%, rgba(12, 14, 20, 0.98) 100%);
    border-radius: 28px;
    padding: 38px 34px 32px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: overlay-card-appear 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes overlay-card-appear {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#alarm-overlay .overlay-stage-card {
    border: 1px solid rgba(255, 82, 82, 0.35);
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.75), 0 0 50px rgba(255, 82, 82, 0.25), inset 0 1px 0 rgba(255, 82, 82, 0.2);
    animation: overlay-card-appear 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards, alarm-card-pulse 2s infinite alternate ease-in-out;
}

#completion-overlay .overlay-stage-card {
    border: 1px solid rgba(77, 173, 255, 0.35);
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.75), 0 0 50px rgba(77, 173, 255, 0.22), inset 0 1px 0 rgba(77, 173, 255, 0.2);
}

@keyframes alarm-card-pulse {
    from {
        border-color: rgba(255, 82, 82, 0.35);
        box-shadow: 0 25px 65px rgba(0, 0, 0, 0.75), 0 0 35px rgba(255, 82, 82, 0.2);
    }
    to {
        border-color: rgba(255, 82, 82, 0.65);
        box-shadow: 0 25px 65px rgba(0, 0, 0, 0.75), 0 0 65px rgba(255, 82, 82, 0.45);
    }
}

.overlay-beacon-badge {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 18px;
    box-sizing: border-box;
}

.alarm-beacon {
    background: radial-gradient(circle, rgba(255, 82, 82, 0.25) 0%, rgba(255, 82, 82, 0.05) 100%);
    border: 1.5px solid rgba(255, 82, 82, 0.5);
    box-shadow: 0 0 25px rgba(255, 82, 82, 0.4);
    animation: beacon-wiggle 1.2s infinite ease-in-out;
}

@keyframes beacon-wiggle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.completion-beacon {
    background: radial-gradient(circle, rgba(77, 173, 255, 0.25) 0%, rgba(77, 173, 255, 0.05) 100%);
    border: 1.5px solid rgba(77, 173, 255, 0.5);
    box-shadow: 0 0 25px rgba(77, 173, 255, 0.4);
}

.overlay-headline {
    font-size: clamp(32px, 5vw, 44px);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    line-height: 1.1;
    margin-bottom: 10px;
}

.overlay-subline {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
    letter-spacing: 0.5px;
    max-width: 440px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.overlay-action-row {
    display: flex;
    gap: 12px;
    width: 100%;
    justify-content: center;
}

@media (max-width: 600px) or (max-height: 600px) {
    .overlay-stage-card {
        padding: 24px 20px 20px !important;
        border-radius: 20px !important;
        max-width: 92% !important;
    }
    .overlay-beacon-badge {
        width: 50px !important;
        height: 50px !important;
        font-size: 24px !important;
        margin-bottom: 12px !important;
    }
    .overlay-headline {
        font-size: 26px !important;
        margin-bottom: 6px !important;
    }
    .overlay-subline {
        font-size: 12px !important;
        margin-bottom: 16px !important;
    }
    .overlay-action-row {
        flex-direction: column !important;
        gap: 8px !important;
    }
}

#timer-container {
    flex: 1 1 25vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 0;
    gap: 14px;
}

/* Timer Stage & 3 Configurable Sizes */
.timer-stage-card {
    position: relative;
    width: 100%;
    background: radial-gradient(120% 120% at 50% 30%, rgba(20, 24, 33, 0.88) 0%, rgba(9, 11, 16, 0.96) 100%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    box-sizing: border-box;
    overflow: visible;
    z-index: 2;
    transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-radius 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Large (Default on Desktop) */
.timer-stage-card.timer-size-large {
    max-width: 880px;
    height: 340px;
    border-radius: 48px;
    padding: 20px 32px;
}
.timer-stage-card.timer-size-large #timer-display {
    font-size: clamp(75px, min(18vh, 14vw), 150px);
}
.timer-stage-card.timer-size-large #rf-timer-left,
.timer-stage-card.timer-size-large #rf-timer-right {
    font-size: clamp(48px, min(11vh, 8vw), 72px);
}
.timer-stage-card.timer-size-large #rf-vs-container {
    max-width: 680px;
    gap: 36px;
    margin-bottom: 14px;
}
.timer-stage-card.timer-size-large #turn-badge {
    min-width: 155px;
    padding: 18px 24px 20px;
    border-radius: 0 26px 26px 0;
}
.timer-stage-card.timer-size-large #turn-badge-label {
    font-size: 16px;
    letter-spacing: 3px;
}
.timer-stage-card.timer-size-large #turn-val-display {
    font-size: clamp(56px, 8vw, 88px);
    margin: 2px 0 6px;
}
.timer-stage-card.timer-size-large .turn-adj-btn {
    width: 32px;
    height: 32px;
    font-size: 20px;
}

/* Medium (Default on Medium screens) */
.timer-stage-card.timer-size-medium {
    max-width: 660px;
    height: 250px;
    border-radius: 36px;
    padding: 16px 26px;
}
.timer-stage-card.timer-size-medium #timer-display {
    font-size: clamp(52px, min(14vh, 9.5vw), 102px);
}
.timer-stage-card.timer-size-medium #rf-timer-left,
.timer-stage-card.timer-size-medium #rf-timer-right {
    font-size: clamp(34px, min(8vh, 5.5vw), 50px);
}
.timer-stage-card.timer-size-medium #rf-vs-container {
    max-width: 520px;
    gap: 24px;
    margin-bottom: 8px;
}
.timer-stage-card.timer-size-medium #turn-badge {
    min-width: 125px;
    padding: 14px 18px 16px;
    border-radius: 0 22px 22px 0;
}
.timer-stage-card.timer-size-medium #turn-badge-label {
    font-size: 14px;
    letter-spacing: 2px;
}
.timer-stage-card.timer-size-medium #turn-val-display {
    font-size: clamp(42px, 6vw, 58px);
    margin: 2px 0 5px;
}
.timer-stage-card.timer-size-medium .turn-adj-btn {
    width: 26px;
    height: 26px;
    font-size: 16px;
}

/* Small (Default on Small screens) */
.timer-stage-card.timer-size-small {
    max-width: 440px;
    height: 175px;
    border-radius: 26px;
    padding: 10px 18px;
}
.timer-stage-card.timer-size-small #timer-display {
    font-size: clamp(36px, min(9vh, 6.5vw), 66px);
}
.timer-stage-card.timer-size-small #rf-timer-left,
.timer-stage-card.timer-size-small #rf-timer-right {
    font-size: clamp(24px, min(5.5vh, 4vw), 34px);
}
.timer-stage-card.timer-size-small #rf-vs-container {
    max-width: 360px;
    gap: 16px;
    margin-bottom: 4px;
}
.timer-stage-card.timer-size-small #rf-switch-btn {
    padding: 8px 24px;
    font-size: 14px;
    margin-bottom: 4px;
}
.timer-stage-card.timer-size-small #turn-badge {
    min-width: 95px;
    padding: 9px 12px 10px;
    border-radius: 0 18px 18px 0;
}
.timer-stage-card.timer-size-small #turn-badge-label {
    font-size: 12px;
    letter-spacing: 1.5px;
}
.timer-stage-card.timer-size-small #turn-val-display {
    font-size: clamp(28px, 4.5vw, 38px);
    margin: 1px 0 4px;
}
.timer-stage-card.timer-size-small .turn-adj-btn {
    width: 22px;
    height: 22px;
    font-size: 14px;
}

/* Timer Size Switcher Bar */
.timer-size-selector {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: rgba(14, 18, 26, 0.75);
    border: 1px solid rgba(77, 173, 255, 0.25);
    border-radius: 18px;
    padding: 3px 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin: 8px auto 2px auto;
    z-index: 5;
    transition: all 0.25s ease;
}

.timer-size-btn {
    width: 28px;
    height: 24px;
    border-radius: 12px;
    background: transparent;
    border: 1px solid transparent;
    color: #8da4be;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.timer-size-btn:hover {
    color: #ffffff;
    background: rgba(77, 173, 255, 0.15);
    border-color: rgba(77, 173, 255, 0.35);
}

.timer-size-btn.active {
    background: linear-gradient(135deg, #4dadff 0%, #1976d2 100%);
    color: #ffffff;
    border-color: #4dadff;
    box-shadow: 0 0 10px rgba(77, 173, 255, 0.55);
}

.timer-ring-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: visible;
}

.timer-ring-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 8px;
    stroke-linejoin: round;
}

.timer-ring-progress {
    fill: none;
    stroke: #4dadff;
    stroke-width: 8px;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 16px rgba(77, 173, 255, 0.85)) drop-shadow(0 0 32px rgba(77, 173, 255, 0.5));
    transition: stroke 0.4s ease, filter 0.4s ease;
}

.timer-ring-progress.state-warning,
.timer-ring-progress.timer-ring-amber {
    stroke: #ffb300 !important;
    filter: drop-shadow(0 0 16px rgba(255, 179, 0, 0.85)) drop-shadow(0 0 32px rgba(255, 179, 0, 0.5)) !important;
}

.timer-ring-progress.state-critical,
.timer-ring-progress.timer-ring-crimson {
    stroke: #ff5252 !important;
    filter: drop-shadow(0 0 18px rgba(255, 82, 82, 0.95)) drop-shadow(0 0 36px rgba(255, 82, 82, 0.6)) !important;
    animation: ring-pulse 1s infinite alternate ease-in-out;
}

@keyframes ring-pulse {
    from {
        filter: drop-shadow(0 0 10px rgba(255, 82, 82, 0.7)) drop-shadow(0 0 20px rgba(255, 82, 82, 0.4));
        opacity: 0.92;
    }
    to {
        filter: drop-shadow(0 0 22px rgba(255, 82, 82, 1)) drop-shadow(0 0 44px rgba(255, 82, 82, 0.8));
        opacity: 1;
    }
}

#timer-center-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 36px;
    width: 100%;
    z-index: 2;
    transition: gap 0.3s ease;
}

#timer-display {
    font-weight: bold;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 25px rgba(77, 173, 255, 0.55);
    transition: color 0.3s ease, text-shadow 0.3s ease;
    font-size: clamp(75px, min(18vh, 14vw), 160px);
    line-height: 1;
    user-select: none;
}

#rapid-fire-container {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

#rf-vs-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    width: 100%;
    max-width: 720px;
    margin-bottom: 16px;
    margin-top: 10px;
}

.auto-style-9 {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auto-style-10 {
    font-size: 15px;
    color: #888;
    font-weight: bold;
    margin-bottom: 6px;
    letter-spacing: 1.5px;
}

#rf-timer-left {
    font-weight: bold;
    font-family: 'Courier New', monospace;
    color: #4dadff;
    text-shadow: 0 0 12px rgba(77, 173, 255, 0.5);
    transition: opacity 0.2s, color 0.3s;
}

.auto-style-11 {
    font-size: 32px;
    font-weight: 900;
    color: #444;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 20px;
}

.auto-style-12 {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auto-style-13 {
    font-size: 15px;
    color: #888;
    font-weight: bold;
    margin-bottom: 6px;
    letter-spacing: 1.5px;
}

#rf-timer-right {
    font-weight: bold;
    font-family: 'Courier New', monospace;
    color: #4dadff;
    text-shadow: 0 0 12px rgba(77, 173, 255, 0.5);
    transition: opacity 0.2s, color 0.3s;
}

#rf-switch-btn {
    background: #1976d2;
    color: white;
    border: none;
    padding: 12px 36px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(25, 118, 210, 0.4);
    text-transform: uppercase;
    transition: transform 0.1s;
    margin-bottom: 10px;
}

/* Luxury Broadcast Turn Counter Badge (Attached Right-Side Tab) */
#turn-badge {
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%) translateX(-100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.28s ease,
                visibility 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(130% 130% at 50% 20%, rgba(26, 33, 46, 0.96) 0%, rgba(12, 15, 22, 0.98) 100%);
    border: 1.5px solid rgba(77, 173, 255, 0.45);
    border-left: none;
    border-radius: 0 24px 24px 0;
    padding: 18px 24px 20px;
    box-shadow: 12px 0 35px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 24px rgba(77, 173, 255, 0.2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-sizing: border-box;
    user-select: none;
    min-width: 155px;
    flex-shrink: 0;
}

#turn-badge.open {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#turn-badge:hover {
    border-color: rgba(77, 173, 255, 0.7);
    box-shadow: 16px 0 42px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 0 32px rgba(77, 173, 255, 0.35);
}

#turn-badge-label {
    font-family: 'Montserrat', 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #4dadff;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(77, 173, 255, 0.45);
    margin-bottom: 2px;
    line-height: 1.2;
}

#turn-val-display {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: clamp(56px, min(12vh, 8.5vw), 92px);
    line-height: 1;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(77, 173, 255, 0.65), 0 0 35px rgba(77, 173, 255, 0.3);
    text-align: center;
    margin: 2px 0 6px;
    letter-spacing: 1px;
}

#turn-quick-adjust {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.turn-adj-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(77, 173, 255, 0.1);
    border: 1px solid rgba(77, 173, 255, 0.38);
    color: #4dadff;
    font-family: 'Montserrat', 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
    line-height: 1;
    padding: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.turn-adj-btn:hover {
    background: rgba(77, 173, 255, 0.28);
    border-color: #4dadff;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(77, 173, 255, 0.5);
    transform: scale(1.08);
}

.turn-adj-btn:active {
    transform: scale(0.92);
    background: rgba(77, 173, 255, 0.45);
}

#controls-area {
    flex-shrink: 0;
    width: 100%;
    max-width: 500px;
    background: radial-gradient(120% 120% at 50% 30%, rgba(20, 24, 33, 0.88) 0%, rgba(9, 11, 16, 0.96) 100%);
    padding: 9px 13px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-sizing: border-box;
    z-index: 5;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.controls-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

.controls-row:not(:last-child) {
    margin-bottom: 7px;
}

.ctrl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 15px;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    user-select: none;
    outline: none;
}

.ctrl-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, transparent 60%);
    opacity: 0.8;
    pointer-events: none;
}

.ctrl-btn:hover {
    transform: translateY(-1.5px);
    filter: brightness(1.1);
}

.ctrl-btn:active {
    transform: translateY(1px) scale(0.98);
    filter: brightness(0.95);
}

.ctrl-btn-blue {
    background: linear-gradient(180deg, #1e88e5 0%, #1565c0 100%);
    color: #ffffff;
    border-color: rgba(66, 165, 245, 0.45);
    box-shadow: 0 4px 14px rgba(21, 101, 192, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.ctrl-btn-red {
    background: linear-gradient(180deg, #e53935 0%, #c62828 100%);
    color: #ffffff;
    border-color: rgba(239, 83, 80, 0.45);
    box-shadow: 0 4px 14px rgba(198, 40, 40, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.ctrl-btn-start {
    background: linear-gradient(180deg, #43a047 0%, #2e7d32 100%);
    color: #ffffff;
    border-color: rgba(102, 187, 106, 0.45);
    box-shadow: 0 4px 14px rgba(46, 125, 50, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.ctrl-btn-start.is-paused {
    background: linear-gradient(180deg, #f57c00 0%, #e65100 100%) !important;
    border-color: rgba(255, 152, 0, 0.5) !important;
    box-shadow: 0 4px 14px rgba(230, 81, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.ctrl-btn-reset {
    background: linear-gradient(180deg, #374151 0%, #1f2937 100%);
    color: #e5e7eb;
    border-color: rgba(107, 114, 128, 0.35);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.ctrl-icon-arrow {
    font-size: 28px;
    font-weight: 900;
    line-height: 0.8;
    opacity: 0.95;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
}

.ctrl-btn:hover .ctrl-icon-arrow {
    transform: scale(1.18);
}

#bottom-dock {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    pointer-events: auto;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-dock {
    display: flex;
    align-items: center;
    background: rgba(18, 20, 26, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    padding: 6px 12px;
    gap: 6px;
}

.dock-btn {
    background: transparent;
    border: none;
    color: #e0e0e0;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
    outline: none;
}

.dock-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.dock-btn:active {
    transform: scale(0.96);
}

.dock-btn-danger:hover {
    background: rgba(211, 47, 47, 0.2);
    color: #ff5252;
}

.dock-divider {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.15);
}

.hotkey-badge {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 10px;
    font-family: monospace;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    letter-spacing: 0;
}

#hotkeys-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    padding: 20px;
}

.hotkeys-card {
    background: #16181d;
    border: 1px solid #333842;
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hotkeys-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #282a30;
    padding-bottom: 12px;
}

.hotkeys-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.hotkey-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1f2229;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #2d313b;
}

.hotkey-desc {
    font-size: 13px;
    color: #ccc;
    font-weight: 500;
}

.hotkey-key {
    background: #2b303c;
    border: 1px solid #454d5e;
    color: #4dadff;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 11px;
    font-family: monospace;
    font-weight: bold;
    box-shadow: 0 2px 0 #151820;
}

.config-accordion {
    background: #151619;
    border: 1px solid #28292d;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.config-accordion:hover {
    border-color: #383a42;
}

.config-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #181a1e;
    cursor: pointer;
    user-select: none;
    font-size: 12px;
    font-weight: 800;
    color: #e0e0e0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: background 0.15s ease, color 0.15s ease;
}

.config-accordion-header:hover {
    background: #202228;
    color: #ffffff;
}

.config-accordion-chevron {
    font-size: 11px;
    color: #4dadff;
    transition: transform 0.2s ease;
}

.config-accordion.open .config-accordion-chevron {
    transform: rotate(180deg);
}

.config-accordion-body {
    display: none;
    padding: 14px;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid #222;
    background: #111215;
}

.config-accordion.open .config-accordion-body {
    display: flex;
}

/* Master Mute Toggle Button */
.mute-btn-small {
    background: #2a2a2a;
    color: #4dadff;
    border: 1px solid #4dadff;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mute-btn-small:hover {
    background: #4dadff;
    color: #000;
}

.mute-btn-small.is-muted {
    background: rgba(211, 47, 47, 0.2);
    border-color: #ff5252;
    color: #ff5252;
}

#timer-wrapper.pseudo-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
}

.auto-style-47 {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    margin-top: 2px;
}

.auto-style-48 {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}
.auto-style-48:hover {
    color: #fff;
}

#confirm-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    z-index: 200;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    border-radius: 16px;
}

#confirm-text {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 30px;
    max-width: 80%;
    line-height: 1.4;
}

.auto-style-49 {
    display: flex;
    gap: 20px;
}

.auto-style-50 {
    background: #d32f2f;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
}

.auto-style-51 {
    background: #444;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
}


/* --- Index.html Styles --- */
.splash-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-y: auto;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s ease;
}
.logo:hover {
    transform: scale(1.05);
}
.logo img {
    height: 40px;
    margin-right: 10px;
}
.logo span {
    font-weight: bold;
    color: var(--accent-blue);
    letter-spacing: 2px;
}
.nav-links {
    display: flex;
    gap: 20px;
}
.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.2s ease;
}
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-blue);
    transition: width 0.3s ease;
}
.nav-links a:hover {
    color: var(--accent-blue);
}
.nav-links a:hover::after {
    width: 100%;
}

/* Mobile Collapsible Navigation Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1010;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 768px) {
    nav {
        padding: 15px 20px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background: rgba(18, 18, 18, 0.98);
        backdrop-filter: blur(20px);
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 35px;
        padding: 40px;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1005;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        font-size: 1.2rem;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
        background-color: var(--accent-blue);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
        background-color: var(--accent-blue);
    }
}

main {
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
}

.hero {
    text-align: center;
    padding: 30px 0 60px;
}
.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #fff, var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p {
    font-size: 1.2rem;
    color: var(--text-subtle);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    background: linear-gradient(135deg, var(--accent-blue), #1976d2);
    color: #fff;
    padding: 15px 35px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 8px;
    text-transform: uppercase;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(77, 173, 255, 0.4);
}
.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(77, 173, 255, 0.6);
}

.app-preview {
    margin-top: 50px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 2px rgba(77, 173, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.app-preview:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), 0 0 10px rgba(77, 173, 255, 0.6);
}
.app-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 80px;
    scroll-margin-top: 100px;
}
.feature-card {
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(5px);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
    background: rgba(40, 40, 40, 0.8);
}
.feature-card h3 {
    color: var(--accent-blue);
    margin-top: 0;
}

.how-it-works {
    margin: 80px 0;
    text-align: center;
    scroll-margin-top: 100px;
}
.how-it-works h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
}
.steps-container {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}
.step {
    flex: 1;
    min-width: 250px;
    background: var(--bg-card);
    padding: 40px 30px;
    border-radius: 12px;
    position: relative;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}
.step:hover {
    border-color: var(--accent-blue);
}
.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--accent-blue);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 0 0 15px rgba(77, 173, 255, 0.5);
}
.step h4 {
    margin-top: 10px;
    color: #fff;
    font-size: 1.2rem;
}
.step p {
    color: var(--text-subtle);
    font-size: 0.95rem;
}

.cta-bottom {
    text-align: center;
    padding: 60px 0;
    background: rgba(77, 173, 255, 0.05);
    border-radius: 16px;
    margin-top: 80px;
    border: 1px solid rgba(77, 173, 255, 0.1);
}
.cta-bottom h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}
.cta-bottom p {
    color: var(--text-subtle);
    margin-bottom: 30px;
}

/* Live Sessions Banner Styling */
.live-sessions-banner {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.6) 0%, rgba(13, 27, 42, 0.6) 100%);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(77, 173, 255, 0.15);
    border-radius: 16px;
    padding: 50px 40px;
    margin: 80px auto;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 15px rgba(77, 173, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.live-sessions-banner:hover {
    transform: translateY(-4px);
    border-color: rgba(77, 173, 255, 0.35);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5), 0 0 25px rgba(77, 173, 255, 0.2);
}

.live-sessions-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(77, 173, 255, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

.live-sessions-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.live-badge {
    background: rgba(77, 173, 255, 0.15);
    color: var(--accent-blue);
    border: 1px solid rgba(77, 173, 255, 0.3);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-transform: uppercase;
    box-shadow: 0 0 15px rgba(77, 173, 255, 0.1);
    animation: live-glow 2s infinite alternate;
}

@keyframes live-glow {
    0% { box-shadow: 0 0 5px rgba(77, 173, 255, 0.1); border-color: rgba(77, 173, 255, 0.3); }
    100% { box-shadow: 0 0 20px rgba(77, 173, 255, 0.3); border-color: rgba(77, 173, 255, 0.6); }
}

.live-sessions-banner h2 {
    font-size: 2.2rem;
    color: #fff;
    margin: 0 0 15px 0;
    font-weight: bold;
    letter-spacing: 1px;
}

.live-schedule {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 30px;
}

.live-schedule span {
    color: var(--accent-blue);
    font-weight: 800;
    text-shadow: 0 0 10px rgba(77, 173, 255, 0.3);
}

.live-platform {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 35px;
    text-align: left;
    max-width: 600px;
    transition: background 0.3s ease;
}

.live-platform:hover {
    background: rgba(255, 255, 255, 0.06);
}

.platform-icon {
    font-size: 2.5rem;
    margin-right: 20px;
    filter: drop-shadow(0 0 8px rgba(77, 173, 255, 0.4));
}

.platform-details {
    display: flex;
    flex-direction: column;
}

.platform-details strong {
    font-size: 1.15rem;
    color: #fff;
    margin-bottom: 5px;
}

.platform-details span {
    font-size: 0.95rem;
    color: var(--text-subtle);
    line-height: 1.4;
}

@media (max-width: 768px) {
    .live-sessions-banner {
        padding: 40px 20px;
    }
    .live-sessions-banner h2 {
        font-size: 1.8rem;
    }
    .live-schedule {
        font-size: 1.1rem;
    }
    .live-platform {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }
    .platform-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
}


@keyframes pulse-anim {
    0% { transform: scale(1); box-shadow: 0 4px 15px rgba(77, 173, 255, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 6px 25px rgba(77, 173, 255, 0.7); }
    100% { transform: scale(1); box-shadow: 0 4px 15px rgba(77, 173, 255, 0.4); }
}
.pulse-btn {
    animation: pulse-anim 2s infinite;
}

footer {
    text-align: center;
    padding: 20px 40px;
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    bottom: 0;
    z-index: 1000;
}
.footer-logo img {
    height: 30px;
    margin-bottom: 10px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}
.footer-logo img:hover {
    opacity: 1;
}
.footer-text {
    color: var(--text-muted);
    font-size: 0.85rem;
}
.footer-text a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-text a:hover {
    color: #fff;
}

/* --- Original Embedded Styles --- */
/* Custom Scrollbar Styling */
        #middle-section::-webkit-scrollbar {
            width: 8px;
        }

        #middle-section::-webkit-scrollbar-track {
            background: #1a1a1a;
            border-radius: 4px;
        }

        #middle-section::-webkit-scrollbar-thumb {
            background: #4dadff;
            border-radius: 4px;
            border: 2px solid #1a1a1a;
        }

        #middle-section::-webkit-scrollbar-thumb:hover {
            background: #6ebfff;
        }

        /* Firefox Support */
        #middle-section {
            scrollbar-width: thin;
            scrollbar-color: #4dadff #1a1a1a;
        }

        /* Config Panel Scrollbar Styling */
        #config-scroll-container::-webkit-scrollbar {
            width: 6px;
        }

        #config-scroll-container::-webkit-scrollbar-track {
            background: #121212;
        }

        #config-scroll-container::-webkit-scrollbar-thumb {
            background: #333;
            border-radius: 3px;
        }

        #config-scroll-container::-webkit-scrollbar-thumb:hover {
            background: #4dadff;
        }

        #config-scroll-container {
            scrollbar-width: thin;
            scrollbar-color: #333 #121212;
        }

        #live-topic-text {
            font-size: clamp(20px, min(4vh, 3vw), 40px);
        }

        #timer-display {
            font-size: clamp(90px, min(20vh, 16vw), 165px);
            line-height: 1;
            user-select: none;
        }

        #rf-timer-left,
        #rf-timer-right {
            font-size: clamp(52px, min(11vh, 9vw), 78px);
            line-height: 1;
            user-select: none;
        }

        #turn-val-display {
            font-size: clamp(50px, min(12vh, 12vw), 200px);
            line-height: 1;
        }

        @media (max-width: 768px) {
            #timer-wrapper {
                min-height: 0 !important;
                height: 100vh !important;
                max-height: 100% !important;
                border-radius: 0 !important;
            }

            #top-bar {
                flex-direction: column !important;
                align-items: flex-start !important;
                padding: 10px 15px !important;
            }

            #topic-display-area {
                margin-left: 0 !important;
                margin-top: 10px !important;
                width: 100%;
                text-align: right !important;
            }

            #bottom-buttons {
                flex-direction: column !important;
                align-items: center !important;
                gap: 15px;
            }

            #reset-btns-container {
                justify-content: center;
                width: 100%;
            }

            #rf-vs-container {
                flex-direction: column !important;
                gap: 10px !important;
                margin-bottom: 30px !important;
            }

            #rf-vs-container>div:nth-child(2) {
                margin: 10px 0 !important;
            }

            #fluid-controls {
                flex-direction: column;
            }

            #config-bottom-row {
                flex-direction: column !important;
                gap: 20px !important;
            }

            #timer-container {
                flex-direction: column !important;
                align-items: center !important;
                justify-content: center !important;
                flex: 1 1 auto !important;
            }

            #controls-area {
                margin-top: auto !important;
                margin-bottom: 0 !important;
            }

            .timer-stage-card {
                margin: 0 auto !important;
                max-width: 96% !important;
                height: clamp(150px, 22vh, 215px) !important;
                border-radius: 28px !important;
                padding: 10px 18px !important;
            }

            #timer-display {
                font-size: clamp(48px, 11vh, 80px) !important;
            }

            #turn-badge {
                left: 100% !important;
                top: 50% !important;
                bottom: auto !important;
                transform: translateY(-50%) translateX(-100%) !important;
            }

            #turn-badge.open {
                transform: translateY(-50%) translateX(0) !important;
                opacity: 1 !important;
                visibility: visible !important;
                pointer-events: auto !important;
            }

            #middle-section {
                overflow-y: auto !important;
            }

            #rf-vs-container {
                margin-top: 15px !important;
            }

            #rf-switch-btn {
                margin-bottom: 30px !important;
            }
        }

        /* Height-based scaling for landscape phones */
        @media (max-height: 500px) {
            #timer-wrapper {
                min-height: 0 !important;
                height: 100vh !important;
                border-radius: 0 !important;
            }

            #top-bar {
                padding: 5px 15px !important;
                flex-direction: row !important;
                flex-shrink: 0 !important; /* Never hide header */
            }

            #top-bar img {
                max-height: 25px !important;
            }

            #top-bar span {
                font-size: 7px !important;
            }

            #topic-display-area {
                margin-top: 0 !important;
                margin-left: 20px !important;
            }

            #live-topic-text {
                font-size: 14px !important;
            }

            #middle-section {
                padding: 5px 10px !important;
                overflow-y: auto !important;
                min-height: 0 !important; /* Allow shrinking */
                flex: 1 1 auto !important;
            }

            #timer-display {
                font-size: clamp(40px, 40vh, 90px) !important;
            }

            #rf-timer-left, #rf-timer-right {
                font-size: clamp(35px, 35vh, 70px) !important;
            }

            #timer-container {
                margin: 5px 0 !important;
                flex: 0 0 auto !important;
            }

            #controls-area {
                padding: 10px !important;
                margin-bottom: 5px !important;
                width: 95% !important;
                max-width: 500px !important;
                flex-shrink: 0 !important; /* Keep controls visible */
            }

            .push-btn-large {
                padding: 6px 10px !important;
                font-size: 13px !important;
            }

            #bottom-bar {
                padding: 5px 10px 10px !important; /* Added 10px bottom padding */
                flex-shrink: 0 !important; /* Never hide footer */
            }

            #bottom-buttons {
                flex-direction: row !important;
                justify-content: center !important;
                gap: 15px !important;
            }

            #bottom-buttons button {
                padding: 4px 8px !important;
                font-size: 11px !important;
            }
        }

        @media (max-width: 960px) {
            #size-btn-l {
                display: none !important;
            }

            #controls-area {
                max-width: 92% !important;
                padding: 8px 12px !important;
            }

            .ctrl-btn {
                padding: 8px 12px !important;
                font-size: 12px !important;
            }
        }

        @media (max-width: 640px) {
            .timer-size-selector {
                display: none !important;
            }

            .timer-stage-card {
                max-width: min(320px, calc(100vw - 160px)) !important;
                height: clamp(140px, 20vh, 175px) !important;
                border-radius: 24px !important;
                padding: 8px 14px !important;
            }

            #timer-display {
                font-size: clamp(34px, 9vh, 58px) !important;
            }

            /* Adjust dock to two rows on small screens to avoid clipping */
            #bottom-dock {
                bottom: 8px !important;
                max-width: 98vw !important;
            }

            .floating-dock {
                flex-wrap: wrap !important;
                justify-content: center !important;
                border-radius: 20px !important;
                padding: 6px 10px !important;
                gap: 5px 6px !important;
                max-width: 96vw !important;
            }

            .dock-divider {
                display: none !important;
            }

            .dock-btn {
                padding: 5px 8px !important;
                font-size: 11px !important;
            }
        }

        @media (max-height: 700px) {
            .timer-stage-card {
                height: clamp(170px, 32vh, 250px) !important;
                padding: 15px 25px !important;
            }

            #timer-display {
                font-size: clamp(60px, 18vh, 120px) !important;
            }

            #rf-timer-left,
            #rf-timer-right {
                font-size: clamp(38px, 12vh, 60px) !important;
            }

            #controls-area {
                margin-top: 4px !important;
                margin-bottom: 4px !important;
                padding: 7px 10px !important;
            }

            .ctrl-btn {
                padding: 7px 11px !important;
                font-size: 11.5px !important;
            }
        }

        @media (max-height: 500px) {
            .timer-stage-card {
                height: 125px !important;
                max-width: 480px !important;
                margin: 4px auto 6px !important;
                border-radius: 20px !important;
                padding: 8px 15px !important;
            }

            #timer-display {
                font-size: clamp(34px, 24vh, 56px) !important;
            }

            #rf-timer-left,
            #rf-timer-right {
                font-size: clamp(28px, 18vh, 44px) !important;
            }

            #timer-container {
                margin: 5px 0 !important;
                flex: 0 0 auto !important;
                gap: 6px !important;
            }

            #controls-area {
                padding: 6px 10px !important;
                margin-top: 2px !important;
                margin-bottom: 2px !important;
                width: 95% !important;
                max-width: 420px !important;
                flex-shrink: 0 !important;
            }

            .ctrl-btn {
                padding: 6px 9px !important;
                font-size: 11px !important;
            }
        }

        @keyframes heartbeat {
            0% {
                transform: scale(1);
            }

            14% {
                transform: scale(1.05);
            }

            28% {
                transform: scale(1);
            }

            42% {
                transform: scale(1.05);
            }

            70% {
                transform: scale(1);
            }
        }

        .urgent-pulse {
            animation: heartbeat 1s infinite;
            color: #ff5252 !important;
        }

        input::-webkit-outer-spin-button,
        input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            appearance: none;
            margin: 0;
        }

        input[type=number] {
            -moz-appearance: textfield;
            appearance: textfield;
        }

        .push-btn-large,
        .push-btn-adjust,
        .push-btn-small {
            color: white;
            border: none;
            cursor: pointer;
            font-weight: bold;
            text-transform: uppercase;
            border-radius: 6px;
            box-shadow: 0 4px #000;
            transition: all 0.1s ease;
            outline: none;
        }

        .push-btn-large {
            flex: 1;
            padding: 12px;
        }

        .push-btn-adjust {
            padding: 8px 12px;
            font-size: 20px;
            background: #333;
        }

        .push-btn-small {
            padding: 4px 10px;
            font-size: 14px;
            background: #333;
        }

        .push-btn-large:active,
        .push-btn-adjust:active,
        .push-btn-small:active {
            box-shadow: 0 1px #000;
            transform: translateY(3px);
        }

        .switch {
            position: relative;
            display: inline-block;
            width: 44px;
            height: 24px;
        }

        .switch input {
            display: none;
        }

        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #444;
            transition: .4s;
            border-radius: 20px;
        }

        .slider:before {
            position: absolute;
            content: "";
            height: 18px;
            width: 18px;
            left: 3px;
            bottom: 3px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }

        input:checked+.slider {
            background-color: #4dadff;
        }

        input:checked+.slider:before {
            transform: translateX(20px);
        }
        
        /* Minimal View Overrides */
        #timer-wrapper.minimal-view #configDetails,
        #timer-wrapper.minimal-view #manual-time-container {
            display: none !important;
        }
        #timer-wrapper.minimal-view #controls-area {
            padding: 10px !important;
            margin-bottom: 10px !important;
            max-width: 500px !important;
        }
        #timer-wrapper.minimal-view .push-btn-large {
            padding: 8px !important;
            font-size: 14px !important;
        }
        #timer-wrapper.minimal-view #timer-container {
            flex: 1 1 40vh !important;
        }
        
        input[type=range] {
            -webkit-appearance: none;
            appearance: none;
            background: transparent;
        }

        input[type=range]::-webkit-slider-runnable-track {
            width: 100%;
            height: 6px;
            background: #333;
            border-radius: 3px;
        }

        input[type=range]::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            height: 18px;
            width: 18px;
            border-radius: 50%;
            background: #4dadff;
            cursor: pointer;
            margin-top: -6px;
            box-shadow: 0 0 10px rgba(77, 173, 255, 0.5);
        }

        /* --- Settings Drawer Styling --- */
        #settings-drawer {
            position: absolute;
            top: 0;
            left: -320px;
            width: 320px;
            height: 100%;
            max-height: 100vh;
            background: #1a1a1a;
            border-right: 2px solid #333;
            z-index: 120;
            transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            flex-direction: column;
            padding: 95px 12px 120px 20px;
            box-sizing: border-box;
            box-shadow: 5px 0 25px rgba(0,0,0,0.5);
            overflow-y: auto;
            overflow-x: hidden;
            scrollbar-width: thin;
            scrollbar-color: #4dadff rgba(0, 0, 0, 0.4);
        }
        #settings-drawer.open {
            left: 0 !important;
        }
        .drawer-pull-tab,
        #settings-drawer-handle {
            position: absolute;
            top: 90px;
            left: 0;
            transform: none;
            background: #121212;
            border: 2px solid #333;
            border-left: none;
            color: #4dadff;
            padding: 18px 8px;
            border-radius: 0 10px 10px 0;
            cursor: pointer;
            z-index: 121;
            transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), top 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s ease, color 0.2s ease;
            box-shadow: 4px 0 15px rgba(0,0,0,0.5);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
            user-select: none;
        }
        .drawer-pull-tab:hover,
        #settings-drawer-handle:hover {
            background: #1a1a1a;
            color: #6ebfff;
        }
        #timer-wrapper.drawer-open .drawer-pull-tab,
        #timer-wrapper.drawer-open #settings-drawer-handle {
            left: 320px !important;
        }
        
        /* Settings Drawer Title */
        .soundboard-title {
            font-size: 16px;
            font-weight: 800;
            color: #4dadff;
            text-transform: uppercase;
            letter-spacing: 2px;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 1px solid #333;
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }
        
        /* Scroll Container Styling */
        #config-scroll-container {
            padding: 0 8px 20px 0 !important;
            display: flex;
            flex-direction: column;
            gap: 12px;
            box-sizing: border-box;
            max-height: none !important;
            border-top: none !important;
        }
        #settings-drawer::-webkit-scrollbar,
        #config-scroll-container::-webkit-scrollbar {
            width: 8px;
        }
        #settings-drawer::-webkit-scrollbar-track,
        #config-scroll-container::-webkit-scrollbar-track {
            background: rgba(0, 0, 0, 0.4);
            border-radius: 4px;
        }
        #settings-drawer::-webkit-scrollbar-thumb,
        #config-scroll-container::-webkit-scrollbar-thumb {
            background: #4dadff;
            border-radius: 4px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 0 8px rgba(77, 173, 255, 0.5);
        }
        #settings-drawer::-webkit-scrollbar-thumb:hover,
        #config-scroll-container::-webkit-scrollbar-thumb:hover {
            background: #6ebfff;
        }
        
        @media (max-height: 600px) {
            #settings-drawer {
                padding-bottom: 80px !important;
            }
        }
        
        @media (max-width: 480px) {
            #settings-drawer {
                width: 100% !important;
                left: -100% !important;
                border-right: none !important;
            }
            #settings-drawer.open {
                left: 0 !important;
            }
            #settings-drawer-handle {
                display: none !important;
            }
        }