/**
 * MLNF - The Great Hall Schedule
 * 24/7 Television Schedule Board Styles
 * Viking-themed with torch flicker, rune stones, and staggered reveals
 */

/* ===== KEYFRAME ANIMATIONS ===== */

@keyframes torchFlicker {
    0%   { box-shadow: 0 0 15px rgba(212, 175, 55, 0.4), 0 0 30px rgba(212, 175, 55, 0.2); }
    25%  { box-shadow: 0 0 20px rgba(212, 175, 55, 0.6), 0 0 40px rgba(212, 175, 55, 0.3); }
    50%  { box-shadow: 0 0 12px rgba(212, 175, 55, 0.3), 0 0 25px rgba(212, 175, 55, 0.15); }
    75%  { box-shadow: 0 0 22px rgba(212, 175, 55, 0.5), 0 0 45px rgba(212, 175, 55, 0.25); }
    100% { box-shadow: 0 0 15px rgba(212, 175, 55, 0.4), 0 0 30px rgba(212, 175, 55, 0.2); }
}

@keyframes slotReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseLive {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(0.85); }
}

@keyframes runeGlow {
    0%, 100% { text-shadow: 0 0 8px rgba(212, 175, 55, 0.4); }
    50%      { text-shadow: 0 0 20px rgba(212, 175, 55, 0.8), 0 0 40px rgba(212, 175, 55, 0.3); }
}

@keyframes statCount {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== SECTION 1: HERO BANNER ===== */

.schedule-hero {
    background: linear-gradient(135deg, #0f1923 0%, var(--navy) 50%, #0f1923 100%);
    position: relative;
    overflow: hidden;
    padding: 3.5rem 0 2.5rem;
    text-align: center;
}

.schedule-hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.schedule-hero h1 {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    margin: 0 0 0.5rem;
    position: relative;
}

.schedule-hero .schedule-subtitle {
    font-size: 1.25rem;
    color: var(--cream);
    opacity: 0.9;
    margin: 0 0 0.75rem;
    font-weight: 400;
}

.schedule-hero .schedule-timezone {
    font-size: 0.875rem;
    color: rgba(248, 244, 227, 0.5);
    margin: 0 0 1.5rem;
}

.schedule-stats-bar {
    display: inline-flex;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-full);
    padding: 0.625rem 2rem;
    animation: statCount 0.6s ease-out;
}

.schedule-stats-bar .stat {
    font-size: 0.875rem;
    color: rgba(248, 244, 227, 0.7);
}

.schedule-stats-bar .stat strong {
    color: var(--gold);
    font-weight: 700;
}

/* ===== SECTION 2: NOW PLAYING ===== */

.now-playing-section {
    padding: 2.5rem 0;
    background: linear-gradient(180deg, #0f1923 0%, var(--surface) 100%);
}

.now-playing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.now-playing-card {
    background: linear-gradient(145deg, #1a2a3a, #243044);
    border: 2px solid var(--gold);
    border-radius: var(--radius-xl);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    animation: torchFlicker 3s ease-in-out infinite;
}

.now-playing-card.open-slot {
    border-color: rgba(212, 175, 55, 0.3);
    animation: none;
    background: linear-gradient(145deg, #1a2332, #1F2937);
}

.now-playing-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--cream);
    margin-bottom: 1rem;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: #EF4444;
    border-radius: 50%;
    animation: pulseLive 1.5s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

.now-playing-card .show-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    margin: 0 0 0.25rem;
}

.now-playing-card .show-creator {
    font-size: 0.95rem;
    color: rgba(248, 244, 227, 0.7);
    margin: 0 0 0.75rem;
}

.now-playing-card .show-description {
    font-size: 0.875rem;
    color: rgba(248, 244, 227, 0.55);
    line-height: 1.5;
    margin: 0;
}

.now-playing-card .open-airwaves-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(248, 244, 227, 0.5);
    margin: 0 0 0.5rem;
}

.now-playing-card .open-airwaves-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.625rem 1.5rem;
    background: transparent;
    border: 2px solid var(--battle-bronze);
    color: var(--gold);
    border-radius: var(--radius-lg);
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.now-playing-card .open-airwaves-cta:hover {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}

/* Up Next Card */
.up-next-card {
    background: linear-gradient(145deg, #1a2332, #1F2937);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: var(--radius-xl);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.up-next-card .up-next-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(248, 244, 227, 0.4);
    margin-bottom: 1rem;
}

.up-next-card .show-name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--cream);
    margin: 0 0 0.25rem;
}

