
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  background: #d9b4dc url("images/crossword-background.png") center center / cover fixed no-repeat;
  font-family: Helvetica, Arial, sans-serif;
  color: #4e285c;
}

.crossword-page {
  width: min(1250px, 94%);
  margin: 0 auto;
  padding: 35px 15px 45px;
}

.crossword-header {
  text-align: center;
  margin-bottom: 30px;
}

.crossword-header h1 {
  margin: 0;
  color: #fff0fb;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: clamp(28px, 5vw, 48px);
  letter-spacing: 5px;
  text-shadow: 4px 4px #81265f;
}

.crossword-header p {
  margin: 8px 0 0;
  color: #fff0fb;
  font-size: 14px;
  letter-spacing: 2px;
  text-shadow: 1px 2px #81265f;
}

.crossword-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.8fr) minmax(450px, 1.5fr);
  align-items: start;
  gap: 22px;
}

.clue-panel {
  background: #d9c3ed;
  border: 4px solid #87558f;
  border-radius: 5px;
  padding: 20px;
  color: #4e285c;
  box-shadow: 4px 5px 0 rgba(67, 25, 67, 0.4);
}

.clue-panel h2 {
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px dashed #a66bb0;
  font-size: 19px;
  letter-spacing: 2px;
}

.clue-item {
  margin: 0 0 15px;
  font-size: 13px;
  line-height: 1.45;
}

.clue-item strong {
  color: #902b77;
  margin-right: 5px;
}

.clue-divider {
  border-top: 2px dashed #a66bb0;
  margin: 25px 0;
}

.puzzle-container {
  min-width: 0;
  padding: 22px 16px;
  background: #a52b70;
  border: 5px solid #70204e;
  border-radius: 5px;
  box-shadow: 5px 6px 0 rgba(67, 25, 67, 0.45);
  text-align: center;
}

.puzzle-container h2 {
  margin: 0;
  color: #f7d6eb;
  font-family: "Arial Black", Arial, sans-serif;
  letter-spacing: 3px;
  font-size: 24px;
  text-shadow: 2px 2px #70204e;
}

.puzzle-subtitle {
  color: #f7d6eb;
  font-size: 12px;
  letter-spacing: 1px;
  margin: 7px 0 18px;
}

.grid-scroll {
  width: 100%;
  overflow-x: auto;
  padding: 5px;
}

#crossword-grid {
  display: grid;
  justify-content: center;
  margin: 0 auto;
  width: max-content;
  gap: 2px;
}

.crossword-cell {
  position: relative;
  width: 29px;
  height: 29px;
  background: #fff5fc;
  border: 1px solid #70204e;
}

.crossword-cell.black {
  background: transparent;
  border: none;
}

.crossword-cell input {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #70204e;
  text-align: center;
  text-transform: uppercase;
  font-size: 17px;
  font-weight: bold;
  font-family: Helvetica, Arial, sans-serif;
  caret-color: #d52b91;
}

.crossword-cell input:focus {
  background: #f6b6e1;
}

.cell-number {
  position: absolute;
  top: 1px;
  left: 2px;
  font-size: 8px;
  line-height: 1;
  color: #70204e;
  pointer-events: none;
}

#crossword-grid .crossword-cell.word-correct {
  background: #b6f56b !important;
  border-color: #79b52e !important;
}

#crossword-grid .crossword-cell.word-correct input {
  color: #365b19 !important;
}

#crossword-grid .crossword-cell.incorrect {
  background: #ffb0b0;
}

.crossword-controls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.crossword-controls button {
  padding: 11px 15px;
  border: 2px solid #70204e;
  border-radius: 4px;
  background: linear-gradient(#ffe3f5, #e88bc9);
  color: #70204e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 3px 0 #70204e;
}

.crossword-controls button:hover {
  transform: translateY(-2px);
}

#crossword-message {
  min-height: 18px;
  margin: 16px 0 0;
  color: #fff0fb;
  font-size: 13px;
  font-weight: bold;
}

.crossword-footer {
  margin-top: 28px;
  color: #fff0fb;
  text-align: center;
  font-size: 10px;
  letter-spacing: 2px;
  text-shadow: 1px 2px #70204e;
}

@media (max-width: 850px) {
  .crossword-layout {
    grid-template-columns: 1fr;
  }

  .puzzle-container {
    grid-row: 1;
  }

  .clue-panel {
    grid-row: 2;
  }
}

@media (max-width: 520px) {
  .crossword-cell {
    width: 25px;
    height: 25px;
  }

  .crossword-cell input {
    font-size: 14px;
  }

  .clue-panel {
    padding: 14px;
  }
}
.puzzle-subtitle-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
}

.puzzle-subtitle-row .puzzle-subtitle {
  margin: 7px 0;
}

.mini-radio {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #f7d6eb;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 1px;
}

.mini-radio button {
  width: 19px;
  height: 19px;
  padding: 0;
  border: 1px solid #f7d6eb;
  border-radius: 50%;
  background: #d9c3ed;
  color: #70204e;
  font-size: 8px;
  cursor: pointer;
}

#crossword-spotify-player {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.back-home {
  position: fixed;
  top: 22px;
  left: 25px;
  z-index: 9999;
  color: #70204e;
  background: #d9c3ed;
  border: 1px solid #87558f;
  padding: 9px 14px;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 1px;
  text-decoration: none;
  box-shadow: 3px 3px 0 #87558f;
  transition: 0.2s ease;
}

.back-home:hover {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #87558f;
}