/* ==========================================================================
   CapyDelivery 3D — Visual Design System & UI Styles
   ========================================================================== */

:root {
  --bg-dark: #0a0c10;
  --capy-brown: #a06b42;
  --capy-warm: #d99a64;
  --capy-dark: #643b1f;
  --accent-gold: #ffbe3b;
  --accent-green: #10b981;
  --accent-blue: #06b6d4;
  --accent-coral: #ff5757;
  --glass-bg: rgba(18, 22, 34, 0.78);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-blur: blur(16px);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-dark);
  font-family: var(--font-sans);
  color: var(--text-main);
}

#game-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

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

/* ==========================================================================
   HUD Layout
   ========================================================================== */
#hud {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem;
}

.hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  pointer-events: auto;
}

.hud-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  font-weight: 600;
  font-size: 0.9rem;
}

.brand-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.capy-emoji {
  font-size: 1.4rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
  animation: floatBounce 2.4s ease-in-out infinite;
}

@keyframes floatBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffc837 0%, #ff8008 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-status {
  font-size: 0.68rem;
  color: var(--accent-green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.time-pill {
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.cycle-progress {
  font-size: 0.72rem;
  color: var(--text-muted);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 0.5rem;
}

.earnings-pill {
  font-family: var(--font-mono);
  color: var(--accent-gold);
  position: relative;
}

.tip-sparkle {
  position: absolute;
  right: -0.5rem;
  top: -0.8rem;
  font-size: 0.85rem;
  color: var(--accent-green);
  font-weight: 800;
  opacity: 0;
  transform: translateY(0);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.tip-sparkle.pop {
  opacity: 1;
  transform: translateY(-8px) scale(1.15);
}

.hud-actions {
  display: flex;
  gap: 0.6rem;
}

.icon-btn {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.icon-btn:hover {
  transform: scale(1.08);
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(30, 36, 56, 0.9);
}

.icon-btn:active {
  transform: scale(0.95);
}

.phone-btn-badge .badge-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-coral);
  box-shadow: 0 0 8px var(--accent-coral);
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

/* ==========================================================================
   Active Quest / Delivery Banner (Top-Center)
   ========================================================================== */
#active-quest-banner {
  position: absolute;
  top: 5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 190, 59, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 24px rgba(255, 190, 59, 0.15);
  border-radius: 16px;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  pointer-events: auto;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 380px;
  max-width: 90vw;
}

#active-quest-banner.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-20px);
}

.quest-tag {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #111827;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  letter-spacing: 0.05em;
}

.quest-tag.dropoff {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.quest-content {
  flex: 1;
}

.quest-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: #ffffff;
}

.quest-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.quest-meta .separator {
  color: rgba(255, 255, 255, 0.2);
}

.tip-timer {
  color: var(--accent-gold);
  font-family: var(--font-mono);
  font-weight: 600;
}

.compass-nav-arrow {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 8px rgba(255, 190, 59, 0.6));
  transition: transform 0.1s linear;
}

/* ==========================================================================
   Speedometer & Dash Cluster (Bottom-Left)
   ========================================================================== */
.dash-cluster.bottom-left {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: auto;
}

.speed-gauge {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  padding: 0.5rem 1rem;
  border-radius: 18px;
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  width: fit-content;
}

.speed-number {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
  letter-spacing: -0.04em;
}

.speed-unit {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
}

