/* CSS Variables - Modern Design System */
:root {
    /* Colors */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --secondary-color: #ec4899;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    /* Neutral Colors */
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --shadow-color: rgba(0, 0, 0, 0.1);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color), #be185d);
    --gradient-accent: linear-gradient(135deg, var(--accent-color), #d97706);
    --gradient-dark: linear-gradient(135deg, #1e293b, #0f172a);
    
    /* Typography */
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.6rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-1xl: 1rem;
    --space-2xl: 20px;
    --space-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-full: 9999px;
    
    /* 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), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Layout */
    --container-width: 1280px;
    --container-padding: 1.5rem;
    --header-height: 72px;
}

/* Base Styles - Shared between all pages */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.main-content{
    margin-top: 70px;
}
/* Container */
.container {
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding: 0 var(--container-padding);
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: var(--space-2xl) 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-links {
    margin-top: var(--space-md);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: all var(--transition-normal);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
}

.footer-link:hover {
    color: var(--primary-color);
    background: var(--bg-primary);
    transform: translateY(-1px);
}

.footer-separator {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.back-to-top.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

/* Carousel Section */
.carousel-section {
    padding: 10px 0;
    background: var(--bg-secondary);
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-2xl);
    background: var(--bg-primary);
}

.carousel-slide-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.carousel-slide {
    display: none;
    padding: 30px;
}

.carousel-slide-inner {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2xl);
}

.carousel-slide.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.carousel-content {
    flex: 1;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.carousel-content h3 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.carousel-content p {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-xl);
    color: var(--text-secondary);
}

.carousel-image-wrapper {
    flex: 0 0 auto;
    width: 600px;
    max-width: 100%;
}

.carousel-image {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.carousel-image .image-placeholder {
    border-radius: var(--radius-xl);
}

.carousel-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    opacity: 1;
    transition: all var(--transition-normal);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: var(--radius-full);
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: var(--font-size-2xl);
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    z-index: 10;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-50%) scale(1.05);
}

.carousel-prev {
    left: var(--space-lg);
}

.carousel-next {
    right: var(--space-lg);
}

.carousel-indicators {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--space-sm);
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    border: none;
    background: rgba(105, 104, 104, 0.5);
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.indicator.active {
    background: var(--primary-color);
    width: 30px;
}
.fa-star-o:before {
    content: "\f005";
}
.star-full{
    color: gold;
}
.star-empty{
  color: gray;
}
.tag-h2 {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}
/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --container-padding: 15px;
        --header-height: 60px;
    }
    
    .container {
        padding: 0 var(--container-padding);
    }
    
    .back-to-top {
        bottom: var(--space-lg);
        right: var(--space-lg);
        width: 45px;
        height: 45px;
    }
    
    /* Carousel responsive */
    .carousel-slide {
        padding: 10px;
    }
    
    .carousel-slide-inner {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .carousel-content {
        max-width: 100%;
        order: 2;
        padding-top: 5px;
    }
    
    .carousel-content h3 {
        font-size: var(--font-size-xl);
        margin-bottom: 10px;
    }
    
    .carousel-content p {
        display: none;
    }
    
    .carousel-content .btn-primary {
        display: none;
    }
    
    .carousel-image-wrapper {
        max-width: 100%;
        order: 1;
    }
    
    .carousel-image .image-placeholder {
        border-radius: var(--radius-xl);
    }
    
    .carousel-prev,
    .carousel-next {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-xl);
    }
    
    .carousel-prev {
        left: var(--space-md);
    }
    
    .carousel-next {
        right: var(--space-md);
    }
}

@media (max-width: 480px) {
    :root {
        --container-padding: 10px;
    }
    
    .footer {
        padding: var(--space-xl) 0;
    }
}

/* Home Page Specific Styles */

/* Page Header */
.page-header {
    text-align: center;
    margin: 10px 0px;
    position: relative;
}

.page-header h2 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin: 0 auto;
    line-height: 1.6;
}

/* Sections */
.section-title {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    margin-bottom: var(--space-xl);
    text-align: center;
    position: relative;
    padding-bottom: var(--space-sm);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

.featured-section {
    padding: 10px 0 0 0;
    background: var(--bg-primary);
    position: relative;
}

.arcade-section {
    padding: var(--space-3xl) 0;
    background: var(--bg-primary);
}

.multiplayer-section {
    padding: var(--space-3xl) 0;
    background: var(--bg-secondary);
}

.strategy-section {
    padding: 10px 0 0 0;
    background: var(--bg-primary);
}

.idle-games-section {
    padding: var(--space-3xl) 0;
    background: var(--bg-secondary);
}

.casual-games-section {
    padding: var(--space-3xl) 0;
    background: var(--bg-primary);
}

.all-games-section {
    padding: var(--space-3xl) 0;
    background: var(--bg-secondary);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    gap: var(--space-lg);
}

.filter-controls {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-xl);
}
.game-link{
  text-decoration: none;
}
/* Game Section Styles */
.game-section {
    padding: var(--space-1xl) 0;
    background: var(--bg-primary);
    position: relative;
}

