/* ===================================
   CSS Reset & Base Styles
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary: hsl(262, 83%, 58%);
    --primary-hover: hsl(262, 83%, 48%);
    --secondary: hsl(340, 82%, 52%);
    --background: hsl(0, 0%, 100%);
    --foreground: hsl(0, 0%, 9%);
    --muted: hsl(0, 0%, 96%);
    --muted-foreground: hsl(0, 0%, 45%);
    --border: hsl(0, 0%, 90%);
    --card: hsl(0, 0%, 100%);
    --card-foreground: hsl(0, 0%, 9%);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-card: linear-gradient(135deg, hsl(262, 83%, 98%), hsl(340, 82%, 98%));

    /* Spacing */
    --container-padding: 1rem;
    --section-spacing: 3rem;

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

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-base);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ===================================
   Container & Layout
   =================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.main-content {
    min-height: calc(100vh - 200px);
    padding-top: 62px;
}

/* ===================================
   Header
   =================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: all var(--transition-base);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--foreground);
}

.logo-icon {
    font-size: 2rem;
}

.main-nav {
    display: none;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    font-weight: 500;
    color: var(--muted-foreground);
    transition: color var(--transition-base);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Slider Grid Layout */
.game-slider-wrapper {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding: 0.5rem;
    scrollbar-width: none;
    /* Firefox */
}

/* Hide Scrollbar */
.game-slider-wrapper::-webkit-scrollbar {
    display: none;
}

.slider-item {
    flex: 0 0 auto;
    width: calc(25% - 0.75rem);
    /* 4 items on mobile */
}

@media (min-width: 640px) {
    .slider-item {
        width: calc(16.666% - 0.84rem);
        /* 6 items on tablet */
    }
}

@media (min-width: 1024px) {
    .slider-item {
        width: calc(8.333% - 0.92rem);
        /* 12 items on desktop */
    }
}

.slider-game-card {
    display: block;
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    aspect-ratio: 1;
}

.slider-game-card:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
    z-index: 10;
}

.slider-game-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-game-info {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    align-items: flex-end;
    padding: 0.5rem;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.slider-game-card:hover .slider-game-info {
    opacity: 1;
}

.slider-game-info h3 {
    color: white;
    font-size: 0.75rem;
    line-height: 1.2;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 600;
}

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

.dropdown {
    position: relative;
}

.dropdown-icon {
    transition: transform var(--transition-base);
}

.dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--foreground);
    transition: background-color var(--transition-base);
}

.dropdown-link:hover {
    background-color: var(--muted);
    color: var(--primary);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0.5rem;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    width: 24px;
    height: 2px;
    background: var(--foreground);
    transition: all var(--transition-base);
}

.hamburger {
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

.mobile-menu-toggle.active .hamburger {
    background: transparent;
}

.mobile-menu-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.mobile-menu-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 999;
    transform: translateX(100%);
    transition: transform var(--transition-base);
    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-content {
    padding: 2rem var(--container-padding);
}

.mobile-nav-list {
    list-style: none;
}

.mobile-nav-item {
    border-bottom: 1px solid var(--border);
}

.mobile-nav-link {
    display: block;
    padding: 1rem 0;
    font-weight: 500;
    color: var(--foreground);
    width: 100%;
    text-align: left;
}

.mobile-nav-link.active {
    color: var(--primary);
}

.mobile-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-dropdown-menu {
    list-style: none;
    padding-left: 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
}

.mobile-dropdown-menu.active {
    max-height: 500px;
}

.mobile-dropdown-link {
    display: block;
    padding: 0.75rem 0;
    color: var(--muted-foreground);
}

/* Desktop Navigation */
@media (min-width: 768px) {
    .main-nav {
        display: block;
    }

    .mobile-menu-toggle {
        display: none;
    }
}

/* ===================================
   Footer
   =================================== */
.site-footer {
    background: var(--muted);
    border-top: 1px solid var(--border);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.footer-description {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.footer-heading {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    transition: color var(--transition-base);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.copyright {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

@media (min-width: 640px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

/* ===================================
   Banner Section
   =================================== */
.banner-section {
    padding: 1rem 0 2rem;
}

.banner {
    position: relative;
    height: 300px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3));
}

.banner-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    padding: 2rem;
    max-width: 600px;
}

.banner-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.banner-subtitle {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.banner-description {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.banner-button {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: transform var(--transition-base);
}

.banner-button:hover {
    transform: scale(1.05);
}

/* Banner Carousel */
.banner-carousel {
    position: relative;
}

.banner-carousel-wrapper {
    position: relative;
    height: 300px;
}

.banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.banner-slide.active {
    opacity: 1;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: var(--foreground);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 10;
    transition: all var(--transition-base);
}

.carousel-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: 1rem;
}

.carousel-btn.next {
    right: 1rem;
}

.carousel-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: all var(--transition-base);
}

.carousel-dots .dot.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

@media (min-width: 768px) {
    .banner {
        height: 400px;
    }

    .banner-carousel-wrapper {
        height: 400px;
    }

    .banner-title {
        font-size: 3rem;
    }
}

/* ===================================
   Section Styles
   =================================== */
.games-section {
    padding: 0.2rem 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.1rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.section-subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.1rem;
}

.view-all-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.875rem;
    transition: gap var(--transition-base);
}

.view-all-link:hover {
    gap: 0.5rem;
}

.view-all-link .icon {
    transition: transform var(--transition-base);
}

.view-all-link:hover .icon {
    transform: translateX(4px);
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .view-all-link {
        font-size: 1rem;
    }
}

/* ===================================
   Game Grid
   =================================== */
.game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.625rem;
}

@media (min-width: 640px) {
    .game-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.875rem;
    }
}

