/* ===== RESET & VARIABLES ===== */
:root {
    --bg-primary: #0e0f14;
    --bg-secondary: #1a1c23;
    --bg-card: #1e212a;
    --bg-hover: #2a2e3a;
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --accent-primary: #ffd966;
    --accent-secondary: #ffb347;
    --accent-glow: rgba(255, 217, 102, 0.3);
    --border-color: #2f3440;
    --success: #6ee7b7;
    --warning: #f87171;
    --gradient: linear-gradient(135deg, #ffd966, #ffb347);
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
    --bg-primary: #f3f4f6;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f9fafb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --accent-primary: #f59e0b;
    --accent-secondary: #d97706;
    --accent-glow: rgba(245, 158, 11, 0.2);
    --border-color: #e5e7eb;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== HEADER & NAVIGATION ===== */
.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(26, 28, 35, 0.95);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo i {
    font-size: 2.5rem;
    color: var(--accent-primary);
    filter: drop-shadow(0 0 10px var(--accent-glow));
}

.logo-text h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.logo-text .tagline {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient);
    border-radius: 2px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.platform-icons {
    display: flex;
    gap: 1rem;
    color: var(--text-secondary);
}

.platform-icons i {
    font-size: 1.2rem;
    transition: all 0.3s;
    cursor: pointer;
}

.platform-icons i:hover {
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s;
}

.theme-toggle:hover {
    background: var(--bg-hover);
    color: var(--accent-primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    background: var(--bg-secondary);
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu a {
    display: block;
    padding: 0.75rem 2rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
}

.mobile-menu a:hover {
    color: var(--accent-primary);
    background: var(--bg-hover);
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(145deg, var(--bg-secondary), var(--bg-primary));
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, var(--accent-glow), transparent 70%);
    pointer-events: none;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 217, 102, 0.1);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-bottom: 2rem;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient);
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.hero-image {
    position: relative;
    height: 400px;
}

.floating-card {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow);
    animation: float 3s ease-in-out infinite;
}

.floating-card i {
    font-size: 1.5rem;
    color: var(--accent-primary);
}

.card-1 {
    top: 20%;
    left: 0;
    animation-delay: 0s;
}

.card-2 {
    top: 50%;
    right: 0;
    animation-delay: 0.5s;
}

.card-3 {
    bottom: 20%;
    left: 30%;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ===== UPDATE BAR ===== */
.update-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.update-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.update-info,
.update-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.update-info i {
    color: var(--success);
}

.update-note i {
    color: var(--accent-primary);
}

/* ===== PLATFORM FILTERS ===== */
.platform-filters {
    padding: 3rem 0;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    font-size: 1rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient);
    color: var(--bg-primary);
    border-color: transparent;
}

/* ===== GAMES SECTION ===== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-title i {
    color: var(--accent-primary);
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 0.5rem;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
}

.view-btn:hover,
.view-btn.active {
    background: var(--gradient);
    color: var(--bg-primary);
    border-color: transparent;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 4rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.games-grid.list-view {
    grid-template-columns: 1fr;
}

.game-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    position: relative;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.5);
}

.game-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.game-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.platform-badge {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.platform-badge i {
    color: var(--accent-primary);
}

.free-badge {
    background: var(--gradient);
    color: var(--bg-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.game-info {
    padding: 1.5rem;
}

.game-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.game-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.expiry-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--warning);
    font-size: 0.9rem;
}

.original-price {
    color: var(--text-secondary);
    text-decoration: line-through;
    font-size: 0.9rem;
}

.claim-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--gradient);
    border: none;
    border-radius: 10px;
    color: var(--bg-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.claim-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--accent-glow);
}

/* List View Styles */
.list-view .game-card {
    display: flex;
    height: 200px;
}

.list-view .game-image {
    width: 200px;
    height: 100%;
}

.list-view .game-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ===== HOW IT WORKS ===== */
.how-it-works {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.step {
    text-align: center;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.step:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
}

.step-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--bg-primary);
}

.step h3 {
    margin-bottom: 1rem;
}

.step p {
    color: var(--text-secondary);
}

/* ===== NEWSLETTER ===== */
.newsletter {
    padding: 4rem 0;
    background: linear-gradient(145deg, var(--bg-secondary), var(--bg-primary));
    text-align: center;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.newsletter-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1rem;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.newsletter-form button {
    padding: 1rem 2rem;
    border-radius: 50px;
    background: var(--gradient);
    border: none;
    color: var(--bg-primary);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--accent-glow);
}

.form-note {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ===== FOOTER ===== */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo i {
    color: var(--accent-primary);
}

.footer-section p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: all 0.3s;
}

.footer-social a:hover {
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.footer-section h4 {
    margin-bottom: 1.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient);
    border: none;
    color: var(--bg-primary);
    font-size: 1.2rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 100;
}

.back-to-top.show {
    display: flex;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--accent-glow);
}

/* ===== ERROR & NO RESULTS ===== */
.error-message,
.no-results {
    text-align: center;
    padding: 4rem;
    color: var(--text-secondary);
}

.error-message i,
.no-results i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--warning);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-image {
        display: none;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links,
    .platform-icons {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .mobile-menu.active {
        display: block;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .filter-buttons {
        justify-content: center;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .list-view .game-card {
        flex-direction: column;
        height: auto;
    }

    .list-view .game-image {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .update-bar .container {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}