/* ============================================
   GRINDVEIL — Idle RPG
   Classic Fantasy Theme | Mobile-First
   ============================================ */

/* --- CSS Variables --- */
:root {
  --bg: #1a1510;
  --bg-lighter: #211b14;
  --surface: #241e16;
  --surface-hover: #2d2519;
  --border: rgba(200, 168, 78, 0.15);
  --border-strong: rgba(200, 168, 78, 0.35);
  --gold: #c8a84e;
  --gold-dim: #8b7235;
  --gold-glow: rgba(200, 168, 78, 0.25);
  --text: #d4c4a0;
  --text-dim: #8a7b65;
  --text-bright: #f0e6cc;
  --hp-red: #c0392b;
  --hp-bg: #2a2218;
  --xp-blue: #3498db;
  --common: #9e9e9e;
  --uncommon: #4caf50;
  --rare: #2196f3;
  --epic: #9c27b0;
  --legendary: #ff9800;
  --font-display: 'Cinzel', serif;
  --font-body: 'Inter', sans-serif;
  --radius: 8px;
  --radius-lg: 12px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* --- Base --- */
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--gold);
  line-height: 1.2;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

input {
  font-family: var(--font-body);
  outline: none;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--gold-dim);
  border-radius: 4px;
}

/* ============================================
   CHARACTER CREATION SCREEN
   ============================================ */

#createScreen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  text-align: center;
}

.create-logo {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 6px;
  text-shadow: 0 0 30px var(--gold-glow), 0 2px 4px rgba(0,0,0,0.5);
  margin-bottom: 4px;
}

.create-tagline {
  font-size: 14px;
  color: var(--text-dim);
  font-style: italic;
  margin-bottom: 32px;
}

.create-section-label {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--gold-dim);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

/* Name Input */
.name-input-wrap {
  width: 100%;
  max-width: 320px;
  margin-bottom: 28px;
}

.name-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-bright);
  font-size: 16px;
  text-align: center;
  transition: border-color 0.2s;
}

.name-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 12px var(--gold-glow);
}

.name-input::placeholder {
  color: var(--text-dim);
}

/* Class Cards */
.class-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 360px;
  margin-bottom: 28px;
}

.class-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 10px 12px;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  cursor: pointer;
  min-height: 44px;
}

.class-card:active {
  transform: scale(0.97);
}

.class-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 16px var(--gold-glow), inset 0 0 20px rgba(200,168,78,0.05);
}

.class-icon {
  font-size: 32px;
  margin-bottom: 6px;
  display: block;
}

.class-name {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--gold);
  margin-bottom: 4px;
}

.class-desc {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 8px;
  line-height: 1.3;
}

.class-stats {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.6;
}

.class-stats span {
  display: block;
}

.stat-highlight {
  color: var(--gold);
  font-weight: 600;
}

/* Begin Button */
.btn-begin {
  width: 100%;
  max-width: 320px;
  padding: 16px;
  background: linear-gradient(135deg, var(--gold), #a88b3a);
  color: #1a1510;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius);
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  min-height: 52px;
}

.btn-begin:active {
  transform: scale(0.97);
}

.btn-begin:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-begin:not(:disabled):hover {
  box-shadow: 0 4px 20px var(--gold-glow);
}

.create-error {
  color: var(--hp-red);
  font-size: 13px;
  margin-top: 8px;
  min-height: 20px;
}

/* ============================================
   GAME SCREEN
   ============================================ */

#gameScreen {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  overflow: hidden;
}

/* --- Top Bar --- */
#topBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-strong);
  flex-shrink: 0;
  min-height: 48px;
}

.top-char {
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-char-name {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-bright);
}

.top-char-level {
  font-size: 12px;
  color: var(--gold);
  font-weight: 600;
  background: rgba(200,168,78,0.12);
  padding: 2px 8px;
  border-radius: 10px;
}

.top-gold {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gold);
}

.top-gold-icon {
  font-size: 16px;
}

.top-zone {
  font-size: 11px;
  color: var(--text-dim);
  max-width: 100px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Battle Area --- */
#battleArea {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.monster-zone-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}

.monster-name {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text-bright);
  margin-bottom: 2px;
}

.monster-level {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.monster-icon {
  font-size: 80px;
  line-height: 1;
  margin-bottom: 12px;
  transition: transform 0.1s;
  user-select: none;
}

.monster-icon.hit {
  transform: scale(0.92);
}

/* HP Bar */
.hp-bar-wrap {
  width: 100%;
  max-width: 280px;
  margin-bottom: 8px;
}

.hp-bar-outer {
  width: 100%;
  height: 18px;
  background: var(--hp-bg);
  border-radius: 9px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(192,57,43,0.3);
}

.hp-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, #e74c3c, var(--hp-red));
  border-radius: 9px;
  transition: width 0.15s ease-out;
  position: relative;
}

