/* ==================== */
/* Effects CSS Link     */
@import "effects.css";

/* ==================== */
/* CSS Variables        */
/* ==================== */
:root {
    /* Monochrome Palette */
    --primary: #ffffff;
    --primary-light: #e0e0e0;
    --primary-dark: #aaaaaa;
    --secondary: #404040;
    --accent: #ffffff;
    
    /* Backgrounds */
    --bg-dark: #000000;
    --bg-card: #0a0a0a;
    --bg-card-hover: #141414;
    --bg-input: #1a1a1a; /* Brightened for better visibility */
    
    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #f2f2f2; /* High contrast gray */
    --text-muted: #a3a3a3;     /* Readable gray */
    
    /* Borders */
    --border-color: #333333;   /* More visible borders */
    --border-hover: #555555;
    
    /* Status Colors */
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #FF6B35 0%, #F7931E 50%, #FFD700 100%);
    --gradient-brand: linear-gradient(135deg, #FF6B35 0%, #F7931E 50%, #FFD700 100%); /* BlazeMarket Fire */
    --gradient-vip: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%); /* Purple/Pink for VIP */
    --gradient-admin: linear-gradient(135deg, #f59e0b 0%, #ffd700 100%); /* Gold for Admin */
    --gradient-hero: linear-gradient(180deg, #000000 0%, #111111 100%);
    --gradient-glow: radial-gradient(circle, rgba(255,255,255,0.15) 0%, rgba(0,0,0,0) 70%);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(255, 255, 255, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 1);
    --shadow-glow: 0 0 20px rgba(255, 255, 255, 0.2);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 24px;
    
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* Smooth ease-out */
}

/* Primary Buttons */
.btn-primary {
    background: var(--gradient-brand);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    filter: brightness(1.1);
}

/* Text Gradients */
.text-gradient,
.hero-title,
.stat-value,
.logo-text,
.section-title,
.legal-content h1,
.admin-header h2 {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent; /* Fallback */
    display: inline-block; /* Often needed for background-clip to work on text */
}

/* Specific overrides if needed */
.stat-value {
    font-weight: 800;
}

/* Badges with colors */
.badge-vip {
    background: var(--gradient-vip);
    color: white;
    border: none;
}

.badge-admin {
    background: var(--gradient-admin);
    color: black;
    border: none;
}

/* Icon Hovers with Color */
svg:hover {
    color: #FF6B35; /* Brand orange on hover */
    filter: drop-shadow(0 0 5px rgba(255, 107, 53, 0.5));
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

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

/* Brighten all icons by default using currentColor */
svg {
    color: var(--text-secondary);
    transition: color 0.3s ease, stroke 0.3s ease;
}

svg:hover {
    color: var(--text-primary);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==================== */
/* Header               */
/* ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 15, 26, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-brand);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    color: white;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: #FF6B35;
    background: var(--bg-card);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 24px;
    flex-direction: column;
    gap: 24px;
}

.mobile-menu.active {
    display: flex;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-nav-link {
    padding: 12px 16px;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.mobile-nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-dark);
}

.mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ==================== */
/* Buttons              */
/* ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #000000;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

.btn-ghost {
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: var(--bg-card);
}

.btn-outline {
    color: var(--text-primary);
    border: 1px solid var(--border-hover);
}

.btn-outline:hover {
    background: var(--bg-card);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
}

/* ==================== */
/* Hero Section         */
/* ==================== */
.hero {
    position: relative;
    padding: 160px 0 100px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
    opacity: 0.5;
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    /* Gradient handled by global utility now */
}

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

/* Search Box */
.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto 48px;
}

.search-input {
    width: 100%;
    padding: 18px 56px 18px 24px;
    font-size: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.05);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    /* Gradient handled by global utility */
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ==================== */
/* Sections             */
/* ==================== */
.section {
    padding: 80px 0;
}

.section-dark {
    background: var(--bg-card);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-header.center {
    flex-direction: column;
    text-align: center;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
}

.section-link {
    color: var(--primary-light);
    font-weight: 600;
    transition: var(--transition);
}

.section-link:hover {
    color: #FF6B35;
    transform: translateX(4px);
}

/* Filters */
.filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
}

/* ==================== */
/* Games Grid           */
/* ==================== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.game-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.game-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.game-card-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--bg-card-hover) 0%, var(--bg-card) 100%);
}

.game-card-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
}

.game-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
}

.game-title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
}

.game-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-dark);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

/* ==================== */
/* Offers Grid          */
/* ==================== */
.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.offer-card {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

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

.offer-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.offer-game-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.offer-game-info {
    flex: 1;
}

.offer-game-title {
    font-weight: 600;
    font-size: 0.875rem;
}

.offer-category {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.offer-body {
    padding: 16px;
}

.offer-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
}

.offer-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.offer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

.offer-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--success);
}

.offer-seller {
    display: flex;
    align-items: center;
    gap: 8px;
}

.seller-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.seller-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.seller-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--warning);
}

