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

:root {
    --bg:         #fef9f0;
    --yellow:     #ffe066;
    --yellow-dark:#f9ca24;
    --green-dark: #5cb85c;
    --text:       #3d3d3d;
    --text-light: #888;
    --white:      #ffffff;
    --danger:     #d63031;
    --radius:     16px;
    --shadow:     0 4px 20px rgba(0,0,0,0.10);
    --shadow-sm:  0 2px 8px  rgba(0,0,0,0.08);
    --transition: 0.15s ease;
}

html, body { height: 100%; font-family: 'Nunito', sans-serif; color: var(--text); background: var(--bg); }

a { color: inherit; text-decoration: none; }

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 12px 24px; border: none; border-radius: 999px; font-family: inherit;
    font-size: 1rem; font-weight: 700; cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
    user-select: none;
}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn--primary   { background: var(--yellow-dark); color: var(--text); box-shadow: var(--shadow-sm); }
.btn--primary:hover:not(:disabled) { box-shadow: var(--shadow); transform: translateY(-1px); }
.btn--secondary { background: var(--white); color: var(--text); border: 2px solid var(--yellow-dark); }
.btn--secondary:hover:not(:disabled) { background: var(--yellow); }
.btn--lg        { padding: 14px 32px; font-size: 1rem; }
.btn--full      { width: 100%; }

/* ── Utilities ────────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.error-msg  { color: var(--danger); font-weight: 600; font-size: 0.9rem; margin-top: 6px; }

/* ════════════════════════════════════════════════════════════════════════════════
   START PAGE
   ════════════════════════════════════════════════════════════════════════════════ */
.start-page {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; background: #1a1a1a;
    position: relative; overflow: hidden;
}

.start-bg-video {
    position: fixed; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;        /* portrait screens: fills perfectly */
    object-position: center center;
    z-index: 0;
}

/* Landscape: show full portrait video, no crop */
@media (orientation: landscape) {
    .start-bg-video {
        object-fit: contain;
    }
}

.start-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
    pointer-events: none;   /* decorative only — never block touches */
}

/* Outer container: full viewport, logo at top, button pinned to vertical center */
.start-container {
    position: relative; z-index: 2;
    width: 100%; max-width: 400px;
    height: 100vh;
    text-align: center;
    padding: 0 24px;
}

/* Logo + tagline: anchored to top */
.start-brand { padding-top: 10vh; }

@keyframes logoFloat {
    0%, 100% { transform: translateY(0);    }
    50%       { transform: translateY(-8px); }
}
.start-logo {
    width: 300px;
    max-width: 60vw;
    height: auto;
    display: block;
    margin: 0 auto;
    animation: logoFloat 3.5s ease-in-out infinite;
    filter: drop-shadow(0 6px 18px rgba(0,0,0,0.45));
}
.start-tagline { font-size: 1.1rem; color: rgba(255,255,255,0.85); font-weight: 600; margin-top: 12px; }

/* Action area: absolutely centered in viewport */
.start-action {
    position: absolute;
    top: 50%; left: 0; right: 0;
    transform: translateY(-50%);
    padding: 0 24px;
    display: flex; flex-direction: column;
    align-items: center;
}

/* Ghost pill button — used for Spela nu + Skapa jakt */
.start-pill-btn {
    -webkit-appearance: none; appearance: none;   /* kill iOS default button style */
    display: inline-block; width: fit-content; align-self: center;
    font-family: inherit; font-size: 0.95rem; font-weight: 700;
    color: rgba(255,255,255,0.9);
    padding: 10px 28px; border-radius: 999px;
    border: 1.5px solid rgba(255,255,255,0.55);
    background: transparent; cursor: pointer; text-decoration: none;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.start-pill-btn:hover { background: rgba(255,255,255,0.08); color: #fff; border-color: #fff; }

/* Menu shown after Spela nu click */
.start-menu {
    display: flex; flex-direction: column;
    align-items: center; gap: 0;
    width: 100%;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.menu-fade-in { animation: fadeInUp 0.3s ease both; }

.code-form { display: flex; flex-direction: column; gap: 12px; width: 100%; margin-bottom: 16px; }
.code-input {
    padding: 16px 22px; border: 3px solid var(--yellow-dark); border-radius: 999px;
    font-family: inherit; font-size: 1.35rem; font-weight: 900; text-align: center;
    letter-spacing: 6px; text-transform: lowercase; background: var(--white);
    outline: none; transition: border-color var(--transition), box-shadow var(--transition);
}
.code-input:focus { border-color: var(--green-dark); box-shadow: 0 0 0 4px rgba(92,184,92,0.2); }

.last-result {
    background: var(--white); border-radius: var(--radius); padding: 20px;
    width: 100%; box-shadow: var(--shadow-sm); text-align: left;
}
.last-result__title { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.last-result__text  { font-size: 0.9rem; color: var(--text-light); margin-bottom: 12px; }

.sound-btn {
    position: fixed;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    right: calc(16px + env(safe-area-inset-right, 0px));
    z-index: 3;
    width: 42px; height: 42px;
    border-radius: 50%; border: none;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(6px);
    color: #fff; font-size: 1.2rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.sound-btn:hover { background: rgba(0,0,0,0.65); }

/* .admin-link used only in admin.html now — kept minimal */
.admin-link {
    font-size: 0.95rem; color: rgba(255,255,255,0.85);
    padding: 10px 28px; border-radius: 999px;
    border: 1.5px solid rgba(255,255,255,0.5);
    text-decoration: none;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.admin-link:hover { background: rgba(255,255,255,0.08); color: #fff; border-color: #fff; }

