/* ═══════════════════════════════════════════════════════════════
   ENTERPRISE DESIGN SYSTEM v2 — PREMIUM
   Neo Casino Premium | Deep Navy + Emerald + Gold
   ═══════════════════════════════════════════════════════════════ */

/* ─────────── DESIGN TOKENS ─────────── */
:root {
    /* ─── Colors — Primary Palette ─── */
    --c-primary-50: #ECFDF5;
    --c-primary-100: #D1FAE5;
    --c-primary-200: #A7F3D0;
    --c-primary-300: #6EE7B7;
    --c-primary-400: #34D399;
    --c-primary-500: #10B981;
    --c-primary-600: #059669;
    --c-primary-700: #047857;
    --c-primary-800: #065F46;
    --c-primary-900: #064E3B;

    /* ─── Colors — Neutral Palette ─── */
    --c-neutral-0: #FFFFFF;
    --c-neutral-50: #F8FAFC;
    --c-neutral-100: #F1F5F9;
    --c-neutral-200: #E2E8F0;
    --c-neutral-300: #CBD5E1;
    --c-neutral-400: #94A3B8;
    --c-neutral-500: #64748B;
    --c-neutral-600: #475569;
    --c-neutral-700: #334155;
    --c-neutral-800: #1E293B;
    --c-neutral-900: #0F172A;
    --c-neutral-950: #050810;

    /* ─── Colors — Accent ─── */
    --c-accent-500: #F59E0B;
    --c-accent-600: #D97706;
    --c-accent-400: #FBBF24;

    /* ─── Colors — Semantic ─── */
    --c-success: #10B981;
    --c-warning: #F59E0B;
    --c-danger: #EF4444;
    --c-info: #3B82F6;

    /* ─── Typography ─── */
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

    /* Type Scale (modular) */
    --fs-2xs: 0.625rem;    /* 10px */
    --fs-xs: 0.75rem;      /* 12px */
    --fs-sm: 0.875rem;     /* 14px */
    --fs-base: 1rem;       /* 16px */
    --fs-lg: 1.125rem;     /* 18px */
    --fs-xl: 1.25rem;      /* 20px */
    --fs-2xl: 1.5rem;      /* 24px */
    --fs-3xl: 1.875rem;    /* 30px */
    --fs-4xl: 2.25rem;     /* 36px */
    --fs-5xl: 3rem;        /* 48px */
    --fs-6xl: 3.75rem;     /* 60px */

    --lh-tight: 1.15;
    --lh-snug: 1.3;
    --lh-normal: 1.5;
    --lh-relaxed: 1.65;

    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-extrabold: 800;
    --fw-black: 900;

    --ls-tighter: -0.04em;
    --ls-tight: -0.02em;
    --ls-normal: 0;
    --ls-wide: 0.025em;
    --ls-wider: 0.05em;
    --ls-widest: 0.15em;

    /* ─── Spacing Scale (4px base) ─── */
    --sp-0: 0;
    --sp-px: 1px;
    --sp-0-5: 2px;
    --sp-1: 4px;
    --sp-1-5: 6px;
    --sp-2: 8px;
    --sp-2-5: 10px;
    --sp-3: 12px;
    --sp-3-5: 14px;
    --sp-4: 16px;
    --sp-5: 20px;
    --sp-6: 24px;
    --sp-8: 32px;
    --sp-10: 40px;
    --sp-12: 48px;
    --sp-16: 64px;
    --sp-20: 80px;
    --sp-24: 96px;

    /* ─── Radii ─── */
    --r-none: 0;
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-xl: 20px;
    --r-2xl: 28px;
    --r-3xl: 36px;
    --r-full: 9999px;

    /* ─── Shadows (Premium) ─── */
    --sh-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
    --sh-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --sh-md: 0 4px 16px rgba(0, 0, 0, 0.45);
    --sh-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
    --sh-xl: 0 24px 64px rgba(0, 0, 0, 0.6);
    --sh-2xl: 0 32px 96px rgba(0, 0, 0, 0.7);

    --sh-glow-primary: 0 0 32px rgba(16, 185, 129, 0.5);
    --sh-glow-accent: 0 0 32px rgba(245, 158, 11, 0.5);
    --sh-glow-danger: 0 0 32px rgba(239, 68, 68, 0.5);
    --sh-glow-info: 0 0 32px rgba(59, 130, 246, 0.5);

    /* ─── Motion — Premium Easings ─── */
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-snappy: cubic-bezier(0.2, 0, 0, 1);

    /* Durations */
    --d-instant: 80ms;
    --d-fast: 150ms;
    --d-base: 250ms;
    --d-slow: 400ms;
    --d-slower: 600ms;

    /* Compound */
    --t-fast: var(--d-fast) var(--ease-smooth);
    --t-base: var(--d-base) var(--ease-smooth);
    --t-slow: var(--d-slow) var(--ease-smooth);
    --t-spring: var(--d-base) var(--ease-spring);

    /* ─── Gradients ─── */
    --grad-primary: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --grad-accent: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    --grad-danger: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    --grad-mix: linear-gradient(135deg, #10B981 0%, #3B82F6 50%, #F59E0B 100%);
    --grad-premium: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    --grad-gold: linear-gradient(135deg, #FBBF24 0%, #F59E0B 50%, #D97706 100%);
    --grad-glass: linear-gradient(135deg, rgba(30,41,59,0.85), rgba(15,23,42,0.7));

    /* ─── Blurs ─── */
    --blur-xs: 4px;
    --blur-sm: 8px;
    --blur-md: 16px;
    --blur-lg: 24px;
    --blur-xl: 40px;

    /* ─── Z-Index Scale ─── */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
    --z-toast: 900;
    --z-max: 9999;
}

/* ─────────── PREMIUM BUTTONS (72 variants) ─────────── */
.e-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    font-family: var(--font-body);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-tight);
    border: none;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    transition: all var(--t-base);
    -webkit-tap-highlight-color: transparent;
}