.up-next-card .show-time {
    font-size: 0.875rem;
    color: rgba(248, 244, 227, 0.5);
    margin: 0 0 0.75rem;
}

.up-next-card .countdown {
    font-size: 0.8rem;
    color: var(--gold);
    font-weight: 600;
}

.up-next-card.open-slot .show-name {
    color: rgba(248, 244, 227, 0.4);
}

/* ===== SECTION 3: DAY NAVIGATION RUNE STONES ===== */

.rune-nav-section {
    padding: 2rem 0 0.5rem;
    background: var(--surface);
}

.rune-nav {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.rune-stone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 80px;
    background: linear-gradient(180deg, #374151, #1F2937);
    border: 2px solid #4B5563;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    user-select: none;
}

.rune-stone:hover {
    border-color: var(--gold);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.2);
}

.rune-stone .rune-char {
    font-size: 1.5rem;
    color: rgba(248, 244, 227, 0.6);
    line-height: 1;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.rune-stone:hover .rune-char {
    color: var(--gold);
    animation: runeGlow 2s ease-in-out infinite;
}

.rune-stone .rune-day {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(248, 244, 227, 0.4);
    transition: color 0.3s ease;
}

.rune-stone:hover .rune-day {
    color: rgba(248, 244, 227, 0.8);
}

/* Active / Selected rune stone */
.rune-stone.active {
    background: linear-gradient(180deg, #2a3a4e, #1a2a3a);
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3), inset 0 1px 0 rgba(212, 175, 55, 0.1);
}

.rune-stone.active .rune-char {
    color: var(--gold);
    text-shadow: 0 0 12px rgba(212, 175, 55, 0.6);
}

.rune-stone.active .rune-day {
    color: var(--gold);
}

/* Today indicator dot */
.rune-stone .today-dot {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--gold);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.6);
}

/* ===== SECTION 4: DAILY SCHEDULE GRID ===== */

.schedule-grid-section {
    padding: 1.5rem 0 3rem;
    background: var(--surface);
}

.schedule-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.slot-card {
    background: var(--surface-alt);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    transition: all 0.3s ease;
    opacity: 0;
    animation: slotReveal 0.4s ease-out forwards;
    animation-delay: calc(var(--slot-index) * 30ms);
}

/* Claimed slot */
.slot-card.claimed {
    background: linear-gradient(145deg, #faf6ed, #f4e8d0);
    border-color: var(--battle-bronze);
}

.slot-card.claimed:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(205, 127, 50, 0.2);
}

/* Live now slot */
.slot-card.live-now {
    background: linear-gradient(145deg, #faf6ed, #f4e8d0);
    border-color: var(--gold);
    border-width: 2px;
    animation: slotReveal 0.4s ease-out forwards, torchFlicker 3s ease-in-out infinite;
    animation-delay: calc(var(--slot-index) * 30ms), 0s;
}

/* Open slot */
.slot-card.open {
    border-style: dashed;
    border-color: var(--gray-300);
    background: var(--surface-alt);
}

.slot-card.open:hover {
    border-style: solid;
    border-color: var(--gold);
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.03), rgba(212, 175, 55, 0.06));
}

