@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@500;600;700;800;900&family=Inter:wght@400;500;700&display=swap");

:root {
    --sky-50: #eff9ff;
    --sky-100: #dff3ff;
    --sky-200: #c8ecff;
    --sky-400: #38bdf8;
    --sky-500: #0ea5e9;
    --sky-600: #0284c7;
    --blue-600: #2563eb;
    --orange: #fb923c;
    --orange-dark: #f97316;
    --yellow: #facc15;
    --red: #ef4444;
    --green: #22c55e;
    --paper: #ffffff;
    --ink: #1f2937;
    --muted: #64748b;
    --line: #bae6fd;
    --shadow: 0 18px 44px rgba(14, 165, 233, .18);
}

* { box-sizing: border-box; }

html {
    min-height: 100%;
    background: var(--sky-100);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: Nunito, Inter, system-ui, sans-serif;
    background:
        radial-gradient(circle at 10% 12rem, rgba(250, 204, 21, .18), transparent 18rem),
        radial-gradient(circle at 92% 22rem, rgba(251, 146, 60, .18), transparent 20rem),
        linear-gradient(180deg, #bde9ff 0%, #eaf8ff 34%, #ffffff 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto;
    height: 8px;
    background: linear-gradient(90deg, var(--yellow), var(--orange), #ef6f8f, var(--blue-600));
    z-index: 90;
}

a { color: inherit; }
button, input, select, textarea { font-family: inherit; }

.site-shell {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    min-height: 104px;
    margin: 0 calc(50% - 50vw) 34px;
    padding: 10px max(20px, calc((100vw - 1180px) / 2));
    background:
        linear-gradient(90deg, rgba(56, 189, 248, .95), rgba(37, 99, 235, .92)),
        url("nav-bg-Ct-k7SnI.png") center / cover;
    box-shadow: 0 8px 22px rgba(2, 132, 199, .25);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    color: #fff;
    font-weight: 900;
    text-decoration: none;
}

.brand img {
    width: 150px;
    height: 86px;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, .18));
}

.brand span {
    display: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.admin-link,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    border: 0;
    border-radius: 999px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, .96);
    color: var(--sky-600);
    font-size: 1rem;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .12);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.admin-link:hover,
.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, .16);
}

.button.secondary {
    background: linear-gradient(90deg, var(--orange), var(--yellow), var(--orange));
    color: #fff;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .12);
}

.button.danger { background: var(--red); color: #fff; }
.button.light { background: #fff; color: var(--sky-600); border: 3px solid var(--sky-100); box-shadow: none; }

.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
    align-items: center;
    gap: 28px;
    margin: 0 auto 34px;
    padding: 42px;
    border: 4px solid var(--sky-100);
    border-top: 16px solid transparent;
    border-radius: 34px;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(90deg, var(--yellow), var(--orange), #ef6f8f) border-box;
    box-shadow: 0 24px 60px rgba(14, 165, 233, .22);
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    left: -4rem;
    bottom: -6rem;
    width: 18rem;
    height: 18rem;
    border-radius: 50%;
    background: rgba(56, 189, 248, .10);
}

.hero h1 {
    position: relative;
    margin: 0;
    max-width: 720px;
    color: var(--sky-600);
    font-size: clamp(2.25rem, 6vw, 4.8rem);
    font-weight: 900;
    line-height: .95;
    letter-spacing: 0;
}

.hero h1::before {
    content: "KIDS HITS RADIO";
    display: block;
    margin-bottom: 14px;
    color: var(--sky-600);
    font-size: .95rem;
    font-weight: 900;
    letter-spacing: .14em;
}

.hero p {
    position: relative;
    margin: 18px 0 0;
    max-width: 660px;
    color: var(--sky-600);
    font-size: clamp(1.05rem, 2.5vw, 1.35rem);
    font-weight: 800;
}

.hero-art {
    position: relative;
    min-height: 260px;
    border: 0;
    border-radius: 30px;
    overflow: hidden;
    background: var(--sky-100);
    box-shadow: 0 20px 42px rgba(14, 165, 233, .18);
    transform: rotate(2deg);
}

.hero-art img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity .65s ease, transform 3s ease;
}

.hero-art img.is-active {
    opacity: 1;
    transform: scale(1);
}

.hero-carousel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(2, 132, 199, .12));
    pointer-events: none;
}

