:root {
    --bg-main: rgba(9, 9, 9, 0.1);
    --bg-secondary: rgba(17, 17, 17, 0.3);
    --bg-card: rgba(24, 24, 24, 0.4);
    --bg-elevated: rgba(32, 32, 32, 0.5);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #A8A8A8;
    --accent: #E6E6E6;
    --hover: #F5F5F5;
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.5);
    
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: initial; /* Handled by Lenis */
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, .logo {
    font-family: var(--font-heading);
    font-weight: 700;
}

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

/* Custom Cursor */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: var(--text-primary);
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: difference;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

/* Loader */
#loader {
    position: fixed;
    inset: 0;
    background: #090909;
    z-index: 9000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-content {
    text-align: center;
    width: 300px;
}

.loading-bar-container {
    width: 100%;
    height: 2px;
    background: var(--border-color);
    margin: 20px 0;
    overflow: hidden;
}

.loading-bar {
    width: 0%;
    height: 100%;
    background: var(--text-primary);
}

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

/* Typography & Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-main);
}

.btn-primary:hover {
    background: var(--hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.btn-buy {
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.5);
    color: #4ade80;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-buy:hover {
    background: rgba(74, 222, 128, 0.25);
    border-color: #4ade80;
    transform: translateY(-2px);
}

.cart-icon {
    animation: cart-drive 2s infinite ease-in-out;
}

@keyframes cart-drive {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(3px); }
}

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

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: rgba(255,255,255,0.2);
}

.full-width {
    width: 100%;
}

/* Navigation */
#navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1400px;
    padding: 15px 30px;
    z-index: 1000;
    background: rgba(9, 9, 9, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#navbar.scrolled {
    background: rgba(9, 9, 9, 0.25);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

.nav-links a {
    margin: 0 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

/* Hero Section */
#hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5%;
    overflow: hidden;
}

.site-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background: #000;
}

.site-bg img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Zoom out to show full image */
    object-position: center;
    opacity: 0.95;
}

.site-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.3) 15%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 2;
}

.hero-content {
    max-width: 800px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transform: translateY(-10vh); /* Shift content slightly towards the top */
}

.label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #4ade80;
    margin-bottom: 24px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 10px #4ade80;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5.5rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.highlight-gold {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #090909; /* Dark text for contrast */
    padding: 0 16px;
    border-radius: 12px;
    display: inline-block;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
    font-style: italic;
}

.hero-desc {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    max-width: 500px;
    line-height: 1.6;
}

.hero-price {
    font-size: 1.4rem;
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 0;
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.4);
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
}

.hero-buttons {
    display: flex;
    gap: 40px;
    justify-content: center;
    align-items: center;
}

.payment-footer {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    opacity: 0.9;
    display: flex;
    justify-content: center;
    align-items: center;
}

.payment-footer img {
    height: 45px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.payment-footer img:hover {
    transform: scale(1.05);
}

.btn-more-games {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(9, 9, 9, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.btn-more-games:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.4);
}

.gamepad-icon {
    animation: gamepad-wiggle 4s infinite ease-in-out;
}

@keyframes gamepad-wiggle {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(15deg); }
    20% { transform: rotate(-10deg); }
    30% { transform: rotate(5deg); }
    40% { transform: rotate(-5deg); }
    50%, 90% { transform: rotate(0deg); }
}

.loader-logo-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
    animation: loader-pulse 2s infinite ease-in-out;
}

@keyframes loader-pulse {
    0%, 100% { opacity: 0.7; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.05); }
}

.animated-loading-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 15px;
    letter-spacing: 2px;
    font-family: var(--font-heading);
}

.animated-loading-text span {
    animation: loading-dots 1.4s infinite both;
}

.animated-loading-text span:nth-child(2) { animation-delay: 0.2s; }
.animated-loading-text span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loading-dots {
    0% { opacity: 0.2; transform: translateY(0px); }
    20% { opacity: 1; transform: translateY(-3px); }
    100% { opacity: 0.2; transform: translateY(0px); }
}

/* Stats */
#stats {
    padding: 80px 5%;
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    display: inline-block;
}

.stat-item span {
    font-size: 3rem;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-weight: 700;
}

.stat-item p {
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Sections Base */
section {
    padding: 120px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 60px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.section-header h2 {
    font-size: 2.5rem;
    letter-spacing: -0.02em;
}

/* Cards & Store */
.filters {
    display: flex;
    gap: 12px;
}

.filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 20px;
    border-radius: 100px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--text-primary);
    color: var(--bg-main);
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
}

.game-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(255,255,255,0.15);
}

.game-img-wrap {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.game-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.game-card:hover .game-img-wrap img {
    transform: scale(1.05);
}

.game-info {
    padding: 24px;
}

.game-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.badge {
    background: var(--bg-elevated);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.price {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Skeletons */
.skeleton-card {
    aspect-ratio: 3/4;
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
    background-size: 400% 100%;
    border-radius: var(--radius-md);
    animation: skeleton-loading 1.5s infinite;
}

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

/* FAQ */
.accordion {
    border-top: 1px solid var(--border-color);
}

.accordion-item {
    border-bottom: 1px solid var(--border-color);
}

.accordion-header {
    width: 100%;
    text-align: left;
    padding: 24px 0;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-family: var(--font-heading);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.accordion-item.active .accordion-header::after {
    content: '−';
    color: var(--text-primary);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.accordion-content p {
    padding-bottom: 24px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
}

.modal.active {
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal.active .modal-backdrop {
    opacity: 1;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 100%;
    background: var(--bg-secondary);
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    border-left: 1px solid var(--border-color);
}

.modal.active .modal-content {
    transform: translateX(0);
}

.close-modal {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(5px);
    transition: var(--transition);
}

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

.modal-hero {
    position: relative;
    height: 350px;
}

.modal-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-secondary) 0%, transparent 100%);
}

.modal-body {
    padding: 40px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.modal-header h2 {
    font-size: 2.2rem;
}

.modal-meta {
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
}

.modal-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 40px;
}

.system-req {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.system-req h3 {
    margin-bottom: 12px;
    font-size: 1.1rem;
}

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

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 80px 5% 40px;
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    margin-bottom: 60px;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 12px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
}

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

@media (max-width: 768px) {
    #navbar {
        top: 15px;
        width: calc(100% - 30px);
        border-radius: 100px;
        padding: 15px 25px;
        background: rgba(9, 9, 9, 0.15);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.15);
    }
    #navbar.scrolled {
        top: 15px;
        width: calc(100% - 30px);
        padding: 15px 25px;
    }
    .nav-links {
        display: none;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .game-grid {
        grid-template-columns: 1fr;
    }
    .footer-content {
        flex-direction: column;
        gap: 40px;
    }
    .cursor {
        display: none; /* Disable custom cursor on mobile */
    }
    
    /* Fix site background image for mobile */
    .site-bg img {
        object-fit: cover;
        object-position: center;
    }
    .site-overlay {
        /* Add a dark gradient at the top so the transparent header text doesn't overlap the bright logo */
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.3) 15%, rgba(0, 0, 0, 0.3) 100%);
    }
    
    /* Adjust floating button position */
    .btn-more-games {
        bottom: 24px;
        right: 15px;
    }
}