/* NexxGen Superstar — Welcome */

:root {
    --bg: #f7fafc;
    --surface: #ffffff;
    --surface-2: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --sky: #38bdf8;
    --sky-deep: #0284c7;
    --sky-soft: #e0f2fe;
    --orange: #f97316;
    --orange-deep: #ea580c;
    --orange-soft: #fff7ed;
    --accent: var(--orange);
    --accent-hover: var(--orange-deep);
    --like: var(--orange);
    --like-active: var(--orange-deep);
    --border: rgba(2, 132, 199, 0.14);
    --font-display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
    --font-body: "Outfit", "Segoe UI", sans-serif;
    --gap: 1.5rem;
    --page-pad: 1.75rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: var(--font-body);
    background:
        radial-gradient(ellipse 70% 45% at 50% 0%, rgba(56, 189, 248, 0.12), transparent 60%),
        radial-gradient(ellipse 50% 35% at 100% 20%, rgba(249, 115, 22, 0.08), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img,
video {
    display: block;
    max-width: 100%;
}

button {
    font: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

/* —— Banner (full width, natural image height, stays on scroll) —— */
.banner {
    top: 0;
    z-index: 100;
    width: 100%;
    height: auto;
    overflow: hidden;
    background: linear-gradient(115deg, var(--sky-deep) 0%, var(--sky) 45%, var(--orange) 100%);
}

.banner__img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    object-position: center center;
}

.banner__fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.banner__brand {
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 3.5rem);
    letter-spacing: 0.08em;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(14, 165, 233, 0.35);
}

/* —— Page content —— */
.page {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 2.25rem var(--page-pad) 3.5rem;
}

.page-header {
    text-align: center;
    margin-bottom: 2.25rem;
}

.page-header__label {
    display: inline-block;
    margin-bottom: 0.65rem;
    padding: 0.28rem 0.85rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sky-deep);
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.18);
    border-radius: 999px;
}

.episode-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3.15rem);
    font-weight: 400;
    letter-spacing: 0.045em;
    text-align: center;
    margin-bottom: 0.75rem;
    color: var(--sky-deep);
    line-height: 1.05;
}

.episode-title span {
    color: var(--orange);
}

.episode-tagline {
    text-align: center;
    max-width: none;
    width: max-content;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 0.5rem;
    font-size: clamp(0.88rem, 1.35vw, 1.05rem);
    font-weight: 500;
    color: var(--muted);
    line-height: 1.4;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.episode-tagline strong {
    color: var(--sky-deep);
    font-weight: 700;
}

.episode-tagline span {
    color: var(--orange);
    font-weight: 700;
}

/* —— Video grid: 4 per row —— */
.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap);
}

.video-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 10px 28px rgba(2, 132, 199, 0.07);
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.video-card:hover {
    border-color: rgba(249, 115, 22, 0.45);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 16px 36px rgba(249, 115, 22, 0.14);
    transform: translateY(-3px);
}

/* Fixed frame — landscape videos */
.video-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0b1220;
    overflow: hidden;
}

.video-card__media video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #0b1220;
}

.video-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 0.95rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border-top: 1px solid rgba(2, 132, 199, 0.1);
    min-height: 62px;
}

.video-card__meta {
    min-width: 0;
    flex: 1;
}

.video-card__name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    text-transform: capitalize;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.01em;
}

.video-card__hint {
    margin-top: 0.12rem;
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 500;
}

/* —— Like button —— */
.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(2, 132, 199, 0.22);
    color: var(--sky-deep);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.08);
}

.like-btn:hover {
    background: linear-gradient(120deg, var(--orange), var(--orange-deep));
    border-color: var(--orange-deep);
    color: #ffffff;
    transform: scale(1.04);
}

.like-btn.is-liked,
.like-btn.has-likes {
    background: linear-gradient(120deg, var(--orange), var(--orange-deep));
    border-color: var(--orange-deep);
    color: #ffffff;
}

.like-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.like-btn__count {
    font-size: 0.82rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 1ch;
}

/* —— Empty state —— */
.video-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted);
    font-size: 0.95rem;
}

@media (max-width: 900px) {
    .episode-tagline {
        white-space: normal;
        width: auto;
        max-width: 36rem;
    }
}

/* —— Vote modal —— */
body.modal-open {
    overflow: hidden;
}

.vote-modal[hidden] {
    display: none !important;
}

.vote-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.vote-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14, 60, 90, 0.5);
}

.vote-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 640px;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16);
    padding: 1.35rem 1.25rem 1.2rem;
}

.vote-modal__close {
    position: absolute;
    top: 0.45rem;
    right: 0.65rem;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--muted);
    padding: 0.2rem 0.4rem;
}

.vote-modal__close:hover {
    color: var(--orange);
}

.vote-modal__title {
    font-family: var(--font-display);
    font-size: 1.65rem;
    letter-spacing: 0.04em;
    background: linear-gradient(100deg, var(--sky-deep), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.15rem;
}

.vote-modal__subtitle {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.85rem;
}

.vote-modal__subtitle strong {
    color: var(--orange);
}

.vote-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 0.85rem;
    margin-bottom: 0.65rem;
}

.vote-form .form-group {
    margin-bottom: 0;
    min-width: 0;
}

.vote-form label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--sky-deep);
    margin-bottom: 0.28rem;
}

.vote-form label span {
    color: var(--orange);
}

.vote-form input[type="text"],
.vote-form input[type="email"],
.vote-form input[type="tel"] {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid #dbe3ea;
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vote-form input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.vote-form input.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1);
}