.game-section--alternate {
    background: var(--bg-secondary);
}

/* Alternate Layout */
.game-section--alternate .games-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: minmax(200px, auto);
    grid-auto-flow: row;
    gap: var(--space-lg);
}

/* Ensure cards don't overflow grid */
.game-section--alternate .game-card {
    min-width: 0;
    overflow: hidden;
    grid-column: span 1;
}

/* First two games (larger, 2 columns each) */
.game-section--alternate .game-card:first-child,
.game-section--alternate .game-card:nth-child(2) {
    grid-column: span 2;
}

/* First two games image aspect ratio */
.game-section--alternate .game-card:first-child .image-container,
.game-section--alternate .game-card:nth-child(2) .image-container {
    padding-bottom: 48%;
    /* 4:3 aspect ratio for wider image */
}

/* Handle cases with fewer than 4 games */
@media (min-width: 992px) {
    /* For 1 game */
    .game-section--alternate .game-card:only-child {
        grid-column: 1 / -1 !important;
        grid-row: 1 / 2 !important;
    }
    
    /* For 2 games - ensure they stay in first row */
    .game-section--alternate .game-card:nth-child(2):last-child {
        grid-column: 3 / span 2 !important;
        grid-row: 1 / 2 !important;
    }
    
    /* For 3 games - third game moves to second row (default behavior) */
    /* No special rule needed */
}

.game-section--featured {
    background: var(--bg-primary);
}

.game-section--horizontal {
    background: var(--bg-secondary);
}

.game-section--grid {
    background: var(--bg-primary);
}

/* Horizontal Layout */
.games-grid-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.game-section--horizontal .games-grid {
    display: flex;
    gap: var(--space-lg);
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: var(--space-sm) 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-secondary);
}

.game-section--horizontal .games-grid::-webkit-scrollbar {
    height: 8px;
}

.game-section--horizontal .games-grid::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
}

.game-section--horizontal .games-grid::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: var(--radius-full);
}

.game-section--horizontal .game-card {
    flex: 0 0 220px;
    max-width: 220px;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
    font-weight: 600;
}

.scroll-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-lg);
}

.scroll-btn-left {
    left: -20px;
}

.scroll-btn-right {
    right: -20px;
}

.filter-tags-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.filter-tags-label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: calc(var(--space-xs) * -1);
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
}

.filter-tag {
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--primary-color);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
    line-height: 1;
    position: relative;
    overflow: hidden;
}

.filter-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left var(--transition-normal);
    z-index: -1;
}

.filter-tag:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.filter-tag:hover::before {
    left: 0;
}

.filter-tag.active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.filter-tag.active::before {
    left: 0;
}



/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: var(--space-lg);
}

.featured-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    justify-items: center;
}

/* Featured Game Cards */
.featured-grid .game-card {
    position: relative;
    transform: none;
    min-width: 220px;
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.featured-grid .game-card::before {
    content: '⭐ Featured';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-accent);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    z-index: 10;
    white-space: nowrap;
}

.game-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    min-height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
}

.game-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 1;
    pointer-events: none;
}

.game-card:hover::after {
    opacity: 0.03;
}

.image-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
}

.placeholder-content {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

.placeholder-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: var(--space-sm);
    opacity: 0.7;
}

.placeholder-text {
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.game-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transition: all var(--transition-normal);
}

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

.image-placeholder {
    display: none;
}

.game-image.loading+.image-placeholder {
    display: flex;
}

.game-image.error {
    display: none;
}

.game-image.error+.image-placeholder {
    display: flex;
}

.game-info {
    padding: 10px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    position: relative;
    z-index: 2;
    padding-bottom: 10px;
}

.game-title {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--text-primary);
    text-align: left;
    line-height: 1.3;
    align-items: center;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-description {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}
.line1 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Line clamp variations for brief comments */
.line2 {
   display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.line3 {
   display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;

}
.line4 {
   display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    overflow: hidden;
    text-overflow: ellipsis;

}
.line5 {
   display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    overflow: hidden;
    text-overflow: ellipsis;

}
.line6 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
    line-clamp: 6;
    overflow: hidden;
    text-overflow: ellipsis;
}