@media (min-width: 768px) {
    .game-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 1024px) {
    .game-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

@media (min-width: 1280px) {
    .game-grid {
        grid-template-columns: repeat(10, 1fr);
    }
}

@media (min-width: 1536px) {
    .game-grid {
        grid-template-columns: repeat(12, 1fr);
    }
}

/* ===================================
   Game Card
   =================================== */
.game-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform var(--transition-base);
}

.game-card:hover {
    transform: translateY(-4px);
}

.game-card.featured {
    grid-column: span 2;
    grid-row: span 2;
}

.game-card-image {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--gradient-card);
    box-shadow: var(--shadow-md);
    transition: box-shadow var(--transition-slow);
}

.game-card:hover .game-card-image {
    box-shadow: var(--shadow-xl);
}

.game-card-image.featured-image {
    aspect-ratio: 1;
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 2px;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-xl);
    transition: transform var(--transition-slow);
}

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

.shine-effect {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            transparent 0%,
            transparent 40%,
            rgba(255, 255, 255, 0) 50%,
            rgba(255, 255, 255, 0.2) 50%,
            transparent 60%,
            transparent 100%);
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
    opacity: 0;
}

.game-card:hover .shine-effect {
    transform: translateX(100%);
    opacity: 1;
}

.gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.7) 0%,
            rgba(0, 0, 0, 0.2) 50%,
            transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.game-card:hover .gradient-overlay {
    opacity: 1;
}

.game-card-content {
    display: flex;
    flex-direction: column;
    padding: 0 0.25rem;
}

.game-card-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    transition: color var(--transition-base);
}

.game-card:hover .game-card-title {
    color: var(--primary);
}

.game-card-title.featured-title {
    font-size: 0.875rem;
    font-weight: 700;
}

@media (min-width: 640px) {
    .game-card-title {
        font-size: 0.875rem;
    }

    .game-card-title.featured-title {
        font-size: 1rem;
    }
}

@media (min-width: 768px) {
    .game-card-title.featured-title {
        font-size: 1.125rem;
    }
}

/* Ad in Grid */
.ad-mobile-only {
    grid-column: 1 / -1;
    margin: 1rem 0;
}

@media (min-width: 768px) {
    .ad-mobile-only {
        display: none;
    }
}

/* ===================================
   Featured Games Grid (Icon Style)
   =================================== */
.featured-games-section {
    margin: 1rem 0;
    background: #feb958;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Mobile: 4 cols (4 rows = 16 items) */
    gap: 1.5rem 0.75rem;
    margin-bottom: 2rem;
    width: 100%;
}

/* App Icon Card Style */
.featured-icon-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    width: 100%;
    /* Ensure card obeys grid cell width */
    min-width: 0;
    /* Prevent overflow in grid items */
}

