.page-header {
  text-align: center;
  margin-bottom: 15px;
}

.page-header h1 {
  font-size: clamp(1.5rem, 5vw, 2rem);
  margin-bottom: 5px;
}

.subtitle {
  color: #666;
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  margin: 0;
}

.content-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  padding: 20px 15px;
  max-width: 550px;
  width: calc(100% - 20px);
  margin: 10px;
  box-sizing: border-box;
}

.timer {
  font-size: clamp(1.3rem, 4vw, 2rem);
  color: #fb6f92;
  font-weight: bold;
  padding: 0.75rem 1.5rem;
  background-color: #f5f7fa;
  border-radius: 10px;
  margin-bottom: 15px;
}

.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.game-section {
  display: flex;
  justify-content: center;
  width: 100%;
  overflow-x: auto;
  padding: 5px;
}

.sudoku-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  grid-template-rows: repeat(9, 1fr);
  border: 3px solid #333;
  margin: 0 auto 20px auto;
  background-color: #fff;
  width: min(100%, 450px);
  aspect-ratio: 1;
  box-sizing: border-box;
}

.sudoku-cell {
  width: 100%;
  height: 100%;
  border: 1px solid #999;
  text-align: center;
  font-size: clamp(0.95rem, 3vw, 1.4rem);
  font-weight: 500;
  color: #333;
  padding: 0;
  outline: none;
  background-color: #fff;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.sudoku-cell:focus {
  background-color: #e8f0fe;
}

.sudoku-cell[value],
.sudoku-cell[readonly] {
  background-color: #f9f9f9;
  color: #555;
  font-weight: 600;
}

.sudoku-cell:nth-child(3n + 1) {
  border-left: 2px solid #333;
}

.sudoku-cell:nth-child(-n + 9) {
  border-top: 2px solid #333;
}

.sudoku-grid > :nth-child(9n) {
  border-right: 2px solid #333;
}

.sudoku-grid > :nth-last-child(-n + 9) {
  border-bottom: 2px solid #333;
}

.cta-button {
  padding: 12px 20px;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Responsive Design ---------- */
@media (max-width: 430px) {
  .content-card {
    padding: 15px 10px;
    width: calc(100% - 10px);
    margin: 5px;
  }

  .timer {
    font-size: 1.3rem;
    padding: 0.6rem 1.2rem;
    margin-bottom: 12px;
  }

  .game-container {
    gap: 1rem;
  }

  .sudoku-grid {
    width: min(100%, 370px);
    border: 2.5px solid #333;
    margin-bottom: 15px;
  }

  .sudoku-cell {
    font-size: clamp(0.9rem, 2.8vw, 1.2rem);
    min-height: 35px;
  }

  .cta-button {
    padding: 10px 18px;
    font-size: 0.95rem;
  }
}

@media (min-width: 431px) and (max-width: 600px) {
  .sudoku-grid {
    width: min(100%, 420px);
  }
}

@media (min-width: 601px) and (max-width: 900px) {
  .content-card {
    max-width: 90%;
    padding: 25px;
  }

  .sudoku-grid {
    width: 450px;
  }
}

@media (min-width: 901px) {
  .content-card {
    max-width: 550px;
    padding: 25px;
  }

  .sudoku-grid {
    width: 450px;
  }
}