@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,600;1,700&display=swap');

:root {
    --wine: #610a16;
    --red: #d81d2b;
    --ink: #171212;
    --cream: #fff8ed;
    --gold: #e7ae45;
    --muted: #9a8f8c;
    --line: #eadfd2;
}

* { box-sizing: border-box; }
html { background: var(--cream); }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: "Be Vietnam Pro", "Segoe UI", Arial, sans-serif; font-feature-settings: "kern" 1, "liga" 1; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.site-header { height: 76px; padding: 0 clamp(24px, 6vw, 100px); display: flex; align-items: center; justify-content: space-between; color: #fff; background: var(--wine); border-bottom: 1px solid rgba(255,255,255,.15); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; font-size: 15px; letter-spacing: .06em; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font-family: inherit; font-size: 20px; font-weight: 800; }
.site-nav { display: flex; align-items: center; gap: 22px; font-size: 14px; font-weight: 700; }
.site-nav a { opacity: .88; }
.site-nav a:hover { opacity: 1; color: var(--gold); }
.site-nav form { margin: 0; }
.nav-button { padding: 0; border: 0; color: #fff; background: transparent; cursor: pointer; font-weight: 700; }
.nav-login { padding: 10px 15px; border: 1px solid rgba(255,255,255,.5); border-radius: 4px; }
.admin-body { background: #f5f1ed; }
.admin-header { min-height: 76px; padding: 0 clamp(24px, 6vw, 100px); display: flex; align-items: center; justify-content: space-between; color: #fff; background: #25151a; border-bottom: 3px solid var(--gold); }

.flash { width: min(1100px, calc(100% - 40px)); margin: 22px auto -10px; padding: 14px 16px; border-radius: 6px; font-weight: 700; }
.flash-success { color: #135c31; background: #dff6e7; border: 1px solid #afe4bd; }
.flash-error { color: #971c26; background: #fde3e5; border: 1px solid #f1b8bd; }
.hero { min-height: 362px; padding: 76px clamp(24px, 11vw, 180px); position: relative; overflow: hidden; color: #fff; background: radial-gradient(circle at 82% 15%, rgba(242,185,62,.28), transparent 19%), linear-gradient(120deg, #3e050d, #970f20 57%, #65101b); }
.hero::after { content: "01"; position: absolute; right: 9%; top: -100px; color: rgba(255,255,255,.06); font-family: inherit; font-size: 430px; font-weight: 900; line-height: 1; }
.eyebrow { margin: 0 0 12px; color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.hero h1 { position: relative; z-index: 1; max-width: 800px; margin: 0; font-family: inherit; font-size: clamp(42px, 5.6vw, 76px); font-weight: 800; line-height: 1.13; letter-spacing: -.035em; }
.hero h1 em { color: #f4c66a; font-weight: 400; }
.hero-copy { position: relative; z-index: 1; max-width: 460px; margin: 24px 0 0; color: rgba(255,255,255,.74); font-size: 17px; line-height: 1.6; }

.draw-board { width: min(1100px, calc(100% - 40px)); margin: -46px auto 0; position: relative; padding: clamp(26px, 4vw, 54px); background: #fff; box-shadow: 0 22px 55px rgba(77,19,23,.15); border: 1px solid #f2e7da; }
.draw-heading { display: flex; justify-content: space-between; gap: 28px; align-items: flex-start; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.draw-heading h2, .admin-wrap h1, .auth-card h1 { margin: 0; font-family: inherit; font-size: clamp(30px, 4vw, 46px); font-weight: 800; line-height: 1.22; letter-spacing: -.025em; }
.draw-date, .admin-topline p, .form-wrap > p, .auth-card > p { color: #756b68; }
.draw-seal { width: 75px; height: 75px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: #b4740b; font-family: inherit; font-weight: 800; line-height: 1.05; text-align: center; transform: rotate(-12deg); }
.prize-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 30px 0; }
.prize-card { padding: 24px 16px 20px; text-align: center; background: #fff9f1; border: 1px solid #f1debe; border-radius: 5px; transition: transform .35s ease, background .35s ease, box-shadow .35s ease; }
.prize-card p { margin: 0 0 8px; color: #8a6a43; font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.prize-card strong { display: block; min-height: 47px; color: #54202a; font-family: inherit; font-size: clamp(30px, 4vw, 43px); font-weight: 800; letter-spacing: .05em; }
.prize-card span { color: var(--muted); font-size: 12px; font-weight: 700; }
.prize-card.revealed { transform: translateY(-5px); color: #fff; background: linear-gradient(130deg, #7c0a18, #bf1324); border-color: #7c0a18; box-shadow: 0 12px 22px rgba(101,10,23,.25); }
.prize-card.revealed p, .prize-card.revealed span { color: #f8d792; }
.prize-card.revealed strong { color: #fff; animation: result-in .5s both; }
@keyframes result-in { from { opacity: 0; transform: scale(.65) rotate(-4deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
.draw-actions { display: flex; align-items: center; justify-content: center; gap: 20px; padding-top: 8px; }
.draw-actions p { margin: 0; color: #796e6a; font-size: 14px; }
.draw-button { display: inline-flex; justify-content: center; align-items: center; min-height: 45px; padding: 0 22px; border: 0; border-radius: 3px; color: #fff; background: var(--red); box-shadow: 0 8px 15px rgba(173,16,33,.2); cursor: pointer; font-size: 14px; font-weight: 900; letter-spacing: .03em; transition: transform .15s ease, background .15s ease; }
.draw-button:hover { background: #bc1220; transform: translateY(-1px); }
.draw-button:disabled { opacity: .7; cursor: default; transform: none; }
.link-button { text-decoration: none; }
.trust-row { width: min(900px, calc(100% - 40px)); margin: 56px auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.trust-row div { display: flex; align-items: center; gap: 14px; }
.trust-row b { color: var(--red); font-family: inherit; font-size: 30px; font-weight: 800; }
.trust-row span { color: #665b57; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.empty-state { width: min(720px, calc(100% - 40px)); margin: -45px auto 58px; position: relative; padding: 62px 38px; text-align: center; background: #fff; box-shadow: 0 22px 55px rgba(77,19,23,.15); }
.empty-symbol { color: var(--gold); font-size: 46px; }
.empty-state h2 { margin: 7px 0; font-family: inherit; font-size: 33px; font-weight: 800; }
.empty-state p { margin: 0 auto 25px; max-width: 450px; color: #756b68; line-height: 1.6; }
.latest-results { width: min(1100px, calc(100% - 40px)); margin: 46px auto; padding: clamp(24px, 4vw, 42px); border: 1px solid var(--line); background: #fff; }
.latest-results-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.latest-results-heading h2 { margin: 0; font-size: clamp(24px, 3vw, 34px); font-weight: 800; letter-spacing: -.025em; }
.latest-results-heading p:not(.eyebrow) { margin: 7px 0 0; color: #756b68; font-size: 14px; }
.latest-results-heading a { color: #a11421; font-size: 14px; font-weight: 800; white-space: nowrap; }
.latest-result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding-top: 23px; }
.latest-result-grid div { padding: 16px; text-align: center; border: 1px solid #f1debe; background: #fff9f1; }
.latest-result-grid span { display: block; margin-bottom: 7px; color: #8a6a43; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.latest-result-grid b { color: var(--wine); font-size: 25px; font-weight: 800; }

.auth-wrap { min-height: calc(100vh - 76px); padding: 74px 20px; background: linear-gradient(135deg, #f9ede0, #fffaf4); }
.auth-card { width: min(460px, 100%); margin: auto; padding: 42px; background: #fff; box-shadow: 0 22px 55px rgba(77,19,23,.12); border-top: 5px solid var(--red); }
.auth-card h1 { font-size: 38px; }
.auth-card label, .admin-form > label { display: grid; gap: 8px; margin-top: 21px; color: #3c302d; font-size: 13px; font-weight: 800; }
input { width: 100%; min-height: 45px; padding: 10px 12px; outline: 0; border: 1px solid #d9ccc3; border-radius: 3px; color: var(--ink); background: #fff; }
input:focus { border-color: #aa2634; box-shadow: 0 0 0 3px rgba(216,29,43,.1); }
.auth-card .draw-button { width: 100%; margin-top: 24px; }
.check-label { display: flex !important; align-items: center; grid-template-columns: auto 1fr; gap: 8px !important; font-weight: 500 !important; }
.check-label input { width: 15px; min-height: 15px; }
.field-error { color: #bd1322; font-weight: 600; }

.admin-wrap { width: min(1120px, calc(100% - 40px)); margin: 55px auto; }
.admin-topline { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 32px; }
.admin-topline p { margin: 10px 0 0; }
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--line); background: #fff; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { padding: 15px 18px; color: #806d60; background: #fff8ed; font-size: 11px; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.admin-table td { padding: 18px; border-top: 1px solid #f0e6dc; white-space: nowrap; }
.status { padding: 5px 9px; border-radius: 99px; font-size: 12px; font-weight: 800; }
.status-draft { color: #956000; background: #fff0c7; }
.status-published { color: #126b38; background: #dcefe2; }
.table-actions { display: flex; align-items: center; gap: 12px; }
.table-actions a, .table-actions button { border: 0; color: #b11120; background: transparent; cursor: pointer; font-size: 13px; font-weight: 800; }
.table-actions form { margin: 0; }
.no-data { padding: 38px !important; color: #887d79; text-align: center; }
.form-wrap { width: min(800px, calc(100% - 40px)); }
.back-link { display: inline-block; margin-bottom: 28px; color: #9d1825; font-size: 14px; font-weight: 800; }
.form-wrap > p { margin: 10px 0 28px; }
.admin-form { padding: 28px; border: 1px solid var(--line); background: #fff; }
.prize-form-heading { display: flex; align-items: center; justify-content: space-between; margin-top: 31px; padding-top: 24px; border-top: 1px solid var(--line); }
.prize-form-heading h2 { margin: 0; font-family: inherit; font-size: 27px; font-weight: 800; }
.prize-form-heading button { border: 0; color: #a11421; background: transparent; cursor: pointer; font-size: 13px; font-weight: 800; }
.prize-input-row { display: grid; grid-template-columns: 1fr 1fr 32px; gap: 10px; align-items: end; margin-top: 15px; }
.prize-input-row label { display: grid; gap: 7px; color: #655a56; font-size: 12px; font-weight: 800; }
.remove-prize { width: 32px; height: 32px; border: 1px solid #efd6d7; border-radius: 3px; color: #b11120; background: #fff5f5; cursor: pointer; font-size: 20px; }
.form-actions { display: flex; gap: 12px; margin-top: 30px; }
.secondary-button { min-height: 45px; padding: 0 18px; border: 1px solid #ab1725; border-radius: 3px; color: #9c111f; background: #fff; cursor: pointer; font-weight: 800; }

@media (max-width: 680px) {
    .site-header { height: 65px; padding: 0 18px; }
    .brand { font-size: 12px; }
    .site-nav { gap: 12px; font-size: 12px; }
    .nav-login { padding: 8px; }
    .hero { min-height: 318px; padding: 58px 24px; }
    .draw-board { margin-top: -34px; padding: 24px 18px; }
    .draw-heading { gap: 16px; }
    .draw-seal { width: 55px; height: 55px; font-size: 11px; }
    .prize-grid { grid-template-columns: 1fr; }
    .draw-actions, .admin-topline { align-items: stretch; flex-direction: column; }
    .draw-actions p { text-align: center; }
    .trust-row { grid-template-columns: 1fr; gap: 15px; margin: 36px auto; }
    .auth-card { padding: 32px 24px; }
    .admin-wrap { margin: 35px auto; }
    .admin-table th:nth-child(4), .admin-table td:nth-child(4) { display: none; }
    .admin-form { padding: 20px 16px; }
    .prize-input-row { grid-template-columns: 1fr 1fr 27px; gap: 7px; }
    .remove-prize { width: 27px; }
    .latest-results-heading { align-items: start; flex-direction: column; }
    .latest-result-grid { grid-template-columns: 1fr; }
}

.auth-footnote { margin-top: 22px !important; text-align: center; font-size: 14px; }
.auth-footnote a, .back-link { color: var(--red); font-weight: 800; }
.admin-tabs { display: flex; gap: 22px; margin: 0 0 24px; border-bottom: 1px solid var(--line); }
.admin-tabs a { padding: 0 0 12px; color: #756b68; font-size: 14px; font-weight: 800; }
.admin-tabs a.active { color: var(--red); border-bottom: 2px solid var(--red); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 28px 0; }
.metric-card { min-height: 126px; display: flex; flex-direction: column; justify-content: space-between; padding: 21px; border: 1px solid var(--line); background: #fff; }
.metric-card b { color: var(--wine); font-family: inherit; font-size: 38px; font-weight: 800; }
.metric-card span { color: #786d67; font-size: 12px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.account-list { margin-top: 30px; padding: 25px; border: 1px solid var(--line); background: #fff; }
.account-list h2 { margin: 0 0 14px; font-family: inherit; font-size: 27px; font-weight: 800; }
.account-draw { display: flex; justify-content: space-between; gap: 20px; padding: 15px 0; border-top: 1px solid #f0e6dc; font-size: 14px; }
.account-draw b { color: #a11421; }
.history-card { display: grid; grid-template-columns: minmax(210px, .8fr) 1.2fr; gap: 30px; margin: 18px 0; padding: 25px; border: 1px solid var(--line); background: #fff; }
.history-card h2 { margin: 0; font-family: inherit; font-size: 27px; font-weight: 800; }
.history-results { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.history-results span { padding: 11px; color: var(--wine); background: #fff8ed; font-family: inherit; font-size: 21px; font-weight: 700; }
.history-results b { display: block; margin-bottom: 3px; color: #896b43; font-family: inherit; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.empty-inline { padding: 30px; color: #756b68; border: 1px solid var(--line); background: #fff; }
.search-form { display: flex; gap: 10px; margin: 0 0 20px; }
.search-form input { max-width: 380px; }
.status-active { color: #005d75; background: #d9f2f8; }
.status-completed { color: #126b38; background: #dcefe2; }
.status-suspended { color: #971c26; background: #fde3e5; }
.inline-action { display: inline-block; margin-top: 14px; }
@media (max-width: 680px) { .metric-grid { grid-template-columns: repeat(2, 1fr); } .history-card { grid-template-columns: 1fr; gap: 15px; } .history-results { grid-template-columns: 1fr; } .search-form { flex-direction: column; } .search-form input { max-width: none; } }
