@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=JetBrains+Mono:wght@400;500;600&family=Space+Mono:wght@400;700&family=Lora:ital,wght@0,600;1,500&family=Press+Start+2P&display=swap');

:root {
  --bg:            #f5f3ee;
  --surface:       #ffffff;
  --surface2:      #eeece6;
  --surface3:      #e6e3da;
  --border:        #dddad0;
  --border-strong: #c4c0b4;
  --text-bright:   #1c1a15;
  --text-dim:      #6a6760;
  --text-3:        #a09d96;
  --accent:        #3d7a52;
  --accent-mid:    #52a06d;
  --accent-light:  #e6f3eb;
  --accent-border: #aed4bc;
  --gold:          #ffd166;
  --danger:        #b84040;
  --deck-bg:       #f2f0ea;
  --deck-hover:    #e6e3da;
  --sh:            0 1px 4px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --sh-md:         0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --r:             8px;
  --rl:            14px;
  --blob1: rgba(70,175,105,0.22);
  --blob2: rgba(150,215,130,0.18);
  --blob3: rgba(255,200,100,0.16);
}

[data-theme="dark"] {
  --bg:            #131210;
  --surface:       #1b1a17;
  --surface2:      #222018;
  --surface3:      #2a2820;
  --border:        #2e2c25;
  --border-strong: #3e3c33;
  --text-bright:   #e6e3d8;
  --text-dim:      #8a8880;
  --text-3:        #565450;
  --accent:        #5cbd78;
  --accent-mid:    #4da864;
  --accent-light:  #152014;
  --accent-border: #2a4a30;
  --deck-bg:       #222018;
  --deck-hover:    #2a2925;
  --blob1: rgba(60,160,100,0.22);
  --blob2: rgba(40,110,65,0.17);
  --blob3: rgba(130,100,30,0.14);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
}

html, body {
  user-select: none;
  -webkit-user-select: none;
}

body {
  background: var(--bg);
  color: var(--text-bright);
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  line-height: 1.4;
  overflow-x: hidden;
  position: relative;
  transition: background 0.25s, color 0.25s;
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

header {
  text-align: center;
}

.title {
  font-family: 'Bebas Neue', sans-serif;
  color: var(--text-bright);
  letter-spacing: 0.08em;
  line-height: 1;
}

.subtitle {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  margin-top: 6px;
}

button, input, select, textarea {
  font: inherit;
}

button {
  -webkit-appearance: none;
  appearance: none;
}

/* ════════════════════════════════════════
   SHARED COMPONENT STYLES
════════════════════════════════════════ */

.mode-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--sh);
}
.mode-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 6px 18px;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.mode-toggle-btn:hover { color: var(--text-bright); }
.mode-toggle-btn.active {
  background: var(--accent);
  color: #fff;
  border-radius: 22px;
}

.ctrl-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--sh);
}
.ctrl-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 7px 16px;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.ctrl-btn:hover { color: var(--text-bright); }
.ctrl-btn.active {
  background: var(--accent);
  color: #fff;
  border-radius: 20px;
}
.ctrl-divider { width: 1px; height: 28px; background: var(--border); flex-shrink: 0; }

.label-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 34px; height: 34px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  box-shadow: var(--sh);
  transition: border-color 0.2s ease;
}
.label-btn:hover { border-color: var(--border-strong); }

/* ════════════════════════════════════════
   CLOSE BUTTON (return to paths)
════════════════════════════════════════ */
.close-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 38px;
  height: 38px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  box-shadow: var(--sh);
  transition: all 0.15s;
}
.close-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-bright);
  box-shadow: var(--sh-md);
}

/* ════════════════════════════════════════
   THEME TOGGLE BUTTON
════════════════════════════════════════ */
.theme-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  box-shadow: var(--sh);
  transition: all 0.15s;
  font-size: 0.8rem;
  font-family: inherit;
  white-space: nowrap;
}
.theme-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-bright);
}
.theme-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
