 /*
        =============================================================
        BASE STYLES
        ... (omitting unchanged BASE STYLES)
        =============================================================
        */

        :root {
            /* Define color palette */
            --primary-color: #007bff; /* Blue */
            --secondary-color: #6c757d; /* Gray */
            --accent-color: #ffc107; /* Yellow/Gold for stars */
            --background-dark: #1a1a1a; /* Dark background */
            --card-background: #2c2c2c; /* Slightly lighter card background */
            --text-light: #ffffff; /* White text */
            --header-height-base: 60px;
        }

        body {
            font-family: 'Inter', Arial, sans-serif;
            background-color: var(--background-dark);
            color: var(--text-light);
            margin: 0;
            padding-top: var(--header-height-base); /* Space for fixed header */
        }

        /* --- Typography and Links --- */
        h2, h3, h4 {
            color: var(--text-light);
        }

        a {
            color: var(--primary-color);
            text-decoration: none;
            transition: color 0.3s;
        }

        a:hover {
            color: var(--accent-color);
        }

        .btn {
            padding: 10px 15px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-weight: bold;
            transition: background-color 0.3s, transform 0.2s;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
        }

        .btn-primary {
            background-color: var(--primary-color);
            color: var(--text-light);
        }

        .btn-secondary {
            background-color: var(--secondary-color);
            color: var(--text-light);
        }

        .btn:hover {
            transform: translateY(-2px);
            opacity: 0.9;
        }

        /* --- Header Styles --- */
        header {
            background-color: #0e0e0e; /* Even darker header */
            padding: 10px 5%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: fixed; /* Fixed header */
            top: 0;
            left: 0;
            width: 90%; /* Adjusted width because of 5% padding on each side */
            z-index: 1000;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
            /* Ensure smooth wrapping transition */
            transition: padding-top 0.3s, padding-bottom 0.3s, height 0.3s;
        }

        header {
            font-size: 1.3rem;
            font-weight: bold;
            color: var(--accent-color);
        }

        
       h3{
        color: #007bff;
       }
        /* --- Game Grid --- */
        .game-grid {
            display: grid;
            /* Default for large screens: 4 columns */
            grid-template-columns: repeat(4, 1fr);
            gap: 55px;
            margin-bottom: 30px;
        }

        .game-card {
            background-color: var(--card-background);
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
            position: relative;
            transition: transform 0.3s, box-shadow 0.3s;
        }

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

        .game-thumbnail {
            width: 100%;
            height: 150px; /* Fixed height for thumbnails */
            object-fit: cover;
            display: block;
        }
        
        /* Fallback styling for missing images */
        .game-thumbnail[src^="placeholder"], .hero-image[src^="placeholder"] {
            background-color: #444;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--secondary-color);
            font-size: 0.9rem;
            content: "Image Missing";
        }
        .game-thumbnail:before { content: "Loading Image..."; }


        .card-info {
            padding: 10px;
        }

        .card-info h4 {
            margin: 0 0 5px 0;
            font-size: 1.1rem;
        }

        .card-meta {
            font-size: 0.85rem;
            color: var(--secondary-color);
        }

        .card-meta .rating {
            color: var(--accent-color);
        }

        .card-play-btn {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background-color: rgba(0, 0, 0, 0.7);
            color: var(--primary-color);
            border: 2px solid var(--primary-color);
            border-radius: 50%;
            width: 50px;
            height: 50px;
            display: flex;
            justify-content: center;
            align-items: center;
            opacity: 0;
            transition: opacity 0.3s, color 0.3s, border-color 0.3s;
        }

        .game-card:hover .card-play-btn {
            opacity: 1;
        }

        .card-play-btn:hover {
            color: var(--accent-color);
            border-color: var(--accent-color);
        }

        .card-play-btn i {
            font-size: 1.5rem;
        }

        .section-footer {
            text-align: center;
            margin-top: 20px;
        }

        /* --- Footer --- */
        .main-footer {
            background-color: #0e0e0e;
            padding: 20px;
            text-align: center;
            border-top: 1px solid var(--card-background);
            margin-top: 40px;
        }

        .footer-links a {
            margin: 0 10px;
            color: var(--secondary-color);
        }

        .main-footer p {
            margin-top: 10px;
            font-size: 0.9rem;
            color: var(--secondary-color);
        }


        /*
        =============================================================
        RESPONSIVE STYLES (The Key to Responsiveness)
        =============================================================
        */

        /* 1. Tablet View (max-width: 992px) */
        @media (max-width: 992px) {
            /* Adjust Header */
            .main-header {
                flex-wrap: wrap;
                justify-content: center;
                padding: 10px 2%;
                width: 96%;
                height: auto; /* Allow height to adjust */
            }

            .logo {
                width: 100%;
                text-align: center;
                margin-bottom: 10px;
            }

            .main-nav {
                order: 2; /* Puts nav below logo/controls on wrap */
                width: 100%;
                justify-content: center;
                margin-bottom: 10px;
                gap: 15px;
                font-size: 0.9rem;
            }

            .user-controls {
                order: 3;
                width: 100%;
                justify-content: center;
            }

            .search-bar {
                flex-grow: 1;
                max-width: 300px;
            }

            body {
                /* Adjust padding to account for the taller, wrapping header */
                padding-top: 130px; 
            }

            /* Adjust Hero Feature */
            .hero-image {
                height: 350px;
            }

            /* Adjust Game Grid: Show 3 columns */
            .game-grid {
                grid-template-columns: repeat(3, 1fr);
                gap: 15px;
            }
        }

        /* 2. Smaller Tablet/Mobile Landscape View (max-width: 768px) */
        @media (max-width: 768px) {
            
            body {
                padding-top: 150px; /* Slightly more padding for smaller screens */
            }
            
            .section-title {
                font-size: 1.5rem;
            }

            /* Adjust Hero Feature */
            .hero-image {
                height: 250px;
            }

            .hero-overlay {
                padding: 15px;
            }
            
            .hero-overlay h2 {
                font-size: 1.5rem;
            }
            
            .hero-overlay p {
                font-size: 0.9rem;
            }

            .btn-hero {
                padding: 10px 20px;
                font-size: 1rem;
            }

            /* Adjust Game Grid: Show 2 columns */
            .game-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .game-thumbnail {
                height: 120px; /* Slightly smaller thumbnail height */
            }
            
            .card-info h4 {
                font-size: 1rem;
            }
        }

        /* 3. Mobile Portrait View (max-width: 500px) */
        @media (max-width: 500px) 
            
            /* Header adjustments for a very small screen */
            
            
            {
            .nav-link {
                text-align: center;
                padding: 10px 0;
                border-bottom: 1px solid var(--card-background);
            }
            
            .user-controls {
                flex-direction: column;
                gap: 10px;
                margin-top: 0;
            }
            
            .search-bar {
                width: 100%;
                max-width: none;
            }
            
            .btn-primary {
                width: 100%; /* Make login button full width */
                text-align: center;
            }

            body {
                /* Max adjusted padding for fixed header */
                padding-top: 250px; 
            }





 /* Adjust Game Grid: Show 1 column (single stack - new side-by-side layout for better use of vertical space) */
            .game-grid {
                grid-template-columns: 1fr;
                gap: 10px;
            }
            
            .game-card {
                display: flex;
                align-items: center;
                height: auto;
            }
            
            .game-thumbnail {
                width: 100px; /* Smaller, fixed width for side-by-side view */
                height: 100px;
                flex-shrink: 0;
                border-radius: 8px 0 0 8px; /* Correct rounding for the side */
            }
            
            .card-info {
                flex-grow: 1;
                padding: 10px;
                /* IMPORTANT ADDITION FOR MOBILE LAYOUT */
                display: flex;
                flex-direction: column;
                justify-content: center;
            }

            /* Play button changes for 1-column layout */
            /* Move play button to the right side and make it always visible */
            .card-play-btn {
                position: static;
                transform: none;
                width: 35px;
                height: 35px;
                margin-right: 10px;
                opacity: 1; /* Always visible in this view */
                color: var(--accent-color);
                border-color: var(--accent-color);
                flex-shrink: 0;
            }
            
            .card-play-btn i {
                font-size: 1rem;
            }
            
            .game-card:hover {
                transform: none; /* Disable hover movement on small screens */
            }
    

 /* Footer adjustments */
            .footer-links {
                display: flex;
                flex-direction: column;
                gap: 5px;
            }
            
            .footer-links a {
                margin: 5px 0;
            }
    
    }
