/* ==========================================================================
   TakeMyPixel.com — High-End Studio Design System (Pro & Luxury Fintech Edition)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;0,700;0,800;1,500&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Space+Grotesk:wght@500;600;700;800&display=swap');

:root {
  /* Dark Luxury Background Tones */
  --bg-base: #06070a;
  --bg-deep: #0a0c13;
  --bg-surface: #10131d;
  --bg-surface-elevated: #161a29;
  --bg-surface-hover: #1e2438;
  --bg-glass: rgba(16, 19, 29, 0.75);

  /* Primary Brand Accents */
  --volt: #d4ff00;
  --volt-hover: #e3ff33;
  --volt-glow: rgba(212, 255, 0, 0.28);
  --volt-muted: rgba(212, 255, 0, 0.1);

  --indigo: #4f46e5;
  --indigo-light: #6366f1;
  --cobalt: #2563eb;
  --cobalt-light: #3b82f6;
  --cobalt-glow: rgba(37, 99, 235, 0.3);

  --emerald: #10b981;
  --emerald-light: #34d399;
  --emerald-muted: rgba(16, 185, 129, 0.12);

  --coral: #f43f5e;
  --coral-light: #fb7185;
  --coral-muted: rgba(244, 63, 94, 0.14);

  --amber: #f59e0b;
  --amber-muted: rgba(245, 158, 11, 0.14);

  /* Typography Colors */
  --text-pure: #ffffff;
  --text-main: #f1f3f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Borders & Dividers */
  --border-hairline: rgba(255, 255, 255, 0.05);
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-strong: rgba(255, 255, 255, 0.28);
  --border-glow: rgba(212, 255, 0, 0.4);

  /* Typography Scales */
  --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 30px;
  --radius-full: 9999px;

  /* Shadows & Elevations */
  --shadow-subtle: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 20px 40px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--border-subtle);
  --shadow-modal: 0 30px 70px -15px rgba(0, 0, 0, 0.95), 0 0 0 1px var(--border-medium);
  --shadow-glow: 0 0 30px rgba(212, 255, 0, 0.15);

  /* Transitions */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --trans-fast: 0.15s ease;
  --trans-normal: 0.25s var(--ease-spring);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background Subtle Gradient Mesh */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image:
    radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(212, 255, 0, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(16, 185, 129, 0.035) 0%, transparent 50%),
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; outline: none; }
input, select, textarea { font-family: inherit; outline: none; border: none; }

.font-mono { font-family: var(--font-mono); }
.text-pure { color: var(--text-pure) !important; }
.text-volt { color: var(--volt) !important; }
.text-cobalt { color: var(--cobalt-light) !important; }
.text-emerald { color: var(--emerald-light) !important; }
.text-coral { color: var(--coral-light) !important; }
.text-amber { color: var(--amber) !important; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ==========================================================================
   HEADER NAVIGATION (STUDIO EDITORIAL)
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  width: 100%;
  height: 66px;
  z-index: 100;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  background: rgba(6, 7, 10, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--trans-normal);
}
.logo-group:hover { transform: translateY(-1px); }

.logo-cube {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--volt) 0%, #a6d800 100%);
  box-shadow: 0 0 16px var(--volt-glow);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-cube::after {
  content: '';
  width: 14px;
  height: 14px;
  background: var(--bg-base);
  border-radius: 3px;
}

.logo-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.04em;
  color: var(--text-pure);
}
.logo-title span { color: var(--volt); }

.header-center {
  display: flex;
  align-items: center;
  gap: 12px;
}

.metric-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 19, 29, 0.7);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: var(--trans-fast);
}
.metric-pill:hover {
  border-color: var(--border-medium);
  background: rgba(22, 26, 41, 0.85);
}

.metric-label {
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.metric-val {
  font-weight: 800;
  color: var(--text-pure);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.currency-toggle {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}

.curr-btn {
  padding: 4px 11px;
  font-family: var(--font-mono);
  font-size: 0.725rem;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: 5px;
  transition: var(--trans-normal);
}
.curr-btn:hover { color: var(--text-main); }
.curr-btn.active {
  background: var(--volt);
  color: #06070a;
  box-shadow: 0 2px 8px var(--volt-glow);
}

/* Base Buttons Kit */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.825rem;
  transition: var(--trans-normal);
  white-space: nowrap;
  letter-spacing: -0.01em;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(180deg, var(--volt) 0%, #c4ee00 100%);
  color: #06070a;
  font-weight: 700;
  box-shadow: 0 4px 18px var(--volt-glow), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(212, 255, 0, 0.4);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #e4ff40 0%, var(--volt) 100%);
  box-shadow: 0 6px 24px var(--volt-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-subtle);
}
.btn-secondary:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-strong);
  color: var(--text-pure);
  transform: translateY(-1px);
}

