/* ================================================================
   SĂN iPHONE — ULTRA PRO MAX Design System
   Mobile-first · Glassmorphism · Dark/Light · SaaS Grade
   ================================================================ */

/* ======================== FONTS ======================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ======================== CSS VARIABLES ======================== */
:root {
    /* Brand - Red/Gold/Orange Theme */
    --primary: #E63946;
    --primary-light: #FF4D4D;
    --primary-dark: #B91C1C;
    --primary-50: rgba(230, 57, 70, 0.08);
    --primary-100: rgba(230, 57, 70, 0.15);
    --primary-glow: rgba(230, 57, 70, 0.35);

    --success: #10B981;
    --success-50: rgba(16, 185, 129, 0.1);
    --warning: #F59E0B;
    --warning-50: rgba(245, 158, 11, 0.1);
    --danger: #EF4444;
    --danger-50: rgba(239, 68, 68, 0.1);
    --info: #3B82F6;
    --gold: #FFD700;
    --orange: #FF7F50;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #E63946 0%, #FF7F50 100%);
    --gradient-accent: linear-gradient(135deg, #FFD700 0%, #F59E0B 100%);
    --gradient-success: linear-gradient(135deg, #10B981 0%, #34D399 100%);
    --gradient-gold: linear-gradient(135deg, #FFD700 0%, #F59E0B 100%);
    --gradient-card-border: linear-gradient(135deg, rgba(255,215,0,0.5) 0%, rgba(230,57,70,0.2) 100%);
    --gradient-hero: linear-gradient(135deg, #E63946 0%, #800000 100%);

    /* Light Mode */
    --bg-primary: #F8FAFC;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-glass: rgba(255, 255, 255, 0.72);
    --bg-glass-heavy: rgba(255, 255, 255, 0.88);
    --bg-elevated: #FFFFFF;
    --bg-input: #F1F5F9;
    --bg-skeleton: linear-gradient(90deg, #E2E8F0 25%, #F1F5F9 50%, #E2E8F0 75%);

    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --text-inverse: #FFFFFF;

    --border: rgba(15, 23, 42, 0.06);
    --border-strong: rgba(15, 23, 42, 0.12);
    --divider: rgba(15, 23, 42, 0.04);

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.1);
    --shadow-glow: 0 0 24px var(--primary-glow);
    --shadow-card-hover: 0 12px 36px rgba(230,57,70,0.12), 0 4px 12px rgba(0,0,0,0.06);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms;
    --duration: 250ms;
    --duration-slow: 400ms;
}

/* ======================== DARK MODE ======================== */
[data-theme="dark"] {
    --bg-primary: #0A0A0A;
    --bg-secondary: #141414;
    --bg-card: #1A1A1A;
    --bg-glass: rgba(10, 10, 10, 0.85);
    --bg-glass-heavy: rgba(10, 10, 10, 0.95);
    --bg-elevated: #222222;
    --bg-input: #262626;
    --bg-skeleton: linear-gradient(90deg, #262626 25%, #333333 50%, #262626 75%);

    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #64748B;
    --text-inverse: #0F172A;

    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.15);
    --divider: rgba(255, 255, 255, 0.04);

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.6);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.7);
    --shadow-glow: 0 0 32px rgba(230,57,70,0.4);
    --shadow-card-hover: 0 12px 36px rgba(255,215,0,0.15);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 480px) {
    html { font-size: 15px; } /* Slightly smaller base font for mobile */
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    transition: background var(--duration) var(--ease-out), color var(--duration) var(--ease-out);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: var(--primary); transition: color var(--duration-fast); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }

/* ======================== ANIMATIONS ======================== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .6; } }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes glow { 0%,100% { box-shadow: 0 0 8px var(--primary-glow); } 50% { box-shadow: 0 0 24px var(--primary-glow); } }
@keyframes ripple-effect { to { transform: scale(4); opacity: 0; } }
@keyframes bounceIn { 0% { transform: scale(0.3); opacity: 0; } 50% { transform: scale(1.05); } 70% { transform: scale(0.95); } 100% { transform: scale(1); opacity: 1; } }
@keyframes confetti-fall { 0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; } 100% { transform: translateY(100vh) rotate(720deg); opacity: 0; } }
@keyframes toast-in { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toast-out { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

.anim-fade { animation: fadeIn var(--duration-slow) var(--ease-out) forwards; }
.anim-slide { animation: slideUp var(--duration-slow) var(--ease-out) forwards; }
.anim-scale { animation: scaleIn var(--duration-slow) var(--ease-out) forwards; }
.anim-float { animation: float 3s ease-in-out infinite; }

/* Stagger children */
.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 60ms; }
.stagger > *:nth-child(3) { animation-delay: 120ms; }
.stagger > *:nth-child(4) { animation-delay: 180ms; }
.stagger > *:nth-child(5) { animation-delay: 240ms; }
.stagger > *:nth-child(6) { animation-delay: 300ms; }

/* ======================== SKELETON ======================== */
.skeleton {
    background: var(--bg-skeleton);
    background-size: 800px 100%;
    animation: shimmer 1.6s ease-in-out infinite;
    border-radius: var(--radius);
}
.skeleton-text { height: 14px; margin-bottom: 8px; border-radius: 6px; }
.skeleton-text.short { width: 60%; }
.skeleton-avatar { width: 40px; height: 40px; border-radius: var(--radius-full); }
.skeleton-card { height: 200px; border-radius: var(--radius-lg); }

/* ======================== RIPPLE ======================== */
.ripple-container { position: relative; overflow: hidden; }
.ripple-container .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: scale(0);
    animation: ripple-effect 0.6s linear;
    pointer-events: none;
}

