/* =========================================================
   TOKENS  — orijinal kırmızı/siyah tema korundu
   ========================================================= */
:root {
  --bg-0: #090909;
  --bg-1: #111111;
  --bg-2: #181818;
  --bg-3: #1e1e1e;
  --line: #272727;
  --line-soft: #1c1c1c;

  --text-0: #e8e3dc;
  --text-1: #9a9590;
  --text-2: #5c5854;

  --red:        #a8241f;
  --red-bright: #cc3b30;
  --red-dim:    #6b1710;
  --ok:         #6b9c60;
  --ok-bright:  #82bf72;

  --font-display: "Bebas Neue", sans-serif;
  --font-mono:    "JetBrains Mono", monospace;
}

/* =========================================================
   RESET / BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--text-0);
  font-family: var(--font-mono);
  height: 100%;
  overflow-x: hidden;
}

body { -webkit-font-smoothing: antialiased; }

h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin: 0;
}

button {
  font-family: var(--font-mono);
  cursor: pointer;
  /* iOS/Android'de 300ms gecikmeyi kaldırır */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--red-bright);
  outline-offset: 3px;
}

/* =========================================================
   TEXTURE — film grain + scanlines (hafif tutuldu)
   ========================================================= */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 9001;
  pointer-events: none;
  opacity: 0.3;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0,0,0,0.15) 3px,
    transparent 4px
  );
}

/* =========================================================
   LAYOUT / SCREENS
   ========================================================= */
main#app {
  min-height: 100vh;
  position: relative;
}

.screen {
  display: none;
  min-height: 100vh;
  padding: 92px 20px 52px;
  align-items: center;
  justify-content: center;
}

.screen.active {
  display: flex;
  animation: screenIn 0.4s ease both;
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

#screen-boot { padding-top: 24px; }

/* =========================================================
   HUD
   ========================================================= */
.hud {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  background: rgba(9,9,9,0.96);
  border-bottom: 1px solid var(--line);
  /* Tek satır kırmızı alt aksan — göze batmadan RPG hissi */
  box-shadow: inset 0 -1px 0 rgba(168,36,31,0.25);
}

.hud.visible { display: flex; }

.hud-level {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text-0);
  display: flex;
  align-items: baseline;
  gap: 3px;
  flex-shrink: 0;
  /* Soluk kırmızı ışık — çok belirgin değil */
  text-shadow: 0 0 14px rgba(204,59,48,0.3);
}
.hud-level small {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-2);
  letter-spacing: 0.08em;
  font-weight: 700;
}

.hud-xp-track {
  flex: 1;
  height: 5px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.hud-xp-fill {
  height: 100%;
  width: 0%;
  background: var(--red);
  transition: width 0.65s ease;
  position: relative;
}
/* Parlak uç — XP barına derinlik katıyor */
.hud-xp-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--red-bright);
  opacity: 0.8;
}

.hud-achv-btn {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 11px;
  padding: 6px 10px;
  letter-spacing: 0.04em;
  transition: border-color 0.2s, color 0.2s;
}
.hud-achv-btn:hover {
  border-color: var(--red);
  color: var(--text-0);
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--text-2);
  color: var(--text-0);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  padding: 12px 28px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover {
  background: var(--text-0);
  color: var(--bg-0);
}

.btn-primary {
  border-color: var(--red);
  color: var(--red-bright);
}
.btn-primary:hover {
  background: var(--red);
  color: var(--bg-0);
  border-color: var(--red);
}

.btn-back {
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 4px 0;
  margin-bottom: 26px;
  transition: color 0.2s;
}
.btn-back:hover { color: var(--text-0); }

/* =========================================================
   BOOT
   ========================================================= */
.boot-wrap {
  max-width: 480px;
  text-align: center;
  margin: auto;
}

.boot-eyebrow {
  font-size: 10px;
  color: var(--text-2);
  letter-spacing: 0.15em;
  margin: 0 0 18px;
  text-transform: uppercase;
}

.boot-title {
  font-size: clamp(68px, 19vw, 120px);
  line-height: 0.88;
  color: var(--text-0);
  position: relative;
  margin-bottom: 10px;
}

