@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --background: #080808;
  --surface: #171717;
  --cell: #202020;
  --border: #363636;
  --text: #ffffff;
  --muted: #999999;
  --teal: #2dd4bf;

  --green: #176b36;
  --green-border: #258746;
  --yellow: #b58b0b;
  --orange: #a94c08;
  --gray: #292929;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--background);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* HEADER */

.topbar {
  width: 100%;
  min-height: 92px;
  padding: 15px 4.5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #242424;
}

.brand {
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0;
  color: white;
  text-decoration: none;
  white-space: nowrap;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.5px;
}

.brand span {
  color: var(--teal);
}

.previous-btn {
  padding: 14px 21px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: white;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: .2s ease;
}

.previous-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
}

/* MAIN LAYOUT */

.game-container {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 35px 30px 25px;
}

/* INTRO */

.game-intro {
  text-align: center;
}

.puzzle-date {
  color: #d1d1d1;
  font-size: 13px !important;
  font-weight: 700;
  letter-spacing: 2px;
}

.legend {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 25px;
  margin: 34px 0;
  color: #d4d4d4;
  font-size: 14px;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 9px;
}

.legend-box {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,.12);
}

.legend-box.exact {
  background: var(--green);
}

.legend-box.close {
  background: var(--yellow);
}

.legend-box.near {
  background: var(--orange);
}

.legend-box.no-match {
  background: var(--gray);
}

/* SEARCH */

.search-section {
  width: min(950px, 100%);
  margin: 0 auto 45px;
  text-align: center;
}

.search-wrapper {
  position: relative;
  width: 100%;
}

#film-search {
  width: 100%;
  height: 60px;
  padding: 0 28px;
  border: 1px solid #222;
  border-radius: 16px;
  outline: none;
  background: #101010;
  color: white;
  font-family: inherit;
  font-size: 15px;
  transition: border .2s ease;
}

#film-search:focus {
  border-color: var(--teal);
}

#film-search::placeholder {
  color: #414141;
}

#film-search:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.search-hint {
  margin: 12px 0 0;
  color: #858585;
  font-size: 14px;
}

.message {
  min-height: 20px;
  margin: 9px 0 0;
  color: var(--teal);
  font-size: 13px;
}

/* AUTOCOMPLETE */

.suggestions {
  position: absolute;
  z-index: 100;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  display: none;
  max-height: 330px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #393939;
  border-radius: 13px;
  background: #191919;
  text-align: left;
  box-shadow: 0 15px 35px rgba(0,0,0,.5);
}

.suggestions.active {
  display: block;
}

.suggestion-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 13px 15px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: white;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}

.suggestion-item:hover,
.suggestion-item:focus {
  outline: none;
  background: #292929;
}

.suggestion-title {
  font-size: 14px;
  font-weight: 700;
}

.suggestion-year {
  color: #999;
  font-size: 12px;
}

/* GUESS COUNTER */

.guess-counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin: 25px 0 40px;
}

.guess-counter strong {
  color: var(--teal);
  font-size: 32px;
  font-weight: 800;
}

.guess-counter span {
  color: #777;
  font-size: 12px;
  letter-spacing: 3px;
}

/* GRID */

.grid-section {
  width: 100%;
  margin-top: 25px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.results-table {
  width: 100%;
  min-width: 1050px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 6px 7px;
}

.results-table th {
  height: 34px;
  padding: 4px;
  color: #bcbcbc;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-align: center;
  white-space: nowrap;
}

.results-table td {
  height: 76px;
  padding: 10px 9px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--cell);
  color: white;
  text-align: center;
  vertical-align: middle;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.results-table td:first-child {
  text-align: left;
  padding-left: 15px;
  font-weight: 800;
}

.film-col {
  width: 15%;
}

.year-col {
  width: 9%;
}

.genre-col {
  width: 12%;
}

.director-col {
  width: 12%;
}

.writer-col {
  width: 12%;
}

.runtime-col {
  width: 9%;
}

.actor-col {
  width: 15%;
}

.production-col {
  width: 16%;
}

.results-table td.exact {
  background: var(--green);
  border-color: var(--green-border);
}

.results-table td.close {
  background: var(--yellow);
  border-color: #c69c16;
}

.results-table td.near {
  background: var(--orange);
  border-color: #bd5c10;
}

.results-table td.no-match {
  background: var(--gray);
  border-color: #3b3b3b;
}

.cell-value {
  display: block;
  font-size: 11px;
}

.cell-subtitle {
  display: block;
  margin-top: 6px;
  color: rgba(255,255,255,.72);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.cell-arrow {
  display: block;
  margin-top: 5px;
  font-size: 16px;
}

/* WIN BANNER
   Replaces the search area after a correct guess. */

.win-section {
  width: 100%;
  margin: 28px 0 35px;
  text-align: center;
}

.win-section.hidden {
  display: none !important;
}

.win-banner {
  width: 50%;
  max-width: 600px;
  min-height: 82px;
  padding: 10px 10px;
  font-size: 25px;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;

  margin: 0 auto;

  border: 1px solid #383838;
  border-radius: 17px;
  background: #171717;
}

.win-banner h2 {
  margin: 0;
  color: var(--teal);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 2px;
}

#shareBtn {
      padding: 10px 20px;
  border: 2px solid white;
  border-radius: 12px;
  background: white;
  color: #080808;
  font-family: inherit;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
  cursor: pointer;
  transition: .2s ease;
}

#shareBtn:hover {
  background: var(--teal);
  border-color: var(--teal);
}