/* ======================== TOAST ======================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: var(--radius);
    background: var(--bg-glass-heavy);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    animation: toast-in var(--duration) var(--ease-out);
    pointer-events: auto;
    max-width: 360px;
}
.toast.toast-out { animation: toast-out var(--duration) var(--ease-out) forwards; }
.toast.toast-success { border-left: 3px solid var(--success); }
.toast.toast-error { border-left: 3px solid var(--danger); }
.toast.toast-warning { border-left: 3px solid var(--warning); }
.toast .toast-icon { font-size: 18px; flex-shrink: 0; }

/* ======================== CONFETTI ======================== */
.confetti-piece {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    z-index: 10001;
    border-radius: 2px;
    animation: confetti-fall linear forwards;
    pointer-events: none;
}

/* ======================== HEADER ======================== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-glass);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--border);
    transition: box-shadow var(--duration) var(--ease-out), background var(--duration) var(--ease-out);
}

.header.scrolled { box-shadow: var(--shadow-md); }

.header-inner { max-width: 680px; margin: 0 auto; padding: 0 12px; }

@media (max-width: 360px) {
    .header-inner { padding: 0 8px; }
}

.header-top { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 8px; }

/* Logo */
.header-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-logo img { width: 32px; height: 32px; border-radius: 10px; }
.header-logo-icon {
    width: 34px; height: 34px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px var(--primary-glow);
}
.header-logo-icon i { color: #fff; width: 18px; height: 18px; }
.header-logo-text {
    font-size: 17px; font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Stats */
.header-stats {
    display: flex; align-items: center; gap: 12px;
    font-size: 11px; color: var(--text-muted); font-weight: 500;
}
.header-stats .stat-live {
    display: flex; align-items: center; gap: 5px;
}
.header-stats .stat-live .pulse-dot {
    width: 7px; height: 7px; border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}
.header-stats .stat-live .pulse-dot.green { background: var(--success); }
.header-stats .stat-live .pulse-dot.indigo { background: var(--primary); }
.header-stats .stat-live span { font-weight: 700; color: var(--text-primary); }

/* User Area */
.header-user { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.balance-badge {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: var(--radius-full);
    background: var(--primary-50); border: 1px solid var(--primary-100);
    font-size: 13px; font-weight: 700; color: var(--primary);
    transition: all var(--duration) var(--ease-out);
    max-width: 120px;
}
.balance-badge span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.balance-badge:hover { background: var(--primary-100); }
.balance-badge i { width: 16px; height: 16px; }

.btn-icon {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius); border: 1px solid var(--border);
    background: var(--bg-input); color: var(--text-secondary);
    cursor: pointer; transition: all var(--duration) var(--ease-out);
    position: relative;
}
.btn-icon:hover { background: var(--primary-50); color: var(--primary); border-color: var(--primary-100); transform: translateY(-1px); }
.btn-icon i { width: 18px; height: 18px; }

.btn-topup-sm {
    display: flex; align-items: center; gap: 4px;
    padding: 6px 14px; border-radius: var(--radius-full);
    background: var(--gradient-primary); color: #fff;
    font-size: 12px; font-weight: 700; border: none; cursor: pointer;
    transition: all var(--duration) var(--ease-out);
    box-shadow: 0 2px 8px var(--primary-glow);
}
.btn-topup-sm:hover { transform: translateY(-1px); box-shadow: 0 4px 16px var(--primary-glow); }
.btn-topup-sm i { width: 14px; height: 14px; }

/* ======================== MAIN ======================== */
.main-content {
    max-width: 680px; margin: 0 auto;
    padding: 16px 16px 100px;
    min-height: calc(100vh - 56px);
}

/* ======================== AUTH PAGES ======================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 20px; position: relative; overflow: hidden;
}
.auth-wrapper::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(79,70,229,0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(236,72,153,0.04) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(99,102,241,0.04) 0%, transparent 50%);
}
.auth-container { width: 100%; max-width: 420px; position: relative; z-index: 1; animation: scaleIn 0.5s var(--ease-out); }
.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl); padding: 40px 28px;
    box-shadow: var(--shadow-lg); border: 1px solid var(--border);
    backdrop-filter: blur(12px);
}
.auth-logo { text-align: center; margin-bottom: 6px; }
.auth-logo .logo-icon-lg {
    width: 56px; height: 56px;
    background: var(--gradient-primary); border-radius: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 14px; box-shadow: 0 8px 24px var(--primary-glow);
}
.auth-logo .logo-icon-lg i { color: #fff; width: 26px; height: 26px; }
.auth-logo h1 {
    font-size: 24px; font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.auth-logo p { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.auth-form { margin-top: 28px; }

/* ======================== FORM ======================== */
.form-group { margin-bottom: 16px; position: relative; }
.form-label {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-label i { width: 15px; height: 15px; opacity: 0.7; }
.form-input {
    width: 100%; padding: 12px 16px;
    border-radius: var(--radius); border: 1.5px solid var(--border-strong);
    background: var(--bg-input); color: var(--text-primary);
    font-size: 14px; font-family: inherit; outline: none;
    transition: all var(--duration) var(--ease-out);
}
.form-input:focus {
    border-color: var(--primary); background: var(--bg-secondary);
    box-shadow: 0 0 0 3px var(--primary-50);
}
.form-input::placeholder { color: var(--text-muted); }

/* ======================== BUTTONS ======================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: var(--radius);
    font-size: 14px; font-weight: 700; font-family: inherit;
    border: none; cursor: pointer;
    transition: all var(--duration) var(--ease-out);
    position: relative; overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary); color: #fff;
    box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px var(--primary-glow); }
.btn-primary:active { transform: translateY(0) scale(0.98); }

.btn-outline {
    background: transparent; border: 1.5px solid var(--border-strong);
    color: var(--text-primary);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }

.btn-success { background: var(--gradient-success); color: #fff; }
.btn-success:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(16,185,129,0.3); }

.btn-danger { background: var(--danger-50); color: var(--danger); border: 1px solid transparent; }
.btn-danger:hover { background: var(--danger); color: #fff; }

.btn-gold { background: var(--gradient-gold); color: #1a1a2e; font-weight: 800; }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(245,158,11,0.3); }

.btn-full { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg { padding: 16px 32px; font-size: 16px; border-radius: var(--radius-lg); }
.btn i { width: 18px; height: 18px; flex-shrink: 0; }

.btn-loading { pointer-events: none; opacity: 0.75; }
.btn-loading::before {
    content: ''; width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
    border-radius: 50%; animation: spin 0.6s linear infinite;
}

/* ======================== CATEGORY CARDS ======================== */
.section-header {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 16px;
}
.section-header i { width: 22px; height: 22px; color: var(--primary); }
.section-title { font-size: 18px; font-weight: 800; }

.category-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); 
    gap: 12px;
}

@media (min-width: 480px) {
    .category-grid { 
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
        gap: 16px; 
    }
}

.cat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all var(--duration) var(--ease-out);
    cursor: pointer; position: relative;
    opacity: 0; animation: fadeIn var(--duration-slow) var(--ease-out) forwards;
}
.cat-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--primary-100);
}
.cat-card::before {
    content: ''; position: absolute; inset: -1px;
    border-radius: var(--radius-lg); z-index: 0;
    background: var(--gradient-card-border); opacity: 0;
    transition: opacity var(--duration);
    pointer-events: none;
}
.cat-card:hover::before { opacity: 1; }