.featured-icon-card .icon-wrapper {
    width: 100%;
    /* Default to full width of grid cell */
    max-width: 80px;
    /* Cap the size so they don't get huge */
    aspect-ratio: 1/1;
    border-radius: 2%;
    overflow: hidden;
    background: var(--muted);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    /* Ensure image container is essentially rigid */
    flex-shrink: 0;
    padding: 1px;
}

/* Ensure images always fill the square wrapper perfectly */
.featured-icon-card .icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.featured-icon-card:hover .icon-wrapper {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.featured-icon-card .icon-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--foreground);
    width: 100%;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    margin-top: 0.25rem;
}

/* Desktop: 8 columns => 2 rows of 8 (Total 16) */
@media (min-width: 1024px) {
    .featured-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 2rem 1.25rem;
    }

    .featured-icon-card .icon-wrapper {
        max-width: 100px;
        /* Allow slightly bigger icons on desktop */
    }

    .featured-icon-card .icon-title {
        font-size: 0.875rem;
    }
}

/* ===================================
   Game Detail Page
   =================================== */
.game-detail {
    padding-top: 62px;
}

.game-content {
    padding: 0px 10px;
}

.game-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.game-icon {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 2px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-meta {
    flex: 1;
    min-width: 0;
}

.game-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.game-developer {
    color: var(--muted-foreground);
    margin-bottom: 0.75rem;
}

.game-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-secondary {
    background: var(--muted);
    color: var(--foreground);
}

.badge-editors {
    background: linear-gradient(135deg, hsl(38, 92%, 50%), hsl(25, 95%, 53%));
    color: white;
}

@media (min-width: 768px) {
    .game-icon {
        width: 180px;
        height: 180px;
    }

    .game-title {
        font-size: 2rem;
    }

    .game-developer {
        font-size: 1.125rem;
    }
}

/* Game Stats */
.game-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.stat-item {
    background: var(--muted);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    text-align: center;
}

.stat-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.25rem;
}

.rating-value {
    font-size: 1.125rem;
    font-weight: 700;
}

.star-icon {
    color: hsl(38, 92%, 50%);
}

.stat-value .icon {
    color: var(--primary);
}

.stat-value-text {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

@media (min-width: 768px) {
    .game-stats {
        gap: 1rem;
    }

    .stat-item {
        padding: 1rem;
    }

    .rating-value {
        font-size: 1.5rem;
    }

    .star-icon {
        width: 24px;
        height: 24px;
    }

    .stat-value-text {
        font-size: 1rem;
    }
}

/* Game Info Section */
.game-info-section {
    margin-bottom: 0.5rem;
}

.info-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.info-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

.info-badge .icon {
    flex-shrink: 0;
}

.additional-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.category-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--muted);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    transition: background-color var(--transition-base);
}

.category-tag:hover {
    background: var(--primary);
    color: white;
}

/* Store Badges */
.store-badges {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.store-badge {
    display: block;
    transition: transform var(--transition-base);
}

.store-badge:hover {
    transform: scale(1.05);
}

.store-badge img {
    width: 180px;
    height: 60px;
    object-fit: contain;
}

@media (min-width: 640px) {
    .store-badges {
        flex-direction: row;
        justify-content: center;
    }

    .store-badge img {
        width: 200px;
        height: 68px;
    }
}

/* Description */
.game-description {
    margin-bottom: 1.5rem;
}

.description-text {
    color: var(--muted-foreground);
    line-height: 1.7;
    white-space: pre-wrap;
}

/* Section Divider */
.section-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

/* Screenshots */
.screenshots-section {
    margin-bottom: 1.5rem;
}

.screenshot-slider {
    position: relative;
    overflow: hidden;
}

.screenshot-wrapper {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--muted);
    padding-bottom: 1rem;
}

.screenshot-wrapper::-webkit-scrollbar {
    height: 8px;
}

.screenshot-wrapper::-webkit-scrollbar-track {
    background: var(--muted);
    border-radius: 4px;
}

.screenshot-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.screenshot-item {
    flex-shrink: 0;
    width: 200px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.screenshot-item img {
    width: 100%;
    height: auto;
}

.screenshot-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: var(--foreground);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    z-index: 10;
    transition: all var(--transition-base);
}