.field-error {
    margin-top: 0.2rem;
    font-size: 0.72rem;
    color: #ef4444;
    line-height: 1.25;
    min-height: 0;
}

.field-error:empty {
    display: none;
}

.form-error {
    margin: 0.15rem 0 0.55rem;
    font-size: 0.8rem;
    color: #ef4444;
    text-align: center;
    min-height: 0;
}

.form-error:empty {
    display: none;
}

.vote-submit {
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 9px;
    background: var(--orange);
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.vote-submit:hover:not(:disabled) {
    background: var(--orange-deep);
}

.vote-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* —— Toast —— */
.toast {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    left: auto;
    z-index: 300;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.85rem 1.2rem;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid rgba(34, 197, 94, 0.35);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
    color: #166534;
    font-size: 0.95rem;
    font-weight: 600;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast[hidden] {
    display: none !important;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast__icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #22c55e;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* intl-tel-input full width */
.iti {
    width: 100%;
    display: block;
}

.iti__flag-container {
    z-index: 2;
}

.iti input {
    width: 100%;
}

@media (max-width: 560px) {
    .toast {
        right: 0.75rem;
        left: 0.75rem;
        top: 0.85rem;
    }

    .vote-form .form-row {
        grid-template-columns: 1fr;
        gap: 0.55rem;
        margin-bottom: 0.55rem;
    }

    .vote-modal__dialog {
        max-width: 100%;
        padding: 1.2rem 1rem 1rem;
    }
}

/* —— Live Standings —— */
.standings {
    background: linear-gradient(180deg, #0b1a2b 0%, #0f2740 50%, #122a45 100%);
    padding: 4rem var(--page-pad);
}

.standings__inner {
    max-width: 820px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: 22px;
    padding: 2.5rem 2rem 2rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.standings__eyebrow {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: 0.65rem;
}

.standings__title {
    text-align: center;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 2rem;
}

.standings__title em {
    font-style: italic;
    background: linear-gradient(100deg, var(--sky), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.standings__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.standings__row {
    display: grid;
    grid-template-columns: 40px 48px 1fr auto;
    gap: 0.85rem;
    align-items: center;
}

.standings__rank {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
}

.standings__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    background: linear-gradient(135deg, var(--sky-deep), var(--orange));
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.standings__info {
    min-width: 0;
}

.standings__name {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: #ffffff;
    text-transform: capitalize;
    margin-bottom: 0.15rem;
}

.standings__sub {
    font-size: 0.78rem;
    color: rgba(226, 232, 240, 0.65);
    margin-bottom: 0.45rem;
}

.standings__bar {
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.standings__bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--sky-deep), var(--sky), var(--orange));
    transition: width 0.35s ease;
}

.standings__votes {
    text-align: right;
}

.standings__votes-num {
    display: block;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    background: linear-gradient(100deg, var(--sky), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.1;
}

.standings__votes-label {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--orange);
}

.standings__empty {
    text-align: center;
    color: rgba(226, 232, 240, 0.7);
    padding: 1.5rem 0;
}

/* —— Rewards —— */
.rewards {
    background: linear-gradient(180deg, #122a45 0%, #0b1a2b 100%);
    padding: 1rem var(--page-pad) 4rem;
}

.rewards__inner {
    max-width: 1100px;
    margin: 0 auto;
}

.rewards__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.reward-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(56, 189, 248, 0.14);
    border-radius: 18px;
    padding: 1.6rem 1.4rem 1.5rem;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.reward-card:hover {
    transform: translateY(-3px);
    border-color: rgba(249, 115, 22, 0.4);
    background: rgba(255, 255, 255, 0.07);
}

.reward-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--orange), var(--orange-deep));
    color: #0b1a2b;
}

.reward-card__icon svg {
    width: 22px;
    height: 22px;
}

.reward-card__title {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.55rem;
}

.reward-card__text {
    font-size: 0.92rem;
    line-height: 1.55;
    color: rgba(226, 232, 240, 0.78);
}

/* —— Vote CTA —— */
.vote-cta {
    background: #ffffff;
    padding: 4.5rem var(--page-pad);
    text-align: center;
}

.vote-cta__inner {
    max-width: 720px;
    margin: 0 auto;
}

.vote-cta__title {
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    color: #000000;
    margin-bottom: 0.85rem;
    line-height: 1.2;
}

.vote-cta__title em {
    font-style: italic;
    background: linear-gradient(100deg, var(--sky), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.vote-cta__text {
    color: rgba(0, 0, 0, 0.7);
    font-size: 1rem;
    margin-bottom: 1.75rem;
}

.vote-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.9rem 1.6rem;
    border-radius: 999px;
    background: linear-gradient(105deg, var(--sky) 0%, var(--orange) 100%);
    color: #0b1a2b;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vote-cta__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(14, 165, 233, 0.3);
}

.vote-cta__btn svg {
    width: 18px;
    height: 18px;
}

/* —— Footer —— */
.site-footer {
    background: #050d16;
    border-top: 1px solid rgba(56, 189, 248, 0.12);
    padding: 1.35rem var(--page-pad);
    text-align: center;
}

.site-footer p {
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.55);
}

/* —— Responsive —— */
@media (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .rewards__grid {
        grid-template-columns: 1fr;
    }

    .standings__inner {
        padding: 2rem 1.25rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .standings__row {
        grid-template-columns: 28px 40px 1fr auto;
        gap: 0.55rem;
    }

    .standings__rank {
        font-size: 1.35rem;
    }

    .standings__avatar {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    :root {
        --page-pad: 1rem;
    }
}

@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}
