/* ════════════════════════════════════════════════
   Reset, CSS Variables & Base
   ════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════
   RESET & CSS VARIABLES
   ═══════════════════════════════════════════════ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Global scrollbar (thin, purple) ── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.25);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.45);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.25) transparent;
}

html.light-mode ::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.2);
}

html.light-mode ::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.35);
}

:root {
    --bg-primary: #070712;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(139, 92, 246, 0.4);

    --accent: #8b5cf6;
    --accent-light: #a78bfa;
    --accent-dark: #6d28d9;
    --accent-glow: rgba(139, 92, 246, 0.25);

    --blue: #60a5fa;

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.12);
    --warning: #f59e0b;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 60px rgba(139, 92, 246, 0.15);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --transition: 0.2s ease;
    --transition-slow: 0.5s ease;
}

/* ═══════════════════════════════════════════════
   BASE
   ═══════════════════════════════════════════════ */
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    width: 100%;
    padding-top: 64px; /* space for fixed header */
}

/* Utility */
.hidden { display: none !important; }

/* ═══════════════════════════════════════════════
   TOAST ANIMATIONS
   ═══════════════════════════════════════════════ */
@keyframes toastIn {
    from { opacity: 0; transform: translateY(12px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(-8px) scale(0.95); }
}

/* Toast base styles (moved from inline JS for theme support) */
.toast-item {
    background: #1e1e3a;
    border: 1px solid rgba(139, 92, 246, 0.4);
    color: #f1f5f9;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    cursor: pointer;
    max-width: 400px;
    text-align: center;
    word-break: break-word;
    animation: toastIn 0.3s ease forwards;
}

/* Light mode toast */
html.light-mode .toast-item {
    background: #fff;
    border-color: rgba(109, 40, 217, 0.2);
    color: #1e1b4b;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}


/* ── Back button: icon only ── */
.bp-back-btn { padding: 8px 10px; }


/* ════════════════════════════════════════════════
   Skeleton Loading
   ════════════════════════════════════════════════ */
.skeleton { position: relative; overflow: hidden; background: rgba(255,255,255,0.04); border-radius: 8px; }
.skeleton::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent); animation: skeletonShimmer 1.5s infinite; }
@keyframes skeletonShimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.skeleton-text { height: 14px; margin-bottom: 8px; border-radius: 4px; }
.skeleton-text.short { width: 40%; }
.skeleton-text.medium { width: 70%; }
.skeleton-text.long { width: 90%; }
.skeleton-circle { border-radius: 50%; }
.skeleton-card { padding: 16px; border: 1px solid rgba(255,255,255,0.05); border-radius: 12px; margin-bottom: 10px; }
.light-mode .skeleton { background: rgba(0,0,0,0.04); }
.light-mode .skeleton::after { background: linear-gradient(90deg, transparent, rgba(0,0,0,0.03), transparent); }
.light-mode .skeleton-card { border-color: rgba(0,0,0,0.05); }