.status {
    margin: 0 0 22px;
    padding: 18px 22px;
    border: 3px solid var(--sky-100);
    border-left: 10px solid var(--orange);
    border-radius: 24px;
    background: rgba(255, 255, 255, .94);
    color: var(--ink);
    font-weight: 900;
    box-shadow: var(--shadow);
}

.status.error { border-left-color: var(--red); color: #991b1b; }
.status.success { border-left-color: var(--green); }

.vote-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 8px 0 28px;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 3px solid var(--sky-100);
    border-radius: 999px;
    background: #fff;
    color: var(--sky-600);
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(14, 165, 233, .12);
}

.song-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 22px;
    padding-bottom: 150px;
}

.song-card {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 342px;
    border: 4px solid var(--sky-100);
    border-radius: 30px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.song-card:hover {
    transform: translateY(-6px) rotate(-1deg);
    border-color: var(--orange);
    box-shadow: 0 26px 56px rgba(251, 146, 60, .20);
}

.song-card input {
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: 1;
    cursor: pointer;
}

.cover {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: var(--sky-100);
}

.song-copy {
    display: block;
    padding: 18px 18px 22px;
}

.song-copy strong {
    display: block;
    color: var(--ink);
    font-size: 1.12rem;
    font-weight: 900;
    line-height: 1.12;
}

.song-copy span {
    display: block;
    margin-top: 8px;
    color: var(--sky-600);
    font-weight: 900;
    line-height: 1.2;
}

.checkmark,
.video-button {
    position: absolute;
    top: 12px;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .20);
}

.checkmark {
    right: 12px;
    z-index: 2;
    pointer-events: none;
    background: var(--sky-500);
    border: 4px solid #fff;
    font-size: 1.6rem;
    font-weight: 900;
}

.video-button {
    left: 12px;
    z-index: 3;
    border: 4px solid #fff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    cursor: pointer;
}

.video-button svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.video-button svg path:nth-of-type(1) {
    fill: currentColor;
    stroke: none;
}

.video-button:hover,
.video-button:focus-visible {
    transform: scale(1.08);
}

.song-card:has(input:checked) {
    border-color: var(--orange);
    box-shadow: 0 26px 60px rgba(251, 146, 60, .25);
}

.song-card:has(input:checked) .checkmark {
    background: linear-gradient(135deg, var(--orange), var(--yellow));
}

.vote-dock {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 20;
    width: min(930px, calc(100% - 24px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 4px solid var(--sky-100);
    border-radius: 26px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 24px 60px rgba(14, 165, 233, .28);
    backdrop-filter: blur(12px);
}

.dock-count {
    color: var(--sky-600);
    font-size: 1.05rem;
    font-weight: 900;
}

.email-field {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

input[type="email"],
input[type="text"],
input[type="password"],
input[type="datetime-local"],
input[type="number"],
textarea,
select {
    width: 100%;
    min-height: 50px;
    border: 3px solid var(--sky-100);
    border-radius: 18px;
    padding: 11px 15px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-weight: 800;
    outline: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--sky-400);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, .18);
}

.honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.modal-open { overflow: hidden; }
.video-modal[hidden] { display: none; }

.video-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 20px;
}

.video-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .62);
    backdrop-filter: blur(8px);
}

.video-dialog {
    position: relative;
    z-index: 1;
    width: min(940px, 100%);
    border: 4px solid #fff;
    border-radius: 30px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .34);
}

.video-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(90deg, var(--sky-500), var(--blue-600));
    color: #fff;
}

.video-head h2 {
    margin: 0;
    min-width: 0;
    font-size: 1.1rem;
    line-height: 1.2;
    font-weight: 900;
}

.video-close {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .22);
    color: #fff;
    font-size: 1.4rem;
    font-weight: 900;
    cursor: pointer;
}

.video-frame {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #050915;
}

.video-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.admin-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    padding: 0 0 54px;
}

.sidebar,
.panel,
.login-box {
    border: 4px solid var(--sky-100);
    border-radius: 30px;
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow);
}