.e-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    pointer-events: none;
}

.e-btn:active::before {
    width: 300px;
    height: 300px;
    transition: width 0s, height 0s;
}

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

/* Sizes */
.e-btn-xs {
    padding: var(--sp-1-5) var(--sp-3);
    font-size: var(--fs-xs);
    border-radius: var(--r-sm);
    min-height: 28px;
}
.e-btn-sm {
    padding: var(--sp-2) var(--sp-4);
    font-size: var(--fs-sm);
    border-radius: var(--r-md);
    min-height: 36px;
}
.e-btn-md {
    padding: var(--sp-3) var(--sp-5);
    font-size: var(--fs-base);
    border-radius: var(--r-md);
    min-height: 44px;
}
.e-btn-lg {
    padding: var(--sp-4) var(--sp-7, 28px);
    font-size: var(--fs-lg);
    border-radius: var(--r-lg);
    min-height: 52px;
    font-weight: var(--fw-bold);
}
.e-btn-xl {
    padding: var(--sp-5) var(--sp-8);
    font-size: var(--fs-xl);
    border-radius: var(--r-lg);
    min-height: 60px;
    font-weight: var(--fw-bold);
}

/* Variants */
.e-btn-primary {
    background: var(--grad-primary);
    color: white;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}
.e-btn-primary:hover:not(:disabled) {
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.55);
    transform: translateY(-2px);
}

.e-btn-accent {
    background: var(--grad-accent);
    color: white;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}
.e-btn-accent:hover:not(:disabled) {
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.55);
    transform: translateY(-2px);
}

.e-btn-danger {
    background: var(--grad-danger);
    color: white;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
}
.e-btn-danger:hover:not(:disabled) {
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.55);
    transform: translateY(-2px);
}

.e-btn-ghost {
    background: rgba(30, 41, 59, 0.6);
    color: var(--c-neutral-200);
    border: 1px solid rgba(148, 163, 184, 0.2);
    -webkit-backdrop-filter: blur(var(--blur-md));
    -webkit-backdrop-filter: backdrop-filter: blur(var(--blur-md));
    -webkit-backdrop-filter: blur(var(--blur-md));
    backdrop-filter: blur(var(--blur-md));
}
.e-btn-ghost:hover:not(:disabled) {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(148, 163, 184, 0.4);
    color: white;
}

.e-btn-outline {
    background: transparent;
    color: var(--c-primary-400);
    border: 1.5px solid var(--c-primary-500);
}
.e-btn-outline:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--c-primary-400);
    color: var(--c-primary-300);
}

