@import url("https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@300;400;500;700&display=swap");
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  line-height: 1.4;
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Prevent horizontal overflow from long words/content */
img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

p,
h1,
h2,
h3 {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* small utility classes */
.sr-only {
  /* accessible screen-reader only */
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

.hidden-mobile {
  display: none !important;
}

@media (min-width: 768px) {
  .hidden-mobile {
    display: initial !important;
  }
}
.show-mobile {
  display: block;
}

@media (min-width: 768px) {
  .show-mobile {
    display: none;
  }
}
.site-header {
  background-color: #004a99;
  color: #fff;
  font-family: "Roboto Slab", Georgia, serif;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  padding: 0.5rem 1rem;
  position: relative;
}
.site-header .site-logo {
  display: flex;
  align-items: center;
  min-width: 0;
}
.site-header .site-logo .site-title {
  font-size: 2rem;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  line-height: 1.2;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}
@media (min-width: 768px) {
  .site-header .site-logo .site-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100vw - 140px);
  }
}
.site-header .hamburger {
  display: block;
  background: none;
  border: none;
  color: inherit;
  font-size: 1.25rem;
  padding: 0.4rem;
  min-width: 44px;
  cursor: pointer;
}
.site-header .site-nav {
  display: none;
  gap: 0.5rem;
}
.site-header .site-nav.active {
  display: block;
  flex-direction: column;
  position: absolute;
  top: 5px;
  right: 0;
  background: #fff;
  color: #004a99;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  animation: slideIn 0.3s ease-out;
  padding: 0.75rem;
  z-index: 40;
  width: auto;
}
.site-header .site-nav.active ul {
  margin: 0;
  padding: 0;
}
.site-header .site-nav.active li {
  display: block;
  padding: 0.7rem 1rem;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
}
@media (min-width: 768px) {
  .site-header .hamburger {
    display: none;
  }
  .site-header .site-nav {
    display: flex;
    gap: 0.5rem;
  }
  .site-header nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
  }
  .site-header nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
  }
  .site-header nav ul li a:hover {
    text-decoration: underline;
  }
}
.site-header {
  /* Add slide animation */
}
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.site-footer {
  background-color: #f8f9fa;
  text-align: center;
  font-size: 0.9rem;
  color: #666;
}

@media (max-width: 768px) {
  #puzzle .grid-wrapper {
    width: 75vw;
    max-width: 45vh;
    min-width: 35vh;
    justify-self: center;
    aspect-ratio: 6/5;
    border-collapse: separate;
    border-spacing: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  #puzzle table {
    inset: 0;
    width: 100%;
    height: 100%;
    border-collapse: separate;
    border-spacing: 0;
  }
}
#puzzle-info {
  text-align: center;
  margin: 1rem auto;
  max-width: 600px;
}
#puzzle-info h2 {
  margin-bottom: 0.5rem;
  color: #004a99;
}
#puzzle-info p {
  font-style: italic;
  color: #666;
  margin-bottom: 1rem;
  display: none;
}
@media (min-width: 768px) {
  #puzzle-info p {
    display: block;
  }
}

#puzzle {
  margin: 0 auto;
  display: flex;
  justify-content: center;
}
#puzzle.read-only {
  pointer-events: none;
  opacity: 0.8;
  filter: grayscale(0.3);
}
#puzzle table {
  border-collapse: separate;
  border-spacing: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
#puzzle td {
  aspect-ratio: 1/1;
  width: 2.5rem;
  height: 2.5rem;
  text-align: center;
  padding: 0.25rem;
}
#puzzle input {
  width: 100%;
  height: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-align: center;
  font-size: clamp(1rem, 4vw, 1.25rem);
  font-weight: bold;
  text-transform: uppercase;
  color: #004a99;
  background: #fafafa;
  transition: all 0.2s ease;
  box-sizing: border-box;
  caret-color: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  line-height: 1;
  padding: 0;
  margin: 0;
}
#puzzle .highlight {
  background: rgba(255, 239, 190, 0.8352941176) !important;
}
#puzzle .focus {
  outline: none;
  background: rgba(255, 239, 190, 0.8352941176);
  border: 2px solid #004a99 !important;
}
#puzzle .link-highlight-1 {
  border: 2px solid #ffb3ba;
}
#puzzle .link-highlight-2 {
  border: 2px solid #bae1ff;
}
#puzzle.grid-incorrect {
  animation: wiggle 0.3s ease-in-out;
}
#puzzle.grid-incorrect input {
  border: 2px solid #dc3545 !important;
}
@keyframes wiggle {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

#clues {
  margin: 1rem auto;
  max-width: 600px;
  display: none;
}
#clues.read-only {
  pointer-events: none;
  opacity: 0.8;
  filter: grayscale(0.3);
}
#clues h3 {
  text-align: center;
  margin-bottom: 0.5rem;
  color: #333;
}
#clues .clue-item {
  margin: 0.1rem 0;
  padding: 0.15rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  cursor: pointer;
}
#clues .clue-item:hover {
  background-color: rgba(0, 69, 153, 0.1);
}
#clues .clue-item.clue-solved {
  color: #999;
  opacity: 0.7;
}
#clues .clue-item.clue-solved.clue-highlight {
  background-color: rgba(255, 239, 190, 0.8352941176);
  border: 1px solid #004a99;
  color: #999;
  opacity: 0.7;
}
#clues .clue-item.clue-highlight:not(.clue-solved) {
  background-color: rgba(255, 239, 190, 0.8352941176);
  border: 1px solid #004a99;
  color: #333;
  opacity: 1;
}
@media (min-width: 768px) {
  #clues {
    display: block;
  }
}

