/* Ballkönig/-königin Umfrage – elegantes, mobile-first Design */

:root {
    --color-bg: #0f1115;
    --color-bg-2: #171a22;
    --color-card: #1b1e28;
    --color-card-border: rgba(212, 175, 110, 0.22);
    --color-gold: #d4af6e;
    --color-gold-light: #f1dcb3;
    --color-text: #f4f1ea;
    --color-text-muted: #a9a9b3;
    --color-success: #6fcf97;
    --color-error: #e77d7d;
    --radius-lg: 20px;
    --radius-md: 12px;
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --shadow-card: 0 20px 45px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}

body {
    min-height: 100svh;
    position: relative;
    overflow-x: hidden;
}

.bg-decoration {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(circle at 15% 10%, rgba(212, 175, 110, 0.16), transparent 45%),
        radial-gradient(circle at 85% 20%, rgba(212, 175, 110, 0.10), transparent 40%),
        radial-gradient(circle at 50% 100%, rgba(212, 175, 110, 0.08), transparent 55%),
        linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-2) 100%);
    pointer-events: none;
}

.page {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 0 auto;
    padding: 48px 20px 64px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.hero {
    text-align: center;
    margin-bottom: 8px;
}

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
    color: var(--color-gold);
    margin: 0 0 12px;
    font-weight: 600;
}

.hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(32px, 8vw, 46px);
    line-height: 1.1;
    margin: 0 0 14px;
    font-weight: 700;
    color: var(--color-gold-light);
}

.hero h1 .accent { color: var(--color-gold); }

.hero-sub {
    color: var(--color-text-muted);
    font-size: 15.5px;
    line-height: 1.55;
    max-width: 46ch;
    margin: 0 auto;
}

.vote-card {
    background: linear-gradient(160deg, var(--color-card), #14161f);
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius-lg);
    padding: 28px 24px 26px;
    box-shadow: var(--shadow-card);
    position: relative;
}

.vote-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.crown {
    font-size: 26px;
    color: var(--color-gold);
    line-height: 1;
}

.vote-card-head h2 {
    font-family: var(--font-serif);
    font-size: 22px;
    margin: 0;
    font-weight: 700;
    color: var(--color-text);
}

.vote-form { display: flex; flex-direction: column; gap: 12px; }

.vote-form label {
    font-size: 13px;
    color: var(--color-text-muted);
    font-weight: 500;
}

.combo { position: relative; }

.vote-form input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px; /* verhindert Zoom auf iOS */
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--color-text);
    outline: none;
    transition: border-color .15s ease, background .15s ease;
}

.vote-form input[type="text"]:focus {
    border-color: var(--color-gold);
    background: rgba(212, 175, 110, 0.06);
}

.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 0;
}

.chip {
    border: 1px solid rgba(212, 175, 110, 0.35);
    background: rgba(212, 175, 110, 0.08);
    color: var(--color-gold-light);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    transition: background .15s ease, transform .1s ease;
}

.chip:hover, .chip:focus-visible { background: rgba(212, 175, 110, 0.2); }
.chip:active { transform: scale(0.97); }

.btn-vote {
    margin-top: 6px;
    padding: 14px 18px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--color-gold), #b8894a);
    color: #17140c;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: filter .15s ease, transform .1s ease;
}

.btn-vote:hover { filter: brightness(1.06); }
.btn-vote:active { transform: scale(0.98); }
.btn-vote:disabled { opacity: 0.6; cursor: not-allowed; }

.form-msg {
    margin: 2px 0 0;
    font-size: 13.5px;
    min-height: 18px;
}

.form-msg.error { color: var(--color-error); }
.form-msg.success { color: var(--color-success); }

.voted-state {
    align-items: center;
    gap: 12px;
    padding: 6px 2px;
}

/* Wichtig: [hidden] muss die Anzeige zuverlässig unterdrücken, auch wenn
   .voted-state dieselbe CSS-Spezifität wie die UA-Regel "[hidden]{display:none}"
   hat. Ohne diese Regel würde der "Danke"-Text schon vor der Abstimmung
   angezeigt werden. */
.voted-state:not([hidden]) {
    display: flex;
}

.voted-state .check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(111, 207, 151, 0.15);
    color: var(--color-success);
    font-weight: 700;
    flex-shrink: 0;
}

.voted-state p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 14.5px;
}

.page-footer {
    text-align: center;
    margin-top: 8px;
}

.page-footer p {
    color: var(--color-text-muted);
    font-size: 12.5px;
    line-height: 1.5;
}

/* Datalist Pfeil dezent ausblenden wo möglich (Browser-abhängig, rein kosmetisch) */
input::-webkit-calendar-picker-indicator { opacity: 0.6; }

@media (max-width: 380px) {
    .page { padding: 36px 14px 48px; }
    .vote-card { padding: 22px 18px 20px; }
}

@media (min-width: 720px) {
    .page { max-width: 760px; }
    .vote-card { padding: 34px 32px 30px; }
}
