/* ==========================================================================
   Ten Million Dollar Homepage - Core Stylesheet
   Theme: Galactic Neon Dark (Outfit/Inter typography, deep space blues, glowing accents)
   ========================================================================== */

/* Design Tokens & Variables */
:root {
  --font-title: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Colors */
  --bg-darker: #080B11;
  --bg-dark: #0F172A;
  --bg-card: rgba(30, 41, 59, 0.4);
  --bg-glass: rgba(15, 23, 42, 0.6);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(139, 92, 246, 0.2);

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  --color-primary: #8B5CF6;
  --color-secondary: #EC4899;
  --color-accent-glow: linear-gradient(135deg, #8B5CF6, #EC4899);
  
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-danger: #EF4444;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.3);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Elements */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: clip;
  max-width: 100vw;
}

body {
  background-color: var(--bg-darker);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: clip;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

/* Background Ambient Glows */
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.12;
}

.bg-glow-1 {
  top: -100px;
  right: -50px;
  width: 500px;
  height: 500px;
  background: var(--color-primary);
}

.bg-glow-2 {
  bottom: 10%;
  left: -100px;
  width: 600px;
  height: 600px;
  background: var(--color-secondary);
}

/* Prevent bg-glow from causing horizontal overflow on mobile */
@media (max-width: 768px) {
  .bg-glow-1 {
    right: 0;
    width: 300px;
    height: 300px;
  }
  .bg-glow-2 {
    left: 0;
    width: 300px;
    height: 300px;
  }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Typography Utilities */
.gradient-text {
  background: var(--color-accent-glow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* App Header styling */
.app-header {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 15px 30px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1800px;
  margin: 0 auto;
  gap: 20px;
}

.brand h1 {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand p {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 2px;
  font-weight: 500;
}

/* Stats Cards */
.stats-container {
  display: flex;
  gap: 15px;
  flex: 1;
  max-width: 650px;
  margin: 0 40px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.stat-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.stat-value {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
}

.progress-bar-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
}

.progress-bar-fill {
  height: 100%;
  background: var(--color-accent-glow);
  width: 0%;
  transition: width 0.8s ease-out;
  box-shadow: 0 0 8px var(--color-primary);
}

/* Header Action Buttons & Search */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box {
  position: relative;
  width: 260px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

.search-box input {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px 10px 38px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  transition: var(--transition-fast);
}

.search-box input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  max-height: 250px;
  overflow-y: auto;
  z-index: 101;
  display: none;
}

.search-result-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: var(--transition-fast);
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.search-result-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--text-primary);
}

.search-result-desc {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Button UI Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent-glow);
  color: white;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.5);
}

.btn-primary:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.6;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-block {
  width: 100%;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

.btn-close:hover {
  color: var(--text-primary);
}

/* Notification Banners */
.notification-banner {
  background: rgba(16, 185, 129, 0.15);
  border-bottom: 1px solid rgba(16, 185, 129, 0.3);
  color: #34D399;
  padding: 10px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  animation: slideDown 0.3s ease;
}

.notification-banner.cancelled {
  background: rgba(239, 68, 68, 0.15);
  border-bottom: 1px solid rgba(239, 68, 68, 0.3);
  color: #F87171;
}

.hidden {
  display: none !important;
}

/* Main Canvas Workspace & Pan/Zoom Area */
.canvas-workspace {
  position: relative;
  flex: 1;
  min-height: 600px;
  overflow: hidden;
  background-color: #121824;
  border-bottom: 1px solid var(--border-color);
}

.canvas-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: absolute;
  top: 0;
  left: 0;
}

/* Viewport transformed via Javascript (translate/scale) */
.canvas-viewport {
  position: absolute;
  transform-origin: 0 0;
  cursor: crosshair; /* Snap selection cursor */
  user-select: none;
}

.canvas-viewport.pan-mode {
  cursor: grab;
}

.canvas-viewport.pan-mode:active {
  cursor: grabbing;
}

/* The actual image canvas */
#ad-canvas {
  background-color: #FFFFFF;
  display: block;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
  image-rendering: pixelated; /* Sharp pixel scaling */
}

/* Virtual Grid Overlays (100px major grid always visible, 10px minor grid on zoom) */
.canvas-viewport::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.26) calc(1px / var(--zoom, 1)), transparent calc(1px / var(--zoom, 1))),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.26) calc(1px / var(--zoom, 1)), transparent calc(1px / var(--zoom, 1)));
  background-size: 100px 100px;
  z-index: 2;
}

.canvas-viewport::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.12) calc(1px / var(--zoom, 1)), transparent calc(1px / var(--zoom, 1))),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.12) calc(1px / var(--zoom, 1)), transparent calc(1px / var(--zoom, 1)));
  background-size: 10px 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.canvas-viewport.show-grid::before {
  opacity: 1;
}

/* 1px Fine Pixel Grid Overlay (Fades in at extremely close zoom) */
.pixel-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.18) calc(1px / var(--zoom, 1)), transparent calc(1px / var(--zoom, 1))),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.18) calc(1px / var(--zoom, 1)), transparent calc(1px / var(--zoom, 1)));
  background-size: 1px 1px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.canvas-viewport.show-pixel-grid .pixel-grid-overlay {
  opacity: 1;
}