#end-description {
  margin: 17px 0;
  color: #aaa;
  font-size: 15px;
}

.answer-line {
  margin: 14px 0;
  color: #aaa;
  font-size: 15px !important;
}

.answer-line strong {
  color: var(--yellow) !important;
}

.hidden {
  display: none !important;
}

/* FOOTER */

.footer {
  padding: 35px 0 15px;
  color: #555;
  text-align: center;
  font-size: 11px;
  letter-spacing: 2px;
}

/* PREVIOUS PUZZLES DRAWER */

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0,0,0,.45);
  opacity: 0;
  visibility: hidden;
  transition: .25s ease;
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.previous-drawer {
  position: fixed;
  z-index: 9999;
  top: 0;
  right: 0;
  width: min(510px, 92vw);
  height: 100dvh;
  padding: 34px;
  overflow-y: auto;
  background: white;
  color: #171717;
  transform: translateX(100%);
  transition: transform .3s ease;
}

.previous-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.drawer-eyebrow {
  color: #29cbb8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}

.drawer-header h2 {
  margin: 12px 0;
  color: #171717;
  font-size: 28px;
  letter-spacing: -1px;
}

.drawer-header p {
  margin: 0;
  color: #888;
  font-size: 13px;
}

.drawer-close {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border: 1px solid #eee;
  border-radius: 50%;
  background: white;
  color: #171717;
  font-size: 23px;
  cursor: pointer;
}

.drawer-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 38px 0 25px;
}

.drawer-stat {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 17px;
  border-radius: 11px;
  background: #f5f5f5;
}

.drawer-stat strong {
  color: #171717;
  font-size: 27px;
}

.drawer-stat span {
  color: #888;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
}

.previous-puzzle-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.previous-puzzle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 16px;
  border: 1px solid #e9e9e9;
  border-radius: 11px;
  background: white;
  color: #171717;
  text-align: left;
  cursor: pointer;
  transition: .2s ease;
}

.previous-puzzle-item:hover,
.previous-puzzle-item.selected {
  background: #e4faf6;
  border-color: #29cbb8;
}

.puzzle-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.puzzle-info strong {
  font-size: 14px;
}

.puzzle-info span {
  color: #888;
  font-size: 12px;
}

.puzzle-status {
  padding: 9px 12px;
  border-radius: 7px;
  background: #29cbb8;
  color: #071c19;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.puzzle-status.not-solved {
  background: #eee;
  color: #777;
}

.archive-empty {
  color: #888;
  font-size: 14px;
}

/* RESPONSIVE */

@media (max-width: 700px) {
  .topbar {
    min-height: 75px;
    padding: 13px 18px;
  }

  .brand {
    font-size: 23px;
  }

  .previous-btn {
    padding: 11px 13px;
    font-size: 11px;
  }

  .game-container {
    padding: 28px 10px 20px;
  }

  .legend {
    gap: 12px;
    margin: 25px 0;
    font-size: 12px;
  }

  #film-search {
    height: 54px;
    font-size: 14px;
  }

  .win-banner {
    min-height: 76px;
    padding: 15px 10px;
    gap: 14px;
  }

  .win-banner h2 {
    font-size: 29px;
  }

  #shareBtn {
    padding: 13px 18px;
    font-size: 11px;
  }

  .results-table {
    min-width: 1050px;
  }

  .previous-drawer {
    padding: 25px 20px;
  }
}

