:root {
  --bg: #050814;
  --panel: rgba(10, 14, 36, 0.9);
  --accent: #ff4e8a;
  --accent-soft: #ffb3d0;
  --text: #f6f7ff;
  --text-muted: #9da2c9;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: "Pixelify Sans", system-ui, sans-serif;
}

body {
  background: #050716;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-ui,
.game-ui button,
.game-ui span {
  font-family: "Pixelify Sans", system-ui, sans-serif;
}

/* Ana wrapper */

.game-wrapper {
  width: 100%;
  max-width: 1400px;
  height: 100vh;
  max-height: 820px;
  position: relative;
  padding: 24px;
}

/* Ekranlar */

.screen {
  position: absolute;
  inset: 24px;
  background: rgba(10, 14, 36, 0.55);
  border-radius: 18px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  padding: 32px;
  display: none;
}

.screen--active {
  display: block;
}

/* Menü */

.game-title {
  font-size: 56px;
  margin: 0 0 16px;
  letter-spacing: 0.12em;
}

/* --- MENU LAYOUT + BANNER --- */

.menu-layout {
  display: flex;
  gap: 56px;
  height: 100%;
  align-items: center;
  justify-content: space-between;
}

.menu-left {
  flex: 0 0 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.menu-right {
  flex: 0 0 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-banner-img {
  width: 100%;
  max-width: 520px;
  max-height: 320px;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55);
  image-rendering: pixelated;
}

/* Küçük ekranlarda menüyü üst-üstte göster */
@media (max-width: 900px) {
  .menu-layout {
    flex-direction: column;
  }

  .menu-right {
    margin-top: 24px;
  }

  .menu-left {
    flex: 0 0 auto;
  }
}

.menu-ship {
  margin-bottom: 32px;
  font-size: 14px;
  color: var(--text-muted);
}

.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 220px;
}

.menu-buttons button {
  padding: 10px 18px;
  border-radius: 999px;
  background: #141731;
  border: 1px solid var(--accent-soft);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  text-align: left;
  transition: background 0.15s ease-out, transform 0.08s ease-out;
  font-family: "Pixelify Sans", system-ui, sans-serif;
  letter-spacing: 0.04em;
}

.menu-buttons button:hover {
  background: #1f2240;
  transform: translateY(-1px);
}

.menu-hint {
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Oyun ekranı */

#game-canvas {
  width: 100%;
  height: calc(100% - 40px);
  border-radius: 12px;
  background: #000;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* HUD */

.hud {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 8px;
  font-size: 14px;
}

/* Kalpler solda, kendi sprite'ından */
.hud-lives {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 90px;
}

.hud-heart {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Ortak overlay buton */

.btn-overlay {
  position: absolute;
  bottom: 32px;
  right: 32px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(0,0,0,0.7);
  color: var(--text);
  border: 1px solid var(--accent-soft);
  cursor: pointer;
  font-size: 13px;
  font-family: "Pixelify Sans", system-ui, sans-serif;
  letter-spacing: 0.04em;
}

.btn-overlay:hover {
  background: rgba(0,0,0,0.9);
}

/* Upgrades & Controls basic layout */

#upgrades h2,
#controls h2 {
  margin-top: 0;
}

#controls ul {
  padding-left: 18px;
  font-size: 14px;
}

/* Küçük ekranlar */

@media (max-width: 768px) {
  .screen {
    padding: 20px;
    inset: 16px;
  }

  .game-title {
    font-size: 40px;
  }
}

/* GAME LAYOUT: sol panel + sağ oyun alanı */
#game .game-layout {
  display: flex;
  height: 100%;
  gap: 24px;
}

/* Sol panel */
.upgrade-panel {
  width: 260px;
  background: radial-gradient(circle at top left, #181a3b 0, #050814 70%);
  border-radius: 14px;
  padding: 16px 18px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.upgrade-title {
  font-size: 18px;
  letter-spacing: 0.08em;
  color: var(--accent-soft);
  margin: 0 0 12px;
}

.upgrade-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.4;
}

.upgrade-list li + li {
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 12px;
}

.upgrade-list h3 {
  font-size: 13px;
  margin: 0 0 4px;
  color: var(--text);
}

.upgrade-list p {
  margin: 2px 0;
}

/* Sağ ana oyun alanı */
.game-main {
  flex: 1;
  position: relative;
}

/* Canvas artık dikeyde esnesin */
#game-canvas {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background: #000;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* HUD overlay */
#game .hud {
  position: absolute;
  top: 14px;
  left: 20px;
  right: auto;      /* sağa yayılmasın, solda kalsın */
  display: flex;
  align-items: center;
  justify-content: flex-start; /* üçü yanyana, soldan başlasın */
  gap: 24px;
  margin: 0;
  font-size: 16px;
  font-family: "Pixelify Sans", system-ui, sans-serif;
  text-shadow: 0 0 4px rgba(0,0,0,0.7);
  pointer-events: none;
}