.cat-card-img {
    position: relative; height: 130px; overflow: hidden;
}
.cat-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease-out); }
.cat-card:hover .cat-card-img img { transform: scale(1.08); }
.cat-card-img .placeholder-bg {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
}
.cat-card-img .placeholder-bg i { width: 40px; height: 40px; color: rgba(255,255,255,0.8); }

.cat-badge-hot {
    position: absolute; top: 8px; right: 8px;
    padding: 3px 10px; border-radius: var(--radius-full);
    background: rgba(0,0,0,0.55); backdrop-filter: blur(8px);
    color: #fff; font-size: 10px; font-weight: 700;
    display: flex; align-items: center; gap: 4px;
}
.cat-badge-hot i { width: 12px; height: 12px; color: var(--gold); }

.cat-card-body { padding: 14px; position: relative; z-index: 1; }
.cat-card-name {
    font-size: 14px; font-weight: 700; color: var(--text-primary);
    margin-bottom: 4px; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    line-clamp: 2;
}
.cat-card-prize {
    display: flex; align-items: center; gap: 4px;
    font-size: 11px; color: var(--text-muted); margin-bottom: 8px;
}
.cat-card-prize i { width: 13px; height: 13px; color: var(--primary-light); }

.cat-card-meta {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px; font-size: 11px; color: var(--text-muted);
}
.cat-card-stars { display: flex; gap: 1px; }
.cat-card-stars i { width: 12px; height: 12px; color: var(--gold); fill: var(--gold); }
.cat-card-plays { font-weight: 600; display: flex; align-items: center; gap: 3px; }
.cat-card-plays i { width: 12px; height: 12px; }