.btn-action-glow {
  background: rgba(37, 99, 235, 0.15);
  color: var(--cobalt-light);
  border: 1px solid rgba(37, 99, 235, 0.35);
}
.btn-action-glow:hover {
  background: var(--cobalt);
  color: #fff;
  box-shadow: 0 0 16px var(--cobalt-glow);
}

/* ==========================================================================
   LIVE MARKET TICKER
   ========================================================================== */
.ticker-wrap {
  display: flex;
  align-items: center;
  background: rgba(8, 10, 15, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  height: 36px;
  overflow: hidden;
  font-family: var(--font-mono);
  position: relative;
  z-index: 90;
}

.ticker-badge {
  background: rgba(212, 255, 0, 0.08);
  color: var(--volt);
  border-right: 1px solid var(--border-subtle);
  padding: 0 18px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.685rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.ticker-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--volt);
  box-shadow: 0 0 8px var(--volt);
}

.ticker-viewport {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-track {
  display: inline-flex;
  gap: 40px;
  animation: tickerSlide 50s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.765rem;
  color: var(--text-secondary);
}
.ticker-coord {
  color: var(--volt);
  font-weight: 700;
  background: rgba(212, 255, 0, 0.06);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(212, 255, 0, 0.15);
}
.ticker-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  color: var(--text-pure);
  font-weight: 600;
}
.ticker-gain {
  color: var(--emerald-light);
  font-weight: 700;
}

@keyframes tickerSlide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==========================================================================
   CANVAS WORKSPACE & WHITE ART CANVAS PRESENTATION
   ========================================================================== */
.canvas-workspace {
  position: relative;
  width: 100vw;
  height: calc(100vh - 102px);
  background: radial-gradient(circle at 50% 50%, #0d101a 0%, #06070a 100%);
  overflow: hidden;
}

.canvas-container {
  width: 100%;
  height: 100%;
  position: relative;
}

#pixelCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

/* Floating Minimap Radar */
.minimap-card {
  position: absolute;
  bottom: 28px;
  right: 28px;
  background: rgba(13, 16, 26, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 12px;
  z-index: 50;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255,255,255,0.06);
  transition: var(--trans-normal);
}
.minimap-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.minimap-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.1em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.minimap-title::after {
  content: 'LIVE';
  color: var(--volt);
  font-size: 0.6rem;
  background: rgba(212, 255, 0, 0.1);
  padding: 1px 4px;
  border-radius: 2px;
}

#minimapCanvas {
  width: 128px;
  height: 128px;
  display: block;
  border-radius: var(--radius-xs);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

/* Floating Zoom & Centering Controls */
.canvas-controls {
  position: absolute;
  bottom: 28px;
  left: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(13, 16, 26, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 6px;
  z-index: 50;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75);
}

.canvas-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  transition: var(--trans-normal);
}
.canvas-btn:hover {
  background: var(--volt);
  color: #06070a;
  border-color: var(--volt);
  box-shadow: 0 0 12px var(--volt-glow);
  transform: translateY(-1px);
}

.zoom-level-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-pure);
  padding: 0 10px;
  letter-spacing: 0.02em;
}

/* Floating Search Bar */
.search-overlay {
  position: absolute;
  top: 24px;
  left: 28px;
  z-index: 50;
}

.search-input {
  background: rgba(13, 16, 26, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  padding: 10px 20px 10px 42px;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-pure);
  width: 290px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6);
  transition: var(--trans-normal);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%2394a3b8" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>');
  background-repeat: no-repeat;
  background-position: 15px center;
}
.search-input:focus {
  width: 360px;
  border-color: var(--volt);
  box-shadow: 0 0 24px var(--volt-glow);
}
.search-input::placeholder { color: var(--text-muted); }

/* ==========================================================================
   PIXEL HUD TOOLTIP (HIGH-PRECISION LUXURY CARD)
   ========================================================================== */
