/* ============================================
   PHONG THAN - Main Stylesheet
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Colors - Dark Theme (default) */
    --bg-dark: #0a0a12;
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-card: #1e1e32;
    --bg-card-hover: #252540;

    --gold-primary: #d4a843;
    --gold-light: #f0d78c;
    --gold-dark: #b8860b;

    --accent-red: #e94560;
    --accent-blue: #3498db;
    --accent-green: #2ecc71;
    --accent-purple: #9b59b6;

    --text-white: #ffffff;
    --text-light: #e0e0e0;
    --text-muted: #888;
    --text-gray: #9ca3af;

    --border-color: #2a2a4a;
    --shadow-color: rgba(0, 0, 0, 0.5);

    /* Spacing */
    --header-height: 80px;
    --footer-height: auto;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Z-index layers */
    --z-header: 100;
    --z-sidebar: 90;
    --z-modal: 1000;
    --z-toast: 2000;
}

/* Light Mode Variables */
body.light-mode {
    --bg-dark: #f0f2f5;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f2f5;
    --text-white: #1a1a2e;
    --text-light: #2d3748;
    --text-muted: #718096;
    --text-gray: #4a5568;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .page-background::before {
    background:
        radial-gradient(ellipse at 20% 20%, rgba(212, 168, 67, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(233, 69, 96, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(220, 220, 230, 0.8) 0%, transparent 70%),
        linear-gradient(180deg, #f0f2f5 0%, #ffffff 50%, #f0f2f5 100%);
}

body.light-mode .page-background::after {
    opacity: 0.3;
}

body.light-mode .header {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 250, 0.95) 100%);
    border-bottom: 1px solid rgba(212, 168, 67, 0.3);
}

body.light-mode .card,
body.light-mode .stat-card,
body.light-mode .download-card,
body.light-mode .feature-card {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

body.light-mode .hero-title {
    -webkit-text-fill-color: #1a1a2e;
    background: linear-gradient(135deg, #1a1a2e 0%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
}

body.light-mode .section-title {
    color: var(--gold-dark);
}

body.light-mode .floating-sidebar {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--border-color);
}

body.light-mode .modal {
    background: #ffffff;
}

body.light-mode .footer {
    background: linear-gradient(180deg, #ffffff 0%, #f0f2f5 100%);
    border-top: 1px solid var(--border-color);
}

body.light-mode .gallery-item .gallery-bg {
    opacity: 0.8;
}

body.light-mode .particle {
    opacity: 0.15;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(212, 168, 67, 0.1);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--gold-primary);
    font-size: 1rem;
    flex-shrink: 0;
}

.dark-mode-toggle:hover {
    background: rgba(212, 168, 67, 0.2);
    border-color: var(--gold-primary);
    transform: scale(1.1);
}

body.light-mode .dark-mode-toggle {
    color: var(--gold-dark);
    background: rgba(184, 134, 11, 0.1);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
}

/* ============================================
   BACKGROUND LAYER
   ============================================ */
.page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.page-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(212, 168, 67, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(233, 69, 96, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(22, 33, 62, 0.8) 0%, transparent 70%),
        linear-gradient(180deg, #0a0a12 0%, #1a1a2e 50%, #0a0a12 100%);
    animation: bgPulse 15s ease-in-out infinite;
}

.page-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4a843' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

@keyframes bgPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Floating particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--gold-primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: floatParticle 20s linear infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 25s; }
.particle:nth-child(2) { left: 20%; animation-delay: 5s; animation-duration: 20s; }
.particle:nth-child(3) { left: 30%; animation-delay: 10s; animation-duration: 30s; }
.particle:nth-child(4) { left: 40%; animation-delay: 2s; animation-duration: 22s; }
.particle:nth-child(5) { left: 50%; animation-delay: 8s; animation-duration: 28s; }
.particle:nth-child(6) { left: 60%; animation-delay: 3s; animation-duration: 24s; }
.particle:nth-child(7) { left: 70%; animation-delay: 12s; animation-duration: 26s; }
.particle:nth-child(8) { left: 80%; animation-delay: 6s; animation-duration: 21s; }
.particle:nth-child(9) { left: 90%; animation-delay: 1s; animation-duration: 23s; }
.particle:nth-child(10) { left: 15%; animation-delay: 7s; animation-duration: 27s; }

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 0.3; }
    90% { opacity: 0.3; }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ============================================
   HEADER
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: linear-gradient(180deg, rgba(10, 10, 18, 0.98) 0%, rgba(26, 26, 46, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 168, 67, 0.2);
    z-index: var(--z-header);
    transition: all var(--transition-normal);
}

.header.scrolled {
    background: rgba(10, 10, 18, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform var(--transition-fast);
}

.logo:hover {
    transform: scale(1.02);
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #000;
    box-shadow: 0 4px 15px rgba(212, 168, 67, 0.3);
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: logoShine 3s ease-in-out infinite;
}

@keyframes logoShine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 50%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(212, 168, 67, 0.3);
}

.logo-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Navigation */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-item .nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    color: var(--text-light);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-item .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 30px;
    height: 3px;
    background: var(--gold-primary);
    border-radius: 3px;
    transition: transform var(--transition-fast);
}

