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

:root {
    --blue: #00467f;
    --blue-dark: #042f5f;
    --blue-deep: #061b35;
    --yellow: #ffca05;
    --orange: #f58220;
    --red: #c52b2f;
    --cream: #fff8df;
    --card: #ffffff;
    --text: #111827;
    --muted: #667085;
    --border: rgba(0, 70, 127, 0.16);
    --success-bg: #ecfdf3;
    --success-text: #027a48;
    --error-bg: #fef3f2;
    --error-text: #b42318;
    --info-bg: #fff7d6;
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 8px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Montserrat", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: var(--blue-deep);
    background-image:
        linear-gradient(180deg, rgba(6, 27, 53, 0.52) 0%, rgba(4, 47, 95, 0.78) 48%, rgba(0, 70, 127, 0.88) 100%),
        url('street-art-bg.svg'),
        radial-gradient(circle at 50% 0%, rgba(255, 202, 5, 0.12), transparent 42%);
    background-size: cover, cover, cover;
    background-position: center top, center top, center top;
    background-attachment: fixed;
    color: var(--text);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.18;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.18) 1px, transparent 1.6px),
        radial-gradient(circle, rgba(255, 202, 5, 0.20) 1px, transparent 1.8px);
    background-size: 28px 28px, 46px 46px;
    background-position: 0 0, 12px 18px;
}

.page {
    position: relative;
    z-index: 1;
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0 32px;
}

.hero {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 32px;
    align-items: center;
    margin-bottom: 22px;
}

.hero-logo-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 270px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.brand-logo {
    display: block;
    width: 100%;
    max-width: 620px;
    height: auto;
    margin: 0 auto;
    border-radius: 0;
    box-shadow: none;
    filter: drop-shadow(0 20px 35px rgba(0, 0, 0, 0.28));
}

.brand-fallback {
    font-size: clamp(44px, 8vw, 86px);
    line-height: 0.85;
    font-weight: 950;
    color: var(--yellow);
    text-transform: uppercase;
    letter-spacing: -0.06em;
    text-shadow: 0 20px 35px rgba(0, 0, 0, 0.24);
}

.hero-content {
    color: #ffffff;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 13px;
    border: 1px solid rgba(255, 202, 5, 0.72);
    border-radius: 999px;
    background: rgba(255, 202, 5, 0.12);
    color: var(--yellow);
    font-weight: 850;
    font-size: 14px;
}

.festival-name {
    margin: 18px 0 8px;
    color: var(--yellow);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 13px;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 14px;
    color: #ffffff;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.92;
    letter-spacing: -0.065em;
    text-transform: uppercase;
    text-wrap: balance;
}

h2 {
    margin-bottom: 10px;
    color: var(--blue-dark);
    font-size: clamp(26px, 4vw, 38px);
    letter-spacing: -0.045em;
    line-height: 1.05;
}

p {
    color: var(--muted);
    line-height: 1.65;
}

.lead {
    max-width: 660px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.dates {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.dates span {
    padding: 10px 13px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(8px);
}

.dates strong {
    color: #ffffff;
}

.intro-card,
.card,
.alert {
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.20);
}

.intro-card {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 26px;
    align-items: center;
    margin: 0 0 18px;
    padding: clamp(22px, 4vw, 32px);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-left: 5px solid var(--yellow);
    background: rgba(255, 255, 255, 0.96);
}

.card,
.alert {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.70);
}

.card {
    position: relative;
    overflow: hidden;
    padding: clamp(22px, 4vw, 38px);
}

.center-card {
    text-align: center;
}

.alert {
    padding: 16px 18px;
    margin-bottom: 18px;
    font-weight: 800;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
}

.alert-error {
    background: var(--error-bg);
    color: var(--error-text);
}

.alert-info {
    color: var(--text);
}

.section-heading {
    max-width: 780px;
    margin-bottom: 22px;
}

.muted {
    margin-bottom: 0;
}

.privacy-box {
    margin: 0 0 24px;
    padding: 16px;
    border: 1px solid rgba(245, 130, 32, 0.34);
    border-radius: var(--radius-md);
    background: var(--info-bg);
}

.privacy-box strong {
    display: block;
    margin-bottom: 6px;
    color: var(--blue-dark);
}

.vote-form {
    display: grid;
    gap: 24px;
}

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

label,
legend {
    font-weight: 800;
    color: var(--blue-dark);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"] {
    width: 100%;
    margin-top: 8px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--text);
    font: inherit;
    outline: none;
}

input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(245, 130, 32, 0.15);
}

fieldset {
    border: 0;
    padding: 0;
    margin: 0;
}