.pixel-hud-tooltip {
  position: fixed;
  background: rgba(11, 14, 22, 0.94);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  width: 310px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.12s ease, transform 0.12s ease;
  z-index: 80;
  box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.pixel-hud-tooltip.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.hud-coord {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--volt);
  font-size: 0.825rem;
  letter-spacing: 0.04em;
}

.hud-status-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hud-status-badge.available {
  background: var(--emerald-muted);
  color: var(--emerald-light);
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.hud-status-badge.occupied {
  background: rgba(37, 99, 235, 0.15);
  color: var(--cobalt-light);
  border: 1px solid rgba(37, 99, 235, 0.35);
}

.hud-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-pure);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  line-height: 1.3;
}

.hud-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  margin-bottom: 5px;
}
.hud-muted { color: var(--text-muted); font-size: 0.775rem; }
.hud-white { color: var(--text-main); font-weight: 600; }
.hud-emerald { color: var(--emerald-light); font-weight: 700; font-family: var(--font-mono); }

.hud-prompt {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.725rem;
  color: var(--volt);
  font-family: var(--font-mono);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   SECTIONS, ROI SIMULATOR & EDITORIAL CARDS
   ========================================================================== */
.section {
  max-width: 1240px;
  margin: 80px auto;
  padding: 0 28px;
}

.section-badge {
  font-family: var(--font-mono);
  font-size: 0.725rem;
  font-weight: 800;
  color: var(--volt);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.section-badge::before {
  content: '//';
  opacity: 0.7;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-pure);
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 780px;
  line-height: 1.65;
  margin-bottom: 36px;
}

/* Luxury Financial Simulator Card */
.simulator-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.simulator-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(212, 255, 0, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.sim-controls { display: flex; flex-direction: column; justify-content: space-between; }
.sim-field { margin-bottom: 24px; }

.sim-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

.sim-val-badge {
  font-family: var(--font-mono);
  color: var(--volt);
  font-weight: 800;
  font-size: 1rem;
  background: rgba(212, 255, 0, 0.08);
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(212, 255, 0, 0.2);
}

.sim-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.sim-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--volt);
  cursor: grab;
  box-shadow: 0 0 16px var(--volt-glow), 0 2px 6px rgba(0,0,0,0.6);
  border: 2px solid #ffffff;
  transition: transform 0.1s ease;
}
.sim-slider::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.15); }

/* Payout Result Box */
.sim-payout-box {
  background: linear-gradient(180deg, #0a0d16 0%, #07080d 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sim-payout-label {
  font-size: 0.725rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}

.sim-payout-total {
  font-family: var(--font-mono);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--emerald-light);
  margin: 8px 0;
  letter-spacing: -0.03em;
  line-height: 1;
}

.sim-roi-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--emerald-muted);
  color: var(--emerald-light);
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
  width: fit-content;
}

.sim-breakdown {
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
}
.sim-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.825rem;
  margin-bottom: 8px;
  color: var(--text-secondary);
}
.sim-row:last-child { margin-bottom: 0; }

/* Hall of Fame Leaderboards */
.leaderboards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.leaderboard-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.leaderboard-header {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-pure);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
}

.leader-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-hairline);
  transition: var(--trans-fast);
}
.leader-item:hover {
  transform: translateX(4px);
}
.leader-item:last-child { border-bottom: none; }

.leader-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rank-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--volt);
  width: 24px;
}

.leader-avatar {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.leader-info-name {
  font-weight: 700;
  color: var(--text-pure);
  font-size: 0.9rem;
}
.leader-info-coord {
  font-family: var(--font-mono);
  font-size: 0.725rem;
  color: var(--text-muted);
}

.leader-right { text-align: right; }
.leader-val {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-pure);
}
.leader-profit-tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* FAQ Accordion */
.faq-container { display: flex; flex-direction: column; gap: 14px; }
.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--trans-normal);
}
.faq-item:hover { border-color: var(--border-medium); }
.faq-item.active {
  border-color: var(--border-strong);
  background: var(--bg-surface-elevated);
}

.faq-question {
  padding: 18px 24px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-pure);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.faq-toggle {
  font-size: 1.25rem;
  color: var(--volt);
  transition: var(--trans-normal);
}
.faq-item.active .faq-toggle { transform: rotate(45deg); }

.faq-answer {
  padding: 0 24px 20px 24px;
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.7;
  display: none;
}
.faq-item.active .faq-answer { display: block; }

/* Editorial Studio Footer */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 40px 28px;
  max-width: 1240px;
  margin: 60px auto 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-links { display: flex; gap: 24px; font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; }