.cat-card-btn {
    width: 100%; padding: 10px;
    border-radius: var(--radius); border: none; cursor: pointer;
    background: var(--gradient-primary); color: #fff;
    font-size: 13px; font-weight: 700; font-family: inherit;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    transition: all var(--duration) var(--ease-out);
    box-shadow: 0 2px 8px var(--primary-glow);
}
.cat-card-btn:hover { box-shadow: 0 4px 16px var(--primary-glow); }
.cat-card-btn i { width: 16px; height: 16px; }

/* ======================== WELCOME BANNER ======================== */
.welcome-banner {
    background: var(--gradient-hero);
    border-radius: var(--radius-xl); padding: 22px 20px;
    margin-bottom: 20px; color: #fff; position: relative; overflow: hidden;
}
.welcome-banner::after {
    content: ''; position: absolute; right: -30px; top: -30px;
    width: 160px; height: 160px;
    border-radius: 50%; background: rgba(255,255,255,0.06);
}
.welcome-banner .wb-label { font-size: 12px; opacity: 0.8; font-weight: 500; }
.welcome-banner .wb-name { font-size: 22px; font-weight: 800; margin: 2px 0; }
.welcome-banner .wb-sub { font-size: 13px; opacity: 0.7; }

/* Flash sale */
.flash-banner {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 14px 16px; margin-bottom: 20px;
    border: 1px solid var(--border);
    display: flex; align-items: center; gap: 12px;
    box-shadow: var(--shadow-xs);
}
.flash-banner-icon { font-size: 24px; animation: float 3s ease-in-out infinite; flex-shrink: 0; }
.flash-banner-icon i { width: 24px; height: 24px; color: var(--primary); }
.flash-banner-text h4 { font-size: 13px; font-weight: 800; color: var(--primary); }
.flash-banner-text p { font-size: 11px; color: var(--text-muted); }
.flash-banner-badge {
    margin-left: auto; padding: 4px 10px;
    background: var(--danger); color: #fff; border-radius: var(--radius-full);
    font-size: 10px; font-weight: 800; animation: pulse 2s infinite;
    letter-spacing: 0.5px;
}

/* ======================== WINNERS TICKER ======================== */
.winners-ticker {
    background: var(--bg-card); border-radius: var(--radius-lg);
    border: 1px solid var(--border); margin-bottom: 16px;
    overflow: hidden; box-shadow: var(--shadow-xs);
}
.winners-ticker-header {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 14px; font-size: 12px; font-weight: 800;
    color: var(--gold); border-bottom: 1px solid var(--divider);
    background: linear-gradient(90deg, rgba(251,191,36,0.06), transparent);
}
.winners-ticker-list {
    max-height: 160px; overflow-y: auto;
    scrollbar-width: thin;
}
.winners-ticker-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 14px; border-bottom: 1px solid var(--divider);
    font-size: 12px; transition: background var(--duration-fast);
}
.winners-ticker-item:last-child { border-bottom: none; }
.winners-ticker-item:hover { background: var(--primary-50); }
.winners-ticker-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--primary-50); display: flex;
    align-items: center; justify-content: center; flex-shrink: 0;
}
.winners-ticker-info { flex: 1; min-width: 0; }
.winners-ticker-name {
    font-weight: 700; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    display: block; font-size: 12px;
}
.winners-ticker-prize {
    color: var(--text-muted); font-size: 11px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    display: block;
}
.winners-ticker-prize strong { color: var(--success); font-weight: 700; }
.winners-ticker-time {
    font-size: 10px; color: var(--text-muted); font-weight: 600;
    flex-shrink: 0;
}

