/* ==========================================================================
   MaxIndusAR — Enterprise Industrial WebAR Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&family=Outfit:wght@500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg-dark: #070a12;
  --bg-surface: #0e1424;
  --bg-card: rgba(18, 26, 44, 0.75);
  --bg-input: #151f33;
  --border: rgba(255, 255, 255, 0.08);
  --border-active: #f59e0b;
  --amber: #f59e0b;
  --amber-hover: #d97706;
  --amber-glow: rgba(245, 158, 11, 0.35);
  --cyan: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.35);
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.3);
  --red: #ef4444;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #64748b;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: radial-gradient(circle at 50% 0%, #151d30 0%, var(--bg-dark) 100%);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Background Cyber Grid */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Header */
.max-header {
  position: sticky;
  top: 0;
  height: 70px;
  background: rgba(14, 20, 36, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  z-index: 1000;
}

.max-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #fff;
}

.max-brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--amber), #ea580c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #000;
  box-shadow: 0 0 24px var(--amber-glow);
}

.max-brand-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.max-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 6px 12px;
  border-radius: 9999px;
  letter-spacing: 0.5px;
}

.max-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.max-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.max-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.max-nav-link:hover {
  color: #fff;
  border-color: var(--amber);
  background: rgba(245, 158, 11, 0.08);
}

/* Container */
.max-container {
  max-width: 1180px;
  margin: 40px auto;
  padding: 0 24px;
  width: 100%;
  flex: 1;
  position: relative;
  z-index: 1;
}

.max-page-header {
  margin-bottom: 36px;
}

.max-page-title {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #ffffff 40%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.max-page-desc {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 760px;
}

/* Industrial Grid & Cards */
.max-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.max-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.max-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 24px rgba(245, 158, 11, 0.15);
}

.max-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--amber);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.max-card-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}

.max-card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Stepper Card Layout */
.max-step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  margin-bottom: 28px;
  backdrop-filter: blur(20px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
  position: relative;
}

@media (max-width: 900px) {
  .max-step-card {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
  }
}

.max-step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--amber);
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 5px 12px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

.max-step-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
}

.max-step-desc {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Interactive Preview Box */
.max-preview-viewport {
  width: 100%;
  height: 280px;
  border-radius: var(--radius);
  background: radial-gradient(circle at center, #151e33 0%, #080c16 100%);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
}

.max-preview-viewport img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

.max-preview-viewport video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
}

.max-preview-viewport a-scene {
  width: 100%;
  height: 100%;
}

/* Control Overlay on Viewport */
.max-viewport-hud {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 3px 8px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 10;
}

/* 3D Controls Panel */
.max-controls-panel {
  background: rgba(14, 20, 36, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.max-control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.max-control-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.max-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #1e293b;
  outline: none;
}

.max-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--amber);
  cursor: pointer;
  box-shadow: 0 0 10px var(--amber);
}

/* Form Inputs */
.max-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.max-input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 12px var(--amber-glow);
}

/* Buttons */
.max-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.max-btn-primary {
  background: linear-gradient(135deg, var(--amber), #ea580c);
  color: #000;
  box-shadow: 0 4px 20px var(--amber-glow);
}

.max-btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--amber-glow);
}

.max-btn-cyan {
  background: linear-gradient(135deg, var(--cyan), #3b82f6);
  color: #fff;
  box-shadow: 0 4px 20px var(--cyan-glow);
}

.max-btn-cyan:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.max-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid var(--border);
}

.max-btn-secondary:hover {
  border-color: var(--amber);
  background: rgba(245, 158, 11, 0.08);
}

/* Action Bar */
.max-action-bar {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 36px;
  padding-bottom: 80px;
}

/* Footer */
.max-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: rgba(14, 20, 36, 0.7);
  padding: 24px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-sub);
}