.footer-links a:hover { color: var(--volt); }

/* ==========================================================================
   MODALS, BACK-OFFICE & DRAFT OVERLAY (LUXURY FINTECH)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 8, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none !important;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-backdrop.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  transform: scale(0.96) translateY(8px);
  transition: transform 0.25s var(--ease-spring);
}
.modal-backdrop.active .modal-card {
  transform: scale(1) translateY(0);
}

.admin-modal-card { max-width: 1020px; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(10, 12, 19, 0.6);
}

.modal-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text-pure);
}

.modal-close-btn {
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--trans-normal);
}
.modal-close-btn:hover {
  background: rgba(244, 63, 94, 0.15);
  color: var(--coral-light);
}

.modal-header {
  flex-shrink: 0;
}

.modal-body {
  padding: 20px 24px;
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  max-height: calc(88vh - 140px);
}

.modal-footer {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-deep);
}

.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.form-input {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.875rem;
  color: var(--text-pure);
  transition: var(--trans-normal);
}
.form-input:focus {
  border-color: var(--volt);
  box-shadow: 0 0 0 3px rgba(212, 255, 0, 0.15);
}

.takeover-box {
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.3);
  padding: 16px;
  border-radius: var(--radius-md);
  font-size: 0.825rem;
  color: var(--text-main);
  line-height: 1.6;
  margin-bottom: 18px;
}

.modal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.modal-tab-btn {
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: var(--trans-normal);
}
.modal-tab-btn:hover { color: var(--text-pure); }
.modal-tab-btn.active {
  background: var(--bg-surface-elevated);
  color: var(--volt);
  border: 1px solid var(--border-medium);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Back-Office Metrics & Tables */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.admin-stat-card {
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  padding: 14px 16px;
  border-radius: var(--radius-md);
}
.admin-stat-title {
  font-size: 0.725rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
}
.admin-stat-num {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text-pure);
  margin-top: 6px;
  letter-spacing: -0.02em;
}

.admin-table-wrap {
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.admin-table th {
  background: #090c14;
  padding: 12px 14px;
  text-align: left;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border-medium);
}
.admin-table td {
  padding: 12px 14px;
  border-top: 1px solid var(--border-hairline);
  color: var(--text-main);
}
.admin-table tr:hover td { background: var(--bg-surface-elevated); }

.admin-action-btn {
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.725rem;
  font-weight: 700;
  margin-right: 4px;
  transition: var(--trans-fast);
}
.admin-action-btn.edit { background: rgba(37, 99, 235, 0.15); color: var(--cobalt-light); border: 1px solid rgba(37, 99, 235, 0.35); }
.admin-action-btn.edit:hover { background: var(--cobalt); color: #fff; }
.admin-action-btn.view { background: rgba(255, 255, 255, 0.08); color: #fff; border: 1px solid var(--border-subtle); }
.admin-action-btn.view:hover { background: rgba(255, 255, 255, 0.15); }
.admin-action-btn.delete { background: var(--coral-muted); color: var(--coral-light); border: 1px solid rgba(244, 63, 94, 0.3); }
.admin-action-btn.delete:hover { background: var(--coral); color: #fff; }
.admin-action-btn.ban { background: var(--amber-muted); color: var(--amber); border: 1px solid rgba(245, 158, 11, 0.35); }
.admin-action-btn.ban:hover { background: var(--amber); color: #06070a; }

.badge-role-admin { background: rgba(212, 255, 0, 0.15); color: var(--volt); border: 1px solid rgba(212, 255, 0, 0.35); font-family: var(--font-mono); font-size: 0.7rem; font-weight: 800; padding: 3px 8px; border-radius: 4px; }
.badge-role-user { background: rgba(255, 255, 255, 0.06); color: var(--text-secondary); border: 1px solid var(--border-subtle); font-family: var(--font-mono); font-size: 0.7rem; padding: 3px 8px; border-radius: 4px; }
.badge-status-active { background: var(--emerald-muted); color: var(--emerald-light); border: 1px solid rgba(16, 185, 129, 0.35); font-family: var(--font-mono); font-size: 0.7rem; padding: 3px 8px; border-radius: 4px; font-weight: 700; }
.badge-status-banned { background: var(--coral-muted); color: var(--coral-light); border: 1px solid rgba(244, 63, 94, 0.35); font-family: var(--font-mono); font-size: 0.7rem; padding: 3px 8px; border-radius: 4px; font-weight: 700; }

.admin-top-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }

/* Image Pixelizer Dropzone */
.dropzone-box {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-deep);
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--trans-normal);
}
.dropzone-box:hover, .dropzone-box.drag-over {
  border-color: var(--volt);
  background: rgba(212, 255, 0, 0.04);
  box-shadow: 0 0 20px var(--volt-glow);
}

.pixelizer-preview-wrap {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}

#pixelizerPreviewCanvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  width: 100%;
  height: 100%;
}