/* Live Selection Box overlay (placed outside scaled viewport) */
.selection-overlay {
  position: absolute;
  left: 0;
  top: 0;
  border: 1.5px dashed #EC4899;
  background: rgba(236, 72, 153, 0.15);
  display: none;
  pointer-events: auto;
  cursor: move;
  z-index: 10;
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.4);
  box-sizing: border-box; /* Crucial so borders don't add to the width */
}

.selection-details {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0F172A;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Resize handles on Selection Box */
.resize-handle {
  position: absolute;
  width: 8px;
  height: 8px;
  background-color: #FFFFFF;
  border: 1.5px solid #EC4899;
  border-radius: 50%;
  z-index: 12;
  box-sizing: border-box;
}

/* Expand touch target for mobile devices without affecting visual size */
.resize-handle::after {
  content: '';
  position: absolute;
  top: -12px;
  left: -12px;
  right: -12px;
  bottom: -12px;
}

.resize-handle.nw {
  top: -4px;
  left: -4px;
  cursor: nwse-resize;
}

.resize-handle.n {
  top: -4px;
  left: 50%;
  margin-left: -4px;
  cursor: ns-resize;
}

.resize-handle.ne {
  top: -4px;
  right: -4px;
  cursor: nesw-resize;
}

.resize-handle.w {
  top: 50%;
  left: -4px;
  margin-top: -4px;
  cursor: ew-resize;
}

.resize-handle.e {
  top: 50%;
  right: -4px;
  margin-top: -4px;
  cursor: ew-resize;
}

.resize-handle.sw {
  bottom: -4px;
  left: -4px;
  cursor: nesw-resize;
}

.resize-handle.s {
  bottom: -4px;
  left: 50%;
  margin-left: -4px;
  cursor: ns-resize;
}

.resize-handle.se {
  bottom: -4px;
  right: -4px;
  cursor: nwse-resize;
}

/* HUD floating controls */
.canvas-hud {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  padding: 8px 20px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-lg);
  z-index: 20;
  max-width: calc(100% - 32px);
}

.hud-mouse-icon {
  width: 14px;
  height: 14px;
  color: var(--text-secondary);
  align-self: center;
}

.hud-keyboard-tip {
  font-size: 11px;
  color: var(--text-secondary);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-keyboard-tip kbd {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: inherit;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 10px;
}

.hud-coordinates {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding-right: 15px;
}

.hud-coord-item {
  min-width: 65px;
}

.hud-coord-item .label {
  opacity: 0.6;
}

.hud-coord-item strong {
  color: var(--text-primary);
  font-family: monospace;
}

.hud-zoom-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding-right: 15px;
}

.hud-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.hud-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.hud-zoom-level {
  font-size: 11px;
  font-weight: 700;
  width: 40px;
  text-align: center;
  font-family: monospace;
}

.hud-interaction-modes {
  display: flex;
  gap: 6px;
}

.hud-mode-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.hud-mode-btn:hover {
  color: var(--text-primary);
}

.hud-mode-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.05);
}

/* Minimap Radar widget */
.minimap-window {
  position: absolute;
  bottom: 24px;
  right: 24px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px;
  box-shadow: var(--shadow-lg);
  z-index: 20;
}

.minimap-title {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.minimap-container {
  width: 160px;
  height: 100px;
  position: relative;
  background: #080B11;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  overflow: hidden;
  cursor: crosshair;
}

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

.minimap-viewport-indicator {
  position: absolute;
  top: 0;
  left: 0;
  border: 1.5px solid var(--color-primary);
  background: rgba(139, 92, 246, 0.15);
  pointer-events: none;
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.3);
}

.minimap-selection-indicator {
  position: absolute;
  border: 1px dashed #EC4899;
  background: rgba(236, 72, 153, 0.25);
  pointer-events: none;
  box-shadow: 0 0 4px rgba(236, 72, 153, 0.4);
}

/* Interactive hover Tooltip Card */
.ad-tooltip {
  position: absolute;
  z-index: 1000;
  width: 280px;
  background: #0F172A;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), var(--shadow-glow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  transform: scale(0.95);
  overflow: hidden;
}

.ad-tooltip.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.tooltip-image-container {
  width: 100%;
  height: 140px;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 10px;
}

.tooltip-image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  image-rendering: auto;
}

.tooltip-body {
  padding: 16px;
}

.tooltip-title {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.tooltip-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.4;
  word-wrap: break-word;
}

.tooltip-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 10px;
}

.tooltip-coords {
  color: var(--text-muted);
  font-family: monospace;
}

.tooltip-link {
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Sidebar slide-out Drawer (Purchase form) */
.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
}

.drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.purchase-drawer {
  position: fixed;
  top: 0;
  right: -450px;
  width: 450px;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-dark);
  border-left: 1px solid var(--border-color);
  z-index: 1001;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.purchase-drawer.active {
  right: 0;
}

.drawer-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-header h2 {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
}

.drawer-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}

.drawer-close:hover {
  color: var(--text-primary);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  scrollbar-width: thin;
}

