/* =================================================================
   Fazza Play - Professional CSS Stylesheet
   Author: Gemini Enterprise
   Description: A modern, dark-themed, and responsive design for a gaming website.
   ================================================================= */

/* Ramadan Banner - Professional Version */
.ramadan-banner {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
    margin: 40px 0;
    border-radius: 25px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 0 3px rgba(255, 215, 0, 0.3);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 215, 0, 0.4);
    min-height: 200px;
}

.ramadan-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(74, 222, 128, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 165, 0, 0.1) 0%, transparent 50%);
    animation: shimmer 6s ease-in-out infinite;
}

.ramadan-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255, 215, 0, 0.05), transparent 60deg);
    animation: rotate 20s linear infinite;
    opacity: 0.5;
}

.ramadan-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    z-index: 2;
}

.ramadan-text {
    flex: 1;
    text-align: right;
    position: relative;
}

.ramadan-title {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffd700, #ffed4e, #fff59d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    animation: glow-text 3s ease-in-out infinite alternate;
}

.ramadan-description {
    font-size: 1.4rem;
    opacity: 0.9;
    line-height: 1.6;
    color: #e0e0e0;
    margin-bottom: 0;
}

.ramadan-offer {
    font-size: 1rem;
    color: #4ade80;
    font-weight: 800;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.25), rgba(74, 222, 128, 0.15));
    padding: 10px 20px;
    border-radius: 30px;
    display: inline-block;
    border: 2px solid rgba(74, 222, 128, 0.5);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    box-shadow: 0 6px 20px rgba(74, 222, 128, 0.3);
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.ramadan-offer:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 222, 128, 0.3);
}

.ramadan-visual {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    position: relative;
}

.ramadan-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 20px;
    animation: float-smooth 5s ease-in-out infinite;
    box-shadow:
        0 12px 30px rgba(255, 215, 0, 0.4),
        0 0 0 3px rgba(255, 215, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.4);
    background: rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.lantern {
    font-size: 2.5rem;
    animation: swing-gentle 4s ease-in-out infinite;
    filter: drop-shadow(0 6px 12px rgba(255, 165, 0, 0.7));
    text-shadow: 0 0 15px rgba(255, 165, 0, 0.6);
}

.crescent-moon {
    font-size: 2.2rem;
    animation: float-smooth 5s ease-in-out infinite reverse;
    filter: drop-shadow(0 6px 12px rgba(255, 255, 255, 0.7));
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

@keyframes shimmer {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes glow-professional {
    0% {
        text-shadow:
            0 0 10px rgba(255, 215, 0, 0.5),
            0 0 20px rgba(255, 215, 0, 0.3),
            0 0 30px rgba(255, 215, 0, 0.2);
    }
    100% {
        text-shadow:
            0 0 15px rgba(255, 215, 0, 0.8),
            0 0 30px rgba(255, 215, 0, 0.5),
            0 0 45px rgba(255, 215, 0, 0.3);
    }
}

@keyframes swing-gentle {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

@keyframes float-smooth {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

/* Responsive for Ramadan Banner */
@media (max-width: 768px) {
    .ramadan-banner {
        padding: 20px 15px;
        margin: 12px 0;
        border-radius: 16px;
    }

    .ramadan-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .ramadan-text {
        text-align: center;
    }

    .ramadan-title {
        font-size: 1.4rem;
        margin-bottom: 6px;
    }

    .ramadan-description {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }

    .ramadan-offer {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .ramadan-image {
        width: 60px;
        height: 60px;
    }

    .lantern {
        font-size: 1.6rem;
    }

    .crescent-moon {
        font-size: 1.4rem;
    }

    .ramadan-visual {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .ramadan-banner {
        padding: 15px 10px;
        margin: 8px 0;
        border-radius: 12px;
    }

    .ramadan-content {
        gap: 10px;
    }

    .ramadan-title {
        font-size: 1.2rem;
        letter-spacing: 0.3px;
    }

    .ramadan-description {
        font-size: 0.8rem;
    }

    .ramadan-offer {
        font-size: 0.75rem;
        padding: 5px 10px;
    }

    .ramadan-image {
        width: 50px;
        height: 50px;
    }

    .lantern {
        font-size: 1.4rem;
    }

    .crescent-moon {
        font-size: 1.2rem;
    }

    .ramadan-visual {
        gap: 8px;
    }
}

/* ------------------------------------
 * 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);
    -webkit-backdrop-filter: blur(10px);
    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;
    }
}