/* Glitch — sadece boot'ta, ince ve kısa */
.boot-title.glitching::before,
.boot-title.glitching::after {
  content: attr(data-text);
  position: absolute;
  left: 0; top: 0; width: 100%;
}
.boot-title.glitching::before {
  color: var(--red-bright);
  transform: translate(2px, 0);
  animation: glitchTop 0.5s steps(2) 2;
  opacity: 0.65;
}
.boot-title.glitching::after {
  color: #4a8fa0;
  transform: translate(-2px, 0);
  animation: glitchBottom 0.5s steps(2) 2;
  opacity: 0.5;
}
@keyframes glitchTop {
  0%   { clip-path: inset(0 0 80% 0); transform: translate(2px,0); }
  50%  { clip-path: inset(40% 0 40% 0); transform: translate(-1px,0); }
  100% { clip-path: inset(80% 0 0 0); transform: translate(1px,0); }
}
@keyframes glitchBottom {
  0%   { clip-path: inset(80% 0 0 0); transform: translate(-2px,0); }
  50%  { clip-path: inset(30% 0 50% 0); transform: translate(1px,0); }
  100% { clip-path: inset(0 0 80% 0); transform: translate(-1px,0); }
}

.boot-sub {
  color: var(--text-1);
  font-size: 13px;
  margin: 0 0 32px;
  letter-spacing: 0.02em;
}

.boot-hint {
  color: var(--text-2);
  font-size: 10px;
  margin-top: 20px;
  letter-spacing: 0.04em;
}

/* =========================================================
   QUEST MENU
   ========================================================= */
.menu-wrap {
  max-width: 640px;
  width: 100%;
  margin: auto;
}

.menu-eyebrow {
  font-size: 10px;
  color: var(--text-2);
  letter-spacing: 0.15em;
  margin: 0 0 4px;
}

.menu-title {
  font-size: 44px;
  margin-bottom: 6px;
  color: var(--text-0);
}

.menu-subtitle {
  font-size: 11px;
  color: var(--text-2);
  margin-bottom: 28px;
  letter-spacing: 0.03em;
}

.quest-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

/* ── Quest Card ──
   Sol borderde ince kırmızı çizgi + hover'da hafif sağa kayma.
   Sade ama RPG karakter listesi hissi veriyor. */
.quest-card {
  position: relative;
  text-align: left;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-left: 3px solid transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  transition: border-left-color 0.2s, background 0.2s, transform 0.18s;
}

.quest-card:not(.locked):hover {
  border-left-color: var(--red);
  background: var(--bg-2);
  transform: translateX(4px);
}

