/* 
 * ALLVOXEL V4 - "THE DEFINITIVE ENGINE" 
 * Industrial Premium Design System. 
 * Focus: Structural density, technical layering, and commanding scale.
 */

:root {
  /* Industrial Obsidian Palette */
  --void: #010103;
  --obsidian: #050508;
  --obsidian-alt: #0a0a0f;
  --industrial-gray: #1a1a24;

  /* Engine Energy Tokens */
  --hyper-indigo: #6366f1;
  --matrix-cyan: #22d3ee;
  --electric-violet: #a855f7;
  --warning-gold: #fbbf24;
  --mint: #4ade80;

  /* Semantic Surfaces */
  --surface-glass: rgba(10, 10, 15, 0.7);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-active: rgba(99, 102, 241, 0.4);

  /* Gradients (Commanding) */
  --grad-engine: linear-gradient(135deg, var(--hyper-indigo) 0%, var(--matrix-cyan) 100%);
  --grad-industrial: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
  --grad-v4: linear-gradient(135deg, #6363f1 0%, #a855f7 30%, #22d3ee 70%, #4ade80 100%);
}

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Outfit:wght@100..900&family=JetBrains+Mono:wght@100..800&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--void);
  color: #e2e8f0;
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(34, 211, 238, 0.05) 0%, transparent 40%);
}

/* Global Texture Overlays */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
  z-index: 100;
}

/* Typography V4 */
.outfit {
  font-family: 'Outfit', sans-serif;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

h1,
h2,
h3,
.heading-v4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.85;
  text-transform: uppercase;
}

.text-gradient-engine {
  background: var(--grad-engine);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Base Industrial Grids */
.bg-grid-v4 {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 10px 10px, 10px 10px;
}

/* V4 Industrial Glass */
.glass-engine {
  background: var(--surface-glass);
  backdrop-filter: blur(40px) saturate(200%);
  border: 1px solid var(--border-glass);
  box-shadow:
    0 10px 40px -10px rgba(0, 0, 0, 0.8),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.glass-engine::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-industrial);
  pointer-events: none;
  opacity: 0.5;
}

.glass-card-v4 {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.glass-card-v4:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--hyper-indigo);
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.8);
  transform: translateY(-8px) scale(1.01);
}

/* High-Volume Atmosphere */
.mesh-deep {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  filter: blur(150px);
  opacity: 0.15;
  border-radius: 50%;
}

.glow-v4-primary {
  background: radial-gradient(circle, var(--hyper-indigo), transparent 75%);
}

.glow-v4-cyan {
  background: radial-gradient(circle, var(--matrix-cyan), transparent 75%);
}

.glow-v4-violet {
  background: radial-gradient(circle, var(--electric-violet), transparent 75%);
}

/* V4 Command Buttons */
.btn-engine {
  position: relative;
  padding: 18px 48px;
  border-radius: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.btn-engine-primary {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.3);
}

.btn-engine-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 20px 40px rgba(255, 255, 255, 0.5);
}

.btn-engine-accent {
  background: var(--grad-engine);
  color: white;
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
}

.btn-engine-accent:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 20px 45px rgba(34, 211, 238, 0.6);
}

.btn-engine-ghost {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
}

.btn-engine-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Container V4 */
.container-v4 {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

/* Animations Hub V4 */
.reveal-v4 {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  transition: all 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.reveal-v4.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Specialized UI Snippets */
.hud-panel {
  background: rgba(255, 255, 255, 0.03);
  border-left: 2px solid var(--matrix-cyan);
  padding: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--matrix-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.code-snippet {
  background: #050508;
  border-radius: 8px;
  padding: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  line-height: 1.8;
}

/* Floating Metrics */
.metric-float {
  position: absolute;
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  z-index: 20;
  pointer-events: none;
}

@keyframes float-v4 {

  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(5px, -15px);
  }
}

.animate-float-v4 {
  animation: float-v4 6s ease-in-out infinite;
}

/* Scrollbar V4 */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--void);
}

::-webkit-scrollbar-thumb {
  background: var(--industrial-gray);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--hyper-indigo);
}