*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #8b1a4a;
    --bg-grad: radial-gradient(
        ellipse at 30% 50%,
        #a62261 0%,
        #8b1a4a 40%,
        #4a0e28 100%
    );
    --accent: #ff6b9d;
}

body {
    min-height: 100vh;
    font-family: "DM Sans", sans-serif;
    color: #f0f0f0;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    transition: background 0.3s;
}

/* -- GRAIN -- */
.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 60;
    opacity: 0.12;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 180px;
}

/* -- SCANLINES -- */
.scanlines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 55;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0, 0, 0, 0.06) 3px,
        rgba(0, 0, 0, 0.06) 4px
    );
}

/* -- SCREEN BG -- */
.screen-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: var(--bg-grad);
    transition: background 0.3s;
}

/* -- NAV -- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 32px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 70;
}
.logo {
    font-family: "Anybody", sans-serif;
    font-weight: 900;
    font-size: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
}
.logo-accent {
    color: var(--accent);
    transition: color 0.3s;
}
.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}
.nav-link {
    font-family: "Space Mono", monospace;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    cursor: pointer;
}
.nav-link:hover {
    color: rgba(255, 255, 255, 0.7);
}
.clock {
    font-family: "Space Mono", monospace;
    font-size: 14px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.5);
}
.clock-sep {
    animation: blink 1s step-end infinite;
}
@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* -- MAIN -- */
main {
    flex: 1;
    display: flex;
    align-items: flex-end;
    padding: 0 40px 120px;
    position: relative;
    z-index: 10;
    min-height: 100vh;
    transition: opacity 0.15s;
}
main.flipping {
    opacity: 0;
}
main.has-lineup {
    align-items: flex-end;
    overflow-y: auto;
    padding-top: 80px;
}
.content {
    max-width: 720px;
    width: 100%;
}

.status {
    font-family: "Space Mono", monospace;
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    padding: 5px 12px;
    display: inline-block;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.6);
}
.status--live {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

.ch-label {
    font-family: "Space Mono", monospace;
    font-size: 13px;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 10px;
}

.title {
    font-family: "Anybody", sans-serif;
    font-weight: 900;
    font-size: clamp(60px, 11vw, 130px);
    line-height: 0.9;
    letter-spacing: -2px;
    text-transform: uppercase;
    margin-bottom: 18px;
    color: #fff;
}

.tagline {
    font-style: italic;
    font-weight: 300;
    font-size: clamp(15px, 2vw, 19px);
    color: rgba(255, 255, 255, 0.5);
    max-width: 500px;
    line-height: 1.55;
    margin-bottom: 28px;
}

.meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.tag {
    font-family: "Space Mono", monospace;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 6px 12px;
}
.tag--hot {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    font-family: "Space Mono", monospace;
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 13px 24px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    z-index: 65;
}
.btn:hover {
    background: #fff;
    color: #0a0a0a;
}
.btn--filled {
    background: #fff;
    color: #0a0a0a;
}
.btn--filled:hover {
    background: rgba(255, 255, 255, 0.85);
}
.btn--ghost {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.6);
}
.btn--ghost:hover {
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
    background: transparent;
}
.btn--disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* -- RERUN -- */
.rerun {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.rerun-item {
    font-family: "Space Mono", monospace;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
}
.rerun-item strong {
    display: block;
    font-family: "Anybody", sans-serif;
    font-weight: 700;
    font-size: 22px;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0;
    text-transform: none;
    margin-top: 4px;
}

/* -- LINEUP -- */
.lineup-label {
    font-family: "Space Mono", monospace;
    font-size: 9px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.25);
    margin-bottom: 12px;
}
.lineup {
    display: grid;
    gap: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.lineup-item {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    align-items: baseline;
}
.lineup-num {
    font-family: "Space Mono", monospace;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 1px;
}
.lineup-info {
}
.lineup-name {
    font-weight: 500;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 2px;
}
.lineup-topic {
    font-style: italic;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1.45;
}
.lineup-recording {
    font-family: "Space Mono", monospace;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.15);
    margin-top: 16px;
}