.sidebar {
    position: sticky;
    top: 18px;
    padding: 16px;
}

.sidebar a {
    display: block;
    padding: 13px 14px;
    border-radius: 999px;
    color: var(--sky-600);
    font-weight: 900;
    text-decoration: none;
}

.sidebar a:hover,
.sidebar a.active {
    background: var(--sky-100);
}

.panel {
    padding: 26px;
    border-top: 12px solid var(--orange);
}

.panel h1,
.panel h2 {
    margin: 0 0 18px;
    color: var(--sky-600);
    font-size: clamp(1.65rem, 3vw, 2.6rem);
    font-weight: 900;
    line-height: 1.05;
}

.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 10px;
    border-bottom: 2px solid var(--sky-100);
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--sky-600);
    font-size: .85rem;
    font-weight: 900;
    text-transform: uppercase;
}

.thumb {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border: 3px solid #fff;
    border-radius: 18px;
    box-shadow: 0 8px 18px rgba(14, 165, 233, .16);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-grid .full { grid-column: 1 / -1; }

.actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0;
}

.login-box {
    width: min(440px, calc(100% - 32px));
    margin: 12vh auto;
    padding: 28px;
}

.import-progress { margin: 18px 0; }

.progress-bar {
    width: 100%;
    height: 20px;
    overflow: hidden;
    border: 3px solid var(--sky-100);
    border-radius: 999px;
    background: var(--sky-50);
}

.progress-bar span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--sky-500), var(--orange), var(--yellow));
    transition: width .2s ease;
}

.import-progress p {
    margin: 8px 0 0;
    color: var(--sky-600);
    font-weight: 900;
}

.import-log {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.import-log div {
    padding: 11px 14px;
    border: 2px solid var(--sky-100);
    border-radius: 18px;
    background: #fff;
    font-weight: 800;
}

.results-list {
    display: grid;
    gap: 14px;
    padding-bottom: 48px;
}

.result-row {
    display: grid;
    grid-template-columns: 62px 82px minmax(0, 1fr) 112px 92px;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 4px solid var(--sky-100);
    border-radius: 26px;
    background: #fff;
    box-shadow: var(--shadow);
}

.result-position {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--yellow), var(--orange));
    color: #fff;
    font-size: 1.45rem;
    font-weight: 900;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .12);
}

.result-cover {
    width: 82px;
    height: 82px;
    object-fit: cover;
    border-radius: 20px;
    background: var(--sky-100);
}

.result-copy strong,
.result-stats strong,
.result-previous strong {
    display: block;
    color: var(--ink);
    font-weight: 900;
}

.result-copy strong {
    font-size: 1.14rem;
    line-height: 1.15;
}

.result-copy span,
.result-stats span,
.result-previous span {
    display: block;
    margin-top: 4px;
    color: var(--sky-600);
    font-weight: 900;
}

.result-stats,
.result-previous { text-align: right; }

@media (max-width: 900px) {
    .topbar {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        margin-bottom: 24px;
        padding-bottom: 18px;
    }

    .brand img {
        width: 132px;
        height: 76px;
    }

    .nav-actions {
        justify-content: center;
    }

    .admin-link,
    .button {
        min-height: 46px;
        padding: 10px 17px;
        font-size: .95rem;
    }

    .hero,
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 28px 22px;
        border-radius: 28px;
    }

    .hero-art {
        min-height: 190px;
        transform: none;
    }

    .hero-art img {
        min-height: 190px;
    }

    .sidebar { position: static; }

    .vote-dock {
        align-items: stretch;
        flex-direction: column;
    }

    .email-field {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .form-grid { grid-template-columns: 1fr; }

    .result-row {
        grid-template-columns: 52px 68px minmax(0, 1fr);
        gap: 11px;
    }

    .result-cover {
        width: 68px;
        height: 68px;
    }

    .result-stats,
    .result-previous {
        text-align: left;
        padding-left: 63px;
    }
}

@media (max-width: 520px) {
    .site-shell { width: min(100% - 20px, 1180px); }
    .song-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.25rem; }
    .hero p { font-size: 1rem; }
}
