/* ==========================================================
   GoVo Wichteln 2026 · Design-System
   ========================================================== */

:root {
    --fir-900: #0a1f16;
    --fir-800: #0d2a1f;
    --fir-700: #113a2b;
    --fir-600: #184a37;
    --fir-500: #205c45;
    --fir-400: #2b7556;
    --fir-300: #4f9d7b;

    --cream-50: #fdf8ec;
    --cream-100: #f8f0d8;
    --cream-200: #f1e3b8;

    --gold-500: #e4b86a;
    --gold-400: #f4c77b;
    --gold-300: #f8d791;

    --red-500: #b23b3b;
    --red-400: #d55454;

    --ink: #1c1a14;
    --ink-soft: #3c3a30;

    --bg: var(--fir-800);
    --surface: rgba(255, 255, 255, 0.05);
    --surface-strong: rgba(255, 255, 255, 0.09);
    --border: rgba(255, 255, 255, 0.12);
    --text: var(--cream-50);
    --text-dim: rgba(253, 248, 236, 0.72);
    --accent: var(--gold-400);

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --radius-xl: 28px;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.15);
    --shadow: 0 10px 30px rgba(0,0,0,0.25);
    --shadow-lg: 0 30px 60px rgba(0,0,0,0.35);

    --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-display: "Playfair Display", "Georgia", serif;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-sans);
    background:
      radial-gradient(1200px 600px at 10% -10%, rgba(228,184,106,0.08), transparent 60%),
      radial-gradient(900px 500px at 110% 0%, rgba(78,157,123,0.12), transparent 60%),
      linear-gradient(180deg, var(--fir-900), var(--fir-800) 60%, var(--fir-900));
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 var(--space-3);
    color: var(--cream-50);
    letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 var(--space-4); color: var(--text-dim); }

a { color: var(--gold-400); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .8; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--space-5); }
.muted { color: var(--text-dim); font-size: .95rem; }
.center { text-align: center; }

/* ---------- Header / Nav ---------- */
.site-header {
    padding: var(--space-5) 0;
    position: relative;
    z-index: 10;
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--cream-50);
}
.brand-emoji { font-size: 1.6rem; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }
.brand-text { font-family: var(--font-display); }
.brand-year {
    color: var(--gold-400);
    margin-left: 4px;
    font-weight: 700;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}
.nav-links a:not(.btn) {
    color: var(--text-dim);
    font-weight: 500;
    font-size: .95rem;
}
.nav-links a:hover { color: var(--cream-50); }
.nav-user {
    color: var(--text-dim);
    font-size: .9rem;
    padding: 0 var(--space-2);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: .95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background .2s, color .2s, border-color .2s;
    text-decoration: none;
    font-family: inherit;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
    color: #3a2a0f;
    border-color: var(--gold-500);
}
.btn-primary:hover { opacity: .95; }

.btn-ghost {
    background: transparent;
    color: var(--cream-50);
    border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface); }

.btn-danger {
    background: rgba(213,84,84,0.15);
    color: #ffb4b4;
    border-color: rgba(213,84,84,0.4);
}
.btn-danger:hover { background: rgba(213,84,84,0.25); }

.btn-big {
    padding: 16px 28px;
    font-size: 1.05rem;
}
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] {
    opacity: .5;
    pointer-events: none;
    cursor: not-allowed;
}

.link-btn {
    background: none;
    border: none;
    color: var(--gold-400);
    cursor: pointer;
    font: inherit;
    padding: 0;
    text-decoration: underline;
}

/* ---------- Cards ---------- */
.card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.card-strong { background: var(--surface-strong); }

.card h2, .card h3 { margin-top: 0; }

.card-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-5);
}

/* ---------- Formulare ---------- */
label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    color: var(--cream-100);
    font-size: .95rem;
}
.form-row { margin-bottom: var(--space-4); }
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}
@media (max-width: 600px) {
    .form-grid { grid-template-columns: 1fr; }
}

input[type="text"], input[type="email"], input[type="password"],
input[type="date"], input[type="datetime-local"], input[type="number"],
textarea, select {
    width: 100%;
    padding: 12px 14px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--cream-50);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--gold-400);
    box-shadow: 0 0 0 3px rgba(244,199,123,0.2);
}
textarea { min-height: 90px; resize: vertical; }

