/* ============================================================
   WM 2026 Tippspiel — Premium Dark UI
   Inspired by Stripe, Linear & Vercel design systems
   ============================================================ */

/* ── Custom Properties ─────────────────────────────────────── */
:root {
    /* Background */
    --bg: #050507;
    --surface: rgba(255, 255, 255, 0.03);
    --surface-hover: rgba(255, 255, 255, 0.055);

    /* Glass */
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-border-hover: rgba(255, 255, 255, 0.12);
    --glass-blur: blur(24px);

    /* Accent palette (gold → orange → red) */
    --accent: #f59e0b;
    --accent-gold: #eab308;
    --accent-orange: #f97316;
    --accent-red: #ef4444;

    /* Gradients */
    --gradient-accent: linear-gradient(135deg, #ef4444, #f97316, #eab308);
    --gradient-text: linear-gradient(135deg, #fde68a 0%, #fbbf24 35%, #f97316 70%, #ef4444 100%);

    /* Text */
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-faint: #475569;

    /* Semantic */
    --success: #34d399;
    --error: #f87171;

    /* Typography */
    --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

    /* Radii */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Motion */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --duration: 300ms;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
    background: var(--bg) !important;
    color: var(--text) !important;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

::selection {
    background: rgba(245, 158, 11, 0.3);
    color: #fff;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ── Background — Gradient Orbs ────────────────────────────── */
.bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    will-change: transform;
}

.bg-orb--violet {
    width: 700px;
    height: 700px;
    top: -15%;
    left: -10%;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.16), transparent 70%);
    animation: orbDrift 25s ease-in-out infinite alternate;
}

.bg-orb--blue {
    width: 600px;
    height: 600px;
    bottom: -10%;
    right: -8%;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.14), transparent 70%);
    animation: orbDrift 22s ease-in-out infinite alternate-reverse;
}

.bg-orb--cyan {
    width: 450px;
    height: 450px;
    top: 40%;
    left: 30%;
    background: radial-gradient(circle, rgba(234, 179, 8, 0.08), transparent 70%);
    animation: orbDrift 28s ease-in-out infinite alternate;
    animation-delay: -8s;
}

@keyframes orbDrift {
    0%   { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(30px, -25px) scale(1.04); }
    66%  { transform: translate(-20px, 15px) scale(0.96); }
    100% { transform: translate(15px, -10px) scale(1.02); }
}

/* ── Background — Dot Grid ─────────────────────────────────── */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 1;
    background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 32px 32px;
    -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 35%, black 20%, transparent 70%);
    mask-image: radial-gradient(ellipse 70% 50% at 50% 35%, black 20%, transparent 70%);
    pointer-events: none;
}

/* ── Layout ────────────────────────────────────────────────── */
.main-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 6rem 1.5rem 4rem;
    max-width: 720px;
    margin: 0 auto;
}

/* ── Fade-in Animation ─────────────────────────────────────── */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays inside hero */
.hero .fade-in:nth-child(1) { transition-delay: 0.05s; }
.hero .fade-in:nth-child(2) { transition-delay: 0.15s; }
.hero .fade-in:nth-child(3) { transition-delay: 0.25s; }
.hero .fade-in:nth-child(4) { transition-delay: 0.35s; }

.countdown.fade-in { transition-delay: 0.15s; }

.features .fade-in:nth-child(1) { transition-delay: 0.05s; }
.features .fade-in:nth-child(2) { transition-delay: 0.15s; }
.features .fade-in:nth-child(3) { transition-delay: 0.25s; }

.register-card.fade-in { transition-delay: 0.05s; }

/* ── Hero Section ──────────────────────────────────────────── */
.hero {
    text-align: center;
    margin-bottom: 4rem;
}

/* Badge / Eyebrow */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.1rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(245, 158, 11, 0.07);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: var(--radius-full);
    margin-bottom: 2rem;
}

.hero-badge__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.35; transform: scale(0.7); }
}

/* Title */
.hero-title {
    font-size: clamp(3rem, 10vw, 5.5rem);
    font-weight: 900;
    line-height: 1.0;
    letter-spacing: -0.035em;
    margin-bottom: 1.25rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtitle */
.hero-subtitle {
    font-size: clamp(0.9rem, 2.5vw, 1.15rem);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    letter-spacing: 0.01em;
}

/* Description */
.hero-description {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.75;
}

/* ── Countdown ─────────────────────────────────────────────── */
.countdown {
    text-align: center;
    margin-bottom: 4rem;
    width: 100%;
}

.countdown__label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.countdown__grid {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.countdown__tile {
    min-width: 92px;
    padding: 1.35rem 0.75rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    text-align: center;
    transition: border-color var(--duration) var(--ease),
                background var(--duration) var(--ease);
}

.countdown__tile:hover {
    border-color: var(--glass-border-hover);
    background: var(--surface-hover);
}

.countdown__number {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.countdown__unit {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 0.45rem;
}

.countdown__sep {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-faint);
    align-self: center;
    margin-top: -0.4rem;
    animation: blink 1s step-start infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.12; }
}

/* ── Feature Highlights ────────────────────────────────────── */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    width: 100%;
    margin-bottom: 4rem;
}

.feature-card {
    padding: 1.5rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    text-align: center;
    transition: all var(--duration) var(--ease);
}

.feature-card:hover {
    border-color: var(--glass-border-hover);
    background: var(--surface-hover);
    transform: translateY(-3px);
}

.feature-card__icon {
    font-size: 1.6rem;
    margin-bottom: 0.7rem;
    display: block;
}

.feature-card__title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.3rem;
}