.quest-card-inner {
  padding: 18px 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quest-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.quest-card-title {
  font-family: var(--font-display);
  font-size: 23px;
  letter-spacing: 0.01em;
  color: var(--text-0);
  line-height: 1;
}

.quest-card-status {
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--text-2);
  border: 1px solid var(--line);
  padding: 3px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.quest-card-status.done {
  color: var(--ok-bright);
  border-color: var(--ok);
}

.quest-card-desc {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.55;
}

.quest-card.locked {
  cursor: default;
  opacity: 0.5;
}
.quest-card.locked .quest-card-title { color: var(--text-2); }

/* Kilitli kart: sağda küçük kilit ikonu, sade */
.quest-card.locked .quest-card-status {
  color: var(--text-2);
  border-color: var(--line-soft);
}

.quest-card.shake {
  animation: shake 0.3s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Tamamlanan görev: soluk yeşil sol kenar */
.quest-card.quest-done {
  border-left-color: var(--ok);
}

/* =========================================================
   QUIZ
   ========================================================= */
.quiz-wrap {
  max-width: 560px;
  width: 100%;
  margin: auto;
}

.quiz-eyebrow {
  font-size: 10px;
  color: var(--text-2);
  letter-spacing: 0.15em;
  margin: 0 0 4px;
}

.quiz-title {
  font-size: 34px;
  margin-bottom: 22px;
  color: var(--text-0);
}

.quiz-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.quiz-progress-text {
  font-size: 10px;
  color: var(--text-2);
  white-space: nowrap;
  letter-spacing: 0.05em;
  font-weight: 700;
}
.quiz-progress-track {
  flex: 1;
  height: 3px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--red);
  transition: width 0.4s ease;
}

/* Soru kutusu — ince sol çizgi, soru kutusunu ayırt ettiriyor */
.quiz-question {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
  color: var(--text-0);
  padding: 16px 16px 16px 18px;
  border-left: 2px solid var(--red-dim);
  background: var(--bg-1);
}

.quiz-options {
  display: grid;
  gap: 8px;
}

.quiz-option {
  text-align: left;
  background: var(--bg-1);
  border: 1px solid var(--line);
  color: var(--text-1);
  padding: 13px 16px;
  font-size: 13px;
  letter-spacing: 0.02em;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  cursor: pointer;
}
.quiz-option:hover:not(:disabled) {
  border-color: var(--text-2);
  color: var(--text-0);
  background: var(--bg-2);
}
.quiz-option:disabled { cursor: default; }

.quiz-option.correct {
  border-color: var(--ok);
  color: var(--ok-bright);
  background: rgba(107,156,96,0.07);
}
.quiz-option.wrong {
  border-color: var(--red);
  color: var(--red-bright);
  background: rgba(168,36,31,0.07);
}

.quiz-feedback {
  min-height: 20px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: 0.03em;
}

.quiz-done {
  max-width: 480px;
  width: 100%;
  margin: auto;
  text-align: center;
}
.quiz-done-eyebrow {
  font-size: 10px;
  color: var(--text-2);
  letter-spacing: 0.15em;
  margin: 0 0 6px;
}
.quiz-done h2 {
  font-size: 40px;
  margin-bottom: 12px;
}
.quiz-done p {
  color: var(--text-1);
  font-size: 13px;
  margin-bottom: 30px;
  letter-spacing: 0.02em;
}

/* =========================================================
   SECRET QUEST — Riff Hafızası
   ========================================================= */
.secret-wrap {
  max-width: 420px;
  width: 100%;
  margin: auto;
  text-align: center;
}

.secret-eyebrow {
  font-size: 10px;
  color: var(--red-bright);
  letter-spacing: 0.15em;
  margin: 0 0 4px;
  text-align: left;
}

.secret-title {
  font-size: 40px;
  margin-bottom: 8px;
  text-align: left;
  color: var(--text-0);
}

.secret-sub {
  color: var(--text-1);
  font-size: 12px;
  margin: 0 0 28px;
  text-align: left;
  letter-spacing: 0.02em;
  line-height: 1.6;
}

/* Pad grid — 2x2, daha büyük dokunma alanı + ince köşe vurgusu */
.riff-pads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}

.riff-pad {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background: var(--bg-1);
  transition: background 0.1s, border-color 0.1s, transform 0.1s;
  position: relative;
}
/* Köşe köşe ufak marker — RPG buton hissi */
.riff-pad::before,
.riff-pad::after {
  content: '';
  position: absolute;
  width: 5px;
  height: 5px;
  border-color: var(--line);
  border-style: solid;
  opacity: 0.6;
  transition: border-color 0.1s;
}
.riff-pad::before { top: 4px; left: 4px; border-width: 1px 0 0 1px; }
.riff-pad::after  { bottom: 4px; right: 4px; border-width: 0 1px 1px 0; }

.riff-pad.active {
  background: var(--red-dim);
  border-color: var(--red-bright);
  transform: scale(0.96);
}
.riff-pad.active::before,
.riff-pad.active::after { border-color: var(--red-bright); }

.secret-status {
  min-height: 20px;
  font-size: 12px;
  color: var(--text-1);
  letter-spacing: 0.04em;
}

/* =========================================================
   FINAL
   ========================================================= */
.final-wrap {
  max-width: 480px;
  width: 100%;
  margin: auto;
  text-align: center;
}

.final-eyebrow {
  font-size: 10px;
  color: var(--text-2);
  letter-spacing: 0.15em;
  margin: 0 0 6px;
}

.final-title {
  font-size: 34px;
  margin-bottom: 34px;
  color: var(--text-0);
}

/* Crate — sandık kutusu, dashed border + hover kırmızılanma */
.crate { margin-bottom: 30px; }