/* ======================== PLAY PAGE ======================== */
.play-hero {
    border-radius: var(--radius-xl); overflow: hidden;
    margin-bottom: 20px; position: relative;
    box-shadow: var(--shadow-md);
}
.play-hero img, .play-hero .placeholder-bg { height: 200px; width: 100%; object-fit: cover; }
.play-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 50px 20px 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    color: #fff;
}
.play-overlay h1 { font-size: 20px; font-weight: 800; }
.play-overlay p { font-size: 12px; opacity: 0.85; margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.play-overlay p i { width: 14px; height: 14px; }

.info-card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 18px; border: 1px solid var(--border);
    box-shadow: var(--shadow-xs); margin-bottom: 14px;
}
.info-card-title {
    font-size: 15px; font-weight: 700;
    margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.info-card-title i { width: 18px; height: 18px; color: var(--primary); }

.prize-list { list-style: none; }
.prize-item {
    padding: 10px 0; border-bottom: 1px solid var(--divider);
    display: flex; align-items: center; gap: 10px; font-size: 14px;
}
.prize-item:last-child { border-bottom: none; }
.prize-icon-box {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--primary-50); display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.prize-icon-box i { width: 18px; height: 18px; color: var(--primary); }
.prize-icon-box.grand { background: var(--warning-50); }
.prize-icon-box.grand i { color: var(--warning); }
.prize-name { font-weight: 600; }
.prize-label-grand { font-size: 10px; font-weight: 700; color: var(--warning); }
.prize-rate {
    margin-left: auto; padding: 4px 10px;
    background: var(--primary-50); color: var(--primary);
    border-radius: var(--radius-full); font-size: 12px; font-weight: 700;
}

.play-notes { font-size: 13px; color: var(--text-secondary); line-height: 1.9; }
.play-notes li { margin-bottom: 2px; padding-left: 20px; position: relative; list-style: none; }
.play-notes li::before {
    content: ''; position: absolute; left: 4px; top: 10px;
    width: 5px; height: 5px; border-radius: 50%; background: var(--primary);
}

.stat-row { display: flex; justify-content: space-around; text-align: center; }
.stat-box .stat-num { font-size: 20px; font-weight: 800; color: var(--primary); }
.stat-box .stat-lbl { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.btn-play-main {
    width: 100%; padding: 16px; font-size: 16px; font-weight: 800;
    border-radius: var(--radius-lg); animation: glow 2.5s ease-in-out infinite;
    max-height: 56px; flex-shrink: 0; align-items: center; justify-content: center;
}

/* ======================== HISTORY ======================== */
.summary-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px;
}
.summary-box {
    background: var(--bg-card); border-radius: var(--radius); padding: 14px;
    text-align: center; border: 1px solid var(--border);
}
.summary-box .s-val { font-size: 18px; font-weight: 800; }
.summary-box .s-lbl { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.history-item {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 16px; margin-bottom: 10px;
    border: 1px solid var(--border); box-shadow: var(--shadow-xs);
    animation: fadeIn var(--duration-slow) var(--ease-out) forwards;
}
.history-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.history-cat { font-size: 14px; font-weight: 700; }
.history-time { font-size: 11px; color: var(--text-muted); }
.history-result {
    font-size: 13px; padding: 5px 12px; border-radius: var(--radius-sm);
    font-weight: 700; display: inline-flex; align-items: center; gap: 5px;
}
.history-result i { width: 14px; height: 14px; }
.history-result.won { background: var(--success-50); color: var(--success); }
.history-result.lost { background: var(--bg-input); color: var(--text-muted); }

.btn-claim {
    margin-top: 10px; padding: 8px 18px; border-radius: var(--radius);
    background: var(--gradient-success); color: #fff;
    font-weight: 700; font-size: 13px; border: none; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
    transition: all var(--duration) var(--ease-out);
}
.btn-claim:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,185,129,0.3); }
.btn-claim i { width: 14px; height: 14px; }

.order-badge {
    font-size: 12px; padding: 4px 12px; border-radius: var(--radius-full);
    font-weight: 600; display: inline-block; margin-top: 8px;
}
.order-badge.pending { background: var(--warning-50); color: var(--warning); }
.order-badge.processing { background: var(--primary-50); color: var(--primary); }
.order-badge.shipped { background: rgba(59,130,246,0.1); color: var(--info); }
.order-badge.completed { background: var(--success-50); color: var(--success); }

.admin-note-box {
    font-size: 12px; color: var(--text-secondary); margin-top: 6px;
    padding: 8px 12px; background: var(--bg-input); border-radius: var(--radius-sm);
    display: flex; align-items: flex-start; gap: 6px;
}
.admin-note-box i { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; color: var(--primary); }

.history-amount { font-size: 12px; color: var(--text-muted); margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.history-amount i { width: 13px; height: 13px; }

/* ======================== TOPUP ======================== */
.topup-balance-card {
    background: var(--gradient-hero); border-radius: var(--radius-xl);
    padding: 24px; color: #fff; text-align: center; margin-bottom: 20px;
    position: relative; overflow: hidden;
}
.topup-balance-card::after {
    content: ''; position: absolute; right: -20px; bottom: -20px;
    width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,0.06);
}
.topup-balance-card .tbc-label { font-size: 12px; opacity: 0.8; }
.topup-balance-card .tbc-amount { font-size: 28px; font-weight: 900; margin: 6px 0; }

.topup-section { margin-bottom: 14px; }
.topup-section .info-card-title { font-size: 14px; }