.screenshot-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.screenshot-btn.prev {
    left: 0.5rem;
}

.screenshot-btn.next {
    right: 0.5rem;
}

@media (min-width: 768px) {
    .screenshot-item {
        width: 300px;
    }
}

/* Developer Info */
.developer-info {
    margin-bottom: 1.5rem;
}

.developer-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.developer-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.developer-item .icon {
    flex-shrink: 0;
    color: var(--muted-foreground);
}

.developer-item .link {
    color: var(--primary);
    transition: text-decoration var(--transition-base);
}

.developer-item .link:hover {
    text-decoration: underline;
}

/* Related Games */
.related-games {
    margin-bottom: 1.5rem;
}

/* Disclaimer */
.disclaimer {
    background: hsl(38, 100%, 97%);
    border: 1px solid hsl(38, 92%, 85%);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.disclaimer-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: hsl(25, 95%, 40%);
}

.disclaimer-text {
    font-size: 0.875rem;
    color: hsl(25, 60%, 30%);
    line-height: 1.6;
}

/* ===================================
   Game Slider
   =================================== */
.game-slider-section {
    padding: 1rem 0;
}

.game-slider {
    position: relative;
    overflow: hidden;
}

.game-slider-wrapper {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.game-slider-wrapper::-webkit-scrollbar {
    display: none;
}

.slider-item {
    flex-shrink: 0;
    width: 150px;
}

.slider-game-card {
    display: block;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.slider-game-card:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.slider-game-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.slider-game-info {
    padding: 0.5rem;
    background: white;
}

.slider-game-info h3 {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: var(--foreground);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    z-index: 10;
    transition: all var(--transition-base);
}

.slider-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev {
    left: 0.5rem;
}

.slider-btn.next {
    right: 0.5rem;
}

@media (min-width: 768px) {
    .slider-item {
        width: 200px;
    }

    .slider-game-card img {
        height: 200px;
    }
}

/* ===================================
   Category Page
   =================================== */
.category-header {
    padding: 2rem 0 1rem;
}

.category-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.category-description {
    color: var(--muted-foreground);
    font-size: 1rem;
}

/* ===================================
   Empty State
   =================================== */
.empty-state {
    text-align: center;
    padding: 5rem 1rem;
}

.empty-icon {
    font-size: 6rem;
    margin-bottom: 1rem;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.empty-description {
    color: var(--muted-foreground);
}

/* ===================================
   Ad Containers
   =================================== */
.ad-container {
    margin: 1.5rem 0;
}

.ad-top,
.ad-bio {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-placeholder {
    background: var(--muted);
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    color: var(--muted-foreground);
}

/* ===================================
   Utility Classes
   =================================== */
.icon {
    display: inline-block;
    vertical-align: middle;
}

/* ===================================
   Responsive Adjustments
   =================================== */
@media (min-width: 768px) {
    :root {
        --container-padding: 1.5rem;
        --section-spacing: 4rem;
    }

    .games-section {
        padding: 2rem 0;
    }
}

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

/* User Navbar Styles */
.topnav {
    background: var(--card);
    padding: 4px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
    flex-wrap: wrap;
}

.nav-links {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.nav-links a {
    color: var(--foreground);
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.nav-links a:hover {
    background: rgba(0, 0, 0, .08);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    border: 1px solid rgba(0, 0, 0, .2);
    background: rgba(0, 0, 0, .06);
    color: var(--foreground);
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links.open {
        display: flex;
    }
}

/* Pure CSS Carousels (replaces JS) */
.screenshot-wrapper,
.game-slider-wrapper,
.banner-carousel-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    scroll-behavior: smooth;
}

.screenshot-wrapper::-webkit-scrollbar,
.game-slider-wrapper::-webkit-scrollbar,
.banner-carousel-wrapper::-webkit-scrollbar {
    display: none;
}

.screenshot-item,
.slider-item,
.banner-slide {
    flex: 0 0 auto;
    scroll-snap-align: start;
}

.screenshot-item {
    max-width: 90vw;
    /* Avoid being wider than screen */
}

.carousel-btn,
.screenshot-btn,
.slider-btn {
    display: none !important;
}

/* Formatted Game Description UI */
.game-description {
    background: var(--card);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    line-height: 1.7;
    font-size: 1rem;
    color: var(--foreground);
}

@media (max-width: 768px) {
    .game-description {
        padding: 1rem;
        font-size: 0.95rem;
    }
}

.description-text {
    overflow-wrap: break-word;
}

.desc-heading {
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 800;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 0.25rem;
}

.description-text>.desc-heading:first-child {
    margin-top: 0;
}

.desc-paragraph {
    margin-bottom: 1rem;
    color: var(--muted-foreground);
}

.desc-list {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    list-style-type: disc;
    color: var(--muted-foreground);
}

.desc-list li {
    margin-bottom: 0.5rem;
}

.desc-list li::marker {
    color: var(--primary);
}

.description-text a {
    color: var(--secondary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

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

/* --- PREMIUM GAME DETAIL ENHANCEMENTS --- */
.game-detail {
    padding-top: 56px !important;
    background: var(--background);
}

.game-hero {
    position: relative;
    padding: 3rem 0;
    margin-bottom: 2rem;
    overflow: hidden;
    color: white;
}

.game-hero-bg {
    position: absolute;
    inset: -40px;
    background-size: cover;
    background-position: center;
    filter: blur(40px) brightness(0.6);
    z-index: 0;
    transform: scale(1.1);
}

.game-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, var(--background) 100%);
    z-index: 1;
}

.game-hero-content {
    position: relative;
    z-index: 2;
}

.game-header {
    display: flex !important;
    gap: 1.5rem !important;
    margin-bottom: 2rem !important;
    align-items: center;
}

.game-icon {
    width: 140px !important;
    height: 140px !important;
    border-radius: 28px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4) !important;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease !important;
}

.game-icon:hover {
    transform: translateY(-5px) scale(1.02) !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5) !important;
}

.game-title {
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    margin-bottom: 0.5rem !important;
    color: black !important;
    line-height: 1.1 !important;
}

.game-developer {
    color: black !important;
    font-size: 1.1rem !important;
    margin-bottom: 1rem !important;
    font-weight: 500;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 1.25rem 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.game-stats.glass-panel {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem !important;
    margin-bottom: 2rem !important;
}

.game-stats.glass-panel .stat-item {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    text-align: center;
}

.game-stats.glass-panel .stat-value {
    color: white !important;
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.game-stats.glass-panel .star-icon,
.game-stats.glass-panel .icon {
    color: #FFD700 !important;
}

.game-stats.glass-panel .stat-label {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 600 !important;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Game Info Table */
.game-info-table {
    margin: 2rem 0;
    width: 100%;
    overflow-x: auto;
}
.game-info-table table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.game-info-table th, .game-info-table td {
    padding: 4px 8px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.game-info-table th {
    color: var(--text-light);
    font-weight: bold;
    width: 35%;
}
.game-info-table td {
    color: var(--text-muted);
    font-weight: normal;
}

.hero-badges {
    display: flex !important;
    flex-direction: row !important;
    gap: 1rem !important;
    justify-content: flex-start !important;
}

.hero-badges .store-badge {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease !important;
    border-radius: 8px;
}

.hero-badges .store-badge:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3) !important;
}

.content-card {
    background: var(--card) !important;
    border-radius: 24px !important;
    padding: 2rem !important;
    margin-bottom: 2rem !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid var(--border) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08) !important;
}

.section-subtitle {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    margin-bottom: 1.5rem !important;
    background: linear-gradient(90deg, var(--primary), hsl(280, 80%, 60%)) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    display: inline-block !important;
}

@media (max-width: 768px) {
    .game-hero {
        padding: 2rem 0 !important;
    }

    .game-header {
        flex-direction: column !important;
        text-align: center !important;
        gap: 1rem !important;
    }

    .game-badges {
        justify-content: center !important;
    }

    .hero-badges {
        justify-content: center !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .game-icon {
        width: 120px !important;
        height: 120px !important;
    }

    .game-title {
        font-size: 1.75rem !important;
    }

    .glass-panel {
        padding: 1rem !important;
    }

    .game-stats.glass-panel {
        gap: 0.5rem !important;
    }

    .game-stats.glass-panel .stat-value {
        font-size: 1.2rem !important;
    }

    .content-card {
        padding: 1.25rem !important;
        border-radius: 20px !important;
    }
}