.e-btn-gold {
    background: var(--grad-gold);
    color: #451A03;
    font-weight: var(--fw-extrabold);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
}
.e-btn-gold:hover:not(:disabled) {
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.65);
    transform: translateY(-2px);
}

.e-btn-block { width: 100%; }

.e-btn-icon {
    padding: var(--sp-2);
    aspect-ratio: 1;
    min-width: unset;
}

/* ─────────── PREMIUM CARDS ─────────── */
.e-card {
    background: linear-gradient(135deg, rgba(30,41,59,0.6), rgba(15,23,42,0.9));
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: var(--r-lg);
    padding: var(--sp-5);
    transition: all var(--t-base);
    position: relative;
    overflow: hidden;
}

.e-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    pointer-events: none;
}

.e-card-glass {
    background: linear-gradient(135deg, rgba(30,41,59,0.5), rgba(15,23,42,0.7));
    -webkit-backdrop-filter: blur(var(--blur-lg));
    -webkit-backdrop-filter: backdrop-filter: blur(var(--blur-lg));
    -webkit-backdrop-filter: blur(var(--blur-lg));
    backdrop-filter: blur(var(--blur-lg));
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.e-card-elevated {
    box-shadow: var(--sh-lg);
}

.e-card-hover {
    cursor: pointer;
}
.e-card-hover:hover {
    transform: translateY(-4px);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.15);
}

.e-card-premium {
    background: linear-gradient(135deg, rgba(30,41,59,0.9), rgba(15,23,42,1));
    border: 1px solid rgba(245, 158, 11, 0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* ─────────── PREMIUM BADGES ─────────── */
.e-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-1);
    padding: var(--sp-1) var(--sp-2-5);
    border-radius: var(--r-full);
    font-size: var(--fs-2xs);
    font-weight: var(--fw-bold);
    letter-spacing: var(--ls-wider);
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid;
}