.line-full {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    display: block;
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
}

@media (max-width: 768px) {
    .line-full {
        -webkit-line-clamp: 3;
        line-clamp: 3;
        display: -webkit-box;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal;
    }
}

.game-rating {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--accent-color);
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.game-genre {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-xs);
}

.genre-tag {
    background: var(--gradient-primary);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.5px;
}



.game-featured {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    background: var(--gradient-secondary);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
    z-index: 2;
    box-shadow: var(--shadow-md);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading Animation */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    font-weight: 500;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin: var(--space-lg) 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    font-weight: 500;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin: var(--space-lg) 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    font-weight: 500;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin: var(--space-lg) 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    font-weight: 500;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin: var(--space-lg) 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.section-description {
    text-align: center;
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    margin-bottom: var(--space-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading Animation */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    font-weight: 500;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin: var(--space-lg) 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    font-weight: 500;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin: var(--space-lg) 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    font-weight: 500;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin: var(--space-lg) 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    font-weight: 500;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin: var(--space-lg) 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Category Sections */
.arcade-section .section-title {
    color: #ff6b6b;
}

.multiplayer-section .section-title {
    color: #4ecdc4;
}

.strategy-section .section-title {
    color: #ffd166;
}

.idle-games-section .section-title {
    color: #95e1d3;
}

.casual-games-section .section-title {
    color: #f38181;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: var(--space-2xl);
}

.load-more-btn {
    padding: var(--space-md) var(--space-2xl);
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-xl);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg);
    font-size: var(--font-size-base);
    position: relative;
    overflow: hidden;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.load-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-slow);
}

.load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-2xl);
}

.load-more-btn:hover::before {
    left: 100%;
}

.load-more-btn:active {
    transform: translateY(-1px);
}

.load-more-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.load-more-btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    right: 16px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