/* -- PRESENTER COUNT -- */
.pcount {
    position: fixed;
    top: 64px;
    right: 32px;
    z-index: 65;
    text-align: right;
}
.pcount-label {
    font-family: "Space Mono", monospace;
    font-size: 9px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 4px;
}
.pcount-num {
    font-family: "Anybody", sans-serif;
    font-weight: 900;
    font-size: 72px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.9);
}
.pcount-of {
    font-family: "Space Mono", monospace;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.25);
    margin-bottom: 12px;
}
.pips {
    display: flex;
    gap: 3px;
    justify-content: flex-end;
}
.pip {
    width: 20px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
}
.pip--on {
    background: rgba(255, 255, 255, 0.6);
}

/* -- CHANNEL STRIP -- */
.strip {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 70;
    display: flex;
    background: rgba(0, 0, 0, 0.92);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.strip-ch {
    flex: 1;
    padding: 12px 8px 14px;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
    border-right: 1px solid rgba(255, 255, 255, 0.03);
}
.strip-ch:last-child {
    border-right: none;
}
.strip-ch:hover {
    background: rgba(255, 255, 255, 0.03);
}
.strip-ch--on {
    background: rgba(255, 255, 255, 0.05);
}
.strip-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    transition: background 0.15s;
}
.strip-ch--on .strip-bar {
    background: var(--accent);
}
.strip-num {
    font-family: "Space Mono", monospace;
    font-size: 9px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.2);
    margin-bottom: 2px;
}
.strip-ch--on .strip-num {
    color: rgba(255, 255, 255, 0.5);
}
.strip-name {
    font-family: "Anybody", sans-serif;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.15);
    transition: color 0.15s;
}
.strip-ch--on .strip-name {
    color: var(--accent);
}
.strip-status {
    font-family: "Space Mono", monospace;
    font-size: 8px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.1);
    margin-top: 2px;
}
.strip-ch--on .strip-status {
    color: var(--accent);
}

/* -- FLIP BUTTONS -- */
.flip {
    position: fixed;
    right: 32px;
    bottom: 90px;
    display: flex;
    gap: 6px;
    z-index: 65;
}
.flip-btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.flip-btn:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
}

/* -- MODAL -- */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
    animation: fade-in 0.15s ease;
}
.overlay.open {
    display: flex;
}
@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal {
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 440px;
    width: 100%;
    padding: 36px;
    animation: modal-in 0.2s ease;
}
@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-title {
    font-family: "Anybody", sans-serif;
    font-weight: 700;
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.modal-sub {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
    font-style: italic;
    margin-bottom: 24px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 16px;
}
.form-label {
    font-family: "Space Mono", monospace;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    display: block;
    margin-bottom: 6px;
}
.input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    font-family: "DM Sans", sans-serif;
    font-size: 14px;
    color: #f0f0f0;
    outline: none;
}
.input:focus {
    border-color: rgba(255, 255, 255, 0.3);
}
.input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    margin-top: 20px;
    margin-bottom: 24px;
    user-select: none;
}
.checkbox-box {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    transition: all 0.15s;
}
.checkbox-box--on {
    background: #fff;
    border-color: #fff;
}
.checkbox-check {
    color: #0a0a0a;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    display: none;
}
.checkbox-box--on .checkbox-check {
    display: block;
}
.checkbox-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
}
.checkbox-label strong {
    color: rgba(255, 255, 255, 0.8);
}

.modal-btns {
    display: flex;
    gap: 10px;
}

.modal-error {
    margin-top: 16px;
    font-size: 13px;
    color: #ff6b6b;
    font-style: italic;
    min-height: 0;
}

.or-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
}
.or-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}
.or-text {
    font-family: "Space Mono", monospace;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.2);
}

.ok-container {
    text-align: center;
    padding: 20px 0;
}
.ok-emoji {
    font-size: 32px;
    margin-bottom: 12px;
}
.ok-text {
    font-size: 16px;
    color: #4dffb8;
    font-style: italic;
    margin-bottom: 4px;
}
.ok-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
}

/* state visibility helpers */
.modal-form {
    display: block;
}
.modal-success {
    display: none;
}
.modal.submitted .modal-form {
    display: none;
}
.modal.submitted .modal-success {
    display: block;
}

/* hide sections */
[data-view] {
    display: none;
}
[data-view].active {
    display: block;
}

@media (max-width: 600px) {
    main {
        padding: 0 24px 110px;
    }
    .pcount {
        display: none;
    }
    .strip-name {
        font-size: 9px;
    }
}
