/* =================================================================
   Fazza Play - Professional CSS Stylesheet
   Author: Gemini Enterprise
   Description: A modern, dark-themed, and responsive design for a gaming website.
   ================================================================= */

/* ------------------------------------
 * CSS Variables (Theme Colors & Fonts)
 * ------------------------------------ */
:root {
    --primary-color: #00AEEF; /* A vibrant blue for calls to action */
    --primary-hover: #0099D1;
    --secondary-color: #A9FD00; /* A lime green for accents */
    --background-dark: #121212; /* Main background */
    --background-light: #1E1E1E; /* Cards and surfaces */
    --background-medium: #2A2A2A; /* Filters and secondary elements */
    --text-primary: #FFFFFF;
    --text-secondary: #B3B3B3;
    --border-color: #333333;
    --font-family: 'Cairo', sans-serif;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    --border-radius: 12px;
}

/* ------------------------------------
 * Global & Reset Styles
 * ------------------------------------ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-hover);
}

h1, h2, h3, h4 {
    font-weight: 800;
    line-height: 1.2;
}

/* ------------------------------------
 * Buttons & UI Elements
 * ------------------------------------ */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-primary);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 174, 239, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--text-primary);
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-white {
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    font-weight: 600;
}

.btn-white:hover {
    background: #fff;
    color: #000;
}


/* ====================================
 * HEADER - Professional Navigation
 * ==================================== */
.main-header {
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 900;
}
.logo-primary { color: var(--primary-color); }
.logo-secondary { color: var(--text-primary); }

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 600;
    padding: 8px;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.mobile-toggle { display: none; } /* Hide on desktop */

/* ====================================
 * HERO SECTION
 * ==================================== */
.hero {
    padding: 80px 0;
    background: radial-gradient(circle at top, #2a2a2a, var(--background-dark));
}

.hero .container {
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 50px;
}

.hero-badge {
    display: inline-block;
    background-color: rgba(0, 174, 239, 0.1);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 30px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    gap: 40px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}
.stat-item { text-align: center; }
.stat-item strong {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
}
.stat-item span { color: var(--text-secondary); }

.hero-visual .featured-card {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: perspective(1000px) rotateY(-10deg);
    transition: transform 0.4s ease;
}

.hero-visual .featured-card:hover {
    transform: perspective(1000px) rotateY(0);
}

.featured-card img {
    border-radius: var(--border-radius);
}

.featured-card .card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}
.featured-card .game-badge {
    background: var(--secondary-color);
    color: #000;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.9rem;
}
.featured-card .game-title {
    margin-top: 10px;
    font-size: 1.5rem;
}


/* ====================================
 * FILTER SYSTEM
 * ==================================== */
main > h1[data-translate="nav_pc_games"] {
    text-align: center;
    font-size: 2.5rem;
    margin: 60px 0 20px;
}

.filter-container {
    background: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 40px;
    width: 90%;
    max-width: 1400px;
    margin-inline: auto;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-header h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
}
.clear-filters {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}
.clear-filters:hover {
    color: var(--text-primary);
    background: var(--background-medium);
}
.search-container {
    width: 100%;
    max-width: 400px;
}
.search-container form {
    display: flex;
}
#search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    background: var(--background-dark);
    color: var(--text-primary);
    border-radius: 6px 0 0 6px;
    font-family: var(--font-family);
}
#search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}
.search-btn {
    padding: 12px 20px;
    background: var(--primary-color);
    color: var(--text-primary);
    border: none;
    cursor: pointer;
    border-radius: 0 6px 6px 0;
    transition: background-color 0.3s;
}
.search-btn:hover {
    background: var(--primary-hover);
}

.filter-group h4 {
    margin-bottom: 12px;
    font-size: 1.2rem;
}
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.filter-btn {
    background: var(--background-medium);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    color: var(--text-primary);
    background: #333;
    border-color: #555;
}

.filter-btn.active {
    background: var(--primary-color);
    color: var(--text-primary);
    border-color: var(--primary-color);
    font-weight: bold;
}
.filter-icon {
    font-size: 1rem;
}
.results-counter {
    margin-top: 24px;
    text-align: center;
    color: var(--text-secondary);
    font-weight: bold;
}
#resultsCount {
    color: var(--primary-color);
    font-size: 1.2em;
}

/* ====================================
 * GAMES GRID & CARDS
 * ==================================== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.game-card {
    background: var(--background-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
}

.game-image {
    position: relative;
    height: 150px; /* Fixed height for consistency */
}
.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures images fill the container */
    transition: transform 0.4s ease;
}

.game-card:hover .game-image img {
    transform: scale(1.1);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .game-overlay {
    opacity: 1;
}

.game-info {
    padding: 16px;
}

.game-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.game-category {
    background: var(--background-medium);
    padding: 4px 10px;
    border-radius: 6px;
}

.game-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: bold;
    color: #FFC107; /* Gold color for rating */
}
.game-rating svg {
    fill: #FFC107;
}

/* ====================================
 * FOOTER
 * ==================================== */
footer {
    background-color: var(--background-light);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: 80px;
    text-align: center;
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-nav a {
    color: var(--text-secondary);
    font-weight: 600;
}

.footer-nav a:hover {
    color: var(--primary-color);
}

.footer-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}


/* ====================================
 * RESPONSIVE DESIGN (Media Queries)
 * ==================================== */

/* Tablets */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-text, .hero-visual {
        max-width: 600px;
        margin: 0 auto;
    }
    .hero-visual .featured-card {
        transform: none;
    }
    .hero-title {
        font-size: 2.8rem;
    }
    .hero-actions, .hero-stats {
        justify-content: center;
    }
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}


/* Mobile */
@media (max-width: 768px) {
    .nav-menu, .header-cta {
        display: none; /* Hide for mobile */
    }
    .mobile-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        background: transparent;
        border: none;
        cursor: pointer;
    }
    .mobile-toggle span {
        width: 100%;
        height: 3px;
        background: var(--text-primary);
        border-radius: 5px;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    .hero-actions .btn {
        width: 100%;
        max-width: 300px;
    }
    .hero-stats {
        gap: 20px;
    }
    .filter-header {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-header .game-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .search-container {
        max-width: none;
    }
}
