/* Secret Santa — mobile-first styles. */

:root {
    --bg: #14110f;
    --card: rgba(24, 19, 17, 0.82);
    --line: rgba(255, 255, 255, 0.14);
    --text: #f7f0e6;
    --muted: #c9bfb2;
    --red: #d23a32;
    --red-dark: #a82821;
    --green: #3f9a62;
    --gold: #f0c05a;
    --danger-bg: rgba(210, 58, 50, 0.18);
    --ok-bg: rgba(63, 154, 98, 0.2);
    --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg) url("../img/slider/3.jpg") center / cover fixed no-repeat;
}

img { max-width: 100%; height: auto; }

a { color: var(--gold); }
a:hover { color: #fff; }

/* Header */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(20, 17, 15, 0.85);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.brand { display: inline-flex; flex-shrink: 0; }
.brand img { display: block; width: 120px; height: auto; }

.site-nav { display: flex; gap: 0.25rem; }

.site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0.75rem;
    border-radius: 999px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a:focus-visible { background: rgba(255, 255, 255, 0.12); }

/* Page layout */

.page {
    flex: 1;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 1.5rem 1rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.card-art {
    display: block;
    width: 100%;
    max-width: 220px;
    margin: 0 auto 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

h1, h2 {
    margin: 0 0 0.5rem;
    font-family: "Amarante", Georgia, serif;
    font-weight: 400;
    line-height: 1.2;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }

p { margin: 0 0 1rem; }
.lead { color: var(--muted); }
.muted { color: var(--muted); font-size: 0.9rem; }
.center { text-align: center; }

/* Forms */

.field { margin-bottom: 1rem; }

label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 0.7rem 0.9rem;
    font: inherit;
    font-size: 1rem; /* 16px stops iOS zooming into the field */
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 10px;
}

textarea { resize: vertical; min-height: 110px; }

input::placeholder, textarea::placeholder { color: #988d80; }

input:focus, textarea:focus {
    outline: 2px solid var(--gold);
    outline-offset: 1px;
    background: rgba(255, 255, 255, 0.12);
}

.hint { margin: 0.35rem 0 0; font-size: 0.85rem; color: var(--muted); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.6rem 1.5rem;
    font: inherit;
    font-weight: 600;
    color: #fff;
    background: var(--red);
    border: 0;
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
}

.btn:hover, .btn:focus-visible { background: var(--red-dark); color: #fff; }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn-block { display: flex; width: 100%; }
.btn-ghost { background: transparent; border: 1px solid rgba(255, 255, 255, 0.4); }
.btn-ghost:hover, .btn-ghost:focus-visible { background: rgba(255, 255, 255, 0.14); }

.form-links { margin: 1.25rem 0 0; text-align: center; font-size: 0.95rem; }

.alert {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--line);
}

.alert-error { background: var(--danger-bg); border-color: rgba(210, 58, 50, 0.6); }
.alert-ok { background: var(--ok-bg); border-color: rgba(63, 154, 98, 0.7); }

/* Recovery phrase */

.phrase {
    margin: 0.5rem 0;
    padding: 0.75rem 0.5rem;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-align: center;
    color: var(--gold);
    background: rgba(0, 0, 0, 0.35);
    border: 1px dashed var(--gold);
    border-radius: 10px;
    overflow-wrap: anywhere;
    user-select: all;
}

/* Home hero */

.hero { text-align: center; padding: 1rem 0; }

.hero .date {
    margin: 0 0 0.25rem;
    color: var(--gold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 600;
}

.hero h1 {
    font-size: 3rem;
    text-shadow: 0 3px 20px rgba(0, 0, 0, 0.6);
}

.countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    max-width: 440px;
    margin: 1.5rem auto;
}

.countdown div {
    padding: 0.75rem 0.25rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.countdown strong {
    display: block;
    font-size: 1.7rem;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.countdown span {
    font-size: 0.7rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.countdown-done { font-size: 1.4rem; margin: 1.5rem 0; color: var(--gold); }

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 320px;
    margin: 1.5rem auto 0;
}

/* Login result */

.wish {
    margin: 0 0 1rem;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border-left: 4px solid var(--gold);
    border-radius: 8px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.recipient { color: #ff7d73; font-weight: 600; }

/* Footer */

.site-footer {
    padding: 1.25rem 1rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    background: rgba(20, 17, 15, 0.85);
    border-top: 1px solid var(--line);
}

.site-footer p { margin: 0; }

/* Wider screens */

@media (min-width: 640px) {
    .brand img { width: 150px; }
    .site-header { padding: 0.75rem 2rem; }
    .site-nav a { padding: 0 1rem; }
    .card { padding: 2rem; }
    .card-art { max-width: 260px; }
    .hero h1 { font-size: 4.5rem; }
    .countdown strong { font-size: 2.4rem; }
    .hero-actions { flex-direction: row; justify-content: center; max-width: none; }
    .hero-actions .btn { min-width: 180px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