/* Slot time header */
.slot-time {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.slot-time .time-range {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.slot-time .time-icon {
    font-size: 0.875rem;
    color: var(--gray-400);
}

.slot-time .live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #EF4444;
    color: white;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.slot-time .live-badge .live-dot-sm {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: pulseLive 1.5s ease-in-out infinite;
}

/* Slot content - claimed shows */
.slot-show-name {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
}

.slot-show-creator {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0 0 0.5rem;
}

.slot-show-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    opacity: 0.8;
}

/* Genre badge */
.genre-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.625rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.genre-badge.history       { background: rgba(94, 58, 140, 0.12); color: #5E3A8C; }
.genre-badge.community     { background: rgba(16, 185, 129, 0.12); color: #059669; }
.genre-badge.investigative { background: rgba(220, 20, 60, 0.12); color: #DC143C; }
.genre-badge.current-events { background: rgba(59, 130, 246, 0.12); color: #2563EB; }

/* Open slot content */
.slot-open-label {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-400);
    margin: 0 0 0.25rem;
}

.slot-open-sub {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin: 0 0 0.75rem;
}

.claim-slot-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.25rem;
    background: transparent;
    border: 1.5px solid var(--battle-bronze);
    color: var(--battle-bronze);
    border-radius: var(--radius-lg);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.claim-slot-btn:hover {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
    transform: translateY(-1px);
}

/* International badge for late-night slots */
.intl-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    color: var(--gray-400);
    margin-top: 0.5rem;
}

/* Slot category label */
.slot-category {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-400);
    margin-bottom: 0.5rem;
}

/* ===== SECTION 5: CREATOR RECRUITMENT ===== */

.schedule-recruitment {
    padding: 4rem 0;
    background: linear-gradient(135deg, #0f1923 0%, var(--navy) 50%, #0f1923 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.schedule-recruitment::before {
    content: '';
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.recruitment-percent {
    font-size: 5rem;
    font-weight: 800;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 40px rgba(212, 175, 55, 0.3);
    position: relative;
}

.recruitment-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--cream);
    margin: 0 0 0.5rem;
    position: relative;
}

.recruitment-sub {
    font-size: 1.1rem;
    color: rgba(248, 244, 227, 0.6);
    margin: 0 0 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.recruitment-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--gold), #B8860B);
    color: var(--navy);
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
    position: relative;
}

.recruitment-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.4);
}

/* ===== HOMEPAGE TEASER ===== */

.schedule-teaser {
    padding: 3rem 0;
    background: linear-gradient(135deg, #0f1923 0%, #1a2332 50%, #0f1923 100%);
    position: relative;
    overflow: hidden;
}

.schedule-teaser::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.schedule-teaser-inner {
    position: relative;
    z-index: 1;
    text-align: center;
}

.schedule-teaser h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gold);
    margin: 0 0 1.5rem;
}

.teaser-now-card {
    display: inline-block;
    background: linear-gradient(145deg, #1a2a3a, #243044);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-xl);
    padding: 1.5rem 2.5rem;
    margin-bottom: 1rem;
    max-width: 500px;
    text-align: left;
}

.teaser-now-card .teaser-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(248, 244, 227, 0.4);
    margin-bottom: 0.5rem;
}

.teaser-now-card .teaser-show {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--cream);
    margin: 0;
}

.teaser-now-card .teaser-creator {
    font-size: 0.875rem;
    color: rgba(248, 244, 227, 0.5);
    margin: 0.25rem 0 0;
}

.teaser-up-next {
    font-size: 0.85rem;
    color: rgba(248, 244, 227, 0.5);
    margin: 1rem 0 1.5rem;
}

.teaser-up-next strong {
    color: rgba(248, 244, 227, 0.7);
}

.teaser-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    background: transparent;
    border: 2px solid var(--battle-bronze);
    color: var(--gold);
    border-radius: var(--radius-lg);
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.teaser-cta:hover {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}

/* ===== DARK MODE OVERRIDES ===== */

[data-theme="dark"] .schedule-grid-section,
[data-theme="dark"] .rune-nav-section {
    background: var(--surface);
}

