/* Base styles */
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
  }
  
  body {
    background: linear-gradient(to right, #f4f4f4, #e0e0e0);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
  }
  
  .game-container {
    max-width: 800px;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 30px 20px;
  }
  
  /* Header and controls */
  header h1 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2rem;
    color: #333;
  }
  
  .controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
  }
  
  .controls select,
  .controls button {
    padding: 6px 12px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 1rem;
    background: #f9f9f9;
    cursor: pointer;
  }
  
  .controls button {
    background-color: #007bff;
    color: #fff;
    border: none;
    transition: background 0.2s ease-in-out;
  }
  
  .controls button:hover {
    background-color: #0056b3;
  }
  
  /* Stats */
  .stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 1rem;
    color: #444;
  }
  
  /* Grid and cards */
  .grid {
    display: grid;
    gap: 10px;
    justify-content: center;
  }
  
  .grid.grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .grid.grid-6 {
    grid-template-columns: repeat(6, 1fr);
  }
  
  .card {
    background-color: #eee;
    width: 100%;
    aspect-ratio: 1 / 1;
    perspective: 1000px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
  }
  
  .card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.5s;
  }
  
  .card.flipped .card-inner {
    transform: rotateY(180deg);
  }
  
  .card-front,
  .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
  }
  
  .card-front {
    background-color: #ffffff;
    transform: rotateY(180deg);
    font-size: 2.5rem;
  }
  
  .card-back {
    background-color: #007bff;
    color: #fff;
  }
  
  /* Win message */
  .win-message {
    display: none;
    text-align: center;
    margin-top: 20px;
    font-size: 1.5rem;
    background-color: #28a745;
    color: white;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
  }
  
  /* Responsive tweaks */
  @media (max-width: 600px) {
    .controls,
    .stats {
      flex-direction: column;
      align-items: center;
    }
  }
  