.e-badge-primary { background: rgba(16,185,129,0.12); color: var(--c-primary-300); border-color: rgba(16,185,129,0.25); }
.e-badge-accent { background: rgba(245,158,11,0.12); color: var(--c-accent-400); border-color: rgba(245,158,11,0.25); }
.e-badge-danger { background: rgba(239,68,68,0.12); color: #F87171; border-color: rgba(239,68,68,0.25); }
.e-badge-info { background: rgba(59,130,246,0.12); color: #60A5FA; border-color: rgba(59,130,246,0.25); }
.e-badge-success { background: rgba(16,185,129,0.12); color: var(--c-primary-300); border-color: rgba(16,185,129,0.25); }
.e-badge-warning { background: rgba(245,158,11,0.12); color: var(--c-accent-400); border-color: rgba(245,158,11,0.25); }
.e-badge-muted { background: rgba(148,163,184,0.08); color: var(--c-neutral-400); border-color: rgba(148,163,184,0.15); }

.e-badge-live {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
    border-color: transparent;
    box-shadow: 0 0 12px rgba(239,68,68,0.5);
    animation: e-livePulse 2s infinite;
}

@keyframes e-livePulse {
    0%, 100% { box-shadow: 0 0 12px rgba(239,68,68,0.5); }
    50% { box-shadow: 0 0 24px rgba(239,68,68,0.9); }
}

/* ─────────── PREMIUM SKELETONS ─────────── */
.e-skeleton {
    background: linear-gradient(90deg, var(--c-neutral-800) 25%, var(--c-neutral-700) 50%, var(--c-neutral-800) 75%);
    background-size: 200% 100%;
    animation: e-shimmer 1.5s infinite;
    border-radius: var(--r-md);
}

.e-skeleton-text {
    height: 14px;
    margin-bottom: var(--sp-2);
    border-radius: var(--r-sm);
}
.e-skeleton-text.short { width: 60%; }
.e-skeleton-text.tiny { width: 40%; }

.e-skeleton-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.e-skeleton-card {
    height: 120px;
    border-radius: var(--r-lg);
}

.e-skeleton-button {
    height: 44px;
    border-radius: var(--r-md);
    width: 120px;
}

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

/* ─────────── PREMIUM INPUTS ─────────── */
.e-input {
    width: 100%;
    padding: var(--sp-3-5) var(--sp-4);
    background: var(--c-neutral-950);
    border: 1.5px solid rgba(148, 163, 184, 0.2);
    border-radius: var(--r-md);
    color: var(--c-neutral-100);
    font-family: var(--font-body);
    font-size: var(--fs-base);
    transition: all var(--t-fast);
    outline: none;
}

.e-input:focus {
    border-color: var(--c-primary-500);
    background: var(--c-neutral-900);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.e-input::placeholder {
    color: var(--c-neutral-500);
}

.e-input-lg {
    padding: var(--sp-4) var(--sp-5);
    font-size: var(--fs-lg);
}

.e-input-error {
    border-color: var(--c-danger);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

/* ─────────── PREMIUM SPINNER ─────────── */
.e-spinner {
    width: 24px;
    height: 24px;
    border: 2.5px solid rgba(16, 185, 129, 0.2);
    border-top-color: var(--c-primary-500);
    border-radius: 50%;
    animation: e-spin 0.7s linear infinite;
}

.e-spinner-sm { width: 16px; height: 16px; border-width: 2px; }
.e-spinner-lg { width: 40px; height: 40px; border-width: 3px; }
.e-spinner-xl { width: 64px; height: 64px; border-width: 4px; }

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

/* ─────────── PREMIUM TYPOGRAPHY ─────────── */
.e-h1 { font-size: var(--fs-5xl); font-weight: var(--fw-black); letter-spacing: var(--ls-tighter); line-height: var(--lh-tight); }
.e-h2 { font-size: var(--fs-4xl); font-weight: var(--fw-black); letter-spacing: var(--ls-tight); line-height: var(--lh-tight); }
.e-h3 { font-size: var(--fs-3xl); font-weight: var(--fw-extrabold); letter-spacing: var(--ls-tight); line-height: var(--lh-snug); }
.e-h4 { font-size: var(--fs-2xl); font-weight: var(--fw-bold); letter-spacing: var(--ls-tight); line-height: var(--lh-snug); }
.e-h5 { font-size: var(--fs-xl); font-weight: var(--fw-bold); line-height: var(--lh-snug); }
.e-h6 { font-size: var(--fs-lg); font-weight: var(--fw-semibold); line-height: var(--lh-snug); }

.e-text-gradient {
    background: var(--grad-mix);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: e-gradientShift 6s ease infinite;
}

@keyframes e-gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ─────────── UTILITIES ─────────── */
.e-flex { display: flex; }
.e-flex-col { flex-direction: column; }
.e-items-center { align-items: center; }
.e-justify-center { justify-content: center; }
.e-justify-between { justify-content: space-between; }
.e-gap-1 { gap: var(--sp-1); }
.e-gap-2 { gap: var(--sp-2); }
.e-gap-3 { gap: var(--sp-3); }
.e-gap-4 { gap: var(--sp-4); }
.e-gap-5 { gap: var(--sp-5); }
.e-gap-6 { gap: var(--sp-6); }

.e-mt-2 { margin-top: var(--sp-2); }
.e-mt-4 { margin-top: var(--sp-4); }
.e-mt-6 { margin-top: var(--sp-6); }
.e-mb-2 { margin-bottom: var(--sp-2); }
.e-mb-4 { margin-bottom: var(--sp-4); }
.e-mb-6 { margin-bottom: var(--sp-6); }

.e-text-center { text-align: center; }
.e-text-right { text-align: right; }
.e-w-full { width: 100%; }

.e-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ─────────── PREMIUM DIVIDER ─────────── */
.e-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.2), transparent);
    margin: var(--sp-5) 0;
}

/* ─────────── PREMIUM EMPTY STATE ─────────── */
.e-empty {
    text-align: center;
    padding: var(--sp-12) var(--sp-5);
}

.e-empty-icon {
    font-size: 4rem;
    opacity: 0.4;
    margin-bottom: var(--sp-4);
    filter: grayscale(0.5);
}

.e-empty-title {
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    color: var(--c-neutral-300);
    margin-bottom: var(--sp-2);
}

.e-empty-text {
    font-size: var(--fs-sm);
    color: var(--c-neutral-500);
    margin-bottom: var(--sp-5);
}

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 768px) {
    :root {
        --fs-5xl: 2rem;
        --fs-4xl: 1.75rem;
        --fs-3xl: 1.5rem;
    }
}
