/* WayPoint 3D — Glassmorphism Dark UI Design System */

:root {
  --bg-slate-950: #020617;
  --bg-slate-900: #0f172a;
  --bg-slate-800: #1e293b;
  --bg-slate-700: #334155;
  --border-slate-700: rgba(51, 65, 85, 0.6);
  --border-slate-600: rgba(71, 85, 105, 0.6);
  
  --text-white: #ffffff;
  --text-slate-200: #e2e8f0;
  --text-slate-300: #cbd5e1;
  --text-slate-400: #94a3b8;
  --text-slate-500: #64748b;

  --accent-teal: #2dd4bf;
  --accent-teal-hover: #14b8a6;
  --accent-purple: #c084fc;
  --accent-purple-hover: #a855f7;
  --accent-purple-dark: #9333ea;
  --accent-rose: #f43f5e;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-slate-900);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  color: var(--text-slate-200);
  user-select: none;
}

/* 3D Canvas Container */
#canvas-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* UI Overlay Container */
.ui-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  z-index: 10;
}

.pointer-auto {
  pointer-events: auto;
}

/* Glassmorphism Panel Foundation */
.glass-panel {
  background: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-slate-700);
  border-radius: 1.25rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
}

/* Top Bar */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.brand-card {
  padding: 1rem 1.25rem;
}

.brand-title {
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  color: var(--text-slate-400);
  font-size: 0.85rem;
  margin-top: 0.25rem;
  letter-spacing: 0.025em;
}

/* Primary Action Buttons */
.btn-primary-nav {
  background-color: var(--accent-teal);
  color: var(--bg-slate-900);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.8rem 1.5rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(45, 212, 191, 0.25);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary-nav:hover {
  background-color: var(--accent-teal-hover);
  transform: translateY(-1px);
  box-shadow: 0 15px 20px -3px rgba(45, 212, 191, 0.35);
}

/* Active Navigation Status Box */
.nav-status-card {
  width: 17rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  animation: slideInRight 0.3s ease-out forwards;
}

.nav-status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-status-title {
  color: var(--accent-teal);
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-icon-close {
  background: transparent;
  border: none;
  color: var(--text-slate-400);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border-radius: 0.375rem;
  transition: color 0.15s ease;
}

.btn-icon-close:hover {
  color: var(--accent-rose);
}

.nav-metrics-row {
  display: flex;
  gap: 1.5rem;
}

.metric-label {
  font-size: 0.65rem;
  color: var(--text-slate-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-value {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--text-white);
}

.metric-value span {
  font-size: 0.75rem;
  color: var(--text-slate-400);
}

.btn-next-floor {
  width: 100%;
  background-color: var(--accent-teal);
  color: var(--bg-slate-900);
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.6rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  margin-top: 0.25rem;
  transition: background-color 0.2s ease;
}

.btn-next-floor:hover {
  background-color: var(--accent-teal-hover);
}

/* Middle Layout: Floor Switcher & Shop Details */
.middle-area {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 1;
  padding: 1.5rem 0;
}

/* Floor Switcher Column */
.floor-switcher {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.floor-btn {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 700;
  border: 1px solid var(--border-slate-700);
  background: rgba(30, 41, 59, 0.8);
  color: var(--text-slate-300);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.floor-btn:hover {
  background: var(--bg-slate-700);
  color: var(--text-white);
}

.floor-btn.active {
  background: var(--accent-purple);
  color: var(--text-white);
  border-color: #d8b4fe;
  box-shadow: 0 10px 15px -3px rgba(192, 132, 252, 0.35);
}

/* Shop Detail Drawer */
.shop-drawer {
  width: 20rem;
  padding: 1.5rem;
  animation: slideInRight 0.3s ease-out forwards;
}

.shop-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.shop-drawer-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.shop-drawer-desc {
  color: var(--text-slate-300);
  font-size: 0.875rem;
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

.btn-navigate-here {
  width: 100%;
  background: var(--accent-purple);
  color: var(--text-white);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-navigate-here:hover {
  background: var(--accent-purple-hover);
}

/* Navigation Modal Dialog */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.2s ease-out;
}

.modal-content {
  background: var(--bg-slate-800);
  border: 1px solid var(--border-slate-700);
  border-radius: 1.5rem;
  padding: 2rem;
  width: 100%;
  max-width: 28rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-white);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-slate-400);
  margin-bottom: 0.5rem;
}

.form-select {
  width: 100%;
  background-color: var(--bg-slate-900);
  border: 1px solid var(--border-slate-700);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-white);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-select:focus {
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.2);
}

.btn-start-route {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-purple));
  color: var(--text-white);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.85rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  margin-top: 1.5rem;
  transition: opacity 0.2s ease, transform 0.15s ease;
  box-shadow: 0 10px 20px -5px rgba(45, 212, 191, 0.25);
}

.btn-start-route:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-start-route:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Animations */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(2rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Custom Scrollbar for Floor Switcher */
.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--bg-slate-700);
  border-radius: 9999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--text-slate-500);
}