.crate-box {
  border: 1px dashed var(--line);
  padding: 56px 20px;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
  position: relative;
}
.crate-box:not([hidden]) { display: flex; }
.crate-box:hover {
  border-color: var(--red);
  background: var(--bg-1);
}

.crate-label {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.07em;
  color: var(--text-0);
}
.crate-hint {
  font-size: 10px;
  color: var(--text-2);
  letter-spacing: 0.08em;
}

.crate-reveal {
  animation: revealIn 0.65s ease both;
}
@keyframes revealIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.gift-img {
  max-width: 100%;
  max-height: 60vh;
  border: 1px solid var(--line);
  display: block;
  margin: 0 auto;
}

.gift-fallback {
  border: 1px dashed var(--line);
  padding: 60px 20px;
  color: var(--text-2);
  font-size: 12px;
}

.final-message {
  margin-top: 30px;
  animation: revealIn 0.6s ease both;
}
.final-message p#final-msg-text {
  color: var(--text-1);
  font-size: 13px;
  margin-bottom: 22px;
  line-height: 1.65;
}
.final-bigline {
  font-size: clamp(30px, 8vw, 48px);
  color: var(--text-0);
  margin-bottom: 14px;
}
.final-closing {
  color: var(--text-2);
  font-size: 11px;
  letter-spacing: 0.03em;
  line-height: 1.5;
}

/* =========================================================
   ACHIEVEMENT PANEL
   ========================================================= */
.achv-panel {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(8,8,8,0.94);
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 88px 20px 40px;
}
.achv-panel:not([hidden]) { display: flex; }

.achv-panel-inner {
  max-width: 480px;
  width: 100%;
}

.achv-eyebrow {
  font-size: 10px;
  color: var(--text-2);
  letter-spacing: 0.15em;
  margin: 0 0 20px;
}

.achv-list { display: grid; gap: 8px; }

.achv-item {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-left: 3px solid transparent;
  background: var(--bg-1);
  padding: 14px 16px;
  transition: border-left-color 0.2s;
}
.achv-item.unlocked { border-left-color: var(--red); }

.achv-mark {
  font-family: var(--font-display);
  font-size: 18px;
  width: 28px;
  text-align: center;
  color: var(--text-2);
  flex-shrink: 0;
}
.achv-item.unlocked .achv-mark { color: var(--red-bright); }

.achv-body strong {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--text-0);
  margin-bottom: 2px;
}
.achv-item:not(.unlocked) .achv-body strong { color: var(--text-1); }

.achv-body span {
  font-size: 11px;
  color: var(--text-2);
}
.achv-item.unlocked .achv-body span { color: var(--text-1); }

/* =========================================================
   TOAST
   ========================================================= */
.xp-toast {
  position: fixed;
  top: 66px;
  left: 50%;
  transform: translate(-50%, -10px);
  z-index: 600;
  background: var(--bg-1);
  border: 1px solid var(--red);
  color: var(--red-bright);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  padding: 8px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
}
.xp-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* =========================================================
   BOOT — terminal
   ========================================================= */
.boot-terminal {
  width: 100%;
  max-width: 430px;
  text-align: left;
  /* Ufak terminal çerçevesi — elle yapılmış his için sade */
  background: var(--bg-1);
  border: 1px solid var(--line);
  padding: 20px 22px 16px;
}