/* Floating Draft Overlay HUD */
.draft-hud-overlay {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(11, 14, 22, 0.94);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid var(--cobalt-light);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8), 0 0 25px rgba(37, 99, 235, 0.3);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: draftSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.draft-hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.draft-hud-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cobalt-light);
  box-shadow: 0 0 12px var(--cobalt-light);
  animation: studioPulse 1.5s infinite;
}

.draft-hud-title {
  font-family: var(--font-mono);
  font-size: 0.775rem;
  font-weight: 800;
  color: var(--text-pure);
  letter-spacing: 0.08em;
}

.draft-hud-coord {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--volt);
}

.draft-hud-stats {
  display: flex;
  gap: 12px;
  align-items: center;
}

.draft-stat {
  display: flex;
  flex-direction: column;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
}

.draft-stat.highlighted {
  border-color: rgba(212, 255, 0, 0.4);
  background: rgba(212, 255, 0, 0.06);
}

.draft-stat-label {
  font-size: 0.675rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-family: var(--font-mono);
  font-weight: 700;
}

.draft-stat-val {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-pure);
  margin-top: 2px;
}

.draft-hud-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 28px;
  left: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
  pointer-events: none;
}
.toast {
  background: rgba(13, 16, 26, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-pure);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255,255,255,0.08);
}
\n
/* ==========================================================================
   INFINITE COLOR PALETTE & 10 CUSTOM SLOTS SYSTEM
   ========================================================================== */
.palette-system-wrap {
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.infinite-picker-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.picker-swatch-wrap {
  position: relative;
  width: 44px;
  height: 40px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-subtle);
  cursor: pointer;
  flex-shrink: 0;
}

.infinite-color-input {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 64px;
  height: 60px;
  border: none;
  cursor: pointer;
  opacity: 0;
}

.picker-swatch-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: #d4ff00;
  transition: background-color 0.1s ease;
}

.hex-code-input {
  width: 110px !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 10px !important;
  font-size: 0.825rem !important;
}

.palette-info-tag {
  font-family: var(--font-mono);
  font-size: 0.675rem;
  color: var(--text-muted);
}

.btn-save-custom-slot {
  background: rgba(212, 255, 0, 0.15) !important;
  color: #ffffff !important;
  border: 1px solid var(--volt) !important;
  font-family: var(--font-mono);
  font-size: 0.725rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 10px rgba(212, 255, 0, 0.2);
  transition: var(--trans-fast);
}
.btn-save-custom-slot:hover {
  background: var(--volt) !important;
  color: #06070a !important;
  transform: translateY(-1px);
  box-shadow: 0 0 16px var(--volt-glow);
}

.color-dot {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  transition: transform 0.15s var(--ease-spring), border-color 0.15s ease;
  position: relative;
}
.color-dot:hover {
  transform: scale(1.18);
  border-color: #ffffff;
  z-index: 5;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.custom-slots-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  margin-top: 6px;
}

.custom-color-slot {
  aspect-ratio: 1;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s var(--ease-spring), border-color 0.15s ease;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
}
.custom-color-slot:hover {
  transform: scale(1.15);
  border-color: var(--volt);
  z-index: 5;
}
.custom-color-slot.has-color {
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.custom-color-slot.has-color:hover {
  border-color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.7);
}
.custom-color-slot .slot-num {
  position: absolute;
  top: 1px;
  left: 3px;
  font-size: 0.55rem;
  color: rgba(255, 255, 255, 0.85);
  pointer-events: none;
  font-weight: 800;
  text-shadow: 0 1px 2px #000;
}
.custom-color-slot .slot-empty-plus {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 800;
}

.palette-sub-title {
  font-family: var(--font-mono);
  font-size: 0.675rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin: 10px 0 6px 0;
}

