:root {
  --paper-bg: #fdfaf6;
  --ink: #111;
  --border-thick: 4px solid var(--ink);
  --border-thin: 1px solid var(--ink);
}

body {
  background-color: #e5e5e5;
  color: var(--ink);
  font-family: "Lora", serif;
  margin: 0;
  padding: 20px;
  display: flex;
  justify-content: center;
}

.newspaper-container {
  background-color: var(--paper-bg);
  max-width: 1200px;
  width: 100%;
  padding: 30px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

/* Masthead */
.masthead {
  text-align: center;
  border-bottom: var(--border-thick);
  margin-bottom: 30px;
  padding-bottom: 10px;
}

.masthead h1 {
  font-family: "Playfair Display", serif;
  font-size: 4rem;
  font-weight: 900;
  text-transform: uppercase;
  margin: 0 0 10px 0;
  letter-spacing: -1px;
}

.dateline {
  display: flex;
  justify-content: space-between;
  border-top: var(--border-thin);
  border-bottom: var(--border-thin);
  padding: 5px 0;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* Layout */
.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 900px) {
  .content-grid {
    grid-template-columns: 350px 1fr;
  }
}

/* Typography & Controls */
h2,
h3 {
  font-family: "Playfair Display", serif;
  text-transform: uppercase;
  border-bottom: var(--border-thin);
  padding-bottom: 5px;
  margin-top: 0;
}

.input-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 5px;
  font-size: 0.9rem;
}

textarea {
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  border: var(--border-thin);
  padding: 10px;
  font-family: monospace;
  resize: vertical;
}

textarea:focus {
  outline: 2px solid var(--ink);
}

.button-group {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

button {
  flex: 1;
  background-color: var(--paper-bg);
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 8px;
  font-family: "Playfair Display", serif;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}

button:hover {
  background-color: var(--ink);
  color: var(--paper-bg);
}

.message {
  margin-top: 15px;
  font-style: italic;
  font-weight: bold;
}

/* Clues */
.clues-container {
  margin-top: 30px;
}

.hidden {
  display: none !important;
}

ol {
  padding-left: 20px;
  line-height: 1.6;
}

li {
  margin-bottom: 5px;
  transition: background-color 0.2s;
}

li::marker {
  color: var(--ink);
}

/* Highlight class for active clues (replaces Tailwind) */
.active-clue {
  background-color: var(--ink);
  color: var(--paper-bg);
  font-weight: bold;
}

/* Puzzle Grid */
.puzzle-section {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.grid-container {
  display: grid;
  border: var(--border-thick);
  background-color: var(--ink);
  gap: 1px; /* Creates internal borders */
}

.grid-cell {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  background-color: var(--paper-bg);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.grid-cell.empty {
  background-color: var(--ink);
}

.grid-cell input {
  width: 100%;
  height: 100%;
  text-align: center;
  text-transform: uppercase;
  font-size: 1.5rem;
  font-family: "Lora", serif;
  border: none;
  background-color: transparent;
  color: var(--ink);
  cursor: pointer;
}

.grid-cell input:focus {
  outline: none;
  background-color: #e5e5e5;
}

.grid-cell .clue-number {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 0.7rem;
  font-weight: 700;
}

.correct {
  background-color: #d4edda !important;
}
.incorrect {
  background-color: #f8d7da !important;
}