/* HEADER LAYOUT */
.header-left { display:flex; align-items:center; gap:24px; min-width:0; }
.back-link {
  color:#bdbdbd; text-decoration:none; font-size:12px; font-weight:800;
  letter-spacing:1px; white-space:nowrap; transition:color .2s ease;
}
.back-link:hover { color:var(--teal); }
@media (max-width:700px) {
  .header-left { gap:13px; }
  .back-link { font-size:10px; letter-spacing:.4px; }
}


/* =========================================
   WORDelikula SHARE RESULTS MODAL
========================================= */

.share-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: 0.2s ease;
}

.share-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.share-modal {
  width: 100%;
  max-width: 550px;
  background: #fff;
  color: #171717;
  border-radius: 16px;
  padding: 34px;
  position: relative;
  box-shadow: 0 20px 70px rgba(0,0,0,.25);
  transform: translateY(12px);
  transition: transform .2s ease;
  font-family: inherit;
}

.share-modal-overlay.active .share-modal {
  transform: translateY(0);
}

.share-modal-eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #8957ff;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.share-modal-title {
  font-size: 32px;
  font-weight: 750;
  letter-spacing: -1px;
  margin: 0 0 18px;
  color: #151515;
}

.share-modal-description {
  color: #858585;
  font-size: 15px;
  margin: 0 0 24px;
}

.share-modal-close {
  position: absolute;
  right: 25px;
  top: 25px;
  width: 44px;
  height: 44px;
  border: 1px solid #e9e9e9;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 23px;
  cursor: pointer;
  transition: .2s;
}

.share-modal-close:hover {
  background: #f2f2f2;
}

.share-result-wrapper {
  position: relative;
  background: #f8f8f8;
  border: 1px solid #e9e9e9;
  border-radius: 12px;
  overflow: hidden;
}

.share-result-text {
  display: block;
  width: 100%;
  height: 275px;
  resize: none;
  border: none;
  outline: none;
  background: transparent;
  padding: 20px 18px;
  padding-right: 65px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.9;
  color: #171717;
  overflow-y: auto;
  white-space: pre;
}

.share-result-text::-webkit-scrollbar {
  width: 9px;
}

.share-result-text::-webkit-scrollbar-thumb {
  background: #999;
  border-radius: 10px;
}

.share-copy-btn {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 44px;
  height: 44px;
  background: #8957ff;
  color: white;
  border: none;
  border-radius: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 23px;
  transition: .2s;
}

.share-copy-btn:hover {
  background: #7040e9;
  transform: scale(1.04);
}

.share-copy-btn.copied {
  background: #18864b;
}

.share-modal-footer {
  margin-top: 13px;
  font-size: 13px;
  color: #888;
}

@media (max-width: 600px) {
  .share-modal {
    padding: 26px 20px;
    border-radius: 15px;
  }

  .share-modal-title {
    font-size: 27px;
  }

  .share-modal-close {
    right: 17px;
    top: 17px;
    width: 38px;
    height: 38px;
  }

  .share-result-text {
    height: 250px;
    font-size: 13px;
    padding-left: 14px;
  }
}

/* =========================================
   PUZZLE DATE + PREVIOUS PUZZLES ALIGNMENT
========================================= */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.puzzle-heading-row {
  width: 40%;
  max-width: 850px;
  margin: 0 auto 35px;
  padding: 0 10px;
  box-sizing: border-box;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

.puzzle-date {
  text-align: left;
  margin: 0;
  flex: 1;
}

.previous-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 18px 25px;
  min-height: 58px;

  background: #171717;
  color: #35d6c0;

  border: 1px solid #285d57;
  border-radius: 15px;

  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .3px;

  cursor: pointer;
  transition: all .2s ease;
}

.previous-btn:hover {
  background: #35d6c0;
  color: #080808;
  border-color: #35d6c0;
}

.legend {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 25px;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 600px) {
  .puzzle-heading-row {
    gap: 10px;
    margin-bottom: 25px;
  }

  .puzzle-date {
    font-size: 13px;
    letter-spacing: 1px;
  }

  .previous-btn {
    padding: 13px 14px;
    min-height: 45px;
    font-size: 11px;
    border-radius: 10px;
  }

  .legend {
    gap: 12px;
    font-size: 12px;
  }
}


