/**
 * ============================================
 * MAIN CSS - Game TopUp
 * Modern Dark Theme with Gaming Aesthetic
 * ============================================
 */

/* ========== CSS Variables ========== */
:root {
    /* Primary Colors */
    --color-primary: #6366f1;
    --color-primary-dark: #4f46e5;
    --color-primary-light: #818cf8;

    /* Secondary Colors */
    --color-secondary: #ec4899;
    --color-secondary-dark: #db2777;
    --color-secondary-light: #f472b6;

    /* Accent Colors */
    --color-accent: #06b6d4;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;

    /* Dark Theme Colors */
    --color-bg-primary: #0f172a;
    --color-bg-secondary: #1e293b;
    --color-bg-tertiary: #334155;
    --color-bg-card: #1e293b;
    --color-bg-hover: #334155;

    /* Text Colors */
    --color-text-primary: #f1f5f9;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #64748b;

    /* Border Colors */
    --color-border: #334155;
    --color-border-light: #475569;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --gradient-gaming: linear-gradient(135deg, #f59e0b 0%, #ef4444 50%, #ec4899 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.4);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    --shadow-glow-pink: 0 0 20px rgba(236, 72, 153, 0.3);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== Base Styles ========== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== Custom Scrollbar ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

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

/* ========== Typography ========== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-primary);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-gaming {
    background: var(--gradient-gaming);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== Card Styles ========== */
.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    transition: all var(--transition-normal);
}

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

.card-glow {
    position: relative;
    overflow: hidden;
}

.card-glow::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, var(--color-primary), transparent 30%);
    animation: rotate-glow 4s linear infinite;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.card-glow:hover::before {
    opacity: 1;
}

.card-glow::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: var(--color-bg-card);
    border-radius: calc(var(--radius-xl) - 2px);
}

.card-glow > * {
    position: relative;
    z-index: 1;
}

@keyframes rotate-glow {
    100% {
        transform: rotate(360deg);
    }
}

/* ========== Button Styles ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--color-bg-tertiary);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}

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

.btn-success {
    background: var(--gradient-success);
    color: white;
}

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

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

.btn-glow {
    position: relative;
    overflow: hidden;
}

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

.btn-glow:hover::before {
    width: 300px;
    height: 300px;
}

/* ========== Form Styles ========== */
.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    color: var(--color-text-primary);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

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

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

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

/* ========== Badge Styles ========== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--color-success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--color-warning);
}

.badge-error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--color-error);
}

.badge-info {
    background: rgba(59, 130, 246, 0.2);
    color: var(--color-info);
}

.badge-primary {
    background: rgba(99, 102, 241, 0.2);
    color: var(--color-primary-light);
}

/* ========== Game Card Specific ========== */
.game-card {
    position: relative;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-normal);
}

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

.game-card-image {
    position: relative;
    padding-bottom: 75%;
    overflow: hidden;
}

.game-card-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.game-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, transparent 50%);
}

.game-card-content {
    padding: 1.25rem;
}

/* ========== Hero Section ========== */
.hero-section {
    position: relative;
    padding: 5rem 0;
    overflow: hidden;
}

.hero-bg-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.15) 0%, transparent 50%);
}

.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: float-particle 15s infinite;
}

@keyframes float-particle {
    0%, 100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ========== Stats Section ========== */
.stat-card {
    text-align: center;
    padding: 2rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* ========== Feature Cards ========== */
.feature-card {
    padding: 2rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    transition: all var(--transition-normal);
}

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

.feature-icon {
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.feature-icon i {
    font-size: 1.5rem;
    color: white;
}

/* ========== Navigation ========== */
.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    color: var(--color-text-secondary);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all var(--transition-fast);
    transform: translateX(-50%);
}

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

/* ========== Mobile Menu ========== */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--color-bg-secondary);
    border-left: 1px solid var(--color-border);
    z-index: 100;
    transition: right var(--transition-normal);
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

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

/* ========== FAQ Accordion ========== */
.faq-item {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1rem;
}

.faq-question {
    width: 100%;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    color: var(--color-text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.faq-question:hover {
    background: var(--color-bg-hover);
}

.faq-answer {
    padding: 0 1.25rem 1.25rem;
    color: var(--color-text-secondary);
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-icon {
    transition: transform var(--transition-fast);
}

/* ========== Footer ========== */
.footer {
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
}

.footer-link {
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--color-primary);
}

/* ========== Animations ========== */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(99, 102, 241, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.8);
    }
}

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

.animate-fade-in-up {
    animation: fade-in-up 0.6s ease-out forwards;
}

.animate-fade-in {
    animation: fade-in 0.6s ease-out forwards;
}

.animate-slide-in-right {
    animation: slide-in-right 0.6s ease-out forwards;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

.animate-bounce-subtle {
    animation: bounce-subtle 3s ease-in-out infinite;
}

/* Animation delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* ========== Loading States ========== */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--color-bg-tertiary) 25%,
        var(--color-bg-hover) 50%,
        var(--color-bg-tertiary) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

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

/* ========== Utilities ========== */
.glass {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.border-gradient {
    border: 2px solid transparent;
    background: linear-gradient(var(--color-bg-card), var(--color-bg-card)) padding-box,
                var(--gradient-primary) border-box;
}

.text-balance {
    text-wrap: balance;
}

/* Responsive container */
.container-custom {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container-custom {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container-custom {
        padding: 0 2rem;
    }
}

/* ========== Responsive Breakpoints ========== */
/* Mobile: 320px - 639px */
/* Tablet: 640px - 1023px */
/* Desktop: 1024px+ */

@media (max-width: 639px) {
    .hero-section {
        padding: 3rem 0;
    }

    .stat-number {
        font-size: 2rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .hero-section {
        padding: 4rem 0;
    }
}

/* ========== Print Styles ========== */
@media print {
    body {
        background: white;
        color: black;
    }

    .no-print {
        display: none !important;
    }
}
