/* ======================================================================
   NES PİKSEL KATMANI
   Tüm oyun yüzeyini 8-bit konsol estetiğine çeker: sınırlı NES paleti,
   keskin köşeler, sert gölgeler ve piksel tipografi.
   `style.css`ten sonra yüklenir; temel temayı üzerine bindirir.
   ====================================================================== */

@font-face {
  font-family: "Pixellari";
  src: url("../fonts/Pixellari.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* ARI conlang sürümünün gömülü yazı tipi. */
@font-face {
  font-family: "Arahora";
  src: url("../fonts/arahora.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg-0: #000000;
  --bg-1: #101024;
  --ink: #fcfcfc;
  --muted: #bcbcbc;
  --gold: #f8b800;
  --gold-soft: #ac7c00;
  --panel: #101024;
  --line: #f8d878;
  --tile-face-a: #fce0a8;
  --tile-face-b: #f8d878;
  --tile-side: #503000;
  --kanji-font: "MS Gothic", "Yu Gothic", "Meiryo", "SimSun", monospace;
  --pixel-font: "Pixellari", "Yu Gothic UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Meiryo", "Lucida Console", "DejaVu Sans Mono", Consolas, "Courier New", monospace;
  --nes-cyan: #3cbcfc;
  --nes-blue: #0058f8;
  --nes-navy: #0000bc;
  --nes-green: #00b800;
  --nes-red: #d82800;
  --nes-magenta: #d800cc;
  --nes-orange: #fca044;
}

/* ARI girişi kendi yazı tipini kullanır; diğer sürümler Pixellari'de kalır. */
html[data-region="ari"] {
  --pixel-font: "Arahora", "Pixellari", "Yu Gothic UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Meiryo", "Lucida Console", "DejaVu Sans Mono", Consolas, "Courier New", monospace;
}

html[data-region="ari"] .brand {
  font-family: var(--pixel-font);
}

#app,
.hud,
.toast {
  font-family: var(--pixel-font);
}

body {
  color: var(--ink);
  background-color: #06060c;
  background-image:
    repeating-linear-gradient(90deg, rgba(60, 188, 252, 0.045) 0 2px, transparent 2px 18px),
    repeating-linear-gradient(0deg, #0a0a14 0 8px, #07070e 8px 16px);
  font-family: var(--pixel-font);
  letter-spacing: 0.02em;
  -webkit-font-smoothing: none;
}

::selection {
  background: var(--gold);
  color: #000;
}

/* ------------------------------- HUD ------------------------------- */

.hud {
  display: grid;
  grid-template-columns: minmax(190px, auto) minmax(150px, auto) minmax(0, 1fr) auto;
  grid-template-areas: "brand stage stats actions";
  align-items: stretch;
  gap: 0;
  min-height: 68px;
  padding: 0;
  border-top: 4px solid var(--gold);
  border-bottom: 4px solid var(--gold);
  background:
    repeating-linear-gradient(0deg, rgba(60, 188, 252, 0.035) 0 2px, transparent 2px 6px),
    #000;
  box-shadow: inset 0 -4px 0 #503000, 0 4px 0 #000;
  backdrop-filter: none;
}

.hud-brand {
  grid-area: brand;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-width: 0;
  padding: 9px 16px;
  border-right: 4px solid var(--gold);
  background: #101024;
  box-shadow: inset -4px 0 0 #503000;
}

.hud-logo {
  display: block;
  flex: 0 0 auto;
  width: 150px;
  height: 42px;
  object-fit: cover;
  object-position: top center;
  image-rendering: pixelated;
}

.brand {
  font-family: var(--pixel-font);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.2em;
  color: #f8d878;
  text-shadow: 3px 3px 0 #503000;
}

.hud-stage {
  grid-area: stage;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 14px;
  border-right: 2px dashed #503000;
  background: #05050f;
}

.level-name {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #bcbcbc;
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.level-name::before {
  content: "";
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  background: var(--nes-cyan);
}

.hud-stats {
  grid-area: stats;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  background: #05050f;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  padding: 7px 14px;
  border-right: 2px dashed #503000;
  line-height: 1.05;
}

.stat:last-child {
  border-right: 0;
}

.stat dt {
  color: var(--nes-cyan);
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.22em;
  text-shadow: 1px 1px 0 #000;
}

.stat dd {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0.04em;
  text-shadow: 3px 3px 0 #000;
}

#statScore {
  min-width: 7ch;
  text-align: left;
}

.hud-actions {
  grid-area: actions;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(46px, auto);
  gap: 0;
  border-left: 4px solid var(--gold);
  background: #101024;
  box-shadow: inset 4px 0 0 #503000;
}

.ghost {
  min-height: 100%;
  padding: 0 11px;
  border: 0;
  border-left: 2px solid #503000;
  border-radius: 0;
  background: #101024;
  color: var(--ink);
  font-family: var(--pixel-font);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: inset 0 3px 0 #ac7c00, inset 0 -3px 0 #503000;
  transition: none;
}

.ghost:first-child {
  border-left: 0;
}

.ghost:hover:not(:disabled) {
  background: var(--gold);
  color: #000;
  box-shadow: inset 0 3px 0 #fcfcfc, inset 0 -3px 0 #ac7c00;
}

.ghost:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: inset 0 3px 0 #ac7c00, inset 0 -3px 0 #503000;
}

.ghost:disabled {
  opacity: 0.4;
}

.ghost:focus-visible,
.primary:focus-visible,
.link:focus-visible,
.nes-option:focus-visible {
  outline: 3px solid var(--nes-cyan);
  outline-offset: 2px;
}

@media (max-width: 1180px) {
  .hud {
    grid-template-columns: minmax(190px, auto) minmax(140px, auto) minmax(0, 1fr);
    grid-template-areas:
      "brand stage stats"
      "actions actions actions";
  }

  .hud-actions {
    grid-auto-columns: minmax(0, 1fr);
    border-left: 0;
    border-top: 4px solid var(--gold);
    box-shadow: inset 0 4px 0 #503000;
  }

  .ghost {
    min-height: 42px;
  }
}

@media (max-width: 720px) {
  .hud {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "stats"
      "actions";
  }

  .hud-brand {
    border-right: 0;
    border-bottom: 4px solid var(--gold);
    box-shadow: inset 0 -4px 0 #503000;
  }

  .hud-stage {
    display: none;
  }

  .stat {
    padding: 6px 8px;
  }

  .stat dd {
    font-size: 16px;
  }

  .hud-actions {
    grid-auto-columns: 1fr;
  }

  .ghost {
    padding: 0 4px;
    font-size: 9px;
  }
}

/* ------------------------------ Sahne ------------------------------ */

#stage {
  background: #06060c;
}

#boardWrap {
  padding: 18px;
  background-color: #0d0d1c;
  background-image:
    repeating-linear-gradient(90deg, rgba(60, 188, 252, 0.035) 0 2px, transparent 2px 14px),
    repeating-linear-gradient(0deg, #0e0e1e 0 6px, #0b0b18 6px 12px);
  box-shadow: inset 0 0 0 3px #000, inset 0 0 0 7px #1b1b3a, inset 0 0 0 9px #000;
}

#boardWrap::before {
  inset: 0;
  border-radius: 0;
  background: repeating-conic-gradient(rgba(248, 216, 120, 0.028) 0% 25%, transparent 0% 50%) 0 0 / 20px 20px;
}

/* ------------------------------ Taşlar ----------------------------- */

.tile {
  border: 0;
  border-radius: 0;
  background-color: var(--tile-face-a);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.7);
  image-rendering: pixelated;
  transition: transform 0.06s steps(1), filter 0.08s steps(1);
}

