/* ============================================================
   PRODE CHIROLAS - main.css
   Dark premium + champagne gold + neon magenta
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Manrope:wght@300;400;500;600;700;800&family=DM+Mono:wght@400;500&display=swap');

:root {
    /* === Colores núcleo === */
    --bg-0: #0a0a0c;
    --bg-1: #111114;
    --bg-2: #18181e;
    --bg-3: #22222a;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);

    /* === Marca === */
    --gold: #d4af37;
    --gold-bright: #f0c850;
    --gold-deep: #9a7d1e;
    --magenta: #ff2a8e;
    --magenta-soft: #ff5fae;
    --mint: #4ad9b1;
    --red: #ff4d57;

    /* === Texto === */
    --text: #f4f4f6;
    --text-dim: #a8a8b3;
    --text-faint: #5e5e6a;

    /* === Tipografía === */
    --font-display: 'Bebas Neue', system-ui, sans-serif;
    --font-body: 'Manrope', system-ui, -apple-system, sans-serif;
    --font-mono: 'DM Mono', ui-monospace, monospace;

    /* === Espaciado === */
    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-5: 1.5rem;
    --sp-6: 2rem;
    --sp-7: 3rem;
    --sp-8: 4rem;

    /* === Bordes y radius === */
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;

    /* === Sombras === */
    --shadow-soft: 0 8px 30px -8px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px -10px var(--gold);
    --shadow-magenta: 0 0 30px -8px var(--magenta);

    /* === Transiciones === */
    --t-quick: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-base: 280ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-slow: 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background: var(--bg-0);
    color: var(--text);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: none;
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}
button { cursor: pointer; }

a { color: var(--gold); text-decoration: none; }

img { max-width: 100%; display: block; }

/* ============================================================
   Atmósfera de fondo - grano + glow estático
   ============================================================ */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(800px circle at 20% -10%, rgba(212, 175, 55, 0.08), transparent 50%),
        radial-gradient(600px circle at 90% 10%, rgba(255, 42, 142, 0.06), transparent 50%),
        radial-gradient(1000px circle at 50% 110%, rgba(74, 217, 177, 0.04), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.12 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.6;
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: overlay;
}

#app, #admin-app {
    position: relative;
    z-index: 2;
    min-height: 100vh;
}

/* ============================================================
   Tipografía utilitaria
   ============================================================ */
.display {
    font-family: var(--font-display);
    letter-spacing: 0.02em;
    line-height: 0.95;
}

h1.display { font-size: clamp(2.5rem, 9vw, 4rem); }
h2.display { font-size: clamp(2rem, 6vw, 2.75rem); }
h3.display { font-size: clamp(1.5rem, 4.5vw, 2rem); }

.mono { font-family: var(--font-mono); }

.dim { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.gold { color: var(--gold); }
.magenta { color: var(--magenta); }
.mint { color: var(--mint); }

.upper { text-transform: uppercase; letter-spacing: 0.08em; }
.tiny { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }

/* ============================================================
   Container
   ============================================================ */
.container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 var(--sp-4);
}
@media (min-width: 768px) {
    .container { max-width: 720px; padding: 0 var(--sp-5); }
}
@media (min-width: 1024px) {
    .container { max-width: 1024px; padding: 0 var(--sp-6); }
}

/* ============================================================
   Animaciones globales reutilizables
   ============================================================ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes pulseGold {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
    50%      { box-shadow: 0 0 0 12px rgba(212, 175, 55, 0); }
}
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes spin { to { transform: rotate(360deg); } }

.fade-up { animation: fadeUp 600ms cubic-bezier(0.16, 1, 0.3, 1) backwards; }
.fade-in { animation: fadeIn 400ms ease backwards; }

/* delays escalonados */
.d-1 { animation-delay: 80ms; }
.d-2 { animation-delay: 160ms; }
.d-3 { animation-delay: 240ms; }
.d-4 { animation-delay: 320ms; }
.d-5 { animation-delay: 400ms; }
.d-6 { animation-delay: 480ms; }

/* ============================================================
   Scrollbar
   ============================================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-deep); }

/* ============================================================
   Focus visible
   ============================================================ */
:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================================
   Estado loading global
   ============================================================ */
.skeleton {
    background: linear-gradient(90deg, var(--bg-2) 0%, var(--bg-3) 50%, var(--bg-2) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--r-sm);
}

.spinner {
    width: 20px; height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ============================================================
   Hidden helper
   ============================================================ */
[hidden], .hidden { display: none !important; }