.telco-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.telco-item {
    padding: 12px 8px; border-radius: var(--radius);
    border: 1.5px solid var(--border-strong); background: var(--bg-input);
    text-align: center; font-size: 12px; font-weight: 700;
    cursor: pointer; transition: all var(--duration) var(--ease-out);
    display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.telco-item i { width: 20px; height: 20px; color: var(--text-muted); }
.telco-item:hover, .telco-item.active {
    border-color: var(--primary); background: var(--primary-50);
    color: var(--primary);
}
.telco-item.active i { color: var(--primary); }

.amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.amount-item {
    padding: 12px; border-radius: var(--radius);
    border: 1.5px solid var(--border-strong); background: var(--bg-input);
    text-align: center; font-size: 13px; font-weight: 700;
    cursor: pointer; transition: all var(--duration) var(--ease-out);
}
.amount-item:hover, .amount-item.active {
    border-color: var(--primary); background: var(--primary-50); color: var(--primary);
}

.topup-history-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; border-bottom: 1px solid var(--divider); font-size: 13px;
}
.topup-history-row:last-child { border-bottom: none; }

/* ======================== BOTTOM NAV ======================== */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    background: var(--bg-glass-heavy);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-top: 1px solid var(--border);
    padding: 6px 0;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
}
.bottom-nav-inner {
    max-width: 500px; margin: 0 auto;
    display: flex; justify-content: space-around;
}
.bottom-nav a {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 4px 12px; border-radius: var(--radius);
    font-size: 10px; font-weight: 600; color: var(--text-muted);
    transition: all var(--duration) var(--ease-out);
}
.bottom-nav a:hover, .bottom-nav a.active { color: var(--primary); }
.bottom-nav a.active { background: var(--primary-50); }
.bottom-nav a i { width: 22px; height: 22px; }

/* ======================== EMPTY STATE ======================== */
.empty-state {
    text-align: center; padding: 50px 20px; color: var(--text-muted);
}
.empty-state i { width: 48px; height: 48px; margin-bottom: 12px; display: inline-block; }
.empty-state p { font-size: 14px; }

/* ======================== SWEETALERT CUSTOM ======================== */
.swal2-popup.swal-ultra {
    border-radius: var(--radius-xl) !important;
    padding: 32px 24px !important;
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-xl) !important;
}
.swal2-popup.swal-ultra .swal2-title { font-size: 20px !important; font-weight: 800 !important; font-family: 'Plus Jakarta Sans', sans-serif !important; }
.swal2-popup.swal-ultra .swal2-html-container { font-size: 14px !important; color: var(--text-secondary) !important; }
.swal2-popup.swal-ultra .swal2-confirm {
    background: var(--gradient-primary) !important; border-radius: var(--radius) !important;
    font-weight: 700 !important; padding: 12px 28px !important;
    box-shadow: 0 4px 14px var(--primary-glow) !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
}
.swal2-popup.swal-ultra .swal2-cancel {
    border-radius: var(--radius) !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
}

/* Claim form in swal */
.claim-form .form-group { text-align: left; margin-bottom: 12px; }
.claim-form .form-input { border-radius: var(--radius); padding: 10px 14px; font-size: 14px; }

/* ======================== SCROLLBAR ======================== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ======================== RESPONSIVE ======================== */
@media (max-width: 500px) {
    .header-logo-text { display: none; }
    .header-stats { gap: 6px; }
    .header-user { gap: 4px; }
    .balance-badge { padding: 6px 8px; font-size: 11px; max-width: 90px; }
    .btn-topup-sm { padding: 6px 8px; }
    .btn-topup-sm span { display: none; }
    .btn-topup-sm i { margin: 0; width: 16px; height: 16px; }
    .theme-toggle { display: none; }
    .btn-icon { width: 32px; height: 32px; }
    .btn-icon i { width: 16px; height: 16px; }
}

@media (max-width: 380px) {
    .header-logo { gap: 0; }
    .header-stats .stat-text { display: none; }
    .header-stats { gap: 4px; font-size: 10px; }
    .balance-badge i { display: none; }
    .balance-badge { max-width: 80px; }
}

@media (min-width: 501px) {
    .header-stats { display: flex; }
}

@media (min-width: 1024px) {
    .main-content { max-width: 1080px; }
    .header-inner { max-width: 1080px; }
    .home-layout, .play-layout, .topup-layout, .history-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
    .winners-ticker, .play-sidebar, .topup-sidebar, .history-sidebar { position: sticky; top: 80px; }
    .history-sidebar .summary-grid { grid-template-columns: 1fr; gap: 12px; }
}

@media (max-width: 1023px) {
    .main-content { max-width: 680px; }
    .home-sidebar, .play-sidebar, .topup-sidebar, .history-sidebar { margin-top: 24px; }
}

