/* ═══════════════════════════════════════════════════
   MTG Rules Oracle — Design System
   Dark Fantasy / Grimoire / Premium AI
   ═══════════════════════════════════════════════════ */

:root {
    /* ── Colors: Backgrounds ── */
    --bg-primary: #0d0d0d;
    --bg-secondary: #111018;
    --bg-tertiary: #1a1612;
    --bg-surface: rgba(26, 22, 18, 0.92);
    --bg-sidebar: #0a0a0f;
    --bg-input: #131210;

    /* ── Colors: Accent ── */
    --gold: #c9a84c;
    --gold-bright: #e0c060;
    --gold-dim: #8a8279;
    --gold-muted: #5a5248;
    --purple: #6a0572;
    --purple-dim: #3d0342;

    /* ── Colors: Text ── */
    --text-primary: #e0d6c8;
    --text-secondary: #b0a89e;
    --text-muted: #706860;

    /* ── Colors: Borders ── */
    --border: #3a3228;
    --border-subtle: #2a2530;
    --border-focus: var(--gold);

    /* ── Colors: States ── */
    --grounded-bg: rgba(34, 120, 60, 0.15);
    --grounded-text: #5cbf7a;
    --grounded-border: rgba(34, 120, 60, 0.35);

    --boundary-bg: rgba(160, 80, 40, 0.15);
    --boundary-text: #d4a574;
    --boundary-border: rgba(160, 80, 40, 0.35);

    --error-bg: rgba(180, 40, 40, 0.12);
    --error-text: #e07070;
    --error-border: rgba(180, 40, 40, 0.3);

    /* ── Typography ── */
    --font-display: 'Georgia', 'Palatino Linotype', 'Book Antiqua', serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

    /* ── Spacing ── */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 0.75rem;
    --space-lg: 1rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
    --space-3xl: 3rem;

    /* ── Layout ── */
    --sidebar-width: 280px;
    --max-content: 860px;
    --header-height: 60px;

    /* ── Radii ── */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* ── Shadows ── */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-elevated: 0 4px 16px rgba(0, 0, 0, 0.45);
    --shadow-glow-gold: 0 0 20px rgba(201, 168, 76, 0.08);

    /* ── Transitions ── */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --t-fast: 0.15s var(--ease-out);
    --t-normal: 0.25s var(--ease-out);
    --t-slow: 0.4s var(--ease-out);

    /* ── Overlay ── */
    --overlay-opacity: 0.93;
}

/* ═══ Reset ═══ */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow: hidden;
}

/* ═══ Wallpaper Background ═══ */

.bg-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(
            180deg,
            rgba(13, 13, 13, var(--overlay-opacity)) 0%,
            rgba(13, 13, 13, calc(var(--overlay-opacity) + 0.02)) 100%
        ),
        url('/assets/wallpaper/Wallpaper_Plains_2560x1600.jpg') center / cover no-repeat fixed;
    pointer-events: none;
}

/* ═══ Typography ═══ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.3;
}

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

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

/* ═══ Selection ═══ */

::selection {
    background-color: var(--gold);
    color: var(--bg-primary);
}

/* ═══ Scrollbar ═══ */

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-muted);
}

/* ═══ Focus Visible ═══ */

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* ═══ Animations ═══ */

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

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes glowPulse {
    0%, 100% { text-shadow: 0 0 12px rgba(201, 168, 76, 0.2); }
    50% { text-shadow: 0 0 20px rgba(201, 168, 76, 0.35); }
}

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

@keyframes dotBounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-4px); }
}

@keyframes orbPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(201, 168, 76, 0.18), inset 0 0 6px rgba(201, 168, 76, 0.12);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 22px rgba(201, 168, 76, 0.4), inset 0 0 10px rgba(201, 168, 76, 0.24);
        transform: scale(1.08);
    }
}

@keyframes orbFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}
