@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;700&display=swap');

:root {
  /* Tonal Hierarchy - Industrial Black */
  --bg-void: #000000;      /* Level 0: Viewport */
  --bg-app: #0e0e0e;       /* Level 1: App Base */
  --bg-sidebar: #1a1a1a;   /* Level 2: Tools */
  --bg-surface: #262626;   /* Level 3: Floating */
  
  /* Industrial Amber Palette */
  --primary: #f59e0b;      /* Primary Amber */
  --primary-dim: #d97706;
  --on-primary: #000000;   /* Black text on amber buttons */
  
  --secondary: #fbbf24;    /* Vivid Yellow */
  --text: #ffffff;
  --text-muted: #888888;
  --outline: #484847;      /* Ghost border fallback (15% opacity) */
  
  --radius: 0px;           /* Zero-Radius Rigidity */
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 { 
  font-family: var(--font-display); 
  font-weight: 700; 
  text-transform: uppercase; 
  letter-spacing: 0.05em; 
}

label, .label-technical { 
  font-family: var(--font-sans); 
  font-size: 11px; 
  font-weight: 600;
  text-transform: uppercase; 
  color: var(--text-muted); 
  letter-spacing: 0.1em;
}

/* Base Button */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.2s;
  gap: 8px;
  background: var(--bg-surface);
  color: var(--primary);
}

button:hover, .btn:hover { 
  background: rgba(245, 158, 11, 0.1); 
  color: var(--primary);
}

/* Primary Button */
.btn-primary { 
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dim) 100%);
  color: var(--on-primary);
}
.btn-primary:hover { 
  background: linear-gradient(135deg, #fbbf24 0%, var(--primary) 100%);
  color: var(--on-primary);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

/* Secondary Button */
.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-secondary:hover {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.1);
}

/* Danger Button */
.btn-danger {
  color: #ef4444;
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ff716c;
  box-shadow: none;
}

/* Ghost Button */
.btn-ghost { 
  background: transparent; 
  color: var(--text-muted); 
}
.btn-ghost:hover { 
  color: var(--primary);
  background: rgba(38, 38, 38, 0.4);
  box-shadow: none;
}

/* Data-Density Inputs */
input, select, textarea {
  width: 100%;
  padding: 12px 0;
  border: none;
  border-bottom: 1px solid var(--outline);
  background-color: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  transition: 0.3s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-bottom: 2px solid var(--primary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  width: 100%;
}

.card {
  background-color: var(--bg-sidebar);
  padding: 24px;
  border: none;
}

/* Slotted List Items */
.scene-item {
  background: var(--bg-app);
  padding: 12px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: 0.2s;
}
.scene-item:hover { background: var(--bg-surface); }
.scene-item.active { 
  border-left: 3px solid var(--primary);
  background: var(--bg-surface);
}

.badge {
  display: inline-flex;
  padding: 2px 8px;
  background: rgba(245, 158, 11, 0.1);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 10px;
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.badge-success { background: rgba(16, 185, 129, 0.1); color: #10b981; border-color: rgba(16, 185, 129, 0.2); }

/* Glassmorphism HUD */
.hud { 
  background: rgba(15, 15, 15, 0.8); 
  backdrop-filter: blur(20px);
  padding: 16px; 
  border: 1px solid rgba(72, 72, 71, 0.15);
}

.header {
  height: 64px;
  background-color: var(--bg-app);
  border-bottom: 1px solid rgba(72, 72, 71, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.logo { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  font-family: var(--font-display);
  font-weight: 700; 
  font-size: 18px; 
  color: var(--primary); 
}

.viewer-container {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-link { 
  color: var(--text-muted); 
  font-size: 12px; 
  font-family: var(--font-display);
  text-transform: uppercase; 
  letter-spacing: 0.1em;
}
.nav-link:hover, .nav-link.active { color: var(--primary); }

/* Utilities */
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.flex { display: flex; }
.flex-column { flex-direction: column; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.block { display: block; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--text-muted); }

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  background: var(--bg-surface);
  color: var(--text);
  padding: 14px 20px;
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  font-family: var(--font-sans);
  font-size: 13px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  animation: slideInRight 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
  max-width: 360px;
  pointer-events: auto;
}

.toast-error { border-left-color: #ef4444; }
.toast-success { border-left-color: #10b981; }

.toast.fade-out {
  animation: fadeOutRight 0.4s ease forwards;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}