@media (max-width: 500px) {
    .welcome-banner { padding: 18px 16px; border-radius: var(--radius-lg); }
    .welcome-banner .wb-name { font-size: 18px; }
}

/* ======================== UTILITIES ======================== */
.text-center { text-align: center; }
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.fw-bold { font-weight: 700; }
.fw-800 { font-weight: 800; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

/* ======================== GAME CAROUSEL (Horizontal) ======================== */
.game-confirm-card {
    background: var(--bg-input); border-radius: var(--radius);
    padding: 16px; margin-top: 12px; text-align: center;
}
.game-confirm-price { display: flex; justify-content: space-between; align-items: center; }
.game-confirm-price span { color: var(--text-muted); font-size: 13px; }
.game-confirm-price strong { font-size: 20px; font-weight: 900; color: var(--primary); }

.swal-game .swal2-popup {
    max-width: 500px !important;
    padding: 20px 0 !important;
    background: var(--bg-card) !important;
}

.game-carousel-wrapper {
    position: relative;
    width: 100%;
    margin: 30px 0;
    overflow: hidden;
    padding: 25px 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.9), rgba(20,20,20,0.95) 15%, rgba(20,20,20,0.95) 85%, rgba(0,0,0,0.9));
    border-top: 2px solid var(--gold);
    border-bottom: 2px solid var(--gold);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4), inset 0 0 30px rgba(0,0,0,0.8);
}

/* Pointer Arrow */
.game-carousel-pointer {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    color: var(--gold);
    filter: drop-shadow(0 4px 12px rgba(255,215,0,0.8));
    animation: pointer-bounce 0.5s ease-in-out infinite alternate;
}
@keyframes pointer-bounce {
    0% { transform: translateX(-50%) translateY(0); }
    100% { transform: translateX(-50%) translateY(5px); }
}

.game-carousel-track {
    display: flex;
    gap: 12px;
    padding: 0;
    will-change: transform;
    transition: transform 5s cubic-bezier(0.15, 0, 0.05, 1);
}

