/**
 * Singinn Software - 360° 3D Interactive Technology Experience Styles
 */

:root {
  --si-gold: #fbbf24;
  --si-amber: #f59e0b;
  --si-bronze: #d97706;
  --si-cyan: #38bdf8;
  --si-blue: #0284c7;
  --si-dark: #070a14;
  --si-card-bg: rgba(9, 14, 28, 0.82);
  --si-border-glass: rgba(255, 255, 255, 0.12);
}

* {
  box-sizing: border-box;
}

body.experience-3d-body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #050811;
  color: #e2e8f0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

/* Fullscreen WebGL Canvas */
.webgl-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 1;
  outline: none;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, #0f172a 0%, #060913 100%);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loading-screen.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none !important;
}

.loading-emblem {
  height: 60px;
  width: auto;
  filter: drop-shadow(0 0 25px rgba(245, 158, 11, 0.6));
  animation: pulseEmblem 2.5s infinite ease-in-out;
}

@keyframes pulseEmblem {

  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.5));
  }

  50% {
    transform: scale(1.08);
    filter: drop-shadow(0 0 35px rgba(251, 191, 36, 0.8));
  }
}

/* HUD Top Bar */
.hud-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  z-index: 100;
  background: linear-gradient(180deg, rgba(6, 9, 18, 0.92) 0%, rgba(6, 9, 18, 0.65) 75%, transparent 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
}

.camera-presets-group {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.btn-hud-view {
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 50px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-hud-view:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.btn-hud-view.active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #070a14;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
}

.btn-hud-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--si-border-glass);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-hud-icon:hover {
  color: #ffffff;
  border-color: #fbbf24;
  background: rgba(245, 158, 11, 0.2);
}

.btn-hud-icon.active {
  color: #fbbf24;
  border-color: #fbbf24;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.btn-hud-accent {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid #38bdf8;
  color: #ffffff;
  font-weight: 700;
  border-radius: 50px;
  padding: 5px 14px;
  font-size: 0.82rem;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.btn-hud-accent:hover {
  background: #38bdf8;
  color: #070a14;
}

/* Left Product Carousel Dock */
.hud-left-dock {
  position: fixed;
  left: 20px;
  top: 80px;
  bottom: 50px;
  width: 220px;
  z-index: 90;
  pointer-events: auto;
}

.dock-scroll-wrapper {
  overflow-y: auto;
  max-height: calc(100vh - 150px);
  padding-right: 5px;
}

.dock-scroll-wrapper::-webkit-scrollbar {
  width: 4px;
}

.dock-scroll-wrapper::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.3);
  border-radius: 4px;
}

.btn-dock-pod {
  background: rgba(9, 14, 28, 0.75);
  border: 1px solid var(--si-border-glass);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  padding: 7px 10px;
  color: #e2e8f0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  cursor: pointer;
}

.btn-dock-pod:hover,
.btn-dock-pod.active {
  background: rgba(245, 158, 11, 0.22);
  border-color: #fbbf24;
  transform: translateX(4px);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.25);
}

.dock-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dock-title {
  font-weight: 700;
  font-size: 0.82rem;
  color: #ffffff;
}

.dock-cat {
  font-size: 0.68rem;
  color: #94a3b8;
}

/* Bottom Bar */
.hud-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  z-index: 100;
  background: linear-gradient(0deg, rgba(6, 9, 18, 0.92) 0%, rgba(6, 9, 18, 0.6) 80%, transparent 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

/* Product Details Modal (HUD Slide-over) */
.product-hud-modal {
  position: fixed;
  top: 75px;
  right: 25px;
  width: 440px;
  max-width: calc(100vw - 40px);
  z-index: 150;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  visibility: hidden;
}

.product-hud-modal.show {
  opacity: 1;
  transform: translateX(0);
  visibility: visible;
}

.hud-modal-content {
  background: var(--si-card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(245, 158, 11, 0.15) inset;
  overflow: hidden;
}

.btn-close-hud {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #e2e8f0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-close-hud:hover {
  background: #ef4444;
  color: #ffffff;
}

.hotspot-chip-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.82rem;
}

.hotspot-chip-title {
  color: #fbbf24;
  font-weight: 700;
  margin-bottom: 2px;
}

.hotspot-chip-desc {
  color: #cbd5e1;
  font-size: 0.76rem;
  line-height: 1.4;
}

/* 3D AI Assistant Widget */
.ai-assistant-widget {
  position: fixed;
  bottom: 35px;
  right: 25px;
  z-index: 120;
}

.ai-avatar-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-avatar-ring {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px dashed #fbbf24;
  animation: rotateRing 12s linear infinite;
}

@keyframes rotateRing {
  100% {
    transform: rotate(360deg);
  }
}

.ai-avatar-core {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #0284c7 0%, #0369a1 50%, #070a14 100%);
  border: 2px solid #38bdf8;
  color: #ffffff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.6), 0 0 10px rgba(251, 191, 36, 0.4);
  transition: transform 0.25s;
}

.ai-avatar-btn:hover .ai-avatar-core {
  transform: scale(1.1);
}

.ai-status-pulse {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #070a14;
  box-shadow: 0 0 8px #10b981;
}

/* AI Dialogue Panel */
.ai-dialogue-panel {
  position: absolute;
  bottom: 75px;
  right: 0;
  width: 360px;
  max-width: calc(100vw - 30px);
  background: var(--si-card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.ai-messages-body {
  max-height: 250px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-bubble {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 0.84rem;
  color: #e2e8f0;
  line-height: 1.5;
}

.ai-bubble.user {
  background: rgba(2, 132, 199, 0.35);
  border-color: #0284c7;
  align-self: flex-end;
  color: #ffffff;
}

.btn-ai-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  padding: 3px 10px;
  font-size: 0.72rem;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ai-chip:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: #fbbf24;
  color: #fbbf24;
}

.btn-icon-xs {
  background: transparent;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Tech Lab Modal */
.tech-lab-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.tech-lab-dialog {
  width: 680px;
  max-width: 100%;
}

.tech-lab-content {
  background: rgba(9, 14, 28, 0.95);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(245, 158, 11, 0.15) inset;
}

/* Mobile Tweaks */
@media (max-width: 768px) {
  .product-hud-modal {
    top: auto;
    bottom: 45px;
    right: 10px;
    left: 10px;
    width: auto;
    max-width: none;
  }

  .hud-left-dock {
    display: none !important;
  }
}