.help-text {
    font-size: .85rem;
    color: var(--text-dim);
    margin-top: var(--space-1);
}

/* ---------- Flash-Meldungen ---------- */
.flash-stack { margin-top: var(--space-4); }
.flash {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: var(--space-3);
    font-weight: 500;
    border: 1px solid var(--border);
    background: var(--surface);
}
.flash-success { background: rgba(79,157,123,0.2); border-color: rgba(79,157,123,0.4); color: #bfe8d4; }
.flash-error   { background: rgba(213,84,84,0.2); border-color: rgba(213,84,84,0.4); color: #ffbdbd; }
.flash-info    { background: rgba(244,199,123,0.15); border-color: rgba(244,199,123,0.35); color: var(--cream-100); }

/* ---------- Hero / Landing ---------- */
.hero {
    text-align: center;
    padding: var(--space-8) 0;
    position: relative;
}
.hero-title {
    font-size: clamp(2.4rem, 7vw, 4.2rem);
    background: linear-gradient(135deg, var(--cream-50), var(--gold-400) 70%, var(--gold-500));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: var(--space-4);
}
.hero-sub {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto var(--space-6);
}
.hero-cta {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    flex-wrap: wrap;
}

.feature-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-5);
    margin-top: var(--space-7);
}
.feature {
    padding: var(--space-5);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: left;
}
.feature-icon { font-size: 2rem; margin-bottom: var(--space-2); }

/* ---------- Dashboard ---------- */
.dashboard-hero {
    padding: var(--space-6);
    background: linear-gradient(135deg, rgba(79,157,123,0.2), rgba(244,199,123,0.08));
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-6);
    position: relative;
    overflow: hidden;
}
.dashboard-hero h1 { margin-bottom: var(--space-2); }

.countdown {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-4);
    flex-wrap: wrap;
}
.countdown-box {
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--border);
    padding: 12px 18px;
    border-radius: var(--radius);
    min-width: 76px;
    text-align: center;
}
.countdown-box .num {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--gold-400);
    display: block;
    line-height: 1.1;
}
.countdown-box .lbl {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
}

.group-card {
    padding: var(--space-5);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: transform .18s, border-color .18s, background .18s;
    display: block;
    color: inherit;
}
.group-card:hover {
    transform: translateY(-3px);
    border-color: var(--gold-400);
    background: var(--surface-strong);
}
.group-card h3 { color: var(--cream-50); margin-bottom: var(--space-2); }
.group-meta {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    font-size: .9rem;
    color: var(--text-dim);
    margin-top: var(--space-3);
}
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .8rem;
    background: rgba(244,199,123,0.18);
    color: var(--gold-400);
    border: 1px solid rgba(244,199,123,0.3);
    font-weight: 500;
}
.badge-green { background: rgba(79,157,123,0.2); color: #bfe8d4; border-color: rgba(79,157,123,0.4); }
.badge-red { background: rgba(213,84,84,0.2); color: #ffbdbd; border-color: rgba(213,84,84,0.4); }
.badge-muted { background: rgba(255,255,255,0.08); color: var(--text-dim); border-color: var(--border); }

/* ---------- Group page ---------- */
.invite-code-box {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: rgba(0,0,0,0.25);
    border: 2px dashed rgba(244,199,123,0.4);
    border-radius: var(--radius);
    margin: var(--space-4) 0;
    flex-wrap: wrap;
}
.invite-code {
    font-family: 'Courier New', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--gold-400);
    flex: 1;
    min-width: 160px;
}

.member-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: var(--space-2);
}
.member-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(0,0,0,0.15);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    gap: var(--space-3);
    flex-wrap: wrap;
}
.member-name { font-weight: 600; }
.member-wichtel { color: var(--gold-400); font-weight: 500; font-size: .95rem; }

