:root {
    --bg: #050505;
    --panel: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.2);
    --gold: #ffd700;
    --text: #f5f5f5;
    --muted: #c7c7c7;
}

* { box-sizing: border-box; }

body {
    background: black;
    color: var(--text);
    font-family: 'Arial', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    margin: 0;
}

.mic-timeline {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.mic-timeline-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0 1rem 1rem;
}

.mic-header {
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}


.mic-kicker {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.35em;
    font-size: 0.7rem;
    color: var(--gold);
}

.mic-media-row {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    min-height: 0;
    position: relative;
}

.mic-lab {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 1.25rem 8rem;
    display: grid;
    gap: 1rem;
    position: relative;
}

.mic-hero {
    border: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    display: block;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
}

.mic-hero .header {
    max-width: 50ch;
    text-align: center;
    margin: 0 auto;
}


.mic-hero .header-title-logo {
    display: inline-flex;
    width: 120px;
    height: 2.5rem;
    margin-left: 0.5rem;
    vertical-align: middle;
    background: white;
    border-radius: 10rem;
    text-decoration: none;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.35);
}

.mic-hero .header-title-logo lottie-player {
    width: 100%;
    height: 100%;
}

.mic-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--gold);
    margin-bottom: 0.4rem;
}

.mic-lead {
    color: var(--muted);
    margin: 0.3rem 0 0;
}

.mic-controls {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    padding: 1rem;
    display: grid;
    gap: 0.65rem;
    align-content: start;
    width: 100%;
}

.mic-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
}

.scramble-text {
    margin: 0;
    color: var(--muted);
    font-weight: 600;
    font-size: 2rem;
}

.cta-button {
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1rem;
    border-radius: 0.7rem;
    border: 1px solid var(--border);
    background: linear-gradient(90deg, rgba(142, 246, 123, 0.35), rgba(142, 246, 123, 0.15));
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.15s ease, box-shadow 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    height: 2.5rem;
}

.cta-button.stop-state {
    background: #b4005c;
    color: #fff;
}

.cta-button.stop-state:hover:enabled {
    color: #ffe0f0;
}

.cta-button:hover:enabled {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    color: #0f0;
}

.cta-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: #111;
    color: var(--text);
}

.slider-label {
    display: grid;
    gap: 0.35rem;
    font-size: 0.95rem;
}

input[type="range"] {
    width: 100%;
}

.meter {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    border: 1px solid var(--border);
}

.meter-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.6), rgba(142, 246, 123, 0.7));
    transition: width 0.1s linear;
}

.status {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.slider-shell {
    border-radius: 1rem;
    padding: 0;
    display: grid;
    gap: 1rem;
    height: 100%;
    flex: 1 1 auto;
    min-height: 0;
    width: calc(100vw - 2rem);
    max-width: none;
    margin: 0 auto;
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

/* Keep room for top header/menu and bottom controls in normal mode */
body.mic-timeline:not(.fullscreen-active) .slider-shell {
    max-height: calc(100dvh - 31rem);
}

.slider-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}


.manual-controls {
    display: flex;
    gap: 0.5rem;
}

.ghost {
    padding: 0.55rem 0.9rem;
    border-radius: 2rem;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    padding: 1rem 1.25rem;
    display: none;
    justify-content: center;
    align-items: center;
}

.scramble-text {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-align: center;
}

.slide.text-mode {
    display: grid;
    place-items: center;
}

.slide.text-mode img {
    display: none;
}

.slide.text-mode .slide-overlay {
    display: flex;
}

.ghost.is-active {
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.35);
}

.mic-slider {
    align-items: center;
    height: 100%;
    margin-top: 0;
    min-height: 0;
}

.slide {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    height: 100%;
    min-height: 0;
    border: 1px solid var(--border);
    background: #000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.slide img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.slide.current {
    transform: scale(1);
}

.slide.current img {
}

.slide.current img.fading {
    opacity: 0;
}

.hud {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text);
    flex-wrap: wrap;
}

.slider-actions {
    margin-left: auto;
    display: flex;
    gap: 0.5rem;
}

.fullscreen {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0 !important;
    z-index: 80;
    background: #000;
}

.fullscreen .slide.current img {
    object-fit: contain;
}

.fullscreen .header {
    display: none !important;
}

.mic-controls-panel {
    margin: 0 auto;
    padding: 1rem;
    height: auto;
    align-content: flex-end;
    width: calc(100vw - 2rem);
    max-width: none;
    border-radius: 1rem;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: stretch;
    margin-top: auto;
    flex: 0 0 auto;
    position: relative;
    z-index: 3;
}

.mic-controls {
    width: 100%;
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.fullscreen .slider-actions #exitFullscreen {
    display: inline-flex !important;
}

.fullscreen ~ .header {
    display: none;
}

.fullscreen-active .menu-bar,
.fullscreen-active .header {
    display: none !important;
}

.fullscreen-active .mic-controls-panel {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    z-index: 120;
}

.exit-floating {
    position: fixed;
    top: 1rem;
    right: 50%;
    transform: translateX(50%);
    z-index: 999;
    display: none;
}

.fullscreen-in {
    object-fit: contain;
    margin: 1rem auto 0 auto;
}

.fullscreen-active .exit-floating {
    display: inline-flex !important;
}

.pre-mic .exit-floating {
    display: none !important;
}

@media (max-width: 960px) {
    .mic-controls-panel {
        width: 100%;
        height: auto;
    }

    .slider-shell {
        width: 100%;
    }
}

@media (max-width: 720px) {
    .mic-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

.pre-mic .menu-bar,
.pre-mic .header,
.pre-mic .slider-shell,
.pre-mic .hud,
.pre-mic .mic-buttons:nth-of-type(n+2),
.pre-mic .slider-label,
.pre-mic .meter,
.pre-mic .status,
.pre-mic #enterFullscreen {
    display: none !important;
}

.pre-mic .mic-controls {
    border: none;
    background: transparent;
    box-shadow: none;
    padding-top: 0;
    display: grid;
    place-items: center;
}

.pre-mic .mic-controls-panel {
    height: auto;
}

.pre-mic .mic-buttons:first-of-type {
    display: contents;
}

.pre-mic .mic-buttons:first-of-type > *:not(#micButton):not(#micHint) {
    display: none !important;
}

micHint {
    
}