/* ==================== */
/* Features Grid        */
/* ==================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 20px;
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ==================== */
/* CTA Section          */
/* ==================== */
.cta-section {
    padding: 100px 0;
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
}

.cta-content {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==================== */
/* Footer               */
/* ==================== */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 64px 0 32px;
}

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

.footer-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 16px;
    margin-bottom: 24px;
    max-width: 280px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

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

.footer-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-list a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-list a:hover {
    color: #FF6B35;
    transform: translateX(4px);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-legal {
    display: flex;
    gap: 24px;
}

.footer-legal a {
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: var(--transition);
}

.footer-legal a:hover {
    color: var(--text-secondary);
}

/* ==================== */
/* User Menu            */
/* ==================== */
.user-menu {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.balance-display {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-right: 8px;
    border-right: 1px solid var(--border-color);
}

.balance-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.balance-amount {
    font-size: 1rem;
    font-weight: 700;
    color: var(--success);
}

.user-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.user-dropdown-trigger:hover {
    background: var(--bg-card);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    display: none;
    overflow: hidden;
}

.user-dropdown.active {
    display: block;
    animation: slideDown 0.2s ease;
}

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

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-dark);
}

.user-avatar-lg {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.user-role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--bg-dark);
    color: var(--text-primary);
}

.dropdown-item.text-danger {
    color: var(--error);
}

.dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.badge {
    margin-left: auto;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

/* Mobile User Menu */
.mobile-user-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.mobile-balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-dark);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
}

.mobile-balance strong {
    color: var(--success);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* ==================== */
/* Modals               */
/* ==================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: modalSlide 0.3s ease;
}

.modal-content.modal-lg {
    max-width: 500px;
}

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

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    background: var(--bg-dark);
    color: var(--text-primary);
}

.modal-header {
    padding: 24px 24px 0;
    text-align: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.modal-form {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-footer {
    padding: 0 24px 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.modal-footer a {
    color: var(--primary-light);
    font-weight: 600;
}

.modal-footer a:hover {
    text-decoration: underline;
}

/* ==================== */
/* Forms                */
/* ==================== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.password-input {
    position: relative;
}

.password-input input {
    width: 100%;
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--text-primary);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-secondary);
}

.checkbox input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.forgot-link {
    color: var(--primary-light);
    font-size: 0.85rem;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    gap: 8px;
    padding: 0 24px;
    margin-bottom: 16px;
}

.auth-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-dark);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: pointer;
}

.auth-tab:hover {
    border-color: var(--primary-light);
    color: var(--text-primary);
}

.auth-tab.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: flex;
}

/* Phone Input */
.phone-input {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0 16px;
}

.phone-prefix {
    font-weight: 600;
    color: var(--text-secondary);
}

.phone-input input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 0;
}

.phone-input input:focus {
    box-shadow: none;
}