.hp-bar-inner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.15), transparent);
  border-radius: 9px 9px 0 0;
}

.hp-bar-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  white-space: nowrap;
}

.battle-dps {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
}

.battle-dps strong {
  color: var(--gold);
}

/* Floating Damage Numbers */
.dmg-float {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--gold);
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
  pointer-events: none;
  animation: floatUp 0.9s ease-out forwards;
  z-index: 10;
}

.dmg-float.crit {
  font-size: 26px;
  color: #ff6b6b;
}

@keyframes floatUp {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-70px) scale(0.8);
  }
}

/* Level Up Animation */
.level-up-flash {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 100;
  animation: levelUpGlow 1.2s ease-out forwards;
}

@keyframes levelUpGlow {
  0% {
    background: rgba(200,168,78,0.3);
  }
  100% {
    background: rgba(200,168,78,0);
  }
}

.level-up-text {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 20px var(--gold-glow);
  pointer-events: none;
  z-index: 101;
  animation: levelUpPulse 1.2s ease-out forwards;
  white-space: nowrap;
}

@keyframes levelUpPulse {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.15);
  }
  40% {
    transform: translate(-50%, -50%) scale(1);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1) translateY(-20px);
  }
}

/* Loot Drop Notification */
.loot-notify {
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 10px 18px;
  font-size: 13px;
  color: var(--text-bright);
  z-index: 90;
  animation: lootSlideUp 2s ease-out forwards;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.loot-notify .loot-name {
  font-weight: 600;
}

.loot-notify .loot-name.common { color: var(--common); }
.loot-notify .loot-name.uncommon { color: var(--uncommon); }
.loot-notify .loot-name.rare { color: var(--rare); }
.loot-notify .loot-name.epic { color: var(--epic); }
.loot-notify .loot-name.legendary { color: var(--legendary); }

@keyframes lootSlideUp {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  10% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
}

/* --- Stats Bar --- */
#statsBar {
  padding: 8px 14px;
  background: var(--bg-lighter);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.stat-item {
  text-align: center;
}

.stat-label {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-bright);
}

/* XP Bar */
.xp-bar-wrap {
  width: 100%;
}

.xp-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-dim);
  margin-bottom: 3px;
}

.xp-bar-outer {
  width: 100%;
  height: 8px;
  background: var(--hp-bg);
  border-radius: 4px;
  overflow: hidden;
}

.xp-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, #2980b9, var(--xp-blue));
  border-radius: 4px;
  transition: width 0.3s ease-out;
}

/* --- Bottom Tabs --- */
#tabs {
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex: 1;
  min-width: 0;
  padding: 10px 4px 8px;
  background: none;
  color: var(--text-dim);
  font-size: 11px;
  text-align: center;
  position: relative;
  transition: color 0.2s;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.tab-btn .tab-icon {
  font-size: 18px;
  display: block;
}

.tab-btn.active {
  color: var(--gold);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--gold);
  border-radius: 2px 2px 0 0;
}

/* --- Tab Content --- */
#tabContent {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 14px 20px;
  min-height: 0;
  display: none;
}

#tabContent.visible {
  display: block;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.tab-title {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--gold);
  margin-bottom: 12px;
}

/* --- Zone Cards --- */
.zone-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.zone-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
  min-height: 60px;
}

.zone-card:active {
  transform: scale(0.98);
}

.zone-card.active-zone {
  border-color: var(--gold);
  box-shadow: 0 0 12px var(--gold-glow);
}

.zone-card.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.zone-card.locked:active {
  transform: none;
}

.zone-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.zone-info {
  flex: 1;
  min-width: 0;
}

.zone-name {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-bright);
  margin-bottom: 2px;
}

.zone-levels {
  font-size: 11px;
  color: var(--text-dim);
}