#solution-section {
  margin: 1rem auto;
  max-width: 400px;
  padding: 0.5rem;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}
#solution-section.visible {
  opacity: 1;
  max-height: 120px;
}
#solution-section label {
  font-weight: bold;
  color: #333;
  white-space: nowrap;
  flex: 1 1 100%;
  text-align: center;
}
#solution-section input {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 200px;
  padding: 0.5rem;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  text-align: center;
  text-transform: uppercase;
  transition: border-color 0.2s ease;
  border-color: #004a99;
}
#solution-section input:placeholder-shown {
  text-transform: none;
  color: #999;
  font-style: italic;
  opacity: 0.7;
}
#solution-section input:focus {
  outline: none;
}
#solution-section input:disabled {
  background-color: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}
#solution-section input.solution-incorrect {
  animation: wiggle 0.3s ease-in-out;
  border: 2px solid #dc3545 !important;
  background-color: #f8d7da !important;
}
#solution-section button {
  flex: 0 0 auto;
  padding: 0.5rem 1rem;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: bold;
  background-color: #004a99;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}
#solution-section button:hover:not(:disabled) {
  background-color: rgb(0, 49.3333333333, 102);
  border-color: rgb(0, 49.3333333333, 102);
}
#solution-section button:disabled {
  background-color: #f5f5f5;
  color: #999;
  border-color: #ddd;
  cursor: not-allowed;
}
@media (max-width: 480px) {
  #solution-section {
    flex-direction: column;
    align-items: stretch;
  }
  #solution-section input,
  #solution-section button {
    max-width: 100%;
  }
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  cursor: default;
  opacity: 0;
  animation: fadeIn 0.2s ease forwards;
}
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  max-width: 400px;
  margin: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  cursor: default;
}
.modal-content.info {
  border: 3px solid #004a99;
}
.modal-content.info p {
  font-style: italic;
  color: #666;
}
.modal-content.success {
  border: 3px solid #28a745;
}
.modal-content.error {
  border: 3px solid #dc3545;
}
.modal-content h3 {
  margin: 0 0 1rem 0;
  font-size: 1.8rem;
  color: #333;
}
.modal-content p {
  margin: 0;
  font-size: 1.2rem;
  color: #666;
}
.modal-content button {
  margin-top: 1.5rem;
  padding: 0.5rem 1.5rem;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  background-color: #004a99;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.modal-content button:hover {
  background-color: rgb(0, 54.2666666667, 112.2);
}

.solution-message {
  margin: 1rem auto;
  max-width: 600px;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}
.solution-message h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
}
.solution-message p {
  margin: 0;
  font-size: 1.1rem;
}

/* keyboard container */
#crossword-keyboard {
  touch-action: manipulation;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: #f9f9f9;
  border-top: 2px solid #ccc;
  padding: 0.5rem 0;
  z-index: 1000;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  margin: 0.25rem 0;
}

.keyboard-row button {
  touch-action: manipulation;
  flex: 0 0 auto;
  width: calc((100% - 1rem) / 10);
  max-width: 44px;
  height: 45px;
  margin: 0.05rem;
  font-size: clamp(0.9rem, 3.5vw, 1.2rem);
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.keyboard-row button:active {
  background: #e0f7fa;
}

/* special bottom row */
.keyboard-row.special button {
  height: 44px;
}

#key-backspace {
  width: calc((100% - 1rem) / 2);
}

.keyboard-row.special .key-space {
  width: 160px;
}

#active-clue-bar {
  text-align: center;
  font-size: 1rem;
  padding: 0.6rem;
  color: #333;
  white-space: normal;
  line-height: 1.3;
}

@media (min-width: 768px) {
  #crossword-keyboard {
    display: none;
  }
}
body {
  margin: 0;
  font-family: "Roboto Slab", Georgia, serif;
  line-height: 1.5;
  background: #fdfdfd;
  color: #333;
  min-height: 100vh;
}

.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main {
  padding-left: 2rem;
  padding-right: 2rem;
  padding-bottom: 2rem;
  flex: 1;
}

a {
  color: #0055aa;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/*# sourceMappingURL=main.css.map */