/* =========================================
   TOPBAR BRAND + HOW TO PLAY
========================================= */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 30px;
}

.how-to-play-btn {
  appearance: none;
  background: transparent;
  border: none;
  outline: none;
  padding: 8px 0;

  color: #c7c7c7;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;

  cursor: pointer;
  transition: color .2s ease;
}

.how-to-play-btn:hover {
  color: #35d6c0;
}

.back-link {
  text-decoration: none;
}

/* =========================================
   HOW TO PLAY MODAL
========================================= */

.modal-open {
  overflow: hidden;
}

.how-to-play-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background: rgba(0, 0, 0, .82);
  backdrop-filter: blur(6px);

  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}

.how-to-play-overlay.active {
  opacity: 1;
  visibility: visible;
}

.how-to-play-modal {
  position: relative;

  width: 100%;
  max-width: 650px;
  max-height: 85vh;

  display: flex;
  flex-direction: column;

  padding: 38px;

  background: #111;
  color: #f5f5f5;

  border: 1px solid #303030;
  border-radius: 18px;

  transform: translateY(15px);
  transition: transform .25s ease;
}

.how-to-play-overlay.active .how-to-play-modal {
  transform: translateY(0);
}

.how-to-play-close {
  position: absolute;
  top: 20px;
  right: 22px;

  width: 40px;
  height: 40px;

  background: #1c1c1c;
  color: #fff;

  border: 1px solid #333;
  border-radius: 50%;

  font-size: 24px;
  cursor: pointer;

  transition: .2s;
}

.how-to-play-close:hover {
  background: #35d6c0;
  color: #080808;
  border-color: #35d6c0;
}

.how-to-play-eyebrow {
  color: #35d6c0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2.5px;
  margin-bottom: 10px;
}

.how-to-play-modal h2 {
  color: #fff;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -1px;
  margin: 0;
}

.how-to-play-subtitle {
  color: #999;
  font-size: 14px;
  margin: 9px 0 25px;
}

.how-to-play-content {
  overflow-y: auto;
  padding-right: 12px;
  flex: 1;
}

.how-to-play-content::-webkit-scrollbar {
  width: 5px;
}

.how-to-play-content::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 10px;
}

/* INSTRUCTION SECTIONS */

.instruction-section {
  padding: 20px 0;
  border-top: 1px solid #292929;
}

.instruction-section h3 {
  color: #35d6c0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.5px;
  margin: 0 0 12px;
}

.instruction-section > p {
  color: #c0c0c0;
  font-size: 14px;
  line-height: 1.8;
  margin: 7px 0;
}

/* COLOR EXPLANATION */

.instruction-color-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 17px;
}

.instruction-color-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.instruction-color {
  flex-shrink: 0;
  width: 27px;
  height: 27px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,.12);
}

.instruction-color.exact {
  background: #18864b;
}

.instruction-color.close {
  background: #c89b13;
}

.instruction-color.near {
  background: #c05b12;
}

.instruction-color.no-match {
  background: #333;
}

.instruction-color-item strong {
  display: block;
  color: #fff;
  font-size: 12px;
  letter-spacing: .8px;
  margin-bottom: 4px;
}

.instruction-color-item p {
  color: #999;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

/* COMMON ACTOR EXPLANATION */

.actor-explanation {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 15px;
}

.actor-example {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 13px;
  color: #aaa;
}

.actor-example-label {
  min-width: 105px;
  color: #35d6c0;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .5px;
}

/* MODAL FOOTER */

.how-to-play-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding-top: 20px;
  margin-top: 15px;

  border-top: 1px solid #292929;
}

.how-to-play-footer > span {
  color: #fff;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -0.5px;
}

.how-to-play-footer > span span {
  color: #35d6c0;
}

.how-to-play-footer button {
  background: #35d6c0;
  color: #080808;

  border: none;
  border-radius: 9px;

  padding: 13px 28px;

  font-family: inherit;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 1px;

  cursor: pointer;
  transition: .2s;
}

.how-to-play-footer button:hover {
  background: #fff;
}

/* =========================================
   EXISTING PUZZLE HEADING
========================================= */

.puzzle-heading-row {
  width: 40%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 35px;
}

.puzzle-date {
  text-align: left;
  margin: 0;
  flex: 1;
}