/* Terminal başlık çubuğu (taklidi) */
.boot-terminal::before {
  content: '▸ SYSTEM_INIT';
  display: block;
  font-size: 9px;
  color: var(--text-2);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.boot-terminal-lines {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.boot-terminal-skip {
  margin-top: 20px;
  font-size: 10px;
  color: var(--text-2);
  opacity: 0;
  animation: fadeInSkip 0.4s ease 1.4s forwards;
  letter-spacing: 0.06em;
  text-align: center;
}
@keyframes fadeInSkip {
  to { opacity: 1; }
}

.boot-term-line {
  font-size: 12px;
  color: var(--text-1);
  min-height: 16px;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.boot-cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: var(--red-bright);
  margin-left: 2px;
  vertical-align: middle;
  animation: cursorBlink 0.75s steps(1) infinite;
}
@keyframes cursorBlink {
  50% { opacity: 0; }
}

.boot-reveal {
  text-align: center;
  animation: revealIn 0.5s ease both;
}

@media (prefers-reduced-motion: reduce) {
  .boot-terminal { display: none; }
}

/* =========================================================
   HUD — ses / mağaza butonları
   ========================================================= */
.hud-mute-btn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 13px;
  transition: border-color 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hud-mute-btn:hover {
  border-color: var(--red);
  color: var(--text-0);
}
.hud-mute-btn.muted {
  color: var(--text-2);
  opacity: 0.5;
}

.hud-store-btn {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 14px;
  padding: 5px 9px;
  transition: border-color 0.2s, color 0.2s;
}
.hud-store-btn:hover {
  border-color: var(--red);
  color: var(--text-0);
}

.hud-title-badge {
  flex-shrink: 0;
  font-size: 9px;
  letter-spacing: 0.07em;
  color: var(--red-bright);
  border: 1px solid var(--red);
  padding: 3px 7px;
  white-space: nowrap;
}

/* =========================================================
   MAĞAZA
   ========================================================= */
.store-balance {
  font-size: 12px;
  color: var(--text-1);
  border: 1px solid var(--line);
  background: var(--bg-1);
  padding: 10px 14px;
  margin-bottom: 20px;
}
.store-balance span {
  color: var(--red-bright);
  font-family: var(--font-display);
  font-size: 17px;
  margin-right: 4px;
}

.store-list { display: grid; gap: 10px; }

.store-item {
  border: 1px solid var(--line);
  border-left: 2px solid transparent;
  background: var(--bg-1);
  padding: 16px;
  transition: border-left-color 0.2s;
}
.store-item:hover { border-left-color: var(--red-dim); }

.store-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.store-item-title {
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--text-0);
}

.store-item-cost {
  font-size: 10px;
  color: var(--text-2);
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid var(--line);
  padding: 3px 7px;
  letter-spacing: 0.04em;
}

.store-item-desc {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.55;
  margin-bottom: 12px;
}

.store-item-content {
  font-size: 12px;
  color: var(--ok-bright);
  border-left: 2px solid var(--ok);
  padding-left: 10px;
  margin-bottom: 12px;
  line-height: 1.55;
}

.store-buy-btn {
  background: transparent;
  border: 1px solid var(--red);
  color: var(--red-bright);
  font-size: 12px;
  padding: 8px 16px;
  letter-spacing: 0.04em;
  transition: background 0.2s, color 0.2s;
}
.store-buy-btn:hover:not(:disabled) {
  background: var(--red);
  color: var(--bg-0);
}
.store-buy-btn:disabled {
  border-color: var(--line);
  color: var(--text-2);
  cursor: default;
}

.store-owned-tag {
  font-size: 11px;
  color: var(--ok-bright);
  border: 1px solid var(--ok);
  padding: 5px 12px;
  display: inline-block;
  letter-spacing: 0.04em;
}

.store-toggle-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 11px;
  padding: 8px 14px;
  margin-top: 4px;
  transition: border-color 0.2s, color 0.2s;
}
.store-toggle-btn:hover {
  border-color: var(--text-1);
  color: var(--text-0);
}

/* =========================================================
   ADMIN — tetikleyici nokta
   ========================================================= */
.admin-dot {
  position: fixed;
  bottom: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  border: none;
  opacity: 0.2;
  z-index: 9500;
  padding: 0;
  transition: opacity 0.2s;
}
.admin-dot:hover { opacity: 0.65; }
.admin-dot::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-0);
}

/* =========================================================
   ADMIN — panel
   ========================================================= */
.admin-panel {
  position: fixed;
  inset: 0;
  z-index: 9600;
  background: rgba(6,6,6,0.98);
  overflow-y: auto;
  padding: 60px 20px;
}

.admin-panel-inner {
  max-width: 560px;
  margin: auto;
}

.admin-eyebrow {
  font-size: 10px;
  color: var(--red-bright);
  letter-spacing: 0.15em;
  margin: 0 0 6px;
}

.admin-title {
  font-size: 32px;
  margin-bottom: 14px;
}