legend {
    margin-bottom: 12px;
}

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

.artist-option {
    display: grid;
    grid-template-columns: auto 42px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #ffffff;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.artist-option:hover {
    transform: translateY(-1px);
    border-color: rgba(245, 130, 32, 0.72);
    background: #fffdf4;
    box-shadow: 0 10px 22px rgba(0, 70, 127, 0.10);
}

.artist-option:has(input:checked) {
    border-color: var(--blue);
    background: #fff5c4;
    box-shadow: inset 0 0 0 1px rgba(0, 70, 127, 0.18), 0 10px 22px rgba(0, 70, 127, 0.12);
}

.artist-option input {
    width: 18px;
    height: 18px;
    accent-color: var(--orange);
}

.artist-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: var(--blue);
    color: #ffffff;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.artist-name {
    min-width: 0;
    font-weight: 900;
    color: var(--text);
}

.privacy-confirm {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #ffffff;
    font-weight: 700;
}

.privacy-confirm input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    accent-color: var(--orange);
}

.privacy-confirm span {
    color: var(--muted);
    line-height: 1.45;
}

button {
    width: 100%;
    border: 0;
    border-radius: var(--radius-md);
    padding: 17px 18px;
    background: var(--red);
    color: white;
    font: inherit;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 14px 26px rgba(197, 43, 47, 0.22);
    transition: background 0.15s ease, transform 0.15s ease;
}

button:hover {
    background: var(--orange);
    transform: translateY(-1px);
}

.eyebrow {
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 12px;
    font-weight: 950;
    color: var(--orange);
}

.winner {
    margin: 22px 0;
    padding: 22px;
    border-radius: var(--radius-lg);
    background: #fff5c4;
    border: 1px solid rgba(245, 130, 32, 0.35);
}

.winner span,
.winner small {
    display: block;
    color: var(--blue-dark);
}

.winner strong {
    display: block;
    margin: 4px 0;
    color: var(--blue);
    font-size: clamp(32px, 5vw, 54px);
    line-height: 0.95;
    letter-spacing: -0.055em;
}

.results {
    display: grid;
    gap: 16px;
    margin-top: 22px;
}

.result-row {
    display: grid;
    gap: 8px;
}

.result-topline {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-weight: 850;
}

.result-topline strong,
.result-row small {
    color: var(--muted);
}

.bar {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: #e7edf5;
    overflow: hidden;
}

.bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--orange);
}

.total {
    margin-top: 24px;
}

.closed-card {
    max-width: 760px;
    margin: 0 auto;
}

.result-page .result-hero {
    margin-bottom: 22px;
}

.result-logo-panel {
    min-height: 230px;
}

.result-private-badge {
    border-color: rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.login-card {
    max-width: 560px;
    margin: 0 auto;
}

.login-form {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.login-alert {
    margin-top: 18px;
    margin-bottom: 0;
    box-shadow: none;
}

.result-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.result-toolbar h2 {
    margin-bottom: 0;
}

.logout-form {
    margin: 0;
    flex: 0 0 auto;
}

.secondary-button {
    width: auto;
    padding: 11px 16px;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--blue-dark);
    box-shadow: none;
}

.secondary-button:hover {
    background: #fffdf4;
    color: var(--blue);
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 22px;
}

.result-stats div {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #ffffff;
}

.result-stats span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-weight: 800;
}

.result-stats strong {
    display: block;
    color: var(--blue-dark);
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.admin-results {
    margin-top: 26px;
}

.admin-result-row {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #ffffff;
}

.neutral-winner {
    background: #f8fafc;
    border-color: var(--border);
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
    padding: 0 4px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    font-weight: 750;
}

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

    .hero-logo-panel {
        min-height: auto;
    }

    .brand-logo {
        max-width: 520px;
    }

    .intro-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    body {
        background-attachment: scroll;
    }

    .page {
        width: min(100% - 20px, 1120px);
        padding: 22px 0;
    }

    .hero {
        gap: 18px;
    }

    .hero-logo-panel {
        justify-content: flex-start;
    }

    .intro-card,
    .card,
    .alert {
        border-radius: 14px;
    }

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

    .artist-option {
        grid-template-columns: auto 40px minmax(0, 1fr);
    }

    .artist-number {
        width: 40px;
        height: 40px;
    }

    .result-topline {
        flex-direction: column;
        gap: 2px;
    }

    .result-toolbar {
        flex-direction: column;
    }

    .result-stats {
        grid-template-columns: 1fr;
    }

    .secondary-button {
        width: 100%;
    }

    .logout-form {
        width: 100%;
    }
}
