@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ==========================================================================
   1. CSS RESET & BASE
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-background);
    color: var(--color-text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

ul, ol {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    outline: none;
    border: none;
}

button {
    cursor: pointer;
    background: none;
}

::selection {
    background-color: var(--color-primary-light);
    color: #fff;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-background);
}
::-webkit-scrollbar-thumb {
    background: var(--color-primary-light);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* ==========================================================================
   2. CSS VARIABLES
   ========================================================================== */
:root {
    /* Colors */
    --color-primary: #7C3AED;
    --color-primary-dark: #6D28D9;
    --color-primary-light: #8B5CF6;
    --color-primary-lighter: #EDE9FE;
    --color-secondary: #4F46E5;
    --color-accent: #F59E0B;
    --color-background: #F8F7FF;
    --color-card-bg: #FFFFFF;
    --color-surface: #F3F4F6;
    --color-text-primary: #1E1B4B;
    --color-text-secondary: #6B7280;
    --color-text-muted: #9CA3AF;
    --color-border: #E5E7EB;
    --color-border-light: #F3F4F6;
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-error: #EF4444;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(124, 58, 237, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(124, 58, 237, 0.1), 0 2px 4px -1px rgba(124, 58, 237, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(124, 58, 237, 0.1), 0 4px 6px -2px rgba(124, 58, 237, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(124, 58, 237, 0.1), 0 10px 10px -5px rgba(124, 58, 237, 0.04);
    --shadow-glow: 0 0 15px rgba(124, 58, 237, 0.3);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-text-primary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; font-weight: 800; line-height: 3rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--color-text-secondary);
}

small, .small {
    font-size: 0.875rem;
    font-weight: 400;
}

/* ==========================================================================
   4. LAYOUT
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

/* ==========================================================================
   5. NAVBAR
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-normal);
    padding: 1.25rem 0;
    background: transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    color: var(--color-text-primary);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: var(--transition-normal);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--color-text-primary);
    z-index: 1001;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    z-index: 999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transform: translateY(-100%);
    transition: transform var(--transition-normal);
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-menu .nav-links {
    flex-direction: column;
    font-size: 1.5rem;
}

.mobile-menu .nav-actions {
    flex-direction: column;
}

/* ==========================================================================
   6. BUTTONS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: var(--transition-normal);
    gap: 0.5rem;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow);
    color: #fff;
}

.btn-secondary {
    background: var(--color-secondary);
    color: #fff;
}

.btn-secondary:hover {
    background: #4338CA;
    color: #fff;
}

.btn-outline {
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    background: transparent;
}

.btn-outline:hover {
    background: var(--color-primary-lighter);
}

.btn-google {
    background: #fff;
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.btn-google:hover {
    background: var(--color-surface);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ==========================================================================
   7. CARDS
   ========================================================================== */
.card {
    background: var(--color-card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    transition: var(--transition-normal);
    border: 1px solid var(--color-border-light);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   8. HERO SECTION
   ========================================================================== */
.hero-section {
    padding: 10rem 0 6rem;
    position: relative;
    background: linear-gradient(135deg, rgba(124,58,237,0.1), rgba(79,70,229,0.1));
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(124,58,237,0.1) 0%, transparent 50%);
    animation: rotateSlow 20s linear infinite;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--color-primary), #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-bottom: 2.5rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================================================
   9. GAME GRID
   ========================================================================== */
.games-section {
    background-color: #fff;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.game-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 3/4;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.game-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: var(--transition-slow);
}

.game-card:hover .game-card-bg {
    transform: scale(1.1);
}

.game-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
}

.game-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    color: #fff;
}

