/* ==========================================================================
   Webest (webest.asia) — Interactive IT Thesis & Project Sandbox Hub Styles
   ========================================================================== */

:root {
  --brand-primary: #6366f1;
  --brand-secondary: #06b6d4;
  --brand-accent: #10b981;
  --bg-dark: #090d16;
  --bg-card: #111827;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background-color: #070b14;
  color: #f8fafc;
  overflow-x: hidden;
}

.font-mono-code {
  font-family: 'JetBrains Mono', monospace;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}

::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.4);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.7);
}

/* Ambient Background Glow */
.hero-glow {
  background:
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.16) 0%, transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(6, 182, 212, 0.14) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
}

/* Case Sidebar Item Active State */
.case-nav-btn {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.case-nav-btn:hover {
  transform: translateX(3px);
}

.case-nav-btn.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22) 0%, rgba(6, 182, 212, 0.12) 100%);
  border-color: rgba(99, 102, 241, 0.65);
  box-shadow: 0 8px 25px -5px rgba(99, 102, 241, 0.25);
}

/* Sandbox Viewport Modes */
.sandbox-viewport-wrapper {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sandbox-viewport-wrapper.mobile-frame {
  max-width: 410px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 42px;
  border: 10px solid #1e293b;
  box-shadow:
    0 0 0 2px #334155,
    0 25px 60px -15px rgba(0, 0, 0, 0.85),
    0 0 40px rgba(99, 102, 241, 0.15);
  background: #0f172a;
  overflow: hidden;
  position: relative;
}

.sandbox-viewport-wrapper.mobile-frame::before {
  content: "";
  display: block;
  width: 110px;
  height: 22px;
  background: #090d16;
  border-radius: 0 0 14px 14px;
  margin: 0 auto;
  position: relative;
  z-index: 30;
}

/* AI Camera Laser Scan Animation (Case #09) */
@keyframes scanLaser {
  0% {
    top: 4%;
    opacity: 0.9;
  }
  50% {
    top: 92%;
    opacity: 1;
  }
  100% {
    top: 4%;
    opacity: 0.9;
  }
}

.ai-laser-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #10b981, #06b6d4, #10b981, transparent);
  box-shadow: 0 0 14px 3px rgba(16, 185, 129, 0.75);
  animation: scanLaser 2.6s ease-in-out infinite;
  pointer-events: none;
  z-index: 20;
}

/* Bounding Box Pulse */
@keyframes bboxPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
}

.bbox-active {
  animation: bboxPulse 1.8s infinite;
}

/* Subtle Fade In for Dynamic Render */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-view-in {
  animation: fadeSlideUp 0.2s ease-out forwards;
}

/* Toast Notification */
.toast-enter {
  animation: fadeSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Selection Chip Active */
.tech-chip {
  transition: all 0.15s ease;
}

.tech-chip.selected {
  background: rgba(99, 102, 241, 0.22);
  border-color: #6366f1;
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.4);
}

/* V2 Enhancements: Admin Bar Chart Animation */
@keyframes barGrowUp {
  from {
    transform: scaleY(0.1);
    opacity: 0.4;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

.chart-bar-col {
  transform-origin: bottom;
  animation: barGrowUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* V2 Enhancements: OpenCV Face Landmarks Grid Pulse */
@keyframes landmarkPulse {
  0%, 100% {
    opacity: 0.55;
    transform: scale(0.95);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

.landmark-dot {
  animation: landmarkPulse 1.6s ease-in-out infinite;
}

/* V2 Enhancements: Mobile Bottom Nav */
.mobile-bottom-nav {
  background: rgba(9, 13, 22, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(51, 65, 85, 0.8);
}
