/* ========================================= */
/* Global Variables (from your index)        */
/* ========================================= */
:root {
    --bg-color: #131732;
    --sec-color: #282c47;
    --sec-color-2: #2a2d35;
    --green: rgb(86, 222, 147);
    --white: #ffffff;
    --border-radius: 12px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    
    /* Additional colors for the app */
    --text-color: #e3e3e3; /* Light grey for general text */
  }
  
  /* ========================================= */
  /* Swatch Randomizer Specific Styles         */
  /* ========================================= */
  
  #swatch-game {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      background-color: var(--sec-color); 
      padding: 30px 20px;
      margin: 20px auto; 
      border-radius: var(--border-radius);
      box-shadow: 0 0 40px rgba(0, 0, 0, 0.5); 
      /* Fixed size settings */
      height: 600px;
      width: 600px;
  }
  
  .game-screen {
      display: none;
      width: 100%;
      height: 100%;
      flex-direction: column;
      align-items: center;
      justify-content: center;
  }
  
  .game-screen.active {
      display: flex;
  }
  
  /* --- Main Menu --- */
  .menu-controls {
      display: flex;
      flex-direction: column;
      gap: 20px;
      width: 80%;
      max-width: 350px;
  }
  
  /* Time/Theme Buttons */
  button.game-button {
      padding: 15px 25px;
      font-size: 1.2rem;
      cursor: pointer;
      border: 2px solid var(--sec-color); 
      background-color: var(--bg-color);
      color: var(--text-color);
      border-radius: var(--border-radius);
      transition: var(--transition);
      box-shadow: var(--shadow);
  }
  
  button.game-button:hover {
      background-color: var(--green);
      color: var(--bg-color);
  }
  
  /* --- Start Button Styling --- */
  .game-button.primary {
      background-color: var(--green);
      border-color: var(--green);
      color: var(--bg-color); 
      font-weight: bold;
  }
  
  .game-button.primary:hover {
      background-color: rgb(75, 192, 130); 
      border-color: rgb(75, 192, 130);
  }
  
  
  /* --- Game Screen --- */
  
  .timer-display {
      font-family: Arial, sans-serif;
      font-size: 3rem;
      margin-bottom: 40px;
      color: var(--text-color);
      font-weight: bold;
  }
  
  /* Swatch Grid Styles */
  #swatch-grid {
      display: grid;
      /* FIX: We will dynamically set both columns and rows in the JS.
         grid-auto-rows is removed here as it conflicts with explicit rows. */
      
      gap: 20px;
      padding: 10px;
      max-width: 550px; 
      width: 90%;
      height: 400px; 
      justify-content: center;
      /* We now rely entirely on the JS to set grid-template-columns and grid-template-rows */
  }
  
  .color-swatch-item {
      display: flex;
      flex-direction: column;
      align-items: center;
  }
  
  .color-swatch {
      width: 100%;
      /* Use aspect-ratio to keep it a perfect square */
      aspect-ratio: 1 / 1; 
      
      border-radius: 15px;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5); 
      cursor: pointer;
      transition: transform 0.1s ease-in-out;
      position: relative; 
  }
  
  .color-swatch:active {
      transform: scale(0.95);
  }
  
  .hex-display {
      font-family: monospace;
      font-size: 1.1rem;
      padding: 5px 10px;
      background-color: rgba(0, 0, 0, 0.4); 
      border-radius: 5px;
      color: var(--text-color); 
      margin-top: 5px;
      transition: var(--transition);
  }
  
  .copy-message {
      margin-top: 30px; 
      font-size: 1.1rem;
      color: var(--green);
      height: 1.2rem;
      opacity: 0;
      transition: opacity 0.5s;
      font-weight: 500;
  }