.feature-card__text {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ── Register Card ─────────────────────────────────────────── */
.register-card {
    width: 100%;
    max-width: 520px;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: 2.5rem 2rem;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.02),
        0 32px 80px -20px rgba(0, 0, 0, 0.6);
}

/* Top accent line (animated shimmer) */
.register-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-accent);
    background-size: 200% 100%;
    animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Inner glow from the top */
.register-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 160px;
    background: radial-gradient(ellipse, rgba(249, 115, 22, 0.06), transparent 70%);
    pointer-events: none;
}

.register-card__title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
    text-align: center;
    margin-bottom: 0.3rem;
    position: relative;
    z-index: 1;
}

.register-card__subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

/* ── Form Layout ───────────────────────────────────────────── */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.15rem;
    position: relative;
    z-index: 1;
}

/* ── Form Labels ───────────────────────────────────────────── */
.form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
}

/* ── Form Inputs ───────────────────────────────────────────── */
.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text) !important;
    font-family: var(--font);
    font-size: 0.95rem;
    padding: 0.8rem 1rem;
    transition: all 0.25s var(--ease);
    outline: none !important;
}

.form-control::placeholder {
    color: var(--text-faint) !important;
}

.form-control:hover {
    border-color: rgba(255, 255, 255, 0.14) !important;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(245, 158, 11, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.08) !important;
}

.form-control:focus-visible {
    outline: none !important;
}

.form-control.is-invalid {
    border-color: rgba(248, 113, 113, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.08) !important;
}

/* ── Validation Feedback ───────────────────────────────────── */
.invalid-feedback {
    font-size: 0.75rem;
    color: var(--error);
    margin-top: 0.35rem;
    display: none;
    text-align: left;
}

.form-control.is-invalid ~ .invalid-feedback,
.form-control.is-invalid + .invalid-feedback {
    display: block;
}

/* ── Altcha Widget ─────────────────────────────────────────── */
.captcha-wrapper {
    position: relative;
    z-index: 1;
}

altcha-widget {
    --altcha-border-radius: 0.75rem;
    --altcha-border-width: 1px;
    --altcha-color-border: rgba(255, 255, 255, 0.08);
    --altcha-color-text: var(--text-secondary);
    --altcha-color-checkbox-label: var(--text-secondary);
    --altcha-color-base: rgba(255, 255, 255, 0.04);
    --altcha-color-text-checkbox: var(--text-secondary);
    width: 100%;
    display: block;
}

/* ── Privacy Note ──────────────────────────────────────────── */
.privacy-note {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    position: relative;
    z-index: 1;
}

.privacy-note__icon {
    flex-shrink: 0;
    color: var(--accent);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* ── Submit Button ─────────────────────────────────────────── */
.btn-register {
    width: 100%;
    padding: 0.85rem 2rem;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.015em;
    border: none;
    border-radius: var(--radius-lg);
    background: var(--gradient-accent);
    background-size: 200% 200%;
    color: #fff;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    position: relative;
    overflow: hidden;
    z-index: 1;
    margin-top: 1.25rem;
}

/* Shine overlay */
.btn-register::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--duration) var(--ease);
}

.btn-register:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow:
        0 4px 16px rgba(249, 115, 22, 0.3),
        0 8px 40px rgba(239, 68, 68, 0.15);
}

.btn-register:hover:not(:disabled)::before {
    opacity: 1;
}

.btn-register:active:not(:disabled) {
    transform: translateY(0);
    box-shadow:
        0 2px 8px rgba(249, 115, 22, 0.2),
        0 4px 16px rgba(239, 68, 68, 0.1);
}

.btn-register:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-register .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
    vertical-align: -0.1em;
}

/* ── Alert Messages ────────────────────────────────────────── */
.alert-msg {
    border-radius: var(--radius-lg);
    border: 1px solid;
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-top: 1.25rem;
    animation: fadeInUp 0.4s var(--ease) forwards;
    position: relative;
    z-index: 1;
}

.alert-msg--success {
    background: rgba(52, 211, 153, 0.07);
    border-color: rgba(52, 211, 153, 0.18);
    color: #a7f3d0;
}

.alert-msg--error {
    background: rgba(248, 113, 113, 0.07);
    border-color: rgba(248, 113, 113, 0.18);
    color: #fecaca;
}

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
    position: relative;
    z-index: 10;
    padding: 3rem 1.5rem 2rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-faint);
}

.site-footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--duration) var(--ease);
}

.site-footer a:hover {
    color: var(--accent);
}

/* ── Keyframes ─────────────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
    .main-content {
        padding: 4rem 1rem 3rem;
    }

    .hero {
        margin-bottom: 3rem;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-bottom: 3rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .countdown {
        margin-bottom: 3rem;
    }

    .countdown__grid {
        gap: 0.4rem;
        flex-wrap: nowrap;
    }

    .countdown__tile {
        min-width: 68px;
        padding: 1rem 0.5rem 0.85rem;
    }

    .countdown__sep {
        font-size: 1.4rem;
    }

    .register-card {
        padding: 2rem 1.25rem;
        border-radius: var(--radius-xl);
    }

    .hero-title {
        letter-spacing: -0.025em;
    }
}

@media (max-width: 380px) {
    .countdown__tile {
        min-width: 56px;
        padding: 0.85rem 0.35rem 0.7rem;
    }

    .countdown__grid {
        gap: 0.25rem;
    }

    .countdown__sep {
        font-size: 1.2rem;
    }

    .hero-badge {
        font-size: 0.65rem;
        padding: 0.35rem 0.9rem;
    }
}
