:root {
    --primary: #726a95; /* A muted purple */
    --primary-dark: #5b557a;
    --secondary: #f2ae72; /* A warm orange */
    --accent: #e0e0e0; /* Light gray for contrast */
    --dark: #333;
    --light: #fff;
    --background: #1e1e1e; /* Darker background */
    --text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    --border-radius: 10px;
    --transition-speed: 0.2s;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  
    /* Font Variables */
    --font-primary: "Poppins", sans-serif;
    --font-secondary: "Roboto", sans-serif;
  }
  
   /* Resets and Basic Styles */
   * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
   body {
    font-family: var(--font-primary);
    background-color: var(--background);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
  }
  
   /* Header */
   header {
    background: linear-gradient(
    45deg,
    var(--primary),
    var(--primary-dark)
    );
    color: var(--light);
    padding: 2rem 0;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden; /* Hide the wave effect overflow */
  }
  
   .header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
   h1 {
    font-size: 2.5rem;
    margin-bottom: 0;
    text-shadow: var(--text-shadow);
    letter-spacing: 1.2px;
    font-weight: 600;
  }
  
   /* Search */
   .search-container {
    max-width: 400px;
    width: 100%;
  }
  
   #search {
    width: 100%;
    padding: 1rem 1.2rem;
    font-size: 1rem;
    border: none;
    border-radius: var(--border-radius);
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--light);
    backdrop-filter: blur(8px);
    transition: all var(--transition-speed) ease;
    font-family: var(--font-secondary);
  }
  
   #search:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  }
  
   /* Tags */
   .tags-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
  }
  
   .tag {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--light);
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    font-size: 0.9rem;
    font-family: var(--font-secondary);
  }
  
   .tag:hover {
    background-color: rgba(255, 255, 255, 0.2);
  }
  
   .tag.active {
    background-color: var(--primary);
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }
  
   /* Games Grid */
   .games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 2rem 3rem;
  }
  
   /* Game Card */
   .game-card {
    background-color: rgba(255, 255, 255, 0.06);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform var(--transition-speed) ease,
    box-shadow var(--transition-speed) ease;
    box-shadow: var(--box-shadow);
  }
  
   .game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  }
  
   .game-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
  }
  
   .game-content {
    padding: 1.5rem;
  }
  
   .game-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
    font-weight: 500;
  }
  
   .game-description {
    font-size: 0.9rem;
    color: #bbb;
    margin-bottom: 1rem;
    font-family: var(--font-secondary);
  }
  
   .game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }
  
   .game-tag {
    background-color: var(--primary);
    color: var(--light);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    transition: background-color var(--transition-speed) ease;
    font-family: var(--font-secondary);
  }
  
   .game-tag:hover {
    background-color: var(--primary-dark);
  }
  
   .play-button {
    display: inline-block;
    background-color: var(--secondary);
    color: var(--dark);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color var(--transition-speed) ease,
    transform var(--transition-speed) ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    font-family: var(--font-secondary);
  }
  
   .play-button:hover {
    background-color: #e6a365;
    transform: scale(1.03);
  }
  
   /* Game Stats */
   .game-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); /* Responsive columns */
    gap: 0.75rem;
    margin: 1.2rem 0;
  }
  
   .stat {
    background-color: rgba(255, 255, 255, 0.08); /* Slightly brighter */
    padding: 0.75rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: background-color var(--transition-speed) ease,
    transform var(--transition-speed) ease;
  }
  
   .stat:hover {
    background-color: rgba(255, 255, 255, 0.15); /* Darker on hover */
    transform: scale(1.05);
  }
  
   .stat-label {
    display: block;
    font-size: 0.75rem; /* Smaller label */
    color: #999;
    margin-bottom: 0.2rem;
    font-family: var(--font-secondary);
    text-transform: uppercase; /* Uppercase labels */
    letter-spacing: 0.5px;
  }
  
   .stat-value {
    font-size: 1rem;
    font-weight: 600; /* Bolder value */
    font-family: var(--font-secondary);
  }
  
   /* Pagination */
   .pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
  }
  
   .pagination button {
    background-color: var(--primary);
    color: var(--light);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color var(--transition-speed) ease,
    transform var(--transition-speed) ease;
    font-family: var(--font-secondary);
  }
  
   .pagination button:hover {
    background-color: var(--primary-dark);
    transform: scale(1.03);
  }
  
   .pagination button:disabled {
    background-color: #555;
    cursor: not-allowed;
    opacity: 0.7;
  }
  
   #page-indicator {
    color: var(--light);
    font-size: 1rem;
    font-family: var(--font-secondary);
  }
  
   /* Loading Spinner */
   .loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
  }
  
   .loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1.2s linear infinite;
    margin-bottom: 1.2rem;
  }
  
   @keyframes spin {
    0% {
    transform: rotate(0deg);
    }
  
    100% {
    transform: rotate(360deg);
    }
  }
  
   .loading p {
    color: white;
    font-size: 1.1rem;
    font-family: var(--font-secondary);
  }
  
   /* Footer */
   footer {
    background-color: var(--dark);
    color: var(--light);
    padding: 1.5rem 2rem;
    text-align: center;
    font-family: var(--font-secondary);
  }
  
   footer a {
    color: var(--secondary);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
  }
  
   footer a:hover {
    color: #e6a365;
  }
  
   .footer-info {
    margin-top: 0.5rem;
    font-size: 0.9rem;
  }
  
   #about-button {
    background-color: var(--primary);
    color: var(--light);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color var(--transition-speed) ease,
    transform var(--transition-speed) ease;
    font-family: var(--font-secondary);
  }
  
   #about-button:hover {
    background-color: var(--primary-dark);
    transform: scale(1.03);
  }
  
   /* Popup Styles */
   .popup {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    z-index: 1001; /* Above everything else */
    justify-content: center;
    align-items: center;
    font-family: var(--font-secondary);
  }
  
   .popup-content {
    background-color: var(--background);
    color: var(--light);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    position: relative;
    max-width: 600px;
    width: 90%;
  }
  
   .close-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--accent);
    transition: color var(--transition-speed) ease;
  }
  
   .close-button:hover {
    color: var(--light);
  }
  
   .popup h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent);
  }
  
   .popup p {
    font-size: 1rem;
    line-height: 1.6;
  }
  
   /* Media Queries */
   @media (max-width: 768px) {
    .header-content {
    flex-direction: column;
    align-items: flex-start;
    }
  
    h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    }
  
    .search-container {
    max-width: 100%;
    }
  
    .games-grid {
    grid-template-columns: 1fr;
    }
  
    .pagination {
    flex-direction: column;
    align-items: center;
    }
  }
  