/* =========================================================================
   CORE MINER TYCOON - VOXEL 3D UI & DESIGN SYSTEM
   Sections:
   1. Reset & Global Viewport Rules
   2. Canvas Layer & Safe Areas
   3. Voxel 3D Panels & Containers
   4. Voxel 3D Pushable Buttons (Chunky Bevels & Depth Feedback)
   5. Keyframe Animations & Glow Effects
   6. Modal & Pointer-Event Accessibility Utilities
   ========================================================================= */

/* 1. Reset & Global Viewport Rules */
[x-cloak] {
  display: none !important;
}

* {
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  background-color: #f1f5f9;
  font-family: 'Fredoka', 'Outfit', sans-serif;
}

/* 2. Canvas Layer & Safe Areas */
#canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  touch-action: none;
}

.safe-top {
  padding-top: max(env(safe-area-inset-top), 12px);
}

.safe-bottom {
  padding-bottom: max(env(safe-area-inset-bottom), 16px);
}



/* 3. Modern Minimal HUD & Glassmorphism System */
.hud-pill {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.07), 0 1px 3px rgba(15, 23, 42, 0.04);
  border-radius: 9999px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.hud-pill:hover {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 20px -2px rgba(15, 23, 42, 0.1), 0 2px 4px rgba(15, 23, 42, 0.05);
}

.hud-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 28px -4px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);
  border-radius: 20px;
}

.hud-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  color: #334155;
  transition: all 0.16s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  position: relative;
  user-select: none;
}
.hud-icon-btn:hover {
  background: #ffffff;
  color: #0f172a;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}
.hud-icon-btn:active {
  transform: translateY(1px) scale(0.96);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

.hud-btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
  border-radius: 9999px;
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  user-select: none;
}
.hud-btn-primary:hover {
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
  transform: translateY(-1.5px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
}
.hud-btn-primary:active {
  transform: translateY(1px) scale(0.97);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.hud-camera-rail {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.1), 0 2px 6px rgba(15, 23, 42, 0.05);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hud-cam-btn {
  width: 38px;
  height: 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #475569;
  font-weight: 800;
  font-size: 13px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.hud-cam-btn:hover {
  background: rgba(241, 245, 249, 0.95);
  color: #0f172a;
  transform: scale(1.06);
}
.hud-cam-btn:active {
  transform: scale(0.92);
  background: rgba(226, 232, 240, 0.9);
}
.hud-cam-btn-emerald {
  color: #059669;
}
.hud-cam-btn-emerald:hover {
  background: #ecfdf5;
  color: #047857;
}
.hud-cam-btn-indigo {
  color: #4f46e5;
}
.hud-cam-btn-indigo:hover {
  background: #eef2ff;
  color: #4338ca;
}

.hud-fever-btn {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hud-fever-btn:hover {
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}
.hud-fever-ready {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.5), 0 4px 12px rgba(234, 88, 12, 0.35) !important;
  animation: fever-pulse 1.2s infinite alternate ease-in-out;
}
@keyframes fever-pulse {
  0% { transform: scale(1); box-shadow: 0 0 10px rgba(245, 158, 11, 0.4); }
  100% { transform: scale(1.04); box-shadow: 0 0 22px rgba(239, 68, 68, 0.8); }
}

/* Refined Voxel Panels & Containers (Cleaner & Softer) */
.voxel-3d-panel {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow: 0 12px 36px -6px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.04);
}

.voxel-3d-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

/* 4. Voxel 3D Pushable Buttons (Refined) */
.voxel-btn-3d {
  transition: all 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  cursor: pointer;
  border-radius: 14px;
}

.voxel-btn-3d:active {
  transform: translateY(2px) scale(0.98) !important;
}

/* Button Color Themes */
.voxel-btn-slate {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05);
}
.voxel-btn-slate:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.voxel-btn-emerald {
  background: #10b981;
  color: #ffffff;
  border: 1px solid #34d399;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
}
.voxel-btn-emerald:hover {
  background: #059669;
}

.voxel-btn-indigo {
  background: #4f46e5;
  color: #ffffff;
  border: 1px solid #818cf8;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.3);
}
.voxel-btn-indigo:hover {
  background: #4338ca;
}

.voxel-btn-amber {
  background: #f59e0b;
  color: #0f172a;
  border: 1px solid #fcd34d;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.3);
}
.voxel-btn-amber:hover {
  background: #d97706;
}

.voxel-btn-red {
  background: #ef4444;
  color: #ffffff;
  border: 1px solid #fca5a5;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.3);
}
.voxel-btn-red:hover {
  background: #dc2626;
}

.voxel-btn-blue {
  background: #2563eb;
  color: #ffffff;
  border: 1px solid #60a5fa;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
}
.voxel-btn-blue:hover {
  background: #1d4ed8;
}

.voxel-btn-purple {
  background: #9333ea;
  color: #ffffff;
  border: 1px solid #c084fc;
  box-shadow: 0 3px 10px rgba(147, 51, 234, 0.3);
}
.voxel-btn-purple:hover {
  background: #7e22ce;
}

/* 5. Keyframe Animations & Glow Effects */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 16px rgba(245, 158, 11, 0.6); }
  50% { box-shadow: 0 0 28px rgba(239, 68, 68, 0.9); }
}

.fever-active {
  animation: pulse-glow 1s infinite;
}

/* 6. Modal & Pointer-Event Accessibility Utilities */
.pointer-none {
  pointer-events: none !important;
}