/* Selection Info Card inside Drawer */
.selection-info-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 24px;
}

.selection-grid-details {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
}

.info-label {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.selection-grid-details strong {
  font-size: 13px;
}

.selection-price-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-value {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 800;
  color: var(--color-secondary);
}

/* Forms layout & inputs */
.purchase-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group textarea {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.15);
}

.form-tip {
  font-size: 11px;
  color: var(--text-muted);
}

/* Image Upload Container UI */
.image-uploader {
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  position: relative;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.3);
  transition: var(--transition-fast);
}

.image-uploader:hover {
  border-color: var(--color-primary);
  background: rgba(139, 92, 246, 0.02);
}

.file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.uploader-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.uploader-icon {
  width: 32px;
  height: 32px;
  color: var(--text-secondary);
}

.uploader-prompt span {
  font-size: 13px;
  font-weight: 600;
}

.uploader-prompt small {
  font-size: 10px;
  color: var(--text-muted);
  max-width: 250px;
}

.uploader-preview {
  position: relative;
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 4px;
  overflow: hidden;
}

.uploader-preview img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.btn-remove-image {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  z-index: 5;
}

.btn-remove-image:hover {
  background: #000;
}

.form-terms {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  text-align: center;
  margin-top: 10px;
}

/* FAQ Section Accordion styling */
.faq-section {
  padding: 80px 20px;
  background-color: var(--bg-darker);
  border-top: 1px solid var(--border-color);
}

.faq-container {
  max-width: 900px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-title);
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 50px;
}

.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  transition: var(--transition-fast);
}

.faq-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.faq-trigger {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 20px 24px;
  text-align: left;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-trigger i {
  color: var(--text-secondary);
  transition: transform 0.2s ease;
  width: 18px;
  height: 18px;
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 24px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.faq-item.active .faq-content {
  max-height: 200px;
  padding-bottom: 20px;
}

.faq-item.active .faq-trigger i {
  transform: rotate(180deg);
}

/* Footer layout */
.app-footer {
  background: #04060A;
  border-top: 1px solid var(--border-color);
  padding: 30px 20px;
  margin-top: auto;
}

.footer-container {
  max-width: 1800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-secondary);
}

/* Keyframes and animations */
@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .header-container {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .stats-container {
    margin: 6px 0;
    max-width: none;
  }
  .header-actions {
    justify-content: space-between;
  }
  .search-box {
    flex: 1;
  }
  .minimap-window {
    display: none;
  }
}

@media (max-width: 768px) {
  .app-header {
    padding: 10px 16px;
  }
  
  .brand {
    text-align: center;
  }

  .brand h1 {
    font-size: 20px;
  }

  .brand p.tagline {
    font-size: 10px;
    margin-top: 1px;
  }

  .stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 8px 0;
    width: 100%;
  }

  .stat-card {
    padding: 6px 10px;
    text-align: center;
    align-items: center;
  }

  .stat-label {
    font-size: 8px;
  }

  .stat-value {
    font-size: 12px;
  }

  .header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    margin-top: 4px;
  }

  .search-box {
    width: 100%;
    flex: none;
  }

  .header-actions .btn {
    flex: 1;
    justify-content: center;
    padding: 10px;
    font-size: 13px;
    min-width: 0;
  }

  .canvas-workspace {
    min-height: 450px; /* Make it shorter on smaller heights */
  }

  .notification-banner {
    padding: 10px 16px;
  }

  .faq-section {
    padding: 60px 16px;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .purchase-drawer {
    width: 100%;
    right: -100%;
    border-left: none;
    border-top: 1px solid var(--border-color);
  }

  .canvas-hud {
    gap: 10px;
    padding: 6px 14px;
  }

  .hud-keyboard-tip {
    display: none;
  }

  .section-title {
    font-size: 26px;
  }

  .section-subtitle {
    font-size: 13px;
    margin-bottom: 30px;
  }

  .faq-trigger {
    padding: 16px;
    font-size: 14px;
  }

  .faq-content {
    padding: 0 16px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .app-header {
    padding: 8px 12px;
  }

  .brand h1 {
    font-size: 18px;
  }

  .brand p.tagline {
    display: none; /* Hide tagline entirely on very small screens to save valuable vertical canvas space */
  }

  .stats-container {
    gap: 4px;
    margin: 6px 0;
  }

  .stat-card {
    padding: 4px 6px;
  }

  .stat-label {
    font-size: 7px;
  }

  .stat-value {
    font-size: 10px;
  }

  .canvas-hud {
    bottom: 12px;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 9999px;
    width: max-content;
  }

  .hud-coordinates {
    display: none; /* Hide coords on mobile to fit controls */
  }

  .hud-zoom-controls {
    gap: 4px;
    padding-right: 8px;
  }

  .hud-btn {
    width: 24px;
    height: 24px;
  }

  .hud-zoom-level {
    width: 32px;
    font-size: 10px;
  }

  .hud-mode-btn {
    padding: 4px 8px;
    font-size: 11px;
    gap: 4px;
  }

  .hud-mode-btn span {
    display: none; /* Hide text, only show icons for a super compact pill */
  }
}