[data-theme="dark"] .now-playing-section {
    background: linear-gradient(180deg, #0f1923 0%, var(--surface) 100%);
}

[data-theme="dark"] .slot-card {
    background: var(--surface-alt);
    border-color: #374151;
}

[data-theme="dark"] .slot-card.claimed {
    background: linear-gradient(145deg, #2a2a1e, #1F2937);
    border-color: rgba(205, 127, 50, 0.5);
}

[data-theme="dark"] .slot-card.live-now {
    background: linear-gradient(145deg, #2a2a1e, #1F2937);
    border-color: var(--gold);
}

[data-theme="dark"] .slot-card.open {
    border-color: #374151;
    background: var(--surface-alt);
}

[data-theme="dark"] .slot-card.open:hover {
    border-color: var(--gold);
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.05), rgba(212, 175, 55, 0.08));
}

[data-theme="dark"] .slot-show-name {
    color: var(--cream);
}

[data-theme="dark"] .slot-show-creator,
[data-theme="dark"] .slot-show-description {
    color: var(--gray-300);
}

[data-theme="dark"] .slot-time .time-range {
    color: var(--gray-300);
}

[data-theme="dark"] .slot-open-label {
    color: var(--gray-500);
}

[data-theme="dark"] .slot-open-sub {
    color: var(--gray-500);
}

[data-theme="dark"] .claim-slot-btn {
    border-color: rgba(205, 127, 50, 0.6);
    color: var(--gold);
}

[data-theme="dark"] .slot-category {
    color: var(--gray-500);
}

/* Dark mode genre badges - inverted */
[data-theme="dark"] .genre-badge.history       { background: rgba(94, 58, 140, 0.25); color: #a07cd8; }
[data-theme="dark"] .genre-badge.community     { background: rgba(16, 185, 129, 0.2); color: #34d399; }
[data-theme="dark"] .genre-badge.investigative { background: rgba(220, 20, 60, 0.2); color: #f87171; }
[data-theme="dark"] .genre-badge.current-events { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }

/* Dark mode rune stones */
[data-theme="dark"] .rune-stone {
    background: linear-gradient(180deg, #243044, #1a2332);
    border-color: #374151;
}

[data-theme="dark"] .rune-stone.active {
    background: linear-gradient(180deg, #1a2a3a, #0f1923);
    border-color: var(--gold);
}

/* ===== MOBILE RESPONSIVE ===== */

@media (max-width: 768px) {
    .schedule-hero {
        padding: 2.5rem 1rem 2rem;
    }

    .schedule-hero h1 {
        font-size: 2rem;
    }

    .schedule-hero .schedule-subtitle {
        font-size: 1rem;
    }

    .schedule-stats-bar {
        gap: 1rem;
        padding: 0.5rem 1.25rem;
        font-size: 0.8rem;
    }

    /* Now playing - stack vertically */
    .now-playing-grid {
        grid-template-columns: 1fr;
    }

    .now-playing-card,
    .up-next-card {
        padding: 1.5rem;
    }

    .now-playing-card .show-name {
        font-size: 1.25rem;
    }

    /* Rune stones - compact */
    .rune-nav {
        gap: 0.5rem;
    }

    .rune-stone {
        width: 44px;
        height: 56px;
    }

    .rune-stone .rune-char {
        font-size: 1.125rem;
    }

    .rune-stone .rune-day {
        font-size: 0.55rem;
    }

    /* Grid - single column */
    .schedule-grid {
        grid-template-columns: 1fr;
    }

    .slot-card {
        padding: 1rem 1.25rem;
    }

    .claim-slot-btn {
        width: 100%;
        justify-content: center;
    }

    /* Recruitment */
    .recruitment-percent {
        font-size: 3.5rem;
    }

    .recruitment-title {
        font-size: 1.35rem;
    }

    .recruitment-cta {
        width: 100%;
        justify-content: center;
    }

    /* Teaser */
    .teaser-now-card {
        display: block;
        padding: 1.25rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .schedule-hero h1 {
        font-size: 1.75rem;
    }

    .schedule-stats-bar {
        flex-direction: column;
        gap: 0.25rem;
        border-radius: var(--radius-lg);
        padding: 0.75rem 1.5rem;
    }

    .rune-stone {
        width: 40px;
        height: 52px;
    }

    .rune-stone .rune-char {
        font-size: 1rem;
    }
}
