:root {
    --bg:           #09080a;
    --card-bg:      #120e16;
    --card-border:  #2a1f35;
    --crimson:      #7a1212;
    --crimson-mid:  #9e1818;
    --crimson-light:#c42020;
    --gold:         #C8A020;
    --gold-light:   #E8C84A;
    --gold-dim:     #8a6e12;
    --text:         #ffffff;
}

/* ── Stars overlay ── */
.stars-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.deco-star {
    position: absolute;
    color: var(--gold);
    line-height: 1;
    --py: 0px; /* parallax Y offset, updated by JS */
    animation: star-twinkle 2.8s ease-in-out infinite alternate;
    text-shadow: 0 0 10px var(--gold-light), 0 0 24px rgba(200,160,32,0.35);
}

@keyframes star-twinkle {
    from { opacity: 0.2; transform: translateY(var(--py)) scale(0.9) rotate(-8deg); }
    to   { opacity: 0.85; transform: translateY(var(--py)) scale(1.1) rotate(8deg); }
}

/* ── Hanging stars ── */
.star-hang {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-origin: top center;
    --py: 0px;
    animation: star-swing var(--sw-dur, 4s) var(--sw-delay, 0s) ease-in-out infinite both;
}

.star-hang::before {
    content: '';
    width: 1px;
    height: var(--thread, 22px);
    background: linear-gradient(to bottom, rgba(200,160,32,0.15), rgba(200,160,32,0.55));
    flex-shrink: 0;
}

.star-body {
    color: var(--gold);
    text-shadow: 0 0 10px var(--gold-light), 0 0 24px rgba(200,160,32,0.35);
    line-height: 1;
}

@keyframes star-swing {
    0%   { transform: translateY(var(--py)) rotate(-6deg); opacity: 0.2;  }
    50%  { transform: translateY(var(--py)) rotate( 6deg); opacity: 0.85; }
    100% { transform: translateY(var(--py)) rotate(-6deg); opacity: 0.2;  }
}

/* ── Hanging props ── */
.prop-anchor {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-origin: top center;
    pointer-events: none;
    --py: 0px;
    animation: prop-swing var(--sw-dur, 6s) var(--sw-delay, 0s) ease-in-out infinite both;
}

.prop-anchor::before {
    content: '';
    width: 1.5px;
    height: var(--thread, 55px);
    background: linear-gradient(to bottom, rgba(200,160,32,0.1), rgba(200,160,32,0.5));
    flex-shrink: 0;
}

.prop-img {
    display: block;
    filter: brightness(0.55) drop-shadow(0 14px 30px rgba(0,0,0,0.7));
}

@keyframes prop-swing {
    0%   { transform: translateY(var(--py)) rotate(-4deg); }
    50%  { transform: translateY(var(--py)) rotate( 4deg); }
    100% { transform: translateY(var(--py)) rotate(-4deg); }
}

/* ── Film roll divider ── */
.film-roll {
    height: 60px;
    margin: 3rem 0 2rem;
    /* warm brown strip with near-black sprocket holes */
    background-color: #3a1f08;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='60'%3E%3Crect x='10' y='7' width='24' height='16' rx='3.5' fill='%230a0806'/%3E%3Crect x='10' y='37' width='24' height='16' rx='3.5' fill='%230a0806'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: 44px 60px;
    box-shadow:
        inset 0 3px 6px rgba(0,0,0,0.5),
        inset 0 -3px 6px rgba(0,0,0,0.5),
        0 0 0 1px rgba(200,160,32,0.15);
    position: relative;
}

/* center frame line */
.film-roll::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.35);
}

/* ── Cinematic script ── */
.cinematic-script {
    font-family: 'Dancing Script', cursive;
    color: var(--gold);
    font-weight: 700;
    text-shadow: 0 0 30px rgba(200,160,32,0.5), 0 0 60px rgba(200,160,32,0.2);
}

/* ── Section headings ── */
.section-title {
    font-weight: 800;
    letter-spacing: 0.18em;
    font-size: 1.05rem;
    color: #ffffff;
}

.section-heading::after {
    content: '';
    display: block;
    width: 36px;
    height: 2px;
    background: var(--gold);
    opacity: 0.65;
    margin: 8px auto 0;
}

/* ─────────────────────────────────────────
   SCHEDULE TABLE  (program section)
───────────────────────────────────────── */
.schedule-table {
    background: linear-gradient(170deg, #6a0e0e 0%, #3d0707 60%, #2e0505 100%);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(200,160,32,0.18);
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.schedule-row {
    display: grid;
    grid-template-columns: 4.8rem 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    color: inherit;
}

.schedule-row:last-child { border-bottom: none; }

.schedule-row:hover {
    background: rgba(255,255,255,0.06);
}

.schedule-row.event-past {
    opacity: 0.4;
}

.schedule-day-abbr {
    display: block;
    font-weight: 800;
    font-size: 1rem;
    color: #ffffff;
    line-height: 1;
    text-transform: uppercase;
}

.schedule-day-date {
    display: block;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.55);
    margin-top: 3px;
}

.schedule-event-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #ffffff;
    line-height: 1.3;
}

.schedule-event-loc {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    margin-top: 3px;
}

