:root {
    --orange: #f39200;
    --orange-dark: #d97e00;
    --grey-dark: #4a4a4a;
    --grey-mid: #6f6f6f;
    --grey-light: #d9d9d9;
    --grey-bg: #f4f4f4;
    --text: #2c2c2c;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--text);
    line-height: 1.5;
    font-size: 15px;
    min-height: 100vh;
}

body {
    background: #2a2a2a;
}

.bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.7) 100%);
}

a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }

.page {
    max-width: 720px;
    margin: 40px auto;
    background: #fff;
    box-shadow: var(--shadow);
    border-radius: 2px;
    overflow: hidden;
}

.site-header {
    background: linear-gradient(to bottom, #5e5e5e, #3d3d3d);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px;
}

.logo-link { display: inline-block; }
.logo { height: 64px; display: block; }

.header-tag {
    color: #fff;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-align: right;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.orange-bar {
    height: 6px;
    background: var(--orange);
    border-bottom: 1px solid #b56e00;
}

.content {
    padding: 28px;
    background: #fff;
}

.flash {
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
}
.flash-error { background: #fde2e2; color: #8a1f1f; border: 1px solid #f5b5b5; }
.flash-message, .flash- { background: #e6f1d9; color: #3c5c1c; border: 1px solid #c4dca0; }

.card {
    border: 1px solid var(--grey-light);
    background: #fff;
    margin-bottom: 0;
    border-radius: 2px;
}
.card + .card { margin-top: 22px; }
.card.narrow { max-width: 420px; margin-left: auto; margin-right: auto; }

.card-title {
    background: linear-gradient(to bottom, #fafafa, #ebebeb);
    border-bottom: 1px solid var(--grey-light);
    padding: 10px 16px;
    color: var(--orange);
    font-weight: 700;
    font-size: 17px;
}
.card-body { padding: 20px 22px; }
.card-body p:first-child { margin-top: 0; }
.card-body p:last-child { margin-bottom: 0; }

h1, h2, h3 { color: var(--orange-dark); font-weight: 700; }
.subhead { font-size: 14px; margin: 18px 0 8px; color: var(--grey-dark); border-bottom: 1px dashed var(--grey-light); padding-bottom: 4px; }

.countdown {
    background: linear-gradient(to bottom, #fff8ec, #ffe9c0);
    border: 1px solid #f0c878;
    border-radius: 4px;
    padding: 14px 16px;
    margin: 18px 0 24px;
    text-align: center;
}
.countdown-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--grey-dark);
    margin-bottom: 8px;
}
.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.countdown-grid > div {
    background: #fff;
    border: 1px solid #e8c98a;
    border-radius: 3px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
}
.countdown .num {
    font-size: 28px;
    font-weight: 700;
    color: var(--orange-dark);
    line-height: 1;
}
.countdown .unit {
    font-size: 11px;
    color: var(--grey-mid);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.vote-form .field { margin-bottom: 14px; }
.vote-form label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--grey-dark);
    margin-bottom: 4px;
}
.vote-form input[type="text"],
.vote-form input[type="email"],
.vote-form input[type="password"] {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--grey-light);
    border-radius: 3px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
}
.vote-form input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 2px rgba(243, 146, 0, 0.15); }
.vote-form small { color: var(--grey-mid); font-size: 12px; }

fieldset.dates {
    border: 1px solid var(--grey-light);
    border-radius: 3px;
    margin: 16px 0;
    padding: 12px 14px;
}
fieldset.dates legend {
    font-weight: 600;
    font-size: 13px;
    color: var(--grey-dark);
    padding: 0 6px;
}
.date-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 400;
    color: var(--text);
    margin: 0;
}
.date-option + .date-option { border-top: 1px dashed var(--grey-light); }
.date-option:hover { background: #fff6e6; }
.date-option input { accent-color: var(--orange); width: 16px; height: 16px; }

.btn-primary, .btn-secondary {
    display: inline-block;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 9px 18px;
    border: 1px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
}
.btn-primary {
    background: var(--orange);
    color: #fff;
    border-color: var(--orange-dark);
}
.btn-primary:hover { background: var(--orange-dark); text-decoration: none; }
.btn-secondary {
    background: #fff;
    color: var(--grey-dark);
    border-color: var(--grey-light);
}
.btn-secondary:hover { background: var(--grey-bg); text-decoration: none; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

.results {
    width: 100%;
    border-collapse: collapse;
    margin-top: 6px;
    font-size: 14px;
}
.results th, .results td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid var(--grey-light);
    vertical-align: top;
}
.results th {
    background: #f6f6f6;
    color: var(--grey-dark);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.results td.num, .results th.num { text-align: right; }
.results tr.winner td { background: #fff4dc; font-weight: 700; }
.actions form { margin-left: 4px; }

.picked { padding-left: 22px; }
.picked li { padding: 3px 0; }

.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: var(--grey-bg);
    border: 1px solid var(--grey-light);
    border-radius: 3px;
    font-size: 13px;
    color: var(--grey-dark);
}

.site-footer {
    background: linear-gradient(to bottom, #4a4a4a, #2f2f2f);
    color: #c8c8c8;
    padding: 14px 24px;
    font-size: 12px;
    text-align: center;
}

.site-footer a {
    color: #c8c8c8;
    text-decoration: underline;
}

.site-footer a:hover {
    color: #ffffff;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.goldi {
    height: 64px;
    width: auto;
    display: block;
}

@media (max-width: 760px) {
    .page { margin: 0; border-radius: 0; }
    .site-header { flex-direction: column; gap: 10px; text-align: center; padding: 16px; }
    .header-tag { text-align: center; }
    .content { padding: 18px; }
    .countdown .num { font-size: 22px; }
    .results th, .results td { font-size: 12px; padding: 6px; }
}