.palette-grid {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.color-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
  transition: transform 0.15s var(--ease-spring), border-color 0.15s ease;
  position: relative;
}
.color-dot:hover {
  transform: scale(1.22);
  border-color: #ffffff;
  z-index: 5;
}
.color-dot.active-swatch {
  transform: scale(1.15);
  border: 2px solid #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.custom-slots-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
}

.custom-color-slot {
  aspect-ratio: 1;
  border-radius: 5px;
  border: 1px solid var(--border-medium);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s var(--ease-spring), border-color 0.15s ease;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}
.custom-color-slot:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.custom-color-slot.has-color {
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.custom-color-slot.has-color:hover {
  border-color: #ffffff;
}
.custom-color-slot.active-slot {
  border: 2px solid #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}
.custom-color-slot .slot-num {
  position: absolute;
  top: 1px;
  left: 2px;
  font-size: 0.5rem;
  color: rgba(255, 255, 255, 0.6);
  pointer-events: none;
  font-weight: 800;
  text-shadow: 0 1px 2px #000;
}
.custom-color-slot .slot-empty-plus {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
}
\n
/* ==========================================================================
   DRAW STUDIO & PIXEL ART CREATOR STYLES
   ========================================================================== */
.draw-studio-card {
  max-width: 740px !important;
}

.draw-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 14px;
}

.draw-tool-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.draw-tool-btn {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--trans-fast);
}
.draw-tool-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-pure);
  border-color: var(--border-medium);
}
.draw-tool-btn.active {
  background: var(--volt);
  color: #06070a;
  border-color: var(--volt);
  box-shadow: 0 0 10px var(--volt-glow);
}

.draw-size-select {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xs);
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.draw-action-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--trans-fast);
}
.draw-action-icon-btn:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-strong);
}

.draw-studio-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 18px;
  align-items: start;
}