/* ---------- Checklist ---------- */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); }
.checklist li {
    padding: 10px 14px;
    background: rgba(0,0,0,0.15);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--border);
}
.checklist li.ok   { border-left-color: #8fd19e; }
.checklist li.fail { border-left-color: var(--red-400); }
.checklist li.ok::before   { content: "✓ "; color: #8fd19e; font-weight: bold; }
.checklist li.fail::before { content: "✗ "; color: var(--red-400); font-weight: bold; }

/* ---------- Draw reveal ---------- */
.draw-stage {
    text-align: center;
    padding: var(--space-7) var(--space-4);
}
.gift-box {
    width: 180px;
    height: 180px;
    margin: 0 auto var(--space-5);
    position: relative;
    cursor: pointer;
    transition: transform .4s cubic-bezier(.34,1.56,.64,1);
}
.gift-box:hover { transform: scale(1.05) rotate(-2deg); }
.gift-box::before {
    content: "🎁";
    font-size: 150px;
    display: block;
    filter: drop-shadow(0 20px 40px rgba(244,199,123,0.4));
    animation: float 3s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

.reveal-name {
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 3.4rem);
    color: var(--gold-400);
    margin: var(--space-5) 0 var(--space-3);
    animation: popIn .8s cubic-bezier(.34,1.56,.64,1);
}
@keyframes popIn {
    from { transform: scale(.5); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.confetti {
    position: fixed; inset: 0; pointer-events: none; z-index: 99;
}
.confetti span {
    position: absolute;
    width: 10px; height: 10px;
    animation: fall 3.5s linear forwards;
}
@keyframes fall {
    to { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ---------- Shopping cards / ideas ---------- */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-5);
}
.shop-card {
    padding: var(--space-5);
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: transform .18s, border-color .18s, background .18s;
    color: var(--cream-50);
}
.shop-card:hover {
    transform: translateY(-3px);
    border-color: var(--gold-400);
    background: var(--surface-strong);
}
.shop-icon { font-size: 2.2rem; display: block; margin-bottom: var(--space-2); }
.shop-name { font-weight: 600; font-size: 1.05rem; }

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-4);
}
.cat-card {
    padding: var(--space-5);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.cat-card h3 { color: var(--gold-400); margin-bottom: var(--space-2); }
.cat-card ul { padding-left: 20px; margin: 0; color: var(--text-dim); }
.cat-card li { margin-bottom: 4px; }

/* ---------- Auth pages ---------- */
.auth-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-7) var(--space-4);
    min-height: calc(100vh - 160px);
}
.auth-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-7);
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
}
.auth-card h1 {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: var(--space-2);
}
.auth-card .sub {
    text-align: center;
    margin-bottom: var(--space-5);
}

/* ---------- Footer ---------- */
.site-footer {
    padding: var(--space-7) 0 var(--space-5);
    text-align: center;
    color: var(--text-dim);
    font-size: .9rem;
    margin-top: var(--space-8);
    border-top: 1px solid var(--border);
}
.site-footer p { margin: 4px 0; color: var(--text-dim); }

/* ---------- Snow ---------- */
.snow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}
.snow span {
    position: absolute;
    top: -20px;
    color: rgba(255,255,255,0.65);
    animation: snowfall linear infinite;
    user-select: none;
}
@keyframes snowfall {
    to { transform: translateY(110vh); }
}

/* ---------- Secret / spoiler ---------- */
.secret-note {
    font-style: italic;
    color: var(--gold-300);
    margin-top: var(--space-4);
}

.greeting-card {
    padding: var(--space-5);
    background: linear-gradient(135deg, rgba(244,199,123,0.12), rgba(79,157,123,0.12));
    border: 1px solid rgba(244,199,123,0.25);
    border-radius: var(--radius-lg);
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--cream-100);
}

.inline-actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-top: var(--space-4);
}

/* ---------- Utilities ---------- */
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mb-0 { margin-bottom: 0; }

.hr-x { border: 0; border-top: 1px solid var(--border); margin: var(--space-5) 0; }

.tabs {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
}
.tab-btn {
    background: transparent;
    color: var(--text-dim);
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: .95rem;
    font-family: inherit;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.tab-btn.active { color: var(--gold-400); border-bottom-color: var(--gold-400); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .snow { display: none; }
}

@media (max-width: 600px) {
    .site-header { padding: var(--space-4) 0; }
    .nav { gap: var(--space-2); }
    .nav-user { display: none; }
    .card { padding: var(--space-5); }
    .snow span { display: none; }
    .snow span:nth-child(3n) { display: block; } /* weniger Flocken */
}
