/* Modern Design System for 3D Oasis Walkthrough + VIP Access Features */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --color-bg: #090c10;
  --color-gold: #f59e0b;
  --color-gold-light: #fcd34d;
  --color-turquoise: #06b6d4;
  --color-purple: #8b5cf6;
  --color-glass-bg: rgba(15, 23, 42, 0.7);
  --color-glass-border: rgba(255, 255, 255, 0.15);
  --color-text-main: #f8fafc;
  --color-text-muted: #94a3b8;
  --shadow-glass: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--color-bg);
  font-family: var(--font-primary);
  color: var(--color-text-main);
  touch-action: none;
}

#canvas-container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

/* Glassmorphism UI Base */
.glass-panel {
  background: var(--color-glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glass);
}

/* Header & Title Overlay */
.header-overlay {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 10;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  pointer-events: auto;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.title-group h1 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 30%, #fcd34d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* VIP Badge Status */
.user-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 4px;
  transition: all 0.3s ease;
}

.user-status-badge.guest {
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.user-status-badge.vip {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(139, 92, 246, 0.25));
  color: #fcd34d;
  border: 1px solid var(--color-gold);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

/* Top Right Settings Widget */
.settings-top-right {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--color-glass-border);
  color: var(--color-text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--color-gold);
  transform: translateY(-2px);
}

.icon-btn.active {
  background: var(--color-gold);
  color: #000;
}

/* VIP Control Sidebar (Top Left Below Header) */
.vip-sidebar {
  position: absolute;
  top: 100px;
  left: 20px;
  z-index: 10;
  padding: 16px;
  width: 260px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s ease;
}

.vip-sidebar.locked {
  opacity: 0.8;
  filter: grayscale(0.5);
}

.sidebar-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-gold-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vip-tag {
  font-size: 0.65rem;
  padding: 2px 6px;
  background: var(--color-purple);
  color: #fff;
  border-radius: 4px;
  font-weight: 700;
}

.weather-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.weather-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-main);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.weather-btn:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--color-gold);
}

.weather-btn.active {
  background: linear-gradient(135deg, #fcd34d, #f59e0b);
  color: #000;
  font-weight: 700;
}

.weather-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Build Tools Group */
.builder-grid {
  display: flex;
  gap: 8px;
}

.builder-btn {
  flex: 1;
  padding: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--color-text-main);
  font-size: 0.75rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.builder-btn.active {
  background: var(--color-turquoise);
  color: #000;
  font-weight: 700;
}

/* Control Panel Bar (Bottom) */
.controls-bottom {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

.btn-group {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ui-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  padding: 10px 18px;
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.ui-btn:hover {
  color: var(--color-text-main);
  background: rgba(255, 255, 255, 0.08);
}

.ui-btn.active {
  color: #0f172a;
  background: linear-gradient(135deg, #fcd34d, #f59e0b);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.ui-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.15);
}

/* On-Screen Touch / Keyboard Movement Guide Overlay */
.instructions-overlay {
  position: absolute;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  opacity: 0.9;
}

.key-badge {
  display: inline-block;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  color: var(--color-text-main);
  font-weight: 600;
  font-size: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Modal Info Card for Hotspots */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 90%;
  max-width: 440px;
  padding: 28px;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.open .modal-card {
  transform: translateY(0) scale(1);
}

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

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-gold-light);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-body {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #cbd5e1;
}

.modal-badge {
  display: inline-block;
  margin-top: 16px;
  padding: 4px 12px;
  background: rgba(6, 182, 212, 0.2);
  color: var(--color-turquoise);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Loading Screen */
#loading-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #090c10;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(245, 158, 11, 0.2);
  border-top-color: var(--color-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: var(--color-text-main);
}

/* 3D Hotspot Markers */
.hotspot-marker {
  position: absolute;
  z-index: 5;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-gold);
  border-radius: 20px;
  color: var(--color-text-main);
  font-size: 0.78rem;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
  transition: transform 0.2s ease, opacity 0.3s ease;
}

.hotspot-marker:hover {
  transform: translate(-50%, -50%) scale(1.1);
  background: rgba(245, 158, 11, 0.9);
  color: #000;
}

.hotspot-dot {
  width: 8px;
  height: 8px;
  background: var(--color-gold-light);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-gold-light);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .vip-sidebar {
    top: 90px;
    width: 200px;
    padding: 12px;
  }
  .header-overlay {
    top: 10px;
    left: 10px;
    padding: 8px 14px;
  }
  .title-group h1 {
    font-size: 1.05rem;
  }
  .controls-bottom {
    bottom: 10px;
    padding: 6px;
    width: 95%;
    justify-content: center;
  }
  .ui-btn {
    padding: 8px 10px;
    font-size: 0.75rem;
  }
  .instructions-overlay {
    display: none;
  }
}
