/* ==========================================================================
   Celebrity Heads — shared design system
   Loaded by home.html, index.html (game.html) and help.html.
   Page-specific overrides live in each file's inline <style> block.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fonts (self-hosted, variable-weight)
   -------------------------------------------------------------------------- */
@font-face {
    font-family: 'DM Sans';
    src: url('/fonts/dmsans.woff2') format('woff2-variations');
    font-weight: 100 1000;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('/fonts/outfit.woff2') format('woff2-variations');
    font-weight: 100 1000;
    font-style: normal;
    font-display: swap;
}

/* --------------------------------------------------------------------------
   Design tokens
   -------------------------------------------------------------------------- */
:root {
    /* Palette: Deep Space Neon */
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --accent-primary: #8b5cf6;   /* Violet */
    --accent-secondary: #06b6d4; /* Cyan */
    --accent-tertiary: #f43f5e;  /* Rose */

    --text-main: #f8fafc;
    --text-muted: #a1b1c7;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shine: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(20px);

    /* Shadows */
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.15);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);

    /* Easing */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-elastic: cubic-bezier(0.5, 1.75, 0.75, 0.75);
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', 'DM Sans', system-ui, sans-serif;
    letter-spacing: -0.02em;
}

button, input, select {
    font-family: inherit;
}

/* --------------------------------------------------------------------------
   Glass card
   -------------------------------------------------------------------------- */
.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 24px;
    padding: 32px 24px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth);
}

.card::after {
    /* Shine effect */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-shine), transparent);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    border-color: rgba(255, 255, 255, 0.15);
}

/* --------------------------------------------------------------------------
   Buttons (pill / .btn family)
   -------------------------------------------------------------------------- */
.btn {
    width: 100%;
    padding: 18px;
    border-radius: 99px;
    border: none;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s var(--ease-elastic);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), #7c3aed);
    color: white;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-primary:not(:disabled):hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px rgba(124, 58, 237, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: var(--accent-tertiary);
    color: white;
    box-shadow: 0 8px 24px rgba(244, 63, 94, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none;
}

.btn:active {
    transform: scale(0.98) !important;
}

.btn:focus-visible {
    outline: 2px solid var(--accent-secondary);
    outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Visually-hidden helper
   -------------------------------------------------------------------------- */
.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   Shared animations
   -------------------------------------------------------------------------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: translateX(0); }
}