.admin-note {
  font-size: 12px;
  color: var(--text-1);
  line-height: 1.6;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  background: var(--bg-1);
  padding: 12px 14px;
}
.admin-note code {
  color: var(--text-0);
  background: var(--bg-2);
  padding: 1px 5px;
  font-size: 11px;
}

.admin-list {
  display: grid;
  gap: 14px;
  margin-bottom: 30px;
}

.admin-row {
  border: 1px solid var(--line);
  background: var(--bg-1);
  padding: 14px;
}

.admin-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.admin-row-top strong {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-0);
}

.admin-tag {
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--ok-bright);
  border: 1px solid var(--ok);
  padding: 2px 7px;
  white-space: nowrap;
}
.admin-tag-empty {
  color: var(--text-2);
  border-color: var(--line);
}

.admin-row-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.admin-preview-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 1px solid var(--line);
}
.admin-preview-video {
  width: 120px;
  border: 1px solid var(--line);
}
.admin-preview-audio {
  height: 32px;
  max-width: 200px;
}

.admin-file-input {
  font-size: 11px;
  color: var(--text-1);
  max-width: 100%;
}

.admin-remove-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 11px;
  padding: 6px 10px;
  transition: border-color 0.2s, color 0.2s;
}
.admin-remove-btn:hover {
  border-color: var(--red);
  color: var(--red-bright);
}

.admin-export-btn {
  width: 100%;
  text-align: center;
}

.admin-row-meta {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.admin-icon-input {
  width: 52px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text-0);
  font-size: 14px;
  text-align: center;
  padding: 7px 4px;
}
.admin-caption-input {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text-0);
  font-size: 12px;
  padding: 7px 10px;
}
.admin-icon-input:focus, .admin-caption-input:focus {
  border-color: var(--red);
  outline: none;
}

.quest-card-caption {
  font-size: 11px;
  color: var(--text-2);
  padding: 0 16px 4px;
}

.admin-media-caption {
  font-size: 12px;
  color: var(--text-1);
  margin-top: 8px;
}

.admin-danger-zone {
  margin-top: 30px;
  border: 1px dashed var(--line);
  padding: 16px;
}
.admin-danger-title {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text-1);
  margin: 0 0 8px;
}
.admin-danger-note {
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.5;
  margin: 0 0 12px;
}
.admin-danger-btn {
  background: transparent;
  border: 1px solid var(--red);
  color: var(--red-bright);
  font-size: 12px;
  padding: 9px 16px;
  transition: background 0.2s, color 0.2s;
}
.admin-danger-btn:hover {
  background: var(--red);
  color: var(--bg-0);
}

.admin-section-divider {
  height: 1px;
  background: var(--line);
  margin: 32px 0 24px;
}

.admin-store-form {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.admin-store-form-row {
  display: flex;
  gap: 10px;
}

.admin-store-icon-input {
  width: 56px;
  flex-shrink: 0;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text-0);
  font-size: 16px;
  text-align: center;
  padding: 10px 4px;
}

.admin-store-title-input,
.admin-store-cost-input,
.admin-store-type-select,
.admin-store-textarea {
  flex: 1;
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text-0);
  font-size: 12px;
  font-family: var(--font-mono);
  padding: 10px 12px;
}

.admin-store-textarea { resize: vertical; }

.admin-store-form-row .admin-store-cost-input {
  max-width: 130px;
}

.admin-store-add-btn { justify-self: start; }

.admin-store-list {
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
}

.admin-store-item-desc {
  font-size: 11px;
  color: var(--text-2);
  margin-bottom: 10px;
}

/* =========================================================
   STORE — reveal media
   ========================================================= */
.store-item-media-img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  margin-top: 10px;
  background: var(--bg-1);
}

.store-item-video-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  margin-top: 10px;
  overflow: hidden;
  background: #000;
}

.store-item-video-wrap iframe,
.store-item-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

.store-item-video-standalone {
  display: block;
  width: 100%;
  max-height: 280px;
  margin-top: 10px;
  background: #000;
}

/* =========================================================
   QUEST CARD COVER
   ========================================================= */
.quest-card-cover {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
  display: block;
}