/* Verification Section */
.verification-section {
    animation: fadeIn 0.3s ease;
}

.code-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.code-input {
    width: 40px;
    height: 48px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    padding: 0;
}

.code-hint {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Deposit Modal */
.deposit-methods {
    padding: 0 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.deposit-method {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.deposit-method:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

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

.method-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.method-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.method-fee {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.deposit-stub {
    padding: 24px;
    text-align: center;
    background: var(--bg-dark);
    border-radius: var(--radius-md);
    margin: 0 24px 24px;
}

.stub-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.deposit-stub p {
    font-weight: 600;
    margin-bottom: 4px;
}

.deposit-stub span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==================== */
/* Settings Page        */
/* ==================== */
.settings-container {
    padding-top: 100px;
    min-height: calc(100vh - 300px);
}

.settings-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
}

.settings-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    height: fit-content;
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.settings-nav-item:hover,
.settings-nav-item.active {
    background: var(--bg-dark);
    color: #FF6B35;
}

.settings-nav-item.active {
    background: var(--gradient-brand);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.2);
}

.settings-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
}


/* ==================== */
/* Cursor Trail         */
/* ==================== */
.cursor-trail {
    position: fixed;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: exclusion;
    transition: opacity 0.3s ease;
    opacity: 0.8;
}

/* ==================== */
/* Animations           */
/* ==================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

/* Modern Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

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

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

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* VIP Badge */
.vip-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    margin-left: 8px;
}

/* Stats Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
}

.stat-card-value {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-card-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Games Management */
.game-management-card {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
}