.draw-canvas-box {
  background: var(--bg-deep);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.draw-canvas-container {
  width: 320px;
  height: 320px;
  border-radius: 4px;
  background-color: #ffffff;
  background-image: 
    linear-gradient(45deg, #f0f2f7 25%, transparent 25%),
    linear-gradient(-45deg, #f0f2f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f0f2f7 75%),
    linear-gradient(-45deg, transparent 75%, #f0f2f7 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: crosshair;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

#drawStudioCanvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
}

.draw-canvas-footer {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.draw-side-panel {
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
}

.draw-palette-presets {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
\n
/* ==========================================================================
   CANVAS SNAPSHOTS & TIME MACHINE RESTORE STYLES
   ========================================================================== */
.timeline-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 4px;
}

.snapshot-card {
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: var(--trans-normal);
  position: relative;
}
.snapshot-card:hover {
  border-color: var(--border-medium);
  background: var(--bg-surface-elevated);
  transform: translateX(3px);
}
.snapshot-card.current {
  border-color: rgba(212, 255, 0, 0.4);
  background: rgba(212, 255, 0, 0.03);
}

.snapshot-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.snapshot-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.snapshot-timestamp {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text-pure);
  letter-spacing: -0.01em;
}

.snapshot-badge-author {
  background: rgba(37, 99, 235, 0.15);
  color: var(--cobalt-light);
  border: 1px solid rgba(37, 99, 235, 0.35);
  font-family: var(--font-mono);
  font-size: 0.675rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.snapshot-action-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.snapshot-metrics-tag {
  font-family: var(--font-mono);
  font-size: 0.725rem;
  color: var(--text-muted);
}

.snapshot-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-restore-version {
  background: rgba(212, 255, 0, 0.12);
  color: var(--volt);
  border: 1px solid var(--volt);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 10px rgba(212, 255, 0, 0.15);
  transition: var(--trans-fast);
}
.btn-restore-version:hover {
  background: var(--volt);
  color: #06070a;
  transform: translateY(-1px);
  box-shadow: 0 0 18px var(--volt-glow);
}
\n
/* ==========================================================================
   USER PROFILE MANAGER STYLES (FULL ACCESS: NOM, PRENOM, BIO, LIENS, CONTACT)
   ========================================================================== */
.profile-sub-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 14px;
}

.profile-tab-btn {
  flex: 1;
  padding: 6px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-radius: var(--radius-xs);
  transition: var(--trans-normal);
  text-align: center;
  white-space: nowrap;
}
.profile-tab-btn:hover {
  color: var(--text-pure);
  background: rgba(255, 255, 255, 0.04);
}
.profile-tab-btn.active {
  background: var(--bg-surface-elevated);
  color: var(--volt);
  border: 1px solid var(--border-medium);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 480px) {
  .form-row-2col { grid-template-columns: 1fr; }
}


/* Language Selector */
.lang-selector-wrap {
  display: flex;
  align-items: center;
}

.lang-select {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-pure);
  font-size: 0.775rem;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  outline: none;
  transition: var(--trans-normal);
}

.lang-select:hover, .lang-select:focus {
  border-color: var(--volt);
  box-shadow: 0 0 10px var(--volt-glow);
}

.lang-select option {
  background: var(--bg-deep);
  color: var(--text-pure);
}


/* ==========================================================================
   ULTRA-RESPONSIVE SYSTEM (Mobile-First, Tablets, Laptops & Desktops)
   ========================================================================== */

/* --- TABLETS & MEDIUM SCREENS (<= 1024px) --- */
@media (max-width: 1024px) {
  .header {
    padding: 12px 20px;
  }
  .header-center {
    display: none; /* Hide top metrics pill on tablet/mobile to declutter header */
  }
  .simulator-card {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
  }
  .canvas-workspace {
    height: 60vh;
    min-height: 440px;
  }
}

/* --- MOBILE DEVICES (<= 768px) --- */
@media (max-width: 768px) {
  /* Header */
  .header {
    padding: 10px 14px;
    gap: 8px;
  }
  .logo-title {
    font-size: 1.1rem;
  }
  .header-right {
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .header-right .btn {
    padding: 6px 10px;
    font-size: 0.75rem;
  }
  .lang-select, .curr-btn {
    padding: 4px 6px;
    font-size: 0.725rem;
  }
  
  /* Canvas Section */
  .canvas-workspace {
    height: 55vh;
    min-height: 380px;
  }
  .search-overlay {
    top: 12px;
    left: 12px;
    right: 12px;
    width: auto;
  }
  .search-input {
    width: 100% !important;
    max-width: 280px;
    font-size: 0.75rem;
    padding: 8px 14px 8px 36px;
  }
  .minimap-card {
    bottom: 14px;
    right: 14px;
    padding: 6px;
    transform: scale(0.85);
    transform-origin: bottom right;
  }
  .canvas-controls {
    bottom: 14px;
    left: 14px;
    gap: 4px;
    padding: 4px;
  }
  .canvas-btn {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }
  .zoom-level-badge {
    font-size: 0.7rem;
    padding: 0 6px;
  }

  /* Pixel HUD Bottom Sheet on Mobile */
  .pixel-hud-tooltip {
    position: fixed !important;
    bottom: 14px !important;
    top: auto !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: 420px !important;
    margin: 0 auto !important;
    padding: 14px 16px !important;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.95) !important;
  }

  /* Modals */
  .modal-backdrop {
    padding: 10px;
    align-items: flex-end; /* Bottom sheet feeling on mobile */
  }
  .modal-card {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 90vh !important;
    padding: 16px 14px !important;
    border-radius: var(--radius-lg) var(--radius-lg) var(--radius-md) var(--radius-md) !important;
  }
  .modal-title {
    font-size: 1.05rem;
  }

  /* Simulator */
  .section {
    padding: 40px 14px;
  }
  .section-title {
    font-size: 1.5rem;
  }
  .section-desc {
    font-size: 0.85rem;
  }
  .simulator-card {
    padding: 16px;
  }
  .sim-result-card {
    padding: 18px;
  }

  /* Leaderboards Table Scroll */
  .leaderboard-tabs {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    display: flex;
    gap: 8px;
  }
  .leaderboard-tab-btn {
    flex-shrink: 0;
    font-size: 0.75rem;
    padding: 8px 12px;
  }
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  /* Draw Studio on Mobile */
  .draw-studio-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .draw-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .draw-tool-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  /* Footer */
  .footer {
    padding: 30px 16px;
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }
}

/* --- SMALL PHONES (<= 480px) --- */
@media (max-width: 480px) {
  .logo-title span {
    display: none; /* Show TakeMyPixel without .com on very small phones */
  }
  .btn-secondary:not(#openAuthBtn) {
    display: none; /* Hide secondary nav buttons on ultra-narrow phones, keeping main CTA & auth */
  }
  .ticker-wrap {
    padding: 6px 10px;
  }
  .ticker-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
  }
  .form-row-2col {
    grid-template-columns: 1fr;
  }
  .preset-buttons-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