.nav-item .nav-link:hover,
.nav-item .nav-link.active {
    color: var(--gold-primary);
    background: rgba(212, 168, 67, 0.1);
}

.nav-item .nav-link:hover::before,
.nav-item .nav-link.active::before {
    transform: translateX(-50%) scaleX(1);
}

.nav-item .nav-link i {
    font-size: 1rem;
}

/* Auth buttons */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    color: #000;
    box-shadow: 0 4px 15px rgba(212, 168, 67, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 168, 67, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
    background: rgba(212, 168, 67, 0.1);
}

.btn-outline-gold {
    background: transparent;
    color: var(--gold-primary);
    border: 2px solid var(--gold-primary);
}

.btn-outline-gold:hover {
    background: var(--gold-primary);
    color: #000;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--gold-primary);
    border-radius: 3px;
    transition: all var(--transition-fast);
}

/* ============================================
   FLOATING SIDEBAR
   ============================================ */
.floating-sidebar {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: var(--z-sidebar);
    padding: 1rem 0.5rem;
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    border: 1px solid var(--border-color);
    border-left: none;
}

.sidebar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
}

.sidebar-btn i {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.sidebar-btn.ios {
    background: linear-gradient(135deg, #000 0%, #333 100%);
}
.sidebar-btn.ios:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.sidebar-btn.android {
    background: linear-gradient(135deg, #3DDC84 0%, #2bc66b 100%);
    color: #000;
}
.sidebar-btn.android:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(61, 220, 132, 0.4);
}

.sidebar-btn.chplay {
    background: linear-gradient(135deg, #e94560 0%, #c73652 100%);
}
.sidebar-btn.chplay:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.4);
}

.sidebar-btn.charge {
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    color: #000;
}
.sidebar-btn.charge:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(212, 168, 67, 0.4);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    padding-top: var(--header-height);
    min-height: 100vh;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 50%, rgba(212, 168, 67, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 50%, rgba(233, 69, 96, 0.08) 0%, transparent 50%);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23d4a843' fill-opacity='0.05' d='M0,160L48,176C96,192,192,224,288,213.3C384,203,480,149,576,138.7C672,128,768,160,864,186.7C960,213,1056,235,1152,218.7C1248,203,1344,149,1392,122.7L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: bottom;
    background-size: cover;
    animation: heroFloat 10s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding: 2rem;
}

.hero-title {
    font-size: 5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 50%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 8px;
    margin-bottom: 1rem;
    animation: titleGlow 3s ease-in-out infinite;
    text-shadow: 0 0 60px rgba(212, 168, 67, 0.5);
}

