/* General Styles */
body {
    font-family: 'Poppins', sans-serif; /* Modern, clean font */
    background: linear-gradient(135deg, #ff9a9e, #fad0c4); /* Soft peach-pink gradient */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    color: #555; /* Dark gray text for contrast */
    overflow: hidden; /* Hide scrollbars */
  }
  
  .page {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .hidden {
    display: none;
  }
  
  /* Start Page Styles */
  .start-container {
    text-align: center;
    background-color: rgba(255, 255, 255, 0.9); /* Semi-transparent white */
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); /* Soft shadow */
    max-width: 400px;
    width: 90%;
    backdrop-filter: blur(10px); /* Blur effect */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Subtle border */
  }
  
  .icon {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
  }
  
  #start-button {
    padding: 12px 24px;
    font-size: 18px;
    cursor: pointer;
    background: linear-gradient(135deg, #ff6f61, #ff9a9e); /* Soft peach-pink gradient */
    color: white;
    border: none;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  #start-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 111, 97, 0.3); /* Soft glow on hover */
  }
  
  /* Game Page Styles */
  .container {
    text-align: center;
    background-color: rgba(255, 255, 255, 0.9); /* Semi-transparent white */
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); /* Soft shadow */
    max-width: 800px;
    width: 90%;
    margin: 20px;
    max-height: 90vh; /* Limit height */
    overflow-y: auto; /* Add scroll if content overflows */
    backdrop-filter: blur(10px); /* Blur effect */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Subtle border */
  }
  
  /* Hide scrollbar but keep functionality */
  .container::-webkit-scrollbar {
    width: 8px;
  }
  
  .container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
  }
  
  .container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
  }
  
  .container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
  }
  
  h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #ff6f61; /* Soft peach */
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600; /* Semi-bold */
  }
  
  .rules {
    text-align: left;
    margin-bottom: 20px;
    background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent white */
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Soft shadow */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Subtle border */
  }
  
  .rules h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #ff6f61; /* Soft peach */
    font-weight: 500; /* Medium */
  }
  
  .rules ul {
    list-style-type: none; /* Remove bullets */
    padding-left: 0;
  }
  
  .rules li {
    font-size: 16px;
    margin-bottom: 8px;
    color: #555; /* Dark gray text */
    padding-left: 20px;
    position: relative;
  }
  
  .rules li::before {
    content: "•";
    color: #ff6f61; /* Soft peach */
    position: absolute;
    left: 0;
    font-size: 20px;
  }
  
  .grid {
    display: grid;
    gap: 10px;
    margin: 20px auto;
    justify-content: center;
  }
  
  .cell {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent white */
    border: 2px solid #ff6f61; /* Soft peach */
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  }
  
  .cell:hover {
    background-color: #ff6f61; /* Soft peach on hover */
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 111, 97, 0.3); /* Soft glow */
  }
  
  .controls {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  
  button, select {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background: linear-gradient(135deg, #ff6f61, #ff9a9e); /* Soft peach-pink gradient */
    color: white;
    border: none;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  button:hover, select:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 111, 97, 0.3); /* Soft glow on hover */
  }
  
  /* Enhanced Level and Time Display */
  .game-info {
    margin: 10px 0;
    font-size: 18px;
    color: #555; /* Dark gray text */
    display: flex;
    justify-content: center;
    gap: 20px;
  }
  
  .game-info p {
    margin: 0;
    font-size: 18px;
    font-weight: 500; /* Medium */
    color: #ff6f61; /* Soft peach */
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .game-info p::before {
    content: "🕒"; /* Clock emoji for time */
    font-size: 20px;
  }
  
  .game-info p:first-child::before {
    content: "📊"; /* Chart emoji for level */
  }
  
  #message {
    margin-top: 20px;
    font-size: 18px;
    color: #ff6f61; /* Soft peach */
    font-weight: 500; /* Medium */
  }
  
  /* Popup Styles */
  .popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay */
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .popup-content {
    background-color: rgba(255, 255, 255, 0.9); /* Semi-transparent white */
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); /* Soft shadow */
    max-width: 400px;
    width: 90%;
    backdrop-filter: blur(10px); /* Blur effect */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Subtle border */
  }
  
  .popup.hidden {
    display: none;
  }
  
  .popup button {
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    background: linear-gradient(135deg, #ff6f61, #ff9a9e); /* Soft peach-pink gradient */
    color: white;
    border: none;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .popup button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 111, 97, 0.3); /* Soft glow on hover */
  }
  
  /* Responsive Design */
  @media (max-width: 600px) {
    .cell {
      width: 40px;
      height: 40px;
    }
  
    .grid {
      gap: 5px;
    }
  
    .container {
      padding: 20px;
    }
  
    h1 {
      font-size: 28px;
    }
  
    .rules h2 {
      font-size: 20px;
    }
  
    .rules li {
      font-size: 14px;
    }
  
    button, select {
      padding: 8px 16px;
      font-size: 14px;
    }
  
    .popup-content {
      padding: 20px;
    }
  }