/* Mobile Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--container-padding);
    }

    /* Sections */
    .game-section,
    .featured-section,
    .arcade-section,
    .multiplayer-section,
    .strategy-section,
    .all-games-section {
        padding: 10px 0;
    }

    .page-header h2 {
        font-size: var(--font-size-2xl);
    }

    .page-header p {
        font-size: var(--font-size-base);
    }

    /* Horizontal Layout */
    .games-grid-wrapper {
        gap: var(--space-sm);
    }

    .game-section--horizontal .games-grid {
        gap: var(--space-md);
    }

    .game-section--horizontal .game-card {
        flex: 0 0 180px;
        max-width: 180px;
    }

    .scroll-btn {
        width: 32px;
        height: 32px;
        font-size: var(--font-size-lg);
    }

    .scroll-btn-left {
        left: -16px;
    }

    .scroll-btn-right {
        right: -16px;
    }

    .section-title {
        font-size: var(--font-size-xl);
        margin-bottom: var(--space-lg);
    }

    .section-description {
        font-size: var(--font-size-sm);
        margin-bottom: var(--space-lg);
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-lg);
    }

    /* Alternate Layout */
    .game-section--alternate .games-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: minmax(180px, auto);
        grid-auto-flow: row;
        gap: var(--space-md);
    }
    
    .game-section--alternate .game-card {
        min-width: 0;
        overflow: hidden;
    }

    .game-section--alternate .game-card:first-child {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .game-section--alternate .game-card:first-child .image-container {
        padding-bottom: 100%;
        /* 1:1 aspect ratio on mobile */
    }

    .game-section--alternate .game-card:nth-child(2),
    .game-section--alternate .game-card:nth-child(3),
    .game-section--alternate .game-card:nth-child(4),
    .game-section--alternate .game-card:nth-child(5),
    .game-section--alternate .game-card:nth-child(n+6) {
        grid-column: span 1;
        grid-row: auto;
    }

    /* Filter Controls */
    .filter-controls {
        flex-direction: column;
        gap: var(--space-md);
        width: 100%;
    }

    .filter-tags-container {
        width: 100%;
    }

    .filter-tags-label {
        text-align: center;
        margin-bottom: var(--space-sm);
        font-size: var(--font-size-base);
    }

    .filter-tags {
        justify-content: center;
        max-width: none;
        gap: var(--space-sm);
        overflow-x: auto;
        padding: var(--space-xs);
        justify-content: flex-start;
    }

    .filter-tag {
        padding: var(--space-xs) var(--space-md);
        font-size: var(--font-size-sm);
        flex-shrink: 0;
    }

    /* Games Grid */
    .games-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .games-grid .game-card {
        width: calc(50% - 10px);
        max-width: none;
        margin: 0;
    }

    .featured-section:not(.game-section--horizontal) .games-grid .game-card {
        width: auto;
    }

    .featured-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .featured-grid .game-card {
        width: calc(50% - 30px);
        min-width: auto;
        max-width: none;
        margin: 0;
    }

    .game-card {
        max-width: 200px;
        margin: 0 auto;
    }

    .game-title {
        font-size: var(--font-size-sm);
        -webkit-line-clamp: 2;
    }

    .game-rating {
        font-size: var(--font-size-xs);
    }

    .game-info {
        padding: var(--space-md);
        gap: var(--space-xs);
    }

    .game-genre {
        gap: var(--space-xs);
    }

    .genre-tag {
        font-size: var(--font-size-xs);
        padding: var(--space-xs) var(--space-sm);
    }



    .game-featured {
        font-size: var(--font-size-xs);
        padding: var(--space-xs) var(--space-sm);
    }

    .load-more-btn {
        padding: var(--space-md) var(--space-xl);
        font-size: var(--font-size-base);
        min-height: 44px;
        width: 100%;
        max-width: 200px;
    }

    /* Loading States */
    .loading-shimmer {
        min-height: 200px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--container-padding);
    }

    .section-title {
        font-size: var(--font-size-lg);
        margin-bottom: var(--space-md);
    }

    .section-description {
        font-size: var(--font-size-sm);
        margin-bottom: var(--space-md);
    }

    /* Games Grid */
    .games-grid,
    .game-section--horizontal .games-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .games-grid .game-card,
    .game-section--horizontal .game-card {
        width: calc(50% - 10px);
        max-width: none;
        margin: 0;
        flex: none;
    }

    /* Alternate Layout */
    .game-section--alternate .games-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: minmax(160px, auto);
        gap: 10px;
    }

    .game-section--alternate .game-card {
        /* Width controlled by grid */
        margin: 0;
        min-width: 0;
        overflow: hidden;
    }

    .game-section--alternate .game-card:first-child {
        grid-column: 1 / -1;
    }

    .game-section--alternate .game-card:first-child .image-container {
        padding-bottom: 100%;
        /* 1:1 aspect ratio on mobile */
    }

    .featured-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: var(--space-sm);
    }

    /* Hide scroll buttons on mobile */
    .scroll-btn {
        display: none;
    }

    .game-card {
        max-width: 160px;
    }

    .game-title {
        font-size: var(--font-size-sm);
        -webkit-line-clamp: 2;
    }

    .game-rating {
        font-size: var(--font-size-xs);
    }

    .game-info {
        padding: var(--space-sm);
        gap: var(--space-xs);
    }

    .game-genre {
        gap: var(--space-xs);
    }

    .genre-tag {
        font-size: var(--font-size-xs);
        padding: var(--space-xs) var(--space-sm);
    }


    .game-featured {
        font-size: var(--font-size-xs);
        padding: var(--space-xs) var(--space-sm);
    }

    .filter-tag {
        padding: var(--space-xs) var(--space-sm);
        font-size: var(--font-size-xs);
    }

    .featured-section,
    .arcade-section,
    .multiplayer-section,
    .strategy-section,
    .all-games-section {
        padding: var(--space-xl) 0;
    }

    .load-more-btn {
        padding: var(--space-sm) var(--space-lg);
        font-size: var(--font-size-sm);
        min-height: 40px;
        width: 100%;
        max-width: 180px;
    }

    .page-header h2 {
        font-size: var(--font-size-xl);
    }

    .page-header p {
        font-size: var(--font-size-sm);
    }
}

/* Navigation Mobile Styles */
@media (max-width: 768px) {}

/* Touch-friendly improvements */
@media (max-width: 768px) {
    .game-card {
        min-height: 160px;
    }

    .load-more-btn {
        min-height: 44px;
        /* Minimum touch target size */
        display: flex;
        align-items: center;
        justify-content: center;
    }


}

/* Landscape orientation support */
@media (max-width: 768px) and (orientation: landscape) {

    .games-grid,
    .featured-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

}

/* Game Tags Styles */
.game-tags {
    display: flex;
    text-transform: none;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-xs);
}

.game-tag {
    background: var(--gradient-secondary);
    text-transform: none;
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.3px;
    white-space: nowrap;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.game-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: -1;
}

.game-tag:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.game-tag:hover::before {
    opacity: 1;
}

/* Color variations for different tag categories */
.game-tag:nth-child(3n+1) {
    background: var(--gradient-primary);
}

.game-tag:nth-child(3n+2) {
    background: var(--gradient-secondary);
}

.game-tag:nth-child(3n+3) {
    background: var(--gradient-accent);
}
#ai-assist-root-new {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}