/* ========== GLOBAL & RESET ========== */
html, body, *, *:before, *:after {
  box-sizing: border-box;
}

body {
  font-family: "Century Gothic", CenturyGothic, Geneva, AppleGothic, sans-serif;
}

/* ========== WORDLE CONTAINER ========== */
.wordle-container {
  max-width: 500px;
  margin: 0 auto;
  padding: 1.25rem;
  position: relative;
}

/* ========== HEADER ========== */
.header-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.25rem;
}

.wordle-container h1 {
  text-align: center;
  font-size: 2rem;
  margin: 0;
}

.header-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}
.header-button:hover {
  background-color: #f0f0f0;
}
.menu-button { right: 0; }
.reset-button { left: 0; }
.menu-icon {
  font-size: 1.5rem;
}

/* ========== DATE MENU ========== */
.date-menu {
  position: absolute;
  top: 3.75rem;
  right: 0;
  background: #fff;
  border: 2px solid #d3d6da;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1000;
  min-width: 200px;
  max-width: 300px;
}
.date-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #d3d6da;
  font-weight: bold;
}
.close-menu-button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  color: #000;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s;
}
.close-menu-button:hover {
  background-color: #f0f0f0;
}
.date-buttons {
  padding: 0.5rem;
  max-height: 400px;
  overflow-y: auto;
}
.date-button {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 0.25rem;
  background: #fff;
  border: 1px solid #d3d6da;
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
  font-size: 1rem;
  transition: background-color 0.2s;
}
.date-button:hover {
  background-color: #f0f0f0;
}
.date-button.active {
  background: #6aaa64;
  color: #fff;
  border-color: #6aaa64;
}
.date-button:last-child {
  margin-bottom: 0;
}

/* ========== GAME BOARD & CELLS ========== */
.game-board {
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  gap: 0.3125rem;
  margin-bottom: 1.25rem;
}
.game-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.3125rem;
}
.game-cell {
  aspect-ratio: 1;
  border: 2px solid #d3d6da;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
  text-transform: uppercase;
  background: #fff;
  color: #000;
}
.game-cell.filled { border-color: #878a8c; }
.game-cell.correct { background: #6aaa64; color: #fff; border-color: #6aaa64; }
.game-cell.present { background: #c9b458; color: #fff; border-color: #c9b458; }
.game-cell.absent { background: #787c7e; color: #fff; border-color: #787c7e; }

/* ========== STATUS & SHARE ========== */
.message {
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  margin: 1.25rem 0 0.5rem 0;
  min-height: 30px;
}
.share-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 1.5rem;
  text-align: center;
}
.share-button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  background: #6aaa64;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  min-width: 120px;
  box-sizing: border-box;
}
.share-button:hover {
  background: #5a9a54;
}

/* ========== KEYBOARD ========== */
.keyboard-container {
  margin-top: 1.5rem;
}
.keyboard-row {
  display: flex;
  justify-content: center;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
}
.key {
  padding: 0.75rem 0.5rem;
  min-width: 2.5rem;
  font-size: 0.9rem;
  font-weight: bold;
  background: #d3d6da;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  color: #000;
  transition: background-color 0.1s, transform 0.1s;
}
.key:hover { background: #c0c3c7; }
.key:active, .key.pressed {
  background: #a8abaf;
  transform: scale(0.95);
  transition: background-color 0.1s, transform 0.1s;
}
.key.key-enter,
.key.key-backspace {
  min-width: 3.75rem;
  font-size: 0.75rem;
}
.key.correct { background: #6aaa64; color: #fff; }
.key.present { background: #c9b458; color: #fff; }
.key.absent { background: #787c7e; color: #fff; }

/* ========== RESPONSIVE ========== */
@media (max-width: 700px) {
  .wordle-container { padding: 0.625rem; }
  .wordle-container h1 { font-size: 1.8rem; margin-left: 1rem; margin-right: 1rem; }
  .header-button { width: 2.25rem; height: 2.25rem; font-size: 1.3rem; }
  .date-menu { top: 3.125rem; right: 0.625rem; left: 0.625rem; max-width: none; }
  .game-cell { font-size: 1.5rem; }
  .key { padding: 0.625rem 0.375rem; min-width: 2rem; font-size: 0.8rem; }
  .key.key-enter,
  .key.key-backspace { min-width: 3.125rem; font-size: 0.7rem; }
}