.tile:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.7);
}

.tile.is-selected {
  transform: translateY(-4px);
  outline: 3px solid var(--gold);
  outline-offset: -1px;
  box-shadow: 0 0 0 2px #000, 0 5px 0 rgba(0, 0, 0, 0.75);
  animation: tile-select 0.7s steps(2, start) infinite;
}

@keyframes tile-select {
  50% {
    outline-color: #fcfcfc;
  }
}

.tile.is-blocked {
  filter: brightness(0.7);
}

.tile.is-blocked::after {
  border-radius: 0;
  background: rgba(6, 6, 32, 0.34);
}

.tile.is-matching {
  animation: tile-pop 0.3s steps(3, end) forwards;
}

.tile.is-nope {
  animation: tile-nope 0.3s steps(2, end);
}

.tile.is-hint {
  animation: tile-hint 0.8s steps(2, start) infinite;
}

@keyframes tile-pop {
  60% {
    transform: translateY(-8px) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-16px) scale(0.5) rotate(6deg);
    opacity: 0;
  }
}

@keyframes tile-hint {
  0%,
  100% {
    outline: 3px solid rgba(60, 188, 252, 0);
    outline-offset: -1px;
  }
  50% {
    outline: 3px solid var(--nes-cyan);
    outline-offset: -1px;
  }
}