#game .hud span {
  pointer-events: none;
}

.hud-lives {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 90px;
}

.hud-heart {
  width: 26px;
  height: 26px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Score / Coins / Best */
#hud-score,
#hud-coins,
#hud-best
#hud-best {
  font-size: 17px;
}

#hud-best {
  margin-left: auto;          /* sağ tarafa yasla */
  color: var(--accent-soft);  /* biraz öne çıksın */
}

.page-title {
  margin-top: 0;
  font-size: 28px;
  letter-spacing: 0.18em;
}

.upgrades-content {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 640px;
  font-size: 14px;
}

.upgrade-card {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.upgrade-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.upgrade-card p {
  margin: 4px 0;
}

/* Achievements panel */

.achievements-panel {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.achievements-panel-title {
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 10px;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.achievement-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(0,0,0,0.12);
  border: 1px solid rgba(255,255,255,0.08);
  opacity: 0.25;
  transition: opacity 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.achievement-card .achievement-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(0,0,0,0.6);
  box-shadow: 0 0 0 2px #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.achievement-card .achievement-icon img {
  width: 22px;
  height: 22px;
  image-rendering: pixelated;
}

.achievement-label {
  font-size: 11px;
  line-height: 1.2;
  color: var(--text-muted);
}

.achievement-card.achievement--unlocked {
  opacity: 1;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.65);
  transform: translateY(-1px);
}

.achievement-card.achievement--unlocked .achievement-label {
  color: var(--text);
}

/* --- CONTROLS PAGE LAYOUT --- */

.controls-inner {
  display: flex;
  gap: 48px;
  height: 100%;
}

.controls-text {
  max-width: 360px;
  font-size: 14px;
}

.controls-intro {
  margin-top: 8px;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.controls-list {
  padding-left: 18px;
  margin-top: 0;
  margin-bottom: 16px;
}

.controls-note {
  font-size: 13px;
  color: var(--text-muted);
}

.controls-card-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-content: flex-start;
}

.controls-card {
  background: rgba(10, 14, 36, 0.9);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-size: 14px;
  line-height: 1.5;
}

.controls-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

/* Daha dar ekranlarda tek sütun */
@media (max-width: 900px) {
  .controls-inner {
    flex-direction: column;
  }

  .controls-card-grid {
    grid-template-columns: 1fr;
  }
}

.audio-wrapper {
  position: absolute;
  top: 28px;
  right: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.audio-btn {
  position: static;       
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 18px;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.audio-btn:hover {
  background: rgba(0,0,0,0.7);
}
.menu-ship {
  margin-bottom: 32px;
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-ship-img {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.menu-title-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

.menu-ship-img {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
}
.audio-levels {
  position: static;     
  display: flex;
  gap: 6px;
}

.vol-btn {
  padding: 4px 10px;
  font-size: 12px;
  background: rgba(0,0,0,0.45);
  border: 1px solid var(--accent-soft);
  color: white;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Pixelify Sans", sans-serif;
  letter-spacing: 0.04em;
  transition: background 0.15s ease-out;
}

.vol-btn:hover {
  background: rgba(0,0,0,0.7);
}

.vol-btn.active {
  background: var(--accent);
  border-color: white;
  color: #fff;
}
.audio-permission {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.audio-permission__box {
  background: #101020;
  border: 2px solid var(--accent-soft, #6cf);
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
  text-align: center;
  font-family: "Pixelify Sans", system-ui, sans-serif;
  color: #fff;
}

.audio-permission__buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.audio-permission__buttons button {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--accent-soft, #6cf);
  background: #000;
  color: #fff;
  cursor: pointer;
  font-family: "Pixelify Sans", system-ui, sans-serif;
}

.audio-permission__buttons button:hover {
  background: var(--accent-soft, #6cf);
  color: #000;
}