@keyframes titleGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    letter-spacing: 6px;
    margin-bottom: 2.5rem;
    text-transform: uppercase;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: 5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title i {
    font-size: 1.5rem;
}

.view-all {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gold-primary);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.view-all:hover {
    gap: 0.75rem;
    color: var(--gold-light);
}

/* ============================================
   CARDS
   ============================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--gold-primary);
    box-shadow: 0 10px 40px rgba(212, 168, 67, 0.15);
}

.card-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    position: relative;
    overflow: hidden;
}

.card-image i {
    color: var(--gold-primary);
    opacity: 0.8;
}

.card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.card-badge.new {
    background: var(--accent-green);
    color: #000;
}

.card-badge.hot {
    background: var(--accent-red);
    color: #fff;
}

.card-badge.event {
    background: var(--accent-purple);
    color: #fff;
}

.card-content {
    padding: 1.5rem;
}

.card-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.card-excerpt {
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-link {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--gold-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.card-link:hover {
    color: var(--gold-light);
    gap: 0.5rem;
}

/* ============================================
   STATS GRID
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all var(--transition-normal);
}

.stat-card:hover {
    border-color: var(--gold-primary);
    transform: translateY(-3px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, rgba(212, 168, 67, 0.2), rgba(212, 168, 67, 0.05));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--gold-primary);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-dark) 100%);
    border-top: 1px solid var(--border-color);
    padding: 4rem 2rem 2rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: 50%;
    color: var(--text-light);
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--gold-primary);
    color: #000;
    transform: translateY(-3px);
}

.footer-column h4 {
    color: var(--gold-primary);
    font-size: 1rem;
    margin-bottom: 1.25rem;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul li a,
.footer-column ul li i {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-column ul li a:hover {
    color: var(--gold-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-card);
    color: var(--accent-red);
}

.modal h2 {
    text-align: center;
    color: var(--gold-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* ============================================
   SCROLL TO TOP
   ============================================ */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    border-radius: 50%;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 90;
    box-shadow: 0 4px 15px rgba(212, 168, 67, 0.3);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(212, 168, 67, 0.4);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    color: #fff;
    font-weight: 500;
    animation: toastSlideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.toast.success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.toast.error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.toast.warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   LOADING
   ============================================ */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-muted);
}

.loading i {
    animation: spin 1s linear infinite;
    color: var(--gold-primary);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-item .nav-link {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }
    
    .auth-buttons {
        display: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
        letter-spacing: 4px;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        letter-spacing: 3px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .floating-sidebar {
        top: auto;
        bottom: 1rem;
        left: 50%;
        transform: translateX(-50%);
        flex-direction: row;
        border-radius: var(--radius-lg);
        border-left: 1px solid var(--border-color);
    }
    
    .sidebar-btn {
        width: 50px;
        height: 50px;
    }
    
    .sidebar-btn span {
        display: none;
    }
    
    .section {
        padding: 3rem 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 1rem;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   GALLERY
   ============================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16/10;
}

.gallery-bg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--gold-primary);
    transition: transform var(--transition-normal);
}

.gallery-item:hover .gallery-bg {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    font-size: 2rem;
    color: var(--gold-primary);
}

/* ============================================
   DOWNLOAD SECTION
   ============================================ */
.download-section {
    background: linear-gradient(180deg, transparent 0%, rgba(212, 168, 67, 0.05) 50%, transparent 100%);
    border-radius: var(--radius-xl);
    margin: 2rem auto;
    padding: 4rem 2rem;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.download-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    position: relative;
    transition: all var(--transition-normal);
}

.download-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold-primary);
}

.download-card.featured {
    border-color: var(--gold-primary);
    background: linear-gradient(180deg, rgba(212, 168, 67, 0.1) 0%, var(--bg-card) 100%);
}

.featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: #000;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.download-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.download-icon.ios {
    background: linear-gradient(135deg, #000, #333);
    color: #fff;
}

.download-icon.android {
    background: linear-gradient(135deg, #3DDC84, #2bc66b);
    color: #000;
}

.download-icon.pc {
    background: linear-gradient(135deg, #1a1a2e, #3498db);
    color: #fff;
}

.download-card h3 {
    color: var(--text-white);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.download-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

/* ============================================
   FEATURE CARDS
   ============================================ */
.feature-card {
    text-align: center;
    padding: 2.5rem 2rem;
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, rgba(212, 168, 67, 0.2), rgba(212, 168, 67, 0.05));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--gold-primary);
}

.feature-title {
    color: var(--text-white);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.feature-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-gold { color: var(--gold-primary); }
.text-white { color: var(--text-white); }
.text-muted { color: var(--text-muted); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* ============================================
   HERO ENHANCEMENTS
    width: 150px;
    height: 150px;
    margin: 0 auto 2rem;
    animation: heroLogoFloat 3s ease-in-out infinite;
}

.hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 30px rgba(212, 168, 67, 0.5));
}

.hero-logo-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: #000;
    box-shadow: 0 0 50px rgba(212, 168, 67, 0.5);
}

@keyframes heroLogoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.hero-countdown {
    margin-top: 2.5rem;
    padding: 1.5rem 2rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(212, 168, 67, 0.3);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

body.light-mode .hero-countdown {
    background: rgba(255, 255, 255, 0.3);
}

.countdown-label {
    color: var(--gold-light);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* ============================================
   HEADER ACTIONS
   ============================================ */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-actions .btn span {
    display: inline;
}

@media (max-width: 768px) {
    .header-actions {
        display: none;
    }

    .download-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   LAZY LOADING
   ============================================ */
img[data-src] {
    opacity: 0;
    transition: opacity 0.4s ease;
}

img[data-src].loaded,
img:not([data-src]) {
    opacity: 1;
}

/* ============================================
   COUNTDOWN TIMER
   ============================================ */
.countdown-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.countdown-wrapper .cd-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(212, 168, 67, 0.1);
    border: 1px solid rgba(212, 168, 67, 0.3);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    min-width: 60px;
}

body.light-mode .countdown-wrapper .cd-unit {
    background: rgba(212, 168, 67, 0.15);
    border-color: rgba(184, 134, 11, 0.3);
}

.countdown-wrapper .cd-num {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--gold-primary);
    line-height: 1;
}

body.light-mode .countdown-wrapper .cd-num {
    color: var(--gold-dark);
}

.countdown-wrapper .cd-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.25rem;
}

.countdown-wrapper .cd-sep {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--gold-primary);
    line-height: 1;
    margin-bottom: 1.2rem;
}

body.light-mode .countdown-wrapper .cd-sep {
    color: var(--gold-dark);
}

.countdown-ended {
    color: var(--accent-green);
    font-weight: 700;
    font-size: 1.2rem;
}

/* ============================================
   RANKING PAGE STYLES
   ============================================ */
.ranking-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.ranking-tab {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ranking-tab:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.ranking-tab.active {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: #000;
    border-color: var(--gold-primary);
}

.ranking-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
}

.ranking-table th {
    background: rgba(212, 168, 67, 0.1);
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    color: var(--gold-primary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-color);
}

body.light-mode .ranking-table th {
    background: rgba(184, 134, 11, 0.1);
    color: var(--gold-dark);
}

.ranking-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-light);
}

body.light-mode .ranking-table td {
    background: #ffffff;
    color: var(--text-light);
}

.ranking-table tr:last-child td {
    border-bottom: none;
}

.ranking-table tr:hover td {
    background: rgba(212, 168, 67, 0.05);
}

body.light-mode .ranking-table tr:hover td {
    background: rgba(212, 168, 67, 0.08);
}

.ranking-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-weight: 900;
}

