/* ============================================================
   Coin Strike Wise Orchard — mintquarters.pro
   Unique colour palette: deep ocean navy + gold + teal accent
   ============================================================ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0B1520;
  --bg2:         #0E1D2E;
  --bg3:         #122338;
  --border:      #1E3A52;
  --gold:        #D4A017;
  --gold-light:  #F0C040;
  --gold-dim:    #8A6510;
  --teal:        #1ABCB0;
  --teal-dim:    #0E7A74;
  --text:        #D8E8F0;
  --text-dim:    #7A9BB0;
  --red:         #E03050;
  --green:       #28C870;
  --overlay-bg:  rgba(8, 16, 28, 0.92);
  --font-main:   'Segoe UI', system-ui, sans-serif;
  --font-game:   'Courier New', Courier, monospace;
  --radius:      6px;
  --shadow:      0 4px 24px rgba(0,0,0,0.55);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

/* ── Header ── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.4rem;
  background: var(--bg2);
  border-bottom: 2px solid var(--gold-dim);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.logo {
  font-family: var(--font-game);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
}

.logo span {
  color: var(--gold);
}

nav {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}

nav a:hover, nav a.active {
  color: var(--gold-light);
  background: rgba(212,160,23,0.12);
}

/* ── Lang Switcher ── */
#lang-switcher {
  position: relative;
}

#lang-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.8rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s;
}

#lang-btn:hover { border-color: var(--gold); }

#lang-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 130px;
  box-shadow: var(--shadow);
  z-index: 200;
  max-height: 260px;
  overflow-y: auto;
}

#lang-dropdown.open { display: block; }

#lang-dropdown button {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.82rem;
  padding: 0.45rem 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

#lang-dropdown button:hover { background: rgba(26,188,176,0.15); }

/* ── Game Section ── */
#game-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.8rem 1rem 1.2rem;
  gap: 0.7rem;
}

/* ── HUD ── */
#hud {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 780px;
}

.hud-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.3rem 0.7rem;
  min-width: 60px;
}

.hud-label {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
}

.hud-value {
  font-family: var(--font-game);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold-light);
}

#action-btn {
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  color: #0B1520;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-game);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.45rem 1.1rem;
  cursor: pointer;
  transition: filter 0.2s, transform 0.1s;
  text-transform: uppercase;
}

#action-btn:hover { filter: brightness(1.2); transform: translateY(-1px); }
#action-btn:active { transform: translateY(0); }

/* ── Game Stage ── */
#game-stage {
  position: relative;
  width: 100%;
  max-width: 780px;
}

#canvas-wrap {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg2);
  box-shadow: 0 0 32px rgba(26,188,176,0.08);
}

#game-canvas {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Overlay ── */
#overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  background: var(--overlay-bg);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  backdrop-filter: blur(2px);
}

.overlay-icon {
  font-size: 3rem;
  line-height: 1;
  filter: drop-shadow(0 0 12px var(--gold));
}

.overlay-title {
  font-family: var(--font-game);
  font-size: clamp(1.1rem, 4vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--gold-light);
  text-shadow: 0 0 20px rgba(212,160,23,0.5);
}

.overlay-sub {
  font-size: 0.9rem;
  color: var(--text-dim);
  max-width: 420px;
  line-height: 1.5;
}

.overlay-btn {
  background: linear-gradient(135deg, var(--teal-dim), var(--teal));
  color: #0B1520;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-game);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 0.65rem 2rem;
  cursor: pointer;
  transition: filter 0.2s, transform 0.1s;
  text-transform: uppercase;
  box-shadow: 0 0 16px rgba(26,188,176,0.35);
}

.overlay-btn:hover { filter: brightness(1.15); transform: translateY(-2px); }
.overlay-btn:active { transform: translateY(0); }

/* ── Game Hint ── */
#game-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-align: center;
  max-width: 600px;
  line-height: 1.5;
}

/* ── Policy / Content Pages ── */
.policy-container {
  max-width: 820px;
  margin: 2rem auto;
  padding: 2rem 1.5rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.policy-container h2 {
  font-family: var(--font-game);
  font-size: 1.5rem;
  color: var(--gold-light);
  margin-bottom: 1.2rem;
  letter-spacing: 0.08em;
}

.policy-container h3 {
  font-size: 0.95rem;
  color: var(--teal);
  margin: 1.2rem 0 0.4rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.policy-container p {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
  line-height: 1.65;
}

.policy-container a {
  color: var(--gold);
  text-decoration: none;
}

.policy-container a:hover { text-decoration: underline; }

/* ── Footer ── */
footer {
  text-align: center;
  padding: 0.9rem 1rem;
  font-size: 0.78rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  background: var(--bg2);
  letter-spacing: 0.04em;
}

/* ── Cookie Banner ── */
#cookie-banner {
  display: none;
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(96vw, 560px);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 9999;
  padding: 1rem 1.2rem;
}

#cookie-banner.visible { display: block; }

#cookie-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--gold-light);
  margin-bottom: 0.4rem;
}

#cookie-body {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 0.8rem;
}

#cookie-body a { color: var(--gold); text-decoration: none; }
#cookie-body a:hover { text-decoration: underline; }

#cookie-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

#cookie-accept-btn {
  background: linear-gradient(135deg, var(--teal-dim), var(--teal));
  color: #0B1520;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  padding: 0.4rem 1.1rem;
  cursor: pointer;
  transition: filter 0.2s;
}

#cookie-accept-btn:hover { filter: brightness(1.15); }

#cookie-decline-btn {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  padding: 0.4rem 1.1rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

#cookie-decline-btn:hover { border-color: var(--text-dim); color: var(--text); }

/* ── Combo / Flash Notifications ── */
.combo-flash {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-game);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-light);
  text-shadow: 0 0 24px var(--gold);
  pointer-events: none;
  animation: flashFade 1s ease-out forwards;
  z-index: 50;
}

@keyframes flashFade {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
  100% { opacity: 0; transform: translate(-50%, -80%) scale(0.9); }
}

/* ── Responsive ── */
@media (max-width: 600px) {
  header { padding: 0.5rem 0.8rem; }
  .logo { font-size: 0.9rem; }
  nav a { font-size: 0.72rem; padding: 0.25rem 0.4rem; }
  .hud-cell { min-width: 48px; padding: 0.25rem 0.4rem; }
  .hud-value { font-size: 0.95rem; }
  .overlay-btn { font-size: 0.88rem; padding: 0.55rem 1.4rem; }
  .policy-container { margin: 0.8rem; padding: 1.2rem 1rem; }
}

/* ── Hidden utility ── */
.hidden { display: none !important; }
