/* ============================================
   GAMEZONE - MODERN GAMING PORTAL
   Playbite Style - AdSense Ready & Premium Design
   ============================================ */

/* CSS Variables - Modern Color Palette */
:root {
    /* Primary Colors - Gaming Purple/Blue */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.1);
    --primary-glow: rgba(99, 102, 241, 0.5);

    /* Accent Colors */
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --accent-pink: #ec4899;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    /* Dark Theme */
    --bg-darker: #0a0a0f;
    --bg-dark: #0f0f17;
    --bg-card: #16161f;
    --bg-card-hover: #1e1e2a;
    --bg-sidebar: #0d0d14;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    /* Borders & Effects */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(99, 102, 241, 0.3);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gradient-pink: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    --gradient-card: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px var(--primary-glow);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radius */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

/* ============================================
   GLOBAL STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at top right, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at bottom left, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at center, rgba(236, 72, 153, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md), 0 0 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    color: var(--primary);
}

/* ============================================
   HEADER - STICKY & MODERN
   ============================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
}

.logo-icon {
    font-size: 2rem;
}

.logo .accent {
    color: var(--accent-pink);
}

.search-box {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gradient-primary);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px var(--primary-glow);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 3px;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 2px;
    background: white;
    transition: var(--transition);
    border-radius: 2px;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 50% 100%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    animation: pulse-bg 15s ease-in-out infinite;
}

@keyframes pulse-bg {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, #fff 0%, #a78bfa 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px var(--primary-glow);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================
   SECTION STYLES
   ============================================ */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title.center {
    text-align: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 3rem;
}

.view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.view-all:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ============================================
   CATEGORIES GRID
   ============================================ */

.categories-section {
    padding: 5rem 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.25rem;
}

.category-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.category-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.category-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.game-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================
   GAME CARDS - MODERN DESIGN
   ============================================ */

.featured-section,
.new-games-section {
    padding: 5rem 0;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.game-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid transparent;
    transition: var(--transition);
}

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.game-card.featured {
    grid-column: span 2;
}

.game-image {
    position: relative;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-hover) 100%);
    overflow: hidden;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.game-card:hover .game-image img {
    transform: scale(1.15);
}

.game-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.85) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.game-card:hover .game-overlay {
    opacity: 1;
}

.play-btn {
    padding: 0.875rem 2rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-full);
    font-weight: 600;
    transform: translateY(20px) scale(0.9);
    transition: var(--transition);
    box-shadow: 0 0 30px var(--primary-glow);
}

.game-card:hover .play-btn {
    transform: translateY(0) scale(1);
}

.game-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.game-badge.hot {
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

.game-badge.new {
    background: var(--gradient-primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.game-info {
    padding: 1rem;
}

.game-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-category {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.game-meta .rating {
    color: var(--accent);
}

/* Favorite Button */
.fav-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    background: rgba(15, 15, 23, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 15;
    transition: var(--transition);
}

.fav-btn:hover {
    background: white;
    color: #ef4444;
    transform: scale(1.1);
}

.fav-btn.active {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.remove-fav-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    background: rgba(239, 68, 68, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition);
    z-index: 20;
}

.game-card:hover .remove-fav-btn {
    opacity: 1;
}

.remove-fav-btn:hover {
    background: #ef4444;
    transform: scale(1.2);
}

/* ============================================
   FEATURES SECTION
   ============================================ */

.features-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.03) 50%, transparent 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.feature-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-5px);
    border-color: var(--border-hover);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.25rem;
    display: block;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ============================================
   NEWSLETTER
   ============================================ */

.newsletter-section {
    padding: 5rem 0;
}

.newsletter-content {
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    padding: 4rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.newsletter-content::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.newsletter-content h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    position: relative;
}

.newsletter-content>p {
    margin-bottom: 2rem;
    opacity: 0.9;
    position: relative;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
}

.newsletter-form input {
    flex: 1;
    min-width: 250px;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-full);
    border: none;
    font-size: 1rem;
    font-family: inherit;
}

.newsletter-form .btn {
    background: var(--bg-darker);
    color: white;
}

.newsletter-form .btn:hover {
    background: var(--bg-dark);
}

.privacy-note {
    font-size: 0.85rem;
    opacity: 0.7;
    position: relative;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--bg-dark);
    padding: 5rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-secondary);
    margin: 1.25rem 0;
    font-size: 0.95rem;
    line-height: 1.7;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-links a {
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.social-links a:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-4px);
    border-color: transparent;
    box-shadow: 0 0 20px var(--primary-glow);
}

.footer-links h4 {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

/* ============================================
   PAGE HEADERS
   ============================================ */

.page-header {
    padding: 10rem 0 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 50%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
}

.page-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    position: relative;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    position: relative;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .game-card.featured {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {

    /* Mobile Navigation - Slide In Menu */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-dark);
        flex-direction: column;
        padding: 100px 30px 30px;
        gap: 0;
        transition: right 0.3s ease;
        z-index: 999;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
        display: flex;
        border-left: 1px solid var(--border-color);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        list-style: none;
    }

    .nav-links a {
        display: block;
        padding: 1rem 0;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links a:hover,
    .nav-links a.active {
        color: var(--primary);
    }

    .mobile-menu-btn {
        display: flex;
        z-index: 1001;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    /* Mobile Overlay */
    body.menu-open::after {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 998;
    }

    .search-box {
        display: none;
    }

    .navbar {
        padding: 0.75rem 0;
    }

    .hero {
        padding-top: 70px;
        min-height: auto;
        padding-bottom: 60px;
    }

    .hero-stats {
        gap: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .section-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-card {
        padding: 1.5rem 1rem;
    }

    .category-icon {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 0%, var(--bg-card-hover) 50%, var(--bg-card) 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}