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

:root {
    --red: #b71925;
    --red-dark: #7d0d16;
    --yellow: #f9b916;
    --yellow-soft: #ffd75b;
    --cream: #fff8e8;
    --ink: #291711;
    --muted: #75625b;
    --white: #fff;
    --line: #eadfd7;
    --success: #138a50;
    --shadow: 0 20px 60px rgba(98, 31, 16, .14);
    --radius: 24px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #fffdf8; font-family: Inter, Arial, sans-serif; line-height: 1.55; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; }
.container { width: min(1160px, calc(100% - 32px)); margin-inline: auto; }
.narrow { width: min(760px, calc(100% - 32px)); }
.eyebrow { color: var(--red); font-size: .76rem; font-weight: 800; letter-spacing: .16em; }
h1, h2, h3 { font-family: 'Baloo 2', Inter, sans-serif; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(2.6rem, 6vw, 5.3rem); }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
p { color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border: 0; border-radius: 999px; font-weight: 800; letter-spacing: .02em; text-decoration: none; cursor: pointer; transition: .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--red), #d52933); box-shadow: 0 12px 28px rgba(183, 25, 37, .28); }
.btn-secondary { background: #fff; color: var(--red); border: 1px solid #e9c7c9; }
.btn-light { color: var(--red); background: #fff; }
.btn-large { min-height: 60px; padding-inline: 42px; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 253, 248, .94); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(183, 25, 37, .08); }
.nav-wrap { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: 'Baloo 2', sans-serif; font-weight: 800; color: var(--red); }
.brand img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; }
.top-nav { display: flex; align-items: center; gap: 26px; }
.top-nav a { text-decoration: none; font-weight: 700; font-size: .92rem; }
.top-nav .nav-cta { background: var(--red); color: #fff; padding: 10px 18px; border-radius: 999px; }
.hero { overflow: hidden; background: radial-gradient(circle at 80% 20%, #ffd84d 0, #f7b714 35%, #f19b00 100%); min-height: 650px; display: grid; align-items: center; position: relative; }
.hero::before { content: ''; position: absolute; inset: 0; opacity: .18; background: repeating-conic-gradient(from -4deg at 78% 50%, #fff 0 5deg, transparent 5deg 12deg); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; gap: 30px; padding: 55px 0; }
.hero-copy .eyebrow { color: var(--red-dark); }
.hero-copy h1 { color: #fff; text-shadow: 0 4px 0 rgba(126, 41, 0, .12); }
.hero-copy h1 em { color: var(--red); font-style: normal; display: inline-block; background: #fff8df; padding: 2px 14px 8px; border-radius: 14px; transform: rotate(-1deg); text-shadow: none; }
.hero-copy > p { color: #5c2509; font-size: 1.12rem; max-width: 620px; font-weight: 600; }
.hero-actions { display: flex; gap: 12px; margin: 28px 0 24px; flex-wrap: wrap; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-badges span { background: rgba(255,255,255,.72); color: #6d2e09; border: 1px solid rgba(255,255,255,.7); padding: 8px 12px; border-radius: 999px; font-size: .82rem; font-weight: 700; }
.hero-art { position: relative; display: grid; place-items: center; min-height: 500px; }
.hero-art img { width: min(700px, 125%); max-width: none; filter: drop-shadow(0 36px 26px rgba(84, 24, 0, .28)); transform: translateX(3%); }
.live-section { padding: 92px 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.section-heading p { margin: 8px 0 0; }
.section-heading.centered { text-align: center; justify-content: center; }
.live-pill { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; background: #fff0f0; color: var(--red); border-radius: 999px; font-size: .78rem; font-weight: 800; }
.live-pill > span { width: 8px; height: 8px; border-radius: 50%; background: #ef2635; box-shadow: 0 0 0 6px rgba(239,38,53,.1); animation: pulse 1.7s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(239,38,53,0); } }
.leader-banner { display: flex; align-items: center; gap: 16px; background: linear-gradient(135deg, #8f0f18, #c31d2a); color: #fff; border-radius: 22px; padding: 20px 26px; margin-bottom: 18px; box-shadow: 0 18px 36px rgba(183,25,37,.2); }
.leader-banner .crown-icon { font-size: 2.3rem; color: var(--yellow); }
.leader-banner div { flex: 1; }
.leader-banner small { display: block; opacity: .78; font-size: .7rem; letter-spacing: .14em; }
.leader-banner strong { font-family: 'Baloo 2'; font-size: 1.5rem; }
.leader-banner b { font-size: 1.5rem; color: var(--yellow-soft); }
.results-list { display: grid; gap: 14px; }
.result-card { display: flex; align-items: center; gap: 18px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px; transition: .2s; }
.result-card.is-leading { border-color: rgba(183,25,37,.4); box-shadow: 0 12px 32px rgba(183,25,37,.09); }
.rank { width: 44px; font-family: 'Baloo 2'; font-size: 1.25rem; font-weight: 800; color: var(--red); text-align: center; }
.avatar { width: 68px; height: 68px; flex: 0 0 68px; border-radius: 50%; overflow: hidden; background: var(--yellow); display: grid; place-items: center; border: 4px solid #fff3c8; }
.avatar.small { width: 48px; height: 48px; flex-basis: 48px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar span { font-family: 'Baloo 2'; font-size: 1.8rem; font-weight: 800; color: var(--red); }
.result-main { flex: 1; min-width: 0; }
.result-title-row { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.result-title-row h3 { font-size: 1.35rem; }
.result-title-row p { margin: 2px 0 0; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-percentage { color: var(--red); font-size: 1.3rem; }
.progress { height: 10px; background: #f3e8df; border-radius: 999px; overflow: hidden; margin: 10px 0 7px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow), var(--red)); border-radius: inherit; transition: width .6s ease; }
.result-main small { color: var(--muted); }
.updated-at { text-align: right; font-size: .76rem; }
.prize-section { padding: 30px 0 90px; }
.prize-card { background: linear-gradient(135deg, var(--red-dark), var(--red)); color: #fff; border-radius: 34px; padding: 38px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; box-shadow: var(--shadow); }
.prize-card .eyebrow { color: var(--yellow-soft); }
.prize-card p { color: #ffeaea; margin-bottom: 0; }
.prize-icon { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; color: var(--red); background: var(--yellow); font-family: 'Baloo 2'; font-size: 2rem; font-weight: 800; border: 8px solid rgba(255,255,255,.23); }
.how-section { padding: 86px 0; background: var(--cream); }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { text-align: center; background: #fff; border-radius: 24px; padding: 32px 24px; border: 1px solid #f2e4cd; }
.step > span { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; margin: 0 auto 16px; background: var(--yellow); color: var(--red); font-family: 'Baloo 2'; font-weight: 800; font-size: 1.5rem; }
.step h3 { font-size: 1.35rem; }
.site-footer { background: #23110d; color: #fff; padding: 40px 0; }
.site-footer p { color: #cdbbb5; margin: 5px 0 0; }
.footer-grid { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: #f7d8d4; }
.flash-wrap { padding-top: 16px; }
.flash { padding: 13px 16px; border-radius: 13px; font-weight: 700; margin-bottom: 18px; }
.flash-success { background: #e5f8ed; color: #14643d; border: 1px solid #b5e7c9; }
.flash-error { background: #ffebec; color: #9a1320; border: 1px solid #f6c1c6; }
.form-page, .vote-page, .thanks-page, .legal-page { padding: 60px 0 90px; min-height: 70vh; }
.form-shell, .thanks-card, .legal-card { background: #fff; border: 1px solid var(--line); border-radius: 30px; box-shadow: var(--shadow); padding: clamp(24px, 5vw, 48px); }
.form-intro { margin-bottom: 28px; }
.form-intro h1, .vote-page h1, .thanks-card h1, .legal-card h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
.voting-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full, .voting-form .full { grid-column: 1 / -1; }
.field label, .admin-form label, .login-form label { font-weight: 700; font-size: .9rem; }
.field input, .admin-form input, .admin-form textarea, .login-form input, .search-form input { width: 100%; border: 1px solid #daccc4; background: #fff; border-radius: 13px; padding: 14px 15px; outline: none; }
.field input:focus, .admin-form input:focus, .admin-form textarea:focus, .login-form input:focus { border-color: var(--red); box-shadow: 0 0 0 4px rgba(183,25,37,.08); }
.consent { display: flex; gap: 12px; align-items: start; color: var(--muted); font-size: .88rem; padding: 14px; background: var(--cream); border-radius: 14px; }
.consent input { margin-top: 4px; accent-color: var(--red); }
.consent a { color: var(--red); font-weight: 700; }
.security-note { text-align: center; font-size: .78rem; margin: 0; }
.contestants-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contestant-choice { cursor: pointer; }
.contestant-choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card { height: 100%; display: block; background: #fff; border: 2px solid var(--line); border-radius: 24px; overflow: hidden; transition: .2s; }
.contestant-choice:hover .choice-card, .contestant-choice input:checked + .choice-card { transform: translateY(-5px); border-color: var(--red); box-shadow: var(--shadow); }
.choice-photo { height: 260px; display: grid; place-items: center; background: linear-gradient(145deg, #ffe68d, #f5aa00); overflow: hidden; }
.choice-photo > img { width: 100%; height: 100%; object-fit: cover; }
.choice-photo > span { font-family: 'Baloo 2'; font-size: 7rem; color: rgba(183,25,37,.8); }
.choice-body { display: flex; flex-direction: column; padding: 20px; min-height: 170px; }
.choice-body b { font-family: 'Baloo 2'; font-size: 1.45rem; }
.choice-body small { color: var(--muted); flex: 1; }
.choice-body em { font-style: normal; font-weight: 800; color: var(--red); margin-top: 16px; }
.contestant-choice input:checked + .choice-card .choice-body em::after { content: ' ✓'; }
.vote-submit-wrap { text-align: center; margin-top: 32px; }
.thanks-card { text-align: center; padding-top: 60px; padding-bottom: 60px; }
.success-check, .warning-icon { width: 86px; height: 86px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center; background: var(--success); color: #fff; font-size: 2.8rem; font-weight: 800; box-shadow: 0 0 0 12px rgba(19,138,80,.1); }
.warning-icon { background: var(--yellow); color: var(--red); box-shadow: 0 0 0 12px rgba(249,185,22,.15); }
.thanks-card p { font-size: 1.05rem; }
.legal-card h2 { font-size: 1.5rem; margin-top: 28px; }
.legal-card p { color: #584944; }
.legal-note { padding: 16px; background: var(--cream); border-left: 4px solid var(--yellow); }
.empty-state { text-align: center; padding: 50px 20px; border: 2px dashed var(--line); border-radius: 20px; color: var(--muted); }

/* ADMIN */
.admin-body { background: #f5f1ec; }
.admin-layout { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; background: #27110e; color: #fff; padding: 24px 18px; display: flex; flex-direction: column; }
.admin-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 5px 8px 24px; font-family: 'Baloo 2'; font-weight: 800; line-height: 1.1; }
.admin-brand img { width: 52px; height: 52px; object-fit: cover; border-radius: 50%; }
.admin-sidebar nav { display: grid; gap: 6px; }
.admin-sidebar nav a, .logout-link { color: #f3dfd9; text-decoration: none; padding: 12px 13px; border-radius: 12px; font-weight: 600; }
.admin-sidebar nav a:hover { background: rgba(255,255,255,.09); color: #fff; }
.logout-link { margin-top: auto; color: #ffaaa9; }
.admin-content { min-width: 0; }
.admin-topbar { height: 74px; padding: 0 30px; background: #fff; border-bottom: 1px solid #eadfd8; display: flex; justify-content: flex-end; align-items: center; }
.admin-topbar div { display: grid; text-align: right; }
.admin-topbar small { color: var(--muted); }
.menu-toggle { display: none; margin-right: auto; background: transparent; border: 0; font-size: 1.5rem; }
.admin-main { padding: 32px; }
.admin-page-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 26px; }
.admin-page-heading h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); }
.admin-page-heading p { margin: 5px 0 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: grid; gap: 4px; box-shadow: 0 8px 24px rgba(75,45,32,.05); }
.stat-card > span { font-size: 1.5rem; }
.stat-card small { color: var(--muted); }
.stat-card strong { font-family: 'Baloo 2'; font-size: 2rem; line-height: 1; }
.stat-highlight { background: linear-gradient(135deg, var(--red-dark), var(--red)); color: #fff; }
.stat-highlight small { color: #ffd7d8; }
.admin-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 24px; box-shadow: 0 10px 30px rgba(75,45,32,.05); }
.admin-card-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.admin-card h2 { font-size: 1.7rem; }
.admin-card p { margin: 4px 0 0; }
.admin-ranking { display: grid; gap: 12px; }
.admin-rank-row { display: flex; align-items: center; gap: 13px; padding: 13px; border: 1px solid var(--line); border-radius: 16px; }
.admin-rank-main { flex: 1; }
.admin-rank-main > div:first-child { display: flex; justify-content: space-between; gap: 10px; }
.admin-rank-main span { color: var(--muted); font-size: .8rem; }
.admin-rank-number { text-align: right; display: grid; min-width: 72px; }
.admin-rank-number strong { font-size: 1.3rem; }
.admin-rank-number span { color: var(--red); font-weight: 700; }
.admin-two-columns { display: grid; grid-template-columns: minmax(320px, .78fr) minmax(420px, 1.22fr); gap: 22px; align-items: start; }
.admin-form { display: grid; gap: 16px; margin-top: 20px; }
.admin-form label { display: grid; gap: 7px; }
.admin-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: end; }
.admin-form .check-label { display: flex; flex-direction: row; align-items: center; min-height: 50px; }
.check-label input { width: auto; accent-color: var(--red); }
.current-photo { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.current-photo img { width: 60px; height: 60px; object-fit: cover; border-radius: 50%; }
.text-link { text-align: center; color: var(--red); font-weight: 700; }
.competitor-admin-list { display: grid; gap: 12px; }
.competitor-admin-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; }
.competitor-admin-item p { font-size: .82rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.competitor-admin-item small { color: var(--red); }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--cream); color: var(--red); text-decoration: none; font-size: 1.2rem; }
.search-form { display: flex; gap: 10px; margin-bottom: 18px; }
.search-form input { max-width: 420px; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.admin-table th, .admin-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: .86rem; }
.admin-table th { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; }
.admin-table td small { display: block; color: var(--muted); max-width: 260px; }
.status { display: inline-block; padding: 5px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.status.success { background: #e3f7ec; color: #11613b; }
.status.pending { background: #fff3d4; color: #8b5a00; }
.table-note { font-size: .75rem; }
.empty-cell { text-align: center !important; color: var(--muted); }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(135deg, #7c0d16, #c51c29); }
.login-shell { width: min(940px, 100%); display: grid; grid-template-columns: 1.05fr .95fr; background: #fff; border-radius: 30px; overflow: hidden; box-shadow: 0 35px 80px rgba(40,0,0,.3); }
.login-brand-panel { position: relative; min-height: 620px; background: radial-gradient(circle at 50% 30%, #ffd94f, #f2a500); padding: 36px; display: flex; flex-direction: column; justify-content: end; overflow: hidden; }
.login-brand-panel img { position: absolute; width: 118%; max-width: none; top: 25px; left: -8%; filter: drop-shadow(0 20px 16px rgba(92,34,0,.25)); }
.login-brand-panel h1, .login-brand-panel p { position: relative; z-index: 1; }
.login-brand-panel h1 { color: var(--red); font-size: 3rem; }
.login-brand-panel p { color: #602607; font-weight: 600; }
.login-form { padding: 50px; display: flex; flex-direction: column; justify-content: center; gap: 15px; }
.login-form > img { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; }
.login-form h2 { font-size: 2.4rem; }
.login-form p { margin: -8px 0 8px; }
.login-form label { display: grid; gap: 6px; }
.login-form > a { color: var(--red); text-align: center; font-weight: 700; font-size: .85rem; }

@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-copy > p { margin-inline: auto; }
    .hero-actions, .hero-badges { justify-content: center; }
    .hero-art { min-height: 360px; }
    .hero-art img { width: min(680px, 105%); transform: none; }
    .contestants-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-two-columns { grid-template-columns: 1fr; }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { position: fixed; left: -280px; z-index: 100; width: 260px; transition: left .2s; box-shadow: 20px 0 50px rgba(0,0,0,.2); }
    .admin-menu-open .admin-sidebar { left: 0; }
    .menu-toggle { display: block; }
    .admin-topbar { justify-content: space-between; }
}
@media (max-width: 720px) {
    .top-nav a:not(.nav-cta) { display: none; }
    .brand span { font-size: .9rem; }
    .hero { min-height: auto; }
    .hero-grid { padding-top: 44px; }
    .hero-art { min-height: 280px; }
    .hero-copy h1 { font-size: 3.1rem; }
    .section-heading, .admin-page-heading { align-items: start; flex-direction: column; }
    .result-card { gap: 10px; padding: 13px; }
    .rank { width: 30px; font-size: 1rem; }
    .avatar { width: 52px; height: 52px; flex-basis: 52px; }
    .result-title-row p { max-width: 170px; }
    .prize-card { grid-template-columns: 1fr; text-align: center; }
    .prize-icon { margin-inline: auto; }
    .steps-grid { grid-template-columns: 1fr; }
    .voting-form { grid-template-columns: 1fr; }
    .field.full, .voting-form .full { grid-column: auto; }
    .contestants-grid { grid-template-columns: 1fr; }
    .choice-photo { height: 310px; }
    .footer-grid { flex-direction: column; align-items: start; }
    .admin-main { padding: 20px 14px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-card { padding: 16px; }
    .stat-card strong { font-size: 1.55rem; }
    .admin-rank-row { gap: 9px; }
    .admin-rank-main > div:first-child span { display: none; }
    .admin-form-row { grid-template-columns: 1fr; }
    .login-shell { grid-template-columns: 1fr; }
    .login-brand-panel { display: none; }
    .login-form { padding: 36px 24px; }
}
@media (max-width: 420px) {
    .container { width: min(100% - 22px, 1160px); }
    .nav-wrap { min-height: 68px; }
    .brand img { width: 46px; height: 46px; }
    .top-nav .nav-cta { padding: 9px 12px; font-size: .78rem; }
    .hero-copy h1 { font-size: 2.62rem; }
    .hero-actions .btn { width: 100%; }
    .result-title-row { gap: 8px; }
    .result-title-row h3 { font-size: 1.1rem; }
    .result-title-row p { max-width: 125px; font-size: .76rem; }
    .result-percentage { font-size: 1.03rem; }
    .leader-banner { padding: 16px; }
    .leader-banner b { font-size: 1.1rem; }
    .stats-grid { grid-template-columns: 1fr; }
}