.stamina-container {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  width: 170px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.stamina-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.stamina-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.stamina-fill {
  height: 100%;
  background: linear-gradient(90deg, #06b6d4, #10b981);
  border-radius: 9999px;
  transition: width 0.1s linear;
}

.cargo-stack-status {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.45rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #e2e8f0;
  width: fit-content;
}

/* ==========================================================================
   Minimap (Bottom-Right)
   ========================================================================== */
.minimap-wrapper.bottom-right {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
  align-self: flex-end;
}

#minimap-canvas {
  border-radius: 14px;
  background: #111827;
  display: block;
}

.minimap-north {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(0,0,0,0.6);
  padding: 1px 5px;
  border-radius: 4px;
}

.minimap-legend {
  display: flex;
  justify-content: space-around;
  margin-top: 4px;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 3px;
}
.dot-player { background: #38bdf8; box-shadow: 0 0 5px #38bdf8; }
.dot-pickup { background: #f59e0b; box-shadow: 0 0 5px #f59e0b; }
.dot-dropoff { background: #10b981; box-shadow: 0 0 5px #10b981; }

/* ==========================================================================
   Controls Hint Bar (Bottom-Center)
   ========================================================================== */
.controls-hint {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 18, 28, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  padding: 0.45rem 1.25rem;
  display: flex;
  gap: 0.9rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
}

.controls-hint span b {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 5px;
  border-radius: 4px;
  margin-right: 2px;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
#toast-container {
  position: absolute;
  top: 5.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 100;
  pointer-events: none;
}

.toast {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-left: 4px solid var(--accent-green);
  padding: 0.75rem 1.1rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  font-size: 0.85rem;
  color: white;
  animation: slideInToast 0.3s cubic-bezier(0.16, 1, 0.3, 1), fadeOutToast 0.3s ease 3.7s forwards;
  max-width: 320px;
}

@keyframes slideInToast {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOutToast {
  to { opacity: 0; transform: translateY(-10px); }
}

/* ==========================================================================
   Cinematic Mode Overlay
   ========================================================================== */
#cinematic-bars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: opacity 0.8s ease;
}

#cinematic-bars.hidden {
  opacity: 0;
}

.cinematic-bar {
  background: #000000;
  width: 100%;
  height: 9vh;
}

.cinematic-caption {
  align-self: center;
  margin-bottom: 2vh;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  animation: pulseCaption 3s infinite;
}

@keyframes pulseCaption {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 0.3; }
}

/* ==========================================================================
   In-Game Smartphone (CapyPhone 16 Pro)
   ========================================================================== */
#phone-modal {
  position: absolute;
  right: 2rem;
  bottom: 2rem;
  z-index: 50;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  transform-origin: bottom right;
}

#phone-modal.phone-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(120%) scale(0.85);
}

.phone-chassis {
  width: 320px;
  height: 580px;
  background: #1e212b;
  border-radius: 46px;
  padding: 10px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8),
              0 0 0 4px #2d3345,
              0 0 0 6px #12151e;
  position: relative;
}

.phone-dynamic-island {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 88px;
  height: 22px;
  background: #000000;
  border-radius: 20px;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
}

.island-camera {
  width: 10px;
  height: 10px;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 50%;
}

.island-speaker {
  width: 28px;
  height: 4px;
  background: #1e293b;
  border-radius: 4px;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: #0f111a;
  border-radius: 38px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.phone-status-bar {
  height: 40px;
  padding: 10px 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #cbd5e1;
}

.phone-status-icons {
  display: flex;
  gap: 0.35rem;
}

.phone-app-header {
  padding: 0.4rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.phone-app-header .app-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
}

.phone-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #94a3b8;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.phone-app-viewport {
  flex: 1;
  overflow-y: auto;
  position: relative;
  padding: 0.75rem;
}

/* Phone Views */
.phone-view {
  display: none;
  animation: fadeInApp 0.25s ease;
}

.phone-view.active {
  display: block;
}

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

/* 1. Orders Tab */
.orders-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.orders-header .section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.orders-header .badge {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-green);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.order-card {
  background: #181c28;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.order-card:hover {
  border-color: rgba(255, 190, 59, 0.4);
  transform: translateY(-2px);
}

.order-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.order-emoji-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.order-food-emoji {
  font-size: 1.25rem;
}

.order-restaurant-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
}

.order-pay-pill {
  background: rgba(255, 190, 59, 0.15);
  color: var(--accent-gold);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
}

.order-desc-text {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.order-dest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #94a3b8;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  padding-top: 0.4rem;
}

.order-accept-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s ease;
  width: 100%;
}

.order-accept-btn:hover {
  filter: brightness(1.15);
}

.order-accept-btn.active-order {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* 2. GPS Map Tab */
.gps-view-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.gps-status {
  color: var(--accent-green);
}

.phone-map-canvas-container {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 0.6rem;
}

#phone-gps-canvas {
  display: block;
  width: 100%;
  background: #111827;
}