/* Prosedürel yedek yüzler (paket yoksa) */

.pip {
  border-radius: 0;
  box-shadow: none;
  transform: scale(0.8);
}

.stick {
  width: 3px;
  border-radius: 0;
  transform: scaleY(0.9);
}

.face-image {
  width: 44px;
  height: 56px;
  object-fit: fill;
  image-rendering: pixelated;
}

.suit-dots {
  color: var(--nes-blue);
}
.suit-bamboo {
  color: var(--nes-green);
}
.suit-char {
  color: var(--nes-red);
}
.suit-sarı {
  color: var(--gold);
}
.suit-wind {
  color: var(--nes-cyan);
}
.suit-dragon {
  color: var(--nes-red);
}
.suit-flower {
  color: var(--nes-magenta);
}
.suit-season {
  color: var(--nes-orange);
}

/* ----------------------------- Ekranlar ---------------------------- */

.overlay {
  background-color: rgba(4, 4, 12, 0.95);
  background-image: repeating-conic-gradient(rgba(60, 188, 252, 0.05) 0% 25%, transparent 0% 50%);
  background-size: 20px 20px;
  backdrop-filter: none;
}

.panel {
  border: 4px solid var(--line);
  border-radius: 0;
  background: #101024;
  box-shadow: inset 0 0 0 4px #000, 0 0 0 4px #000, 0 9px 0 rgba(0, 0, 0, 0.7);
  animation: panel-in 0.16s steps(2, end);
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow {
  color: var(--nes-cyan);
  font-family: var(--pixel-font);
  font-size: 10.5px;
  letter-spacing: 0.3em;
}

.panel h1 {
  font-family: var(--pixel-font);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: #fcfcfc;
  text-shadow: 3px 3px 0 #503000, 3px 3px 0 #000;
}

.story-location {
  color: var(--nes-cyan);
  font-family: var(--pixel-font);
  font-size: 11.5px;
  letter-spacing: 0.16em;
}

.story-text {
  padding: 14px 16px;
  border: 3px solid #000;
  border-radius: 0;
  background: #000030;
  box-shadow: inset 0 0 0 2px #1b1b6a;
  color: #fcfcfc;
  font-family: var(--pixel-font);
  font-size: 13.5px;
  line-height: 1.65;
}

.story-objective {
  color: #f8d878;
  font-family: var(--pixel-font);
  font-size: 12.5px;
}

.story-objective::before {
  color: var(--gold);
}

.panel-actions {
  gap: 10px;
}

.primary {
  padding: 9px 16px;
  border: 3px solid #fcfcfc;
  border-radius: 0;
  background: var(--gold);
  color: #000;
  font-family: var(--pixel-font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: inset -3px -3px 0 #ac7c00, inset 3px 3px 0 #f8d878, 0 4px 0 #000;
  transition: none;
}

.primary:hover {
  background: #f8d878;
  transform: translateY(-1px);
  box-shadow: inset -3px -3px 0 #ac7c00, inset 3px 3px 0 #fcfcfc, 0 5px 0 #000;
}

.primary:active {
  transform: translateY(3px);
  box-shadow: inset 3px 3px 0 #ac7c00;
}

.link {
  color: var(--nes-cyan);
  font-family: var(--pixel-font);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-decoration-color: rgba(60, 188, 252, 0.45);
}

.link:hover {
  color: #fcfcfc;
}

.hint-line {
  border-top: 3px solid #1b1b3a;
  color: var(--muted);
  font-family: var(--pixel-font);
  font-size: 11px;
  line-height: 1.8;
}

kbd {
  padding: 1px 5px;
  border: 2px solid #7c7c7c;
  border-radius: 0;
  background: #1b1b3a;
  box-shadow: 0 2px 0 #000;
  font-family: var(--pixel-font);
  font-size: 10px;
  color: #fcfcfc;
}

.win-stats {
  gap: 8px;
}

.win-stats li {
  padding: 8px 12px;
  border: 3px solid #000;
  border-radius: 0;
  background: #0b0b1a;
  box-shadow: inset 0 0 0 2px #ac7c00;
  color: var(--muted);
  font-family: var(--pixel-font);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.win-stats span {
  color: #f8d878;
  font-size: 17px;
  text-shadow: 2px 2px 0 #000;
}

/* Bölgesel final epilogu */
.finale {
  margin: 2px 0 22px;
  text-align: center;
}

.finale-visual {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 80px;
  margin: 0 0 10px;
}

.finale-letter,
.finale-glyph {
  display: inline-block;
  color: #6b4b00;
  text-shadow: 3px 3px 0 #2a1600;
  opacity: 0.25;
  animation: finale-light 720ms steps(5, end) forwards;
  animation-delay: var(--delay, 0ms);
}

.finale-letter {
  font-size: clamp(34px, 7vw, 54px);
}

.finale-glyph {
  font-family: var(--pixel-font);
  font-size: clamp(20px, 4vw, 32px);
  line-height: 1.2;
}

.finale-ari {
  max-width: 100%;
}

.finale-jp {
  position: relative;
  padding: 12px 34px;
}

.finale-jp::before {
  content: "";
  position: absolute;
  inset: 6px -12px;
  background: repeating-linear-gradient(
    180deg,
    rgba(248, 216, 120, 0.16) 0 1px,
    transparent 1px 10px
  );
  transform: skewY(-4deg);
}

.finale-jp-text {
  position: relative;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-size: clamp(38px, 8vw, 62px);
  line-height: 1.1;
  color: #f8d878;
  text-shadow: 3px 3px 0 #2a1600;
  letter-spacing: 0.08em;
  animation: finale-jp-in 900ms ease both;
}

.finale-body {
  max-width: 48ch;
  margin: 0 auto;
  color: #bcbcbc;
  font-size: 13px;
  line-height: 1.7;
}

@keyframes finale-light {
  from {
    opacity: 0.2;
    color: #6b4b00;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    color: #f8b800;
    transform: none;
  }
}

@keyframes finale-jp-in {
  from {
    opacity: 0;
    letter-spacing: 0.3em;
  }
  to {
    opacity: 1;
    letter-spacing: 0.08em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .finale-letter,
  .finale-glyph,
  .finale-jp-text {
    animation: none;
    opacity: 1;
    color: #f8b800;
    letter-spacing: 0.08em;
  }
}

.level-list {
  gap: 6px;
}

.level-item {
  padding: 10px 14px;
  border: 3px solid #000;
  border-radius: 0;
  background: #0b0b1a;
  box-shadow: inset 0 0 0 2px #1b1b3a;
  font-family: var(--pixel-font);
}

.level-item:hover:not(:disabled) {
  border-color: #f8d878;
  background: #171733;
}

.level-item.is-locked {
  opacity: 0.4;
}

#menuTitle,
.menu-subtitle,
.nes-option,
.levels-progress,
.nes-panel .level-item,
.menu-panel #menuTitle,
.menu-panel .menu-subtitle,
.nes-panel .menu-subtitle,
.nes-panel .levels-progress,
.level-item .level-id,
.level-item .level-state,
.link,
.nes-panel .link {
  font-family: var(--pixel-font);
}

.level-item {
  grid-template-columns: 88px 40px minmax(0, 1fr) auto;
}

.level-preview {
  width: 88px;
  height: 48px;
  display: block;
  border: 1px solid #ac7c00;
  background: #05050f;
  image-rendering: pixelated;
}

.language-item {
  grid-template-columns: 48px minmax(0, 1fr) auto;
}

.language-item.is-active {
  border-color: #f8d878;
  box-shadow: inset 0 0 0 2px #ac7c00;
}

.help-rules {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  color: #d8d8d8;
  font-family: var(--pixel-font);
  font-size: 12px;
  line-height: 1.75;
}

.help-rules li {
  padding: 8px 12px;
  border-left: 4px solid #ac7c00;
  background: #0b0b1a;
}

.level-id {
  color: var(--gold);
  font-family: var(--pixel-font);
  font-size: 15px;
  letter-spacing: 0.1em;
}

.level-title {
  font-size: 13px;
}

.level-state {
  color: var(--nes-cyan);
  font-size: 10px;
  letter-spacing: 0.14em;
}

/* --------------------------- Menü dokunuşu -------------------------- */

.nes-panel {
  border-color: #f8d878;
  background: #0b0b1a;
  box-shadow:
    0 0 0 3px #000,
    0 0 0 7px #ac7c00,
    0 9px 0 #000;
}

.nes-frame {
  border-color: #ac7c00;
  background: #05050f;
}

.menu-logo {
  filter: none;
}

.menu-panel #menuTitle {
  color: #f8d878;
  text-shadow: 3px 3px 0 #503000;
}

.nes-panel .menu-subtitle {
  color: #bcbcbc;
}

.nes-progress {
  border-color: #ac7c00;
  background: #000;
}

.nes-progress .menu-progress-head b {
  color: #f8d878;
}

.nes-progress .menu-progress-track {
  background: #08080f;
}

.nes-progress .menu-progress-track i {
  background: repeating-linear-gradient(90deg, #f8b800 0 8px, #f8d878 8px 10px);
  box-shadow: none;
}

.press-start {
  color: #f8d878;
}

.nes-option {
  color: #bcbcbc;
}

.nes-option::before {
  color: #f8b800;
}

.nes-option.is-active,
.nes-option:hover:not(:disabled),
.nes-option:focus-visible {
  color: #f8d878;
  background: rgba(248, 184, 0, 0.14);
}

.nes-option:disabled {
  color: #7c7c7c;
}

.nes-panel .level-item {
  border-color: #ac7c00;
  background: #05050f;
}

.nes-panel .level-item:hover:not(:disabled) {
  border-color: #f8d878;
  background: #171733;
}

/* --------------------------- Bildirim / hata ------------------------- */

.toast {
  padding: 9px 16px;
  border: 3px solid #f8d878;
  border-radius: 0;
  background: #000;
  color: var(--ink);
  font-family: var(--pixel-font);
  font-size: 12px;
  box-shadow: 0 5px 0 #000;
}

.error-text {
  border: 3px solid #a80020;
  border-radius: 0;
  background: #200008;
  color: #f8d878;
  font-family: var(--pixel-font);
  font-size: 12px;
}

/* --------------------------- Editör yüzeyi -------------------------- */

.editor-side {
  border-right: 4px solid var(--gold);
  background: #05050f;
}

.side-head h1 {
  font-family: var(--pixel-font);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #f8d878;
  text-shadow: 3px 3px 0 #000;
}

.side-sub,
.editor-side label,
.deal-info,
.deal-note,
.validation,
.tool-info,
.editor-status {
  font-family: var(--pixel-font);
}

.back-link {
  color: #f8d878;
  font-family: var(--pixel-font);
  text-decoration: underline;
}

fieldset {
  padding: 10px 12px;
  border: 3px solid var(--gold-soft);
  border-radius: 0;
  background: #0b0b1a;
  box-shadow: inset 0 0 0 2px #000;
}

legend {
  color: #f8d878;
  font-family: var(--pixel-font);
  letter-spacing: 0.2em;
}

.editor-side input:not([type="checkbox"]),
.editor-side select,
.editor-side textarea {
  border: 2px solid var(--tile-side);
  border-radius: 0;
  background: #05050f;
  color: var(--ink);
  font-family: var(--pixel-font);
  box-shadow: inset 2px 2px 0 #000;
}

.editor-side input:focus-visible,
.editor-side select:focus-visible,
.editor-side textarea:focus-visible {
  outline: 3px solid var(--nes-cyan);
  outline-offset: 1px;
}

.layer-btn {
  border: 2px solid var(--gold-soft);
  border-radius: 0;
  background: #05050f;
  font-family: var(--pixel-font);
}

.layer-btn.is-active {
  border-color: #f8d878;
  background: var(--gold);
  color: #000;
}

.editor-toolbar {
  border-bottom: 4px solid var(--gold);
  background: #000;
  box-shadow: 0 4px 0 var(--tile-side);
}

.editor-canvas-wrap {
  background-color: #0d0d1c;
  background-image:
    repeating-linear-gradient(90deg, rgba(60, 188, 252, 0.035) 0 2px, transparent 2px 14px),
    repeating-linear-gradient(0deg, #0e0e1e 0 6px, #0b0b18 6px 12px);
}

.cell {
  border: 1px dashed rgba(172, 124, 0, 0.35);
  border-radius: 0;
}

.editor-slot {
  border: 2px dashed var(--gold-soft);
  border-radius: 0;
  background: rgba(248, 184, 0, 0.07);
  color: var(--gold-soft);
}

.editor-tile.is-active-layer {
  box-shadow: inset 0 0 0 2px var(--gold), 0 4px 0 #000;
}

.editor-status {
  border-top: 4px solid var(--gold);
  background: #000;
}

/* Menü paneli kısa ekranlara sığsın: logo ve boşluklar bir tık daraltıldı. */
.nes-panel {
  padding: 14px;
}

.nes-frame {
  padding: 14px 18px 10px;
}

.menu-logo {
  width: min(400px, 100%);
  margin: 0 auto 12px;
}

.menu-panel .menu-subtitle {
  margin-bottom: 16px;
}

.menu-panel .menu-progress {
  margin-bottom: 16px;
}

.menu-panel .press-start {
  margin: 2px 0 12px;
}

.menu-panel .menu-options {
  margin-bottom: 10px;
}

.menu-panel .hint-line {
  margin-top: 14px;
  padding-top: 12px;
}

.menu-credit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 22px -6px -4px;
  padding-top: 13px;
  border-top: 2px solid #1b1b3a;
  box-shadow: 0 -4px 0 #05050f;
  color: #bcbcbc;
  font-family: var(--pixel-font);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-align: center;
}

.menu-credit .credit-label {
  color: var(--gold);
  letter-spacing: 0.18em;
}

.menu-credit .credit-dot {
  width: 5px;
  height: 5px;
  background: var(--gold);
  box-shadow: 0 0 0 2px #503000;
  transform: rotate(45deg);
}

.menu-credit a {
  color: #f8d878;
  text-decoration: none;
  border-bottom: 1px dashed var(--gold-soft);
}

.menu-credit a:hover,
.menu-credit a:focus-visible {
  color: #fff;
  border-bottom-color: #fff;
}

/* --------------------------- Ara ekranı ----------------------------- */

.pause-panel {
  width: min(400px, calc(100vw - 48px));
}

.pause-panel .menu-options {
  margin: 18px 0 4px;
}

/* --------------------------- Credits ekranı -------------------------- */

.credits-panel {
  width: min(620px, calc(100vw - 48px));
}

.credits-list {
  display: grid;
  gap: 10px;
  margin: 22px 0 24px;
  padding: 0;
}

.credits-list > div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 11px 14px;
  border: 2px solid #1b1b3a;
  background: #05050f;
  box-shadow: inset 3px 3px 0 #000;
}

.credits-list dt {
  color: var(--nes-cyan);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.credits-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.3;
  text-shadow: 2px 2px 0 #000;
}

.credits-panel .panel-actions {
  margin-top: 0;
}

@media (max-width: 600px) {
  .credits-list > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@keyframes nes-blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

/* Sessiz düğme durumu */
.ghost.is-off {
  color: #503000;
  border-color: #503000;
  background: #0b0b1a;
}

/* Skor haneleri sabit genişlikte kalsın */
#statScore {
  min-width: 7ch;
  text-align: right;
}
