* {
  box-sizing: border-box;
}

:root {
  --bg: #0f1115;
  --panel: #181b22;
  --panel-2: #20242d;
  --text: #f5f7fb;
  --muted: #aab0bd;
  --line: #303644;
  --gold: #d6b25e;
  --gold-dark: #9f7d35;
  --green: #2ed47a;
  --red: #ff5f6d;
  --white: #ffffff;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    linear-gradient(rgba(7, 9, 13, 0.82), rgba(12, 15, 22, 0.9)),
    url("background-texture.png") center center / cover fixed no-repeat,
    linear-gradient(135deg, #0b0d11 0%, #151923 100%);
  color: var(--text);
  min-height: 100vh;
}

.app-shell {
  width: min(980px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 40px;
}


.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.site-logo {
  width: min(100%, 420px);
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  max-width: 560px;
}





.status-card,
.game-card,
.controls-card,
.help {
  background: rgba(24, 27, 34, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 20px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

.status-card {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding: 10px 14px;
  margin-bottom: 14px;
  color: var(--muted);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.status-card p {
  margin: 0;
}

#guessCounter {
  color: var(--gold);
  font-weight: 800;
  white-space: nowrap;
}

.game-card {
  position: relative;
  padding: 14px;
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.9);
}

.grid {
  display: grid;
  grid-template-columns: minmax(92px, 150px) repeat(3, 1fr);
  gap: 8px;
}

.cell,
.header,
.corner {
  min-height: 112px;
  border-radius: 14px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
}

.header {
  background: linear-gradient(180deg, #2a303b, #171a21);
  color: var(--white);
  font-weight: 850;
  font-size: 0.92rem;
  line-height: 1.15;
}

.corner {
  background:
    linear-gradient(135deg, rgba(214, 178, 94, 0.22), rgba(255,255,255,0.04));
  position: relative;
}

.corner::after {
  content: "NB";
  color: var(--gold);
  font-weight: 900;
  font-size: 1.55rem;
  letter-spacing: -0.08em;
}

.cell {
  background: #ffffff;
  color: #101218;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.cell:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(214, 178, 94, 0.18);
}

.cell.selected {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(214, 178, 94, 0.35);
}

.cell.correct {
  background: linear-gradient(180deg, #d8ffe8, #aef4cb);
  color: #0b2b17;
  border-color: rgba(46, 212, 122, 0.9);
}

.cell.wrong:not(.correct) {
  border-color: rgba(255, 95, 109, 0.95);
  box-shadow: inset 0 0 0 2px rgba(255, 95, 109, 0.25);
}

.cell.revealed {
  background: #edf0f5;
  color: #171a21;
  align-items: flex-start;
  overflow-y: auto;
}

.answer-reveal {
  font-size: 0.76rem;
  line-height: 1.22;
  font-weight: 700;
}

.controls-card {
  margin-top: 14px;
  padding: 16px;
}

.selected-box {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

.label {
  display: block;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}

#selectedCellText,
#message {
  margin: 0;
}

.guess-row {
  display: flex;
  gap: 10px;
}

input {
  flex: 1;
  min-width: 0;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0f1115;
  color: var(--text);
  font-size: 1rem;
}

input::placeholder {
  color: #6f7786;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 13px 16px;
  background: linear-gradient(180deg, var(--gold), var(--gold-dark));
  color: #111;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

button:hover {
  filter: brightness(1.06);
}

.secondary-button {
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(214, 178, 94, 0.55);
}

#message {
  margin-top: 12px;
  font-weight: 800;
  min-height: 1.25rem;
}

.help {
  margin-top: 14px;
  padding: 18px;
  color: var(--muted);
}

.help h2 {
  margin: 0 0 8px;
  color: var(--text);
}

.help p {
  margin: 8px 0 0;
  line-height: 1.45;
}



/* Fixed guess panel above the board */
.inline-guess-panel {
  display: none;
  margin: 0 0 14px;
}

.inline-guess-panel.active {
  display: block;
  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 17, 21, 0.96);
  border: 1px solid rgba(214, 178, 94, 0.65);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.inline-guess-panel .selected-box {
  margin-bottom: 10px;
}

.inline-guess-panel #message {
  margin-top: 10px;
}

@media (max-width: 720px) {
  .hero {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-content {
    align-items: center;
    text-align: center;
  }

  .site-logo {
    width: min(100%, 360px);
    margin: 0 auto;
  }

  .secondary-button {
    width: 100%;
  }

  .status-card {
    flex-direction: column;
  }

  .grid {
    grid-template-columns: 86px repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .cell,
  .header,
  .corner {
    min-height: 92px;
    padding: 7px;
    border-radius: 11px;
    font-size: 0.8rem;
  }

  .guess-row {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}



@media (max-width: 720px) {
  .inline-guess-panel.active {
    grid-column: 1 / -1;
  }
}


.status-card #guessCounter {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(24, 27, 34, 0.92);
  border: 1px solid var(--line);
}



@media (max-width: 720px) {
}