.prize-card-reel {
    flex: 0 0 130px;
    height: 160px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Premium Casino Gradient Cards */
.prize-card-reel.card-ruby { background: linear-gradient(135deg, #D31027, #EA384D); border: 1px solid #FF4D4D; box-shadow: inset 0 0 10px rgba(0,0,0,0.2); }
.prize-card-reel.card-emerald { background: linear-gradient(135deg, #11998e, #38ef7d); border: 1px solid #4ade80; box-shadow: inset 0 0 10px rgba(0,0,0,0.2); }
.prize-card-reel.card-sapphire { background: linear-gradient(135deg, #0cebeb, #20e3b2); border: 1px solid #2dd4bf; box-shadow: inset 0 0 10px rgba(0,0,0,0.2); }
.prize-card-reel.card-amethyst { background: linear-gradient(135deg, #8E2DE2, #4A00E0); border: 1px solid #c084fc; box-shadow: inset 0 0 10px rgba(0,0,0,0.2); }
.prize-card-reel.card-topaz { background: linear-gradient(135deg, #FF8008, #FFC837); border: 1px solid #fbbf24; box-shadow: inset 0 0 10px rgba(0,0,0,0.2); }
.prize-card-reel.card-onyx { background: linear-gradient(135deg, #232526, #414345); border: 1px solid #6b7280; box-shadow: inset 0 0 10px rgba(0,0,0,0.5); }
.prize-card-reel.card-gold { background: linear-gradient(135deg, #FFDF00, #D4AF37); border: 1px solid #FEF08A; box-shadow: inset 0 0 20px rgba(255,255,255,0.4), 0 0 15px rgba(212,175,55,0.4); animation: shine 3s infinite linear; }

@keyframes shine {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
.prize-card-reel.card-gold::before {
    content: ''; position: absolute; top:0; left:-100%; width:50%; height:100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg); animation: shine-sweep 3s infinite;
}
@keyframes shine-sweep { 0% { left: -100%; } 20% { left: 200%; } 100% { left: 200%; } }


.prize-card-reel.active {
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
    transform: scale(1.05);
    background: var(--primary-50);
    z-index: 5;
}

.prize-card-reel.active-winner {
    border-color: var(--gold);
    box-shadow: 0 0 40px rgba(255,215,0,0.8), inset 0 0 20px rgba(255,215,0,0.3);
    transform: scale(1.15);
    background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(230,57,70,0.05));
    z-index: 10;
    animation: pulse-winner 1s infinite alternate ease-in-out;
}
@keyframes pulse-winner {
    0% { box-shadow: 0 0 30px rgba(255,215,0,0.6), inset 0 0 15px rgba(255,215,0,0.2); }
    100% { box-shadow: 0 0 60px rgba(255,215,0,1), inset 0 0 30px rgba(255,215,0,0.5); }
}

.prize-card-reel.dimmed {
    opacity: 0.35;
    filter: grayscale(80%);
    transform: scale(0.95);
    transition: all 0.5s var(--ease-out);
}

.prize-card-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.prize-card-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-50);
    border-radius: 50%;
    margin-bottom: 12px;
    color: var(--primary);
}

.prize-card-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    line-clamp: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Lose card styling */
.prize-card-reel.lose {
    border-style: dashed;
    opacity: 0.8;
}
.prize-card-reel.lose .prize-card-icon {
    background: var(--bg-card);
    color: var(--text-muted);
}
.prize-card-reel.lose .prize-card-name {
    color: var(--text-muted);
    font-style: italic;
}

.game-slot-header h3 { font-size: 18px; font-weight: 900; margin: 0 0 10px; text-align: center; }

.game-slot-bar {
    height: 4px; background: var(--bg-input);
    border-radius: var(--radius-full); margin: 0 40px 15px;
    overflow: hidden;
}
.game-slot-progress {
    height: 100%; width: 0;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width 5s linear;
}
.game-slot-text {
    font-size: 13px; color: var(--text-muted); text-align: center;
    animation: pulse 1.5s ease-in-out infinite;
}


/* ======================== GAME WIN SCREEN ======================== */
.swal-game-win .swal2-html-container { padding: 0 !important; }

.game-win-screen { text-align: center; position: relative; padding: 10px 0; }
.game-win-glow {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(251,191,36,0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: win-glow 2s ease-in-out infinite;
}
@keyframes win-glow {
    0%, 100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

.game-win-trophy {
    font-size: 64px; position: relative; z-index: 1;
    animation: win-trophy 0.8s var(--ease-spring);
    filter: drop-shadow(0 0 20px rgba(251,191,36,0.5));
}
@keyframes win-trophy {
    0% { transform: scale(0) rotate(-30deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.game-win-title {
    font-size: 28px; font-weight: 900;
    background: linear-gradient(135deg, #F59E0B, #FBBF24, #F59E0B);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 8px 0 4px;
    animation: win-text 0.6s var(--ease-spring) 0.3s both;
}
@keyframes win-text {
    0% { transform: translateY(20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.game-win-subtitle {
    color: var(--text-muted); font-size: 14px; margin-bottom: 12px;
}
.game-win-prize {
    font-size: 18px; font-weight: 800; color: var(--primary);
    padding: 12px 20px; background: var(--primary-50);
    border: 1px solid var(--primary-100);
    border-radius: var(--radius); display: inline-block;
    animation: bounceIn 0.6s var(--ease-spring) 0.5s both;
}
.game-win-action {
    margin-top: 16px; font-size: 13px; color: var(--text-secondary);
}
.game-win-action strong { color: var(--primary); }

.swal-game .swal2-popup {
    max-width: 360px !important;
}

/* ======================== TOPUP PREVIEW ======================== */
.topup-preview-card {
    display: none; margin-bottom: 14px;
}
.topup-preview-anim {
    animation: scaleIn 0.3s var(--ease-spring);
}
.topup-preview-inner {
    background: var(--bg-card);
    border: 1.5px solid var(--primary-100);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 16px var(--primary-glow);
}
.topup-preview-header {
    background: var(--gradient-primary);
    color: #fff; padding: 10px 16px;
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; font-weight: 800; letter-spacing: 0.5px;
}
.topup-preview-header i { width: 16px; height: 16px; }
.topup-preview-rows { padding: 14px 16px; }
.topup-preview-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; border-bottom: 1px solid var(--divider);
    font-size: 13px; color: var(--text-secondary);
}
.topup-preview-row:last-child { border-bottom: none; }
.topup-preview-row strong { color: var(--text-primary); font-weight: 700; }
.topup-preview-row.dim { font-size: 12px; color: var(--text-muted); }
.topup-preview-row.bonus {
    font-size: 12px; font-weight: 700;
    color: var(--success);
    background: var(--success-50);
    margin: 4px -16px; padding: 8px 16px;
}
.topup-preview-total {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0 4px; margin-top: 4px;
    border-top: 2px solid var(--primary-100);
}
.topup-preview-total span { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.topup-preview-total strong {
    font-size: 20px; font-weight: 900;
    color: var(--success);
}

/* ======================== LINE CLAMP FIX ======================== */
.cat-card-name {
    line-clamp: 2;
}

/* Live Stats Update Animation */
.stat-up { animation: stat-up 0.6s var(--ease-spring); }
.stat-down { animation: stat-down 0.6s var(--ease-spring); }

@keyframes stat-up {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); color: var(--success); }
    100% { transform: scale(1); }
}
@keyframes stat-down {
    0% { transform: scale(1); }
    50% { transform: scale(0.9); color: var(--danger); }
    100% { transform: scale(1); }
}