/* Gradients for specific games */
.game-mobile-legends .game-card-icon { background: linear-gradient(135deg, #FF6B35, #FF3366); }
.game-pubg-mobile .game-card-icon { background: linear-gradient(135deg, #F5A623, #F7DC6F); }
.game-bgmi .game-card-icon { background: linear-gradient(135deg, #1ABC9C, #16A085); }
.game-genshin-impact .game-card-icon { background: linear-gradient(135deg, #667eea, #764ba2); }
.game-free-fire .game-card-icon { background: linear-gradient(135deg, #f12711, #f5af19); }
.game-valorant .game-card-icon { background: linear-gradient(135deg, #fd1d1d, #833ab4); }
.game-cod-mobile .game-card-icon { background: linear-gradient(135deg, #232526, #414345); }
.game-clash-of-clans .game-card-icon { background: linear-gradient(135deg, #11998e, #38ef7d); }
.game-roblox .game-card-icon { background: linear-gradient(135deg, #ee0979, #ff6a00); }
.game-stumble-guys .game-card-icon { background: linear-gradient(135deg, #4facfe, #00f2fe); }

.game-card-title {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.game-card-category {
    color: rgba(255,255,255,0.7);
    font-size: 0.875rem;
}

/* ==========================================================================
   10. GAME DETAIL PAGE & PACKAGES
   ========================================================================== */
.game-banner {
    height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding-bottom: 2rem;
}

.game-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 100%);
}

.game-banner-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.game-banner-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    box-shadow: var(--shadow-lg);
}

.game-banner-title {
    color: #fff;
    margin: 0;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.package-card {
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.package-card:hover {
    border-color: var(--color-primary-light);
    transform: translateY(-2px);
}

.package-card.selected {
    border-color: var(--color-primary);
    background: var(--color-primary-lighter);
}

.package-card.selected::after {
    content: '✓';
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--color-primary);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.package-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
}

.package-price {
    color: var(--color-primary);
    font-weight: 600;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text-primary);
}

.form-input, .form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    transition: var(--transition-fast);
    font-size: 1rem;
}

.form-input:focus, .form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
    background: #fff;
}

.form-error {
    color: var(--color-error);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

/* ==========================================================================
   11. LEADERBOARD
   ========================================================================== */
.leaderboard-section {
    background: #fff;
}

.leaderboard-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.leaderboard-tab {
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    background: var(--color-surface);
    color: var(--color-text-secondary);
    transition: var(--transition-fast);
}

.leaderboard-tab.active, .leaderboard-tab:hover {
    background: var(--color-primary);
    color: #fff;
}

.leaderboard-table-container {
    overflow-x: auto;
}

.leaderboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.leaderboard-table th {
    text-align: left;
    padding: 1rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.leaderboard-table td {
    padding: 1rem;
    background: #fff;
    border-top: 1px solid var(--color-border-light);
    border-bottom: 1px solid var(--color-border-light);
}

.leaderboard-table tr td:first-child {
    border-left: 1px solid var(--color-border-light);
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}

.leaderboard-table tr td:last-child {
    border-right: 1px solid var(--color-border-light);
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

.leaderboard-table tr:hover td {
    background: var(--color-surface);
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 700;
    color: var(--color-text-secondary);
    background: var(--color-surface);
}

.rank-gold {
    background: linear-gradient(135deg, #FFD700, #FDB931);
    color: #fff;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.3);
}

.rank-silver {
    background: linear-gradient(135deg, #E0E0E0, #BDBDBD);
    color: #fff;
}

.rank-bronze {
    background: linear-gradient(135deg, #CD7F32, #A0522D);
    color: #fff;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* ==========================================================================
   12. PROFILE PAGE
   ========================================================================== */
.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: var(--shadow-md);
}

.profile-info h1 {
    margin-bottom: 0.25rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.order-table {
    width: 100%;
    border-collapse: collapse;
}

.order-table th, .order-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.order-status {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-completed { background: rgba(16, 185, 129, 0.1); color: var(--color-success); }
.status-pending { background: rgba(245, 158, 11, 0.1); color: var(--color-warning); }
.status-failed { background: rgba(239, 68, 68, 0.1); color: var(--color-error); }

/* ==========================================================================
   13. WALLET
   ========================================================================== */
.wallet-card {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.wallet-balance-label {
    font-size: 1rem;
    opacity: 0.8;
}

.wallet-balance-amount {
    font-size: 3rem;
    font-weight: 800;
    margin: 0.5rem 0;
}

/* ==========================================================================
   14. ADMIN PANEL
   ========================================================================== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: #1E1B4B;
    color: #fff;
    padding: 2rem 1rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: var(--transition-normal);
    z-index: 100;
}

.admin-sidebar-logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 2rem;
    color: #fff;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-nav a {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    color: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-nav a:hover, .admin-nav a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.admin-content {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
    background: var(--color-surface);
    min-height: 100vh;
}

.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.admin-stat-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--color-primary-lighter);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.admin-stat-info h3 {
    font-size: 1.5rem;
    margin: 0;
}

.admin-stat-info p {
    color: var(--color-text-secondary);
    margin: 0;
    font-size: 0.875rem;
}

/* ==========================================================================
   15. FOOTER
   ========================================================================== */
.footer {
    background: #1E1B4B;
    color: #fff;
    padding: 4rem 0 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    color: #fff;
    margin-bottom: 1.5rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--color-text-muted);
}

.footer-links a:hover {
    color: var(--color-primary-light);
}

.footer-bottom {
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: var(--color-text-muted);
}

/* ==========================================================================
   16. MODALS
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: #fff;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-xl);
    transform: translateY(-20px);
    transition: transform var(--transition-normal);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-muted);
    cursor: pointer;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* ==========================================================================
   17. ALERTS & BADGES & TOAST
   ========================================================================== */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.alert-success { background: rgba(16, 185, 129, 0.1); color: var(--color-success); border: 1px solid var(--color-success); }
.alert-error { background: rgba(239, 68, 68, 0.1); color: var(--color-error); border: 1px solid var(--color-error); }
.alert-info { background: rgba(59, 130, 246, 0.1); color: #3B82F6; border: 1px solid #3B82F6; }

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: #fff;
    border-left: 4px solid var(--color-primary);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    transform: translateX(120%);
    transition: transform var(--transition-normal);
}

.toast.show {
    transform: translateX(0);
}

.toast.success { border-color: var(--color-success); }
.toast.error { border-color: var(--color-error); }

/* ==========================================================================
   18. LOADING & UTILITIES
   ========================================================================== */
.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(124, 58, 237, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-primary);
    animation: spin 1s ease-in-out infinite;
    display: inline-block;
}

.skeleton {
    background: #e2e8f0;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--color-primary); }
.text-muted { color: var(--color-text-muted); }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

/* ==========================================================================
   19. ANIMATIONS
   ========================================================================== */
@keyframes spin {
    to { transform: rotate(360deg); }
}

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

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

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

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.slide-up {
    opacity: 0;
    transform: translateY(20px);
}

.slide-up.visible {
    animation: slideUp 0.8s ease forwards;
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* ==========================================================================
   20. RESPONSIVE QUERIES
   ========================================================================== */
/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
    .game-grid { grid-template-columns: repeat(3, 1fr); }
    .packages-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-content { grid-template-columns: repeat(2, 1fr); }
    .admin-sidebar { width: 200px; }
    .admin-content { margin-left: 200px; }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    h1 { font-size: 2rem; line-height: 2.5rem; }
    h2 { font-size: 1.75rem; }
    
    .section { padding: 3rem 0; }
    .hero-section { padding: 8rem 0 4rem; }
    .hero-title { font-size: 2.5rem; }
    .hero-stats { flex-direction: column; gap: 1.5rem; }
    
    .nav-links { display: none; }
    .nav-actions { display: none; }
    .mobile-menu-toggle { display: block; }
    
    .game-grid { grid-template-columns: repeat(2, 1fr); }
    .packages-grid { grid-template-columns: 1fr; }
    
    .footer-content { grid-template-columns: 1fr; }
    
    .profile-header { flex-direction: column; text-align: center; }
    
    .wallet-card { flex-direction: column; text-align: center; gap: 1.5rem; }
    
    .admin-sidebar { 
        transform: translateX(-100%); 
        width: 250px;
    }
    .admin-sidebar.active {
        transform: translateX(0);
    }
    .admin-content { margin-left: 0; padding: 1rem; }
    
    .leaderboard-table-container, .order-table-container {
        overflow-x: auto;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .game-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 2rem; }
}

/* ==========================================================================
   21. PRINT STYLES
   ========================================================================== */
@media print {
    .navbar, .footer, .btn, .admin-sidebar, .mobile-menu-toggle {
        display: none !important;
    }
    .admin-content {
        margin: 0 !important;
        padding: 0 !important;
    }
    body {
        background: #fff;
        color: #000;
    }
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