.zone-monsters {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zone-lock-icon {
  font-size: 18px;
  color: var(--text-dim);
  flex-shrink: 0;
}

/* --- Equipment Slots --- */
.equip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.equip-slot {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}

.equip-slot.filled {
  border-style: solid;
}

.equip-slot.filled.common { border-left: 3px solid var(--common); }
.equip-slot.filled.uncommon { border-left: 3px solid var(--uncommon); }
.equip-slot.filled.rare { border-left: 3px solid var(--rare); }
.equip-slot.filled.epic { border-left: 3px solid var(--epic); }
.equip-slot.filled.legendary { border-left: 3px solid var(--legendary); }

.equip-slot-label {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.equip-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 2px;
}

.equip-item-stat {
  font-size: 11px;
  color: var(--text-dim);
}

.equip-empty {
  font-size: 24px;
  color: var(--text-dim);
  opacity: 0.3;
}

/* --- Inventory Grid --- */
.inv-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.inv-slot {
  aspect-ratio: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.1s;
  min-height: 44px;
  position: relative;
}

.inv-slot:active {
  transform: scale(0.95);
}

.inv-slot.empty {
  cursor: default;
  opacity: 0.3;
}

.inv-slot.empty:active {
  transform: none;
}

.inv-slot.common { border-left: 3px solid var(--common); }
.inv-slot.uncommon { border-left: 3px solid var(--uncommon); }
.inv-slot.rare { border-left: 3px solid var(--rare); }
.inv-slot.epic { border-left: 3px solid var(--epic); }
.inv-slot.legendary { border-left: 3px solid var(--legendary); }

.inv-item-icon {
  font-size: 22px;
  margin-bottom: 2px;
}

.inv-item-shortname {
  font-size: 9px;
  color: var(--text-dim);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* Inventory item tooltip / action popup */
.inv-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 20px;
  z-index: 80;
  width: 280px;
  max-width: 90vw;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.inv-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 79;
}

.inv-popup-name {
  font-family: var(--font-display);
  font-size: 16px;
  margin-bottom: 4px;
}

.inv-popup-name.common { color: var(--common); }
.inv-popup-name.uncommon { color: var(--uncommon); }
.inv-popup-name.rare { color: var(--rare); }
.inv-popup-name.epic { color: var(--epic); }
.inv-popup-name.legendary { color: var(--legendary); }

.inv-popup-type {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.inv-popup-stats {
  font-size: 13px;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.7;
}

.inv-popup-stats .bonus {
  color: var(--uncommon);
}

.inv-popup-actions {
  display: flex;
  gap: 8px;
}

.inv-popup-actions button {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  min-height: 44px;
}

.btn-equip {
  background: linear-gradient(135deg, var(--gold), #a88b3a);
  color: #1a1510;
}

.btn-sell {
  background: var(--hp-bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-close-popup {
  background: var(--hp-bg);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

/* --- Shop --- */
.shop-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shop-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.shop-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.shop-info {
  flex: 1;
  min-width: 0;
}

.shop-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 2px;
}

.shop-desc {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.shop-level {
  font-size: 11px;
  color: var(--gold-dim);
}

.btn-buy {
  background: linear-gradient(135deg, var(--gold), #a88b3a);
  color: #1a1510;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius);
  white-space: nowrap;
  min-height: 44px;
  min-width: 80px;
  transition: opacity 0.2s;
}

.btn-buy:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* --- Prestige --- */
.prestige-panel {
  text-align: center;
  padding: 20px 0;
}

.prestige-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.prestige-title {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--gold);
  margin-bottom: 8px;
}

.prestige-desc {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 20px;
  line-height: 1.6;
}

.prestige-bonus-list {
  text-align: left;
  margin-bottom: 20px;
}

.prestige-bonus-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.prestige-bonus-label {
  color: var(--text);
}

.prestige-bonus-value {
  color: var(--gold);
  font-weight: 600;
}

.prestige-req {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.prestige-req strong {
  color: var(--hp-red);
}

.prestige-req.met strong {
  color: var(--uncommon);
}

.btn-prestige {
  width: 100%;
  max-width: 280px;
  padding: 14px;
  background: linear-gradient(135deg, #9c27b0, #7b1fa2);
  color: #fff;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius);
  transition: opacity 0.2s, transform 0.15s;
  min-height: 52px;
}

.btn-prestige:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-prestige:not(:disabled):active {
  transform: scale(0.97);
}

.prestige-count {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 12px;
}

/* ============================================
   OFFLINE MODAL
   ============================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  width: 100%;
  max-width: 340px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.modal-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--gold);
  margin-bottom: 4px;
}

.modal-subtitle {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.modal-rewards {
  text-align: left;
  margin-bottom: 20px;
}

.modal-reward-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.modal-reward-label {
  color: var(--text);
}

.modal-reward-value {
  color: var(--gold);
  font-weight: 600;
}

.btn-collect {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--gold), #a88b3a);
  color: #1a1510;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius);
  min-height: 52px;
  transition: transform 0.15s;
}

.btn-collect:active {
  transform: scale(0.97);
}

/* ============================================
   UTILITY
   ============================================ */

.hidden {
  display: none !important;
}

.gold-text {
  color: var(--gold);
}

.text-dim {
  color: var(--text-dim);
}

/* Prevent iOS zoom on input focus */
@supports (-webkit-touch-callout: none) {
  .name-input {
    font-size: 16px;
  }
}

/* ============================================
   RESPONSIVE TWEAKS
   ============================================ */

@media (max-width: 359px) {
  .create-logo {
    font-size: 32px;
    letter-spacing: 4px;
  }
  .class-grid {
    gap: 8px;
  }
  .class-card {
    padding: 10px 8px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
}

@media (min-width: 480px) {
  #gameScreen {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
}
