/* ============================================================
   DNRD — Shared M3 Dark Red Theme
   Single source of truth for colors, typography, reset, and
   common components across ALL pages.
   ============================================================ */

/* ── Google Fonts ────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;600;700&family=Roboto:wght@300;400;500;700&family=JetBrains+Mono:wght@400;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,1,0');

/* ── CSS Custom Properties ──────────────────────────────────── */
:root {
    /* === M3 Dark Red Tonal Palette (canonical names) === */
    --md-primary: #FFB4AB;
    --md-on-primary: #690005;
    --md-primary-container: #93000A;
    --md-on-primary-container: #FFDAD6;
    --md-secondary: #E7BDB8;
    --md-on-secondary: #442926;
    --md-secondary-container: #5D3F3B;
    --md-on-secondary-container: #FFDAD6;
    --md-tertiary: #E5C18D;
    --md-on-tertiary: #422C05;
    --md-tertiary-container: #5C4119;
    --md-on-tertiary-container: #FFDEA6;
    --md-error: #FFB4AB;
    --md-on-error: #690005;
    --md-surface: #1A1110;
    --md-surface-dim: #1A1110;
    --md-surface-bright: #423736;
    --md-surface-container-lowest: #140C0B;
    --md-surface-container-low: #221918;
    --md-surface-container: #261D1C;
    --md-surface-container-high: #312826;
    --md-surface-container-highest: #3D3231;
    --md-on-surface: #F1DFDC;
    --md-on-surface-variant: #D8C2BE;
    --md-outline: #A08C89;
    --md-outline-variant: #534341;
    --md-inverse-surface: #F1DFDC;
    --md-inverse-on-surface: #382E2C;
    --md-inverse-primary: #C00011;
    --md-scrim: #000000;
    --md-shadow: rgba(0, 0, 0, 0.3);

    /* === Short aliases (used by commands, hosting, etc.) === */
    --bg: #1A1110;
    --bg-elevated: #221918;
    --bg-card: #261D1C;
    --bg-hover: #312826;
    --border: #534341;
    --accent: #FFB4AB;
    --accent-dim: #D32F2F;
    --accent-hover: #93000A;
    --accent-soft: rgba(255, 180, 171, 0.12);
    --text: #F1DFDC;
    --text-secondary: #D8C2BE;
    --text-muted: #A08C89;
    --success: #81C784;
    --premium: #FFDAD6;
    --accent-glow: 0 0 8px rgba(255, 180, 171, 0.3), 0 0 2px rgba(255, 180, 171, 0.15);
    --radius: 12px;
    --radius-pill: 9999px;

    /* === Tool-page aliases (used by cnb, selfbot) === */
    --bg-primary: #1A1110;
    --bg-secondary: #221918;
    --bg-tertiary: #261D1C;
    --bg-input: #312826;
    --bg-glass: rgba(34, 25, 24, 0.85);
    --accent-light: #FFDAD6;
    --accent-dark: #93000A;
    --accent-glow-rgba: rgba(255, 180, 171, 0.2);
    --accent-subtle: rgba(255, 180, 171, 0.06);
    --border-focus: #FFB4AB;
    --border-light: rgba(83, 67, 65, 0.9);
    --text-primary: #F1DFDC;
    --text-tertiary: #A08C89;
    --warning: #FFDEA6;
    --error: #FFB4AB;
    --danger: #FFB4AB;
    --info: #60a5fa;
    --discord: #FFB4AB;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* === M3 Shape Scale === */
    --shape-xs: 4px;
    --shape-sm: 8px;
    --shape-md: 12px;
    --shape-lg: 16px;
    --shape-xl: 28px;
    --shape-full: 9999px;

    /* === Shadows === */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(255, 180, 171, 0.2);

    /* === Transitions === */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* === Font stacks === */
    --font-primary: 'Google Sans', 'Roboto', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* === Safe areas === */
    --safe-area-top: env(safe-area-inset-top);
    --safe-area-bottom: env(safe-area-inset-bottom);
}

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

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

/* ── Scrollbar (hidden globally) ────────────────────────────── */
::-webkit-scrollbar { display: none; }
html {
    scrollbar-width: none;
}
html, body {
    -ms-overflow-style: none;
}

/* ── Base Typography ────────────────────────────────────────── */
body {
    font-family: var(--font-primary);
    background: var(--md-surface);
    color: var(--md-on-surface);
    line-height: 1.5;
    font-size: 14px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ── Reduced Motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Common Animations ──────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes m3FadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes m3SlideDown {
    from { transform: translateY(-100%); }
    to   { transform: translateY(0); }
}

@keyframes m3ScaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