.schedule-time {
    font-weight: 700;
    color: var(--gold);
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* ─────────────────────────────────────────
   LEADERBOARD  (teams section)
───────────────────────────────────────── */
.leaderboard {
    background: #100d18;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(200,160,32,0.12);
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

.lb-row {
    display: grid;
    grid-template-columns: 2.5rem 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    transition: background 0.15s;
}

.lb-row:hover { background: rgba(255,255,255,0.04); }

.lb-row:last-child { border-bottom: none; }

.lb-rank {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--gold);
    opacity: 0.7;
    font-family: 'Roboto Mono', monospace;
}

.lb-name {
    font-weight: 500;
    color: #fff;
    font-size: 0.95rem;
}

.lb-score {
    font-weight: 700;
    color: var(--gold-light);
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    white-space: nowrap;
}

.lb-score span {
    font-size: 0.65rem;
    opacity: 0.5;
    margin-left: 3px;
    font-weight: 400;
}

.lb-actions {
    padding: 0.5rem 1.25rem 0.85rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ─────────────────────────────────────────
   CHALLENGE CARDS
───────────────────────────────────────── */
.challenge-card {
    background: linear-gradient(135deg, #1a0a0a, #120808);
    border: 1px solid rgba(139,26,26,0.35);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
    height: 100%;
}

.challenge-card:hover {
    border-color: var(--gold-dim);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.ch-activity {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold);
    opacity: 0.8;
    margin-bottom: 4px;
}

.ch-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
    line-height: 1.3;
}

.ch-pts {
    margin-top: 8px;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.4);
    font-family: 'Roboto Mono', monospace;
}

/* ── Cinema modals ── */
.cinema-modal {
    background: #13101a;
    border: 1px solid rgba(200,160,32,0.2);
    border-radius: 14px !important;
    overflow: hidden;
    color: #fff;
    box-shadow: 0 24px 60px rgba(0,0,0,0.7);
}

.cinema-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(200,160,32,0.15);
}

.cinema-modal-tag {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gold);
    opacity: 0.8;
    margin-bottom: 4px;
}

.cinema-modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}

.cinema-modal-close {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
    line-height: 1;
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.cinema-modal-close:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
    border-color: rgba(255,255,255,0.25);
}

.cinema-modal-body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.cinema-modal-meta {
    font-size: 0.85rem;
    color: var(--gold);
    margin-bottom: 0.85rem;
}

.cinema-modal-desc {
    font-size: 0.92rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
    margin: 0;
}

.cinema-modal-row {
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.cinema-modal-row:last-child { border-bottom: none; }

.cinema-modal-row-gold { color: var(--gold) !important; }

/* ── Buttons ── */
.btn-cinema {
    background-color: transparent;
    border: 1.5px solid #3a2a55;
    color: var(--gold);
    font-weight: 600;
    transition: all 0.2s;
}

.btn-cinema:hover, .btn-cinema:focus {
    background-color: rgba(200,160,32,0.08);
    border-color: var(--gold-dim);
    color: var(--gold-light);
}

.btn-cinema-cta {
    background: linear-gradient(135deg, var(--crimson), #550a0a);
    border: 1.5px solid var(--gold-dim);
    color: var(--gold);
    font-weight: 700;
    padding: 0.75rem 2.5rem;
    font-size: 1rem;
    border-radius: 50px;
    transition: all 0.2s;
    letter-spacing: 0.06em;
}

.btn-cinema-cta:hover {
    background: linear-gradient(135deg, var(--crimson-mid), var(--crimson));
    border-color: var(--gold);
    color: var(--gold-light);
    box-shadow: 0 0 20px rgba(200,160,32,0.2);
}

.btn-cinema-sm {
    background: transparent;
    border: 1px solid rgba(200,160,32,0.25);
    color: rgba(200,160,32,0.75);
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    transition: all 0.15s;
}

.btn-cinema-sm:hover {
    border-color: var(--gold-dim);
    color: var(--gold);
    background: rgba(200,160,32,0.06);
}

/* ── Misc ── */
.text-gold { color: var(--gold) !important; }
.text-gold-light { color: var(--gold-light) !important; }
.location_url { color: var(--gold); text-decoration: underline; }

.dropdown-menu {
    background-color: #160c1a;
    border-color: #2a1f35;
}
.dropdown-item { color: #ccc; }
.dropdown-item:hover { background: rgba(200,160,32,0.1); color: var(--gold); }

html, body {
    overflow-x: hidden;
    background-color: var(--bg);
    color: var(--text);
}

/* ── Intro animations ── */
@keyframes cinematic-lower {
    /* gravity drop: starts from rest, accelerates */
    0%  { transform: translateY(-92vh); animation-timing-function: cubic-bezier(0.4, 0, 1, 1); }
    /* first overshoot: momentum carries past rest */
    60% { transform: translateY(28px);  animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
    /* rise: upward momentum decelerates against gravity */
    70% { transform: translateY(-18px); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
    /* second overshoot: gravity re-accelerates downward */
    78% { transform: translateY(9px);   animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
    /* smaller rise */
    84% { transform: translateY(-4px);  animation-timing-function: cubic-bezier(0.6, 0, 1, 1); }
    /* tiny overshoot */
    90% { transform: translateY(2px);   animation-timing-function: ease-in-out; }
    100%{ transform: translateY(0);     }
}

@keyframes hero-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes hero-rise-in {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0);    }
}
