/* GamePixel Frontend - Main Styles */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #f8f9fa;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid #3498db;
    color: #3498db;
}

.btn-outline:hover {
    background: #3498db;
    color: white;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #219a52;
    color: white;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
    color: white;
}

/* Header */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
}

.logo:hover {
    color: #3498db;
}

.logo i {
    color: #3498db;
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0;
    color: #2c3e50;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #3498db;
}

.indent-button { 
    border: none; 
    border-top: none; 
    background-color: transparent; 
} 
.indent-button svg {
    height: 24px; 
    width: 24px; 
    display: inline-block; 
    fill: #eff0f7; 
    background-color: #000000;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

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

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #2c3e50;
    border-bottom: 1px solid #f1f2f6;
    transition: background-color 0.3s ease;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #3498db;
}

.dropdown-item:last-child {
    border-bottom: none;
}

/* Search Form */
.search-form {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 0.5rem;
    min-width: 300px;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    outline: none;
}

.search-btn {
    background: #3498db;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background: #2980b9;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #2c3e50;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 1rem;
}

.mobile-nav.active {
    display: block;
}

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

.mobile-nav-item {
    border-bottom: 1px solid #f1f2f6;
}

.mobile-nav-link {
    display: block;
    padding: 1rem 0;
    color: #2c3e50;
    font-weight: 500;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Section Styles */
.section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
}

/* Games Grid */
/* .games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
} */
.games-grid {
    display: grid;
    flex-flow: wrap;
    box-sizing: border-box;
    content-visibility: visible;
    padding: 0px;
    gap: 6px;
    margin: 0px;
    width: 100%;
    grid-template-columns: repeat(1, 1fr);
}
@media (min-width: 330px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 590px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 850px) {
    .games-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (min-width: 1080px) {
    .games-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}
@media (min-width: 1250px) {
    .games-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}



.game-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.game-card-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.game-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.game-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.play-btn {
    background: #3498db;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.play-btn:hover {
    background: #2980b9;
    transform: scale(1.05);
    color: white;
}

.game-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: #e74c3c;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

.game-card-content {
    padding: 1.5rem;
}

.game-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.game-card-title a {
    color: #2c3e50;
}

.game-card-title a:hover {
    color: #3498db;
}

.game-card-category {
    color: #7f8c8d;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.game-card-category a {
    color: #7f8c8d;
}

.game-card-category a:hover {
    color: #3498db;
}

.game-card-description {
    color: #7f8c8d;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.game-card-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #95a5a6;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: #2c3e50;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    color: #3498db;
}

.category-icon {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 1rem;
}

.category-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.category-count {
    color: #7f8c8d;
    font-size: 0.875rem;
}



/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #3498db;
}

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

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

.footer-links a {
    color: #bdc3c7;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #3498db;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    text-align: center;
    color: #95a5a6;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #34495e;
    color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #3498db;
    transform: translateY(-2px);
    color: white;
}

/* Layout adjustments for fixed header */
.main-content {
    /* Ensure content isn't hidden behind fixed header */
    padding-top: 60px; /* approximate navbar height */
}

/* Scroll-to-top button styling */
.scroll-to-top {
    position: fixed;
    right: 50px;
    bottom: 50px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid #333333;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease, background 0.2s ease;
    z-index: 1050; /* above content */
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.scroll-to-top i {
    font-size: 0.95rem;
}

.overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgb(0 0 0 / .5);
    display: none;
    z-index: 99;
}
body.menu-opened .overlay {
    display: block;
}
body.menu-opened {
    overflow: hidden;
}

/* Responsive Design */
@media (min-width: 330px) {
    .indent-button {
        display: block;
        height: 38px;
        width: 38px;
    }
    .sidebar-wrapper {
        position: fixed;
        margin: 0;
        margin-bottom: 0 !important;
        top: 58px;
        bottom: 0;
        left: 0;
        z-index: 100;
        overflow-y: auto;
        scrollbar-width: none;
        overscroll-behavior-y: contain;

        transform: translate3d(calc(-100% - 45px), 0, 0);
        transition: .2s ease-in-out;
        border-right: 1px solid #ffffff5e;
    }
    .sidebar-wrapper.active {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
}
@media (min-width: 590px) {
    
}
@media (min-width: 850px) {
    .indent-button {
        display: none;
    }
    .sidebar-wrapper {
        position: static;
        border-right: 0px solid transparent;

        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
}
@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .header-content {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .search-form {
        min-width: auto;
        width: 100%;
        order: 3;
        flex-basis: 100%;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0;
    }
    
    .section {
        padding: 2rem 0;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-col-reverse { flex-direction: column-reverse; }
.flex-row-reverse { flex-direction: row-reverse; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.align-center { align-items: center; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.nowrap { white-space: nowrap; }