.gps-stats {
  background: #181c28;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font-size: 0.72rem;
  display: flex;
  justify-content: space-between;
}

/* 3. Wallet Tab */
.wallet-card {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-radius: 16px;
  padding: 1.1rem;
  color: white;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
  margin-bottom: 1rem;
}

.card-label {
  font-size: 0.72rem;
  opacity: 0.8;
  text-transform: uppercase;
}

.wallet-card h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0.2rem 0 0.6rem;
}

.card-sub {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 0.5rem;
}

.wallet-transactions h4 {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.tx-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tx-item {
  display: flex;
  justify-content: space-between;
  background: #181c28;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  font-size: 0.75rem;
}

.tx-val {
  color: var(--accent-green);
  font-family: var(--font-mono);
  font-weight: 700;
}

/* 4. Lo-Fi Beats Tab */
.radio-cassette {
  background: #181c28;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.radio-art {
  font-size: 3.5rem;
  background: #0f111a;
  width: 90px;
  height: 90px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.5);
}

.radio-track-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: white;
}

.radio-artist {
  font-size: 0.75rem;
  color: var(--accent-gold);
  margin-bottom: 0.9rem;
}

.audio-visualizer-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 28px;
  margin-bottom: 1rem;
}

.vbar {
  width: 4px;
  background: var(--accent-green);
  border-radius: 2px;
  height: 6px;
  transition: height 0.1s ease;
}

.radio-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.r-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.r-btn.r-play {
  background: var(--accent-gold);
  color: #111827;
  width: 44px;
  height: 44px;
  font-size: 1.1rem;
}

.r-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}
.r-btn.r-play:hover {
  background: #f59e0b;
}

.radio-volume {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  font-size: 0.8rem;
}

.radio-volume input {
  flex: 1;
  accent-color: var(--accent-gold);
}

/* Phone Dock Navigation */
.phone-nav-dock {
  height: 52px;
  background: #141724;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.nav-app-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 10px;
  transition: color 0.15s ease;
}

.nav-app-btn .nav-icon {
  font-size: 1.1rem;
}

.nav-app-btn .nav-label {
  font-size: 0.65rem;
  font-weight: 600;
}

.nav-app-btn.active {
  color: var(--accent-gold);
}

.phone-home-bar {
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-home-bar::after {
  content: '';
  width: 100px;
  height: 4px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 9999px;
}

/* ==========================================================================
   Start Game / Intro Screen
   ========================================================================== */
#start-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.88) 0%, rgba(10, 12, 16, 0.98) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  transition: opacity 0.5s ease;
}

#start-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.start-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  padding: 2.5rem;
  max-width: 620px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.start-badge {
  display: inline-block;
  background: rgba(255, 190, 59, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(255, 190, 59, 0.3);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  padding: 4px 12px;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

.game-logo {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 0.6rem;
}

.game-logo span {
  background: linear-gradient(135deg, #ffc837 0%, #ff8008 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tagline {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.75rem;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  text-align: left;
  margin-bottom: 1.75rem;
}

.feat-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
}

.feat-icon {
  font-size: 1.3rem;
  margin-bottom: 0.2rem;
}

.feat-item h4 {
  font-size: 0.82rem;
  color: #ffffff;
  margin-bottom: 0.15rem;
}

.feat-item p {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.start-btn-group {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.primary-play-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #111827;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  padding: 0.9rem 2.2rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.4);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.primary-play-btn:hover {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.1);
}

.secondary-play-btn {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.9rem 1.6rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: background 0.15s ease;
}

.secondary-play-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.attribution-note {
  font-size: 0.72rem;
  color: #64748b;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 768px) {
  #hud {
    padding: 0.75rem;
  }
  .hud-pill {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
  }
  #phone-modal {
    right: 50%;
    transform: translateX(50%);
    bottom: 1rem;
  }
  #phone-modal.phone-hidden {
    transform: translateX(50%) translateY(120%) scale(0.85);
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  #active-quest-banner {
    min-width: unset;
    width: 95%;
  }
}