/* =========================================================
   FINAL — ses butonu
   ========================================================= */
.final-audio-btn {
  margin-top: 18px;
  font-size: 12px;
  padding: 10px 20px;
}

/* =========================================================
   KONFETİ
   ========================================================= */
.confetti-piece {
  position: fixed;
  top: -20px;
  width: 8px;
  height: 14px;
  z-index: 9800;
  pointer-events: none;
  opacity: 0.9;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  to {
    transform: translateY(110vh) rotate(540deg);
    opacity: 0.2;
  }
}

/* =========================================================
   ALTERNATİF TEMA (mağazadan açılan yeşil vurgu)
   ========================================================= */
body.theme-alt {
  --red:        #2f8f5b;
  --red-bright: #3fbf78;
  --red-dim:    #1c5e3b;
}

/* =========================================================
   MOBİL — dokunmatik uyum
   ========================================================= */
@media (min-width: 600px) {
  .quest-grid { grid-template-columns: 1fr 1fr; }
}

/* 480px ve altı: küçük telefon ayarları */
@media (max-width: 480px) {
  .screen { padding: 80px 14px 40px; }
  #screen-boot { padding-top: 16px; }

  .menu-title { font-size: 36px; }
  .menu-subtitle { font-size: 10px; margin-bottom: 20px; }

  .quest-card-title { font-size: 20px; }
  .quest-card-inner { padding: 14px 14px 14px 12px; }

  /* Quiz seçenekleri — daha büyük dokunma alanı */
  .quiz-option { padding: 15px 14px; font-size: 13px; min-height: 48px; }
  .quiz-question { font-size: 15px; padding: 14px; }

  /* Riff padler — küçük ekranda yeterince büyük kalsın */
  .riff-pads { gap: 8px; }
  .riff-pad { min-height: 72px; }

  .boot-wrap { padding: 0 4px; }
  .boot-terminal { padding: 16px; }
  .boot-title { margin-bottom: 8px; }

  /* HUD — sıkışmayı önle */
  .hud { gap: 7px; padding: 9px 12px; }
  .hud-level { font-size: 19px; }
  .hud-xp-track { min-width: 0; }
  .hud-achv-btn { font-size: 10px; padding: 5px 8px; }
  .hud-store-btn { font-size: 13px; padding: 4px 7px; }
  .hud-mute-btn { width: 28px; height: 28px; font-size: 12px; }

  .final-bigline { font-size: clamp(26px, 7vw, 38px); }

  .achv-panel { padding: 80px 14px 30px; }
  .achv-item { padding: 12px 14px; gap: 10px; }

  .btn { padding: 12px 22px; font-size: 12px; }

  .quiz-title { font-size: 28px; }
  .quiz-done h2 { font-size: 32px; }
}

/* Çok küçük ekranlar (360px ve altı) */
@media (max-width: 360px) {
  .screen { padding: 76px 10px 36px; }
  .hud { gap: 5px; padding: 8px 10px; }
  .hud-level { font-size: 17px; }
  .hud-achv-btn { font-size: 9px; padding: 4px 7px; }
  .hud-store-btn { font-size: 12px; padding: 3px 6px; }
  .hud-mute-btn { width: 26px; height: 26px; font-size: 11px; }
  .quiz-option { padding: 13px 12px; }
  .riff-pad { min-height: 64px; }
  .boot-terminal { padding: 13px; }
  .boot-terminal-lines { gap: 7px; }
  .boot-term-line { font-size: 11px; }
}

/* Yatay mod (landscape) — kısa ekranlar için */
@media (max-height: 500px) and (orientation: landscape) {
  .screen { padding: 68px 20px 24px; min-height: 100vh; }
  #screen-boot { padding-top: 10px; }
  .boot-terminal { max-height: 60vh; overflow-y: auto; }
  .riff-pads { gap: 7px; }
  .riff-pad { min-height: 60px; }
  .hud { padding: 8px 16px; }
}

/* Orta tablet aralığı */
@media (max-width: 640px) {
  .quiz-wrap { max-width: 100%; }
  .menu-wrap { max-width: 100%; }
  .secret-wrap { max-width: 100%; }
  .final-wrap { max-width: 100%; }
}