.ranking-rank.gold {
    background: linear-gradient(135deg, #ffd700, #b8860b);
    color: #000;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.ranking-rank.silver {
    background: linear-gradient(135deg, #c0c0c0, #808080);
    color: #000;
    box-shadow: 0 0 10px rgba(192, 192, 192, 0.3);
}

.ranking-rank.bronze {
    background: linear-gradient(135deg, #cd7f32, #8b4513);
    color: #fff;
    box-shadow: 0 0 10px rgba(205, 127, 50, 0.3);
}

.ranking-rank.default {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: 900;
    font-size: 1rem;
}

.vip-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.vip-badge.vip-high { background: linear-gradient(135deg, #ffd700, #ff8c00); color: #000; }
.vip-badge.vip-mid { background: linear-gradient(135deg, #c0c0c0, #808080); color: #000; }
.vip-badge.vip-low { background: linear-gradient(135deg, #cd7f32, #8b4513); color: #fff; }

/* ============================================
   GIFTCODE PAGE STYLES
   ============================================ */
.giftcode-input-wrapper {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.giftcode-input-wrapper input {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-white);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
    transition: border-color var(--transition-fast);
}

.giftcode-input-wrapper input:focus {
    outline: none;
    border-color: var(--gold-primary);
}

body.light-mode .giftcode-input-wrapper input {
    background: #ffffff;
    color: #1a1a2e;
}

.giftcode-result {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
}

.giftcode-result.success {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.giftcode-result.error {
    background: rgba(233, 69, 96, 0.1);
    border: 1px solid rgba(233, 69, 96, 0.3);
}

.giftcode-rewards {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.reward-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(212, 168, 67, 0.1);
    border-radius: var(--radius-md);
    min-width: 100px;
}

.reward-item i {
    font-size: 1.5rem;
    color: var(--gold-primary);
}

.reward-item span {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
}

/* ============================================
   EVENTS PAGE STYLES
   ============================================ */
.event-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.event-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold-primary);
    box-shadow: 0 10px 40px rgba(212, 168, 67, 0.15);
}

.event-card-image {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    position: relative;
    overflow: hidden;
}

.event-card-image i {
    color: var(--gold-primary);
    opacity: 0.8;
}

.event-card-body {
    padding: 1.5rem;
}

.event-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.75rem;
}

.event-card-desc {
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.event-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.event-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

.event-status.active {
    background: rgba(46, 204, 113, 0.15);
    color: var(--accent-green);
}

.event-status.upcoming {
    background: rgba(52, 152, 219, 0.15);
    color: var(--accent-blue);
}

.event-status.ended {
    background: rgba(136, 136, 136, 0.15);
    color: var(--text-muted);
}

.event-status .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulseDot 1.5s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* ============================================
   COMMUNITY / DISCORD WIDGET
   ============================================ */
.discord-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 2rem auto;
    max-width: 800px;
    text-align: center;
}

.discord-widget-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.discord-widget-header i {
    font-size: 2rem;
    color: #5865F2;
}

.discord-widget-header h3 {
    color: var(--text-white);
    font-size: 1.3rem;
}

.discord-stats {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin: 1rem 0;
}

.discord-stat {
    text-align: center;
}

.discord-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-primary);
}

.discord-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.fanpage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.fanpage-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(212, 168, 67, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
    text-decoration: none;
}

.fanpage-item:hover {
    border-color: var(--gold-primary);
    transform: translateY(-2px);
    background: rgba(212, 168, 67, 0.1);
}

.fanpage-item i {
    font-size: 1.5rem;
}

.fanpage-item.facebook i { color: #1877F2; }
.fanpage-item.youtube i { color: #FF0000; }
.fanpage-item.tiktok i { color: #000000; }
.fanpage-item.discord i { color: #5865F2; }

.fanpage-item span {
    color: var(--text-light);
    font-weight: 500;
}