.previous-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 18px 25px;
  min-height: 58px;

  background: #171717;
  color: #35d6c0;

  border: 1px solid #285d57;
  border-radius: 15px;

  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .3px;

  cursor: pointer;
  transition: all .2s ease;
}

.previous-btn:hover {
  background: #35d6c0;
  color: #080808;
  border-color: #35d6c0;
}

.legend {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 25px;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 600px) {

  .brand-group {
    gap: 15px;
  }

  .how-to-play-btn {
    font-size: 10px;
    letter-spacing: .5px;
  }

  .how-to-play-modal {
    padding: 28px 20px 20px;
    max-height: 90vh;
  }

  .how-to-play-modal h2 {
    font-size: 28px;
  }

  .how-to-play-close {
    top: 14px;
    right: 14px;
  }

  .how-to-play-subtitle {
    font-size: 12px;
  }

  .puzzle-heading-row {
    gap: 10px;
    margin-bottom: 20px !important;
  }

  .puzzle-date {
    font-size: 13px;
    letter-spacing: 1px;
  }

  .previous-btn {
    padding: 13px 14px;
    min-height: 45px;
    font-size: 11px;
    border-radius: 10px;
  }

  .legend {
    gap: 12px;
    font-size: 12px;
  }
}

/* Keep RUNTIME and YEAR labels inline with descriptions */

.instruction-color-item p {
  display: block;
  margin: 4px 0;
  line-height: 1.6;
}

.instruction-color-item p strong {
  display: inline !important;
  color: #c0c0c0;
  font-size: inherit;
  letter-spacing: 0;
  margin: 0;
  font-weight: 700;
}

/* =========================================
   CENTER PUZZLE DATE AND PREVIOUS BUTTON
========================================= */

.puzzle-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 40%;
  gap: 20px;
}

.puzzle-date {
  display: flex;
  align-items: center;
  margin: 0;
  font-size: 18px; /* Reduced by 2px */
  line-height: 1;
}

.previous-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px; /* Reduced by 2px */
  min-height: 54px;
  padding: 16px 25px;
}

/* Mobile */
@media (max-width: 600px) {
  .puzzle-date {
    font-size: 11px;
  }

  .previous-btn {
    font-size: 10px;
    min-height: 44px;
    padding: 12px 14px;
  }
}

/* =========================================
   PUZZLE HEADER — CENTERED INWARD
========================================= */

.puzzle-heading-row {
  width: 40%;
  max-width: 1250px;
  margin: 0 auto 35px;
  padding: 0 10px;
  box-sizing: border-box;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.puzzle-date {
 font-size: 13px !important;
  letter-spacing: 1.5px;
  margin: 0;
}

.previous-btn {
  font-size: 10px !important;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 14px;
}

/* Responsive */
@media (max-width: 600px) {
  .puzzle-heading-row {
    padding: 0 5px;
    gap: 12px;
  }

  .puzzle-date {
    font-size: 10px !important;
    letter-spacing: 1px;
  }

  .previous-btn {
    font-size: 10px !important;
    min-height: 40px;
    padding: 10px 12px;
  }
}
/* =========================================
   SEARCH BAR + GIVE UP BUTTON
========================================= */

.search-controls {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.search-controls .search-wrapper {
  flex: 1;
  min-width: 0;
}

.give-up-btn {
  flex-shrink: 0;
  min-width: 125px;
  height: 60px;
  padding: 0 22px;

  background: #c62828;
  color: #fff;

  border: 1px solid #e53935;
  border-radius: 16px;

  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;

  cursor: pointer;
  transition: all .2s ease;
}

.give-up-btn:hover:not(:disabled) {
  background: #e53935;
  border-color: #ff5252;
  transform: translateY(-2px);
}

.give-up-btn:active:not(:disabled) {
  transform: translateY(0);
}

.give-up-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* MOBILE */

@media (max-width: 600px) {

  .search-controls {
    gap: 7px;
  }

  .give-up-btn {
    min-width: 90px;
    height: 54px;
    padding: 0 12px;
    font-size: 11px;
    border-radius: 12px;
  }

}

@media (max-width: 768px) {

  .win-banner {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px 10px;
    gap: 15px;
    font-size: 20px;
  }

  .puzzle-heading-row {
    width: 100%;
    max-width: 100%;
    padding: 0 12px;
    margin: 0 auto 25px;
    box-sizing: border-box;
    gap: 12px;
  }

}