.game-management-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.game-avatar-upload {
    width: 80px;
    height: 80px;
    background: var(--bg-card);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.game-avatar-upload:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

.game-avatar-upload svg {
    color: var(--text-muted);
    margin-bottom: 4px;
}

.game-avatar-upload span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Responsive for settings */
@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-sidebar {
        order: -1;
    }
    
    .settings-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .settings-nav-item {
        flex: 0 0 auto;
        padding: 8px 14px !important;
        font-size: 0.8rem;
    }
    
    .settings-content {
        padding: 16px !important;
    }
    
    .settings-content h3 {
        font-size: 1.1rem;
    }
    
    .settings-container {
        padding-top: 80px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        text-align: center;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    /* Profile page mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }
    
    .stat-card-value {
        font-size: 1.3rem;
    }
    
    /* Game management cards */
    .game-management-card {
        padding: 14px !important;
    }
    
    .game-management-header {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .game-management-card .btn {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
    
    /* Support page mobile */
    .support-layout {
        grid-template-columns: 1fr !important;
    }
    
    .support-page {
        padding: 80px 0 40px;
    }
    
    .support-header h1 {
        font-size: 1.5rem;
    }
    
    .support-card-body {
        padding: 14px 16px;
    }
    
    .support-card-header {
        padding: 14px 16px;
    }
    
    .ticket-detail-header {
        padding: 14px 16px;
    }
    
    .ticket-messages {
        padding: 14px 16px;
        max-height: 300px;
    }
    
    .ticket-reply-bar {
        padding: 12px 16px;
    }
    
    .ticket-reply-bar input {
        font-size: 0.85rem;
    }
    
    .faq-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Mobile back button */
    #mobileBackBtn {
        display: inline-flex !important;
        min-height: 36px;
        padding: 6px 14px;
        font-size: 0.8rem;
    }
    
    /* User menu mobile fix */
    .user-menu {
        gap: 8px;
    }
    
    .balance-display {
        display: none;
    }
    
    .user-dropdown {
        right: 0;
        left: auto;
        min-width: 220px;
    }
    
    /* Dropdown on mobile - make it work better */
    .dropdown-item {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
}

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

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav, .header-actions {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero {
        padding: 100px 0 50px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .hero-stats {
        gap: 16px;
    }
    
    .stat-value {
        font-size: 1.3rem;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .game-card-content {
        padding: 10px;
    }
    
    .game-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 8px;
    }
    
    .game-title {
        font-size: 0.75rem;
    }
    
    .game-count {
        font-size: 0.65rem;
        bottom: 6px;
        right: 6px;
        padding: 2px 6px;
    }
    
    .offers-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    /* Touch-friendly buttons */
    .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
        min-height: 44px;
    }
    
    .btn-lg {
        padding: 16px 24px;
        font-size: 1.05rem;
        min-height: 50px;
    }
    
    .btn-sm {
        padding: 10px 16px;
        min-height: 40px;
    }
    
    /* Offer card mobile */
    .offer-header {
        padding: 12px;
    }
    
    .offer-body {
        padding: 12px;
    }
    
    .offer-footer {
        padding: 12px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .offer-footer .btn {
        flex: 1;
        min-width: 0;
    }
    
    .offer-price {
        font-size: 1.1rem;
    }
    
    /* Modal mobile */
    .modal {
        padding: 12px;
    }
    
    .modal-content {
        max-height: 95vh;
        border-radius: var(--radius-md);
    }
    
    .modal-header {
        padding: 20px 16px 0;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    .modal-form {
        padding: 16px;
    }
    
    .modal-form .form-group label {
        font-size: 0.85rem;
    }
    
    .modal-form input,
    .modal-form textarea,
    .modal-form select {
        padding: 12px;
        font-size: 1rem;
        min-height: 44px;
    }
    
    .modal-close {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
    }
    
    /* Header mobile */
    .header {
        padding: 12px 0;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: 8px;
    }
    
    .cta-title {
        font-size: 1.5rem;
    }
    
    /* CTA section */
    .cta .btn {
        width: 100%;
    }
    
    /* Toast better position */
    .toast {
        left: 16px;
        right: 16px;
        bottom: 20px;
        max-width: none;
        text-align: center;
    }
    
    /* Mobile menu improvements */
    .mobile-menu {
        padding: 20px 16px;
    }
    
    .mobile-nav-link {
        padding: 14px 0;
        font-size: 1rem;
    }
    
    .mobile-actions .btn {
        min-height: 48px;
        font-size: 1rem;
    }
    
    /* Feature cards */
    .feature-card {
        padding: 20px;
    }
    
    .feature-icon {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }
    
    /* Stat cards */
    .stat-card {
        padding: 16px;
    }
    
    /* Search */
    .search-input {
        min-height: 44px;
        font-size: 1rem;
    }
    
    /* Filter buttons */
    .filters {
        gap: 6px;
    }
    
    .filter-btn {
        padding: 10px 14px;
        font-size: 0.8rem;
        min-height: 40px;
    }
    
    /* Chat view mobile */
    .chat-view {
        max-height: 280px !important;
        font-size: 0.85rem;
    }
    .chat-message {
        padding: 8px 10px;
        margin-bottom: 6px;
    }
    .chat-input input {
        min-height: 44px;
        font-size: 0.95rem;
    }
    
    /* Code inputs - easier paste on mobile */
    .code-input {
        width: 40px !important;
        height: 48px !important;
        font-size: 1.2rem !important;
    }
    
    /* Admin panel mobile */
    .admin-grid {
        grid-template-columns: 1fr !important;
    }
    .admin-sidebar {
        position: static !important;
    }
    .admin-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }
    .admin-nav-item {
        flex: 0 0 auto;
        padding: 8px 12px !important;
        font-size: 0.8rem;
    }
    .admin-nav-item span {
        font-size: 0.75rem;
    }
    .deal-card {
        padding: 12px;
    }
    .admin-actions {
        flex-wrap: wrap;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .hero-title {
        font-size: 1.7rem;
    }
    
    .hero-subtitle {
        font-size: 0.85rem;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
    
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .filters {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }
    
    .filter-btn {
        flex: 0 0 auto;
        min-width: auto;
    }
    
    .section-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}
