/* ==========================================================================
   Passeio Virtual 360° - Apartamentos Tenda | Meta Quest 3S & Web
   Design System: Minimalist Luxury Glassmorphism
   ========================================================================== */

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

:root {
  --bg-dark: #0a0c10;
  --bg-card: rgba(16, 20, 28, 0.75);
  --bg-card-hover: rgba(28, 35, 48, 0.9);
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-active: #e5b869;
  --accent-gold: #e5b869;
  --accent-cyan: #38bdf8;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.45);
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --blur-amount: 20px;
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  user-select: none;
  -webkit-user-select: none;
}

/* ==========================================================================
   Viewers Containers (2D Marzipano & WebXR Three.js)
   ========================================================================== */

#app-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

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

#webxr-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  display: none;
}

#webxr-canvas.active {
  display: block;
  pointer-events: auto;
}

/* Transição de Fade para troca de ambientes */
#fade-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 50;
}

#fade-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   Header Superior Minimalista
   ========================================================================== */

.top-bar {
  position: absolute;
  top: 24px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  pointer-events: none;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  background: var(--bg-card);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--border-glass);
  border-radius: 9999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  transition: var(--transition-smooth);
}

.brand-badge:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.25);
}

.brand-logo-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--accent-gold), #ff9900);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 0 15px rgba(229, 184, 105, 0.5);
}

.brand-text-container {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-primary);
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

/* Indicador do Ambiente Atual */
.current-room-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  background: var(--bg-card);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--border-glass);
  border-radius: 9999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
}

.pulsing-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-gold);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-gold);
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.current-room-name {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #fff;
}

/* ==========================================================================
   Botões de Ação Laterais (VR, Giroscópio, Fullscreen, Info)
   ========================================================================== */

.action-controls {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 10;
  pointer-events: none;
}

.control-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: var(--transition-smooth);
}

.control-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  transform: scale(1.08);
}

.control-btn:active {
  transform: scale(0.96);
}

.control-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Destaque para o Botão WebXR Meta Quest */
.vr-launcher-btn {
  background: linear-gradient(135deg, rgba(229, 184, 105, 0.25), rgba(56, 189, 248, 0.25));
  border: 1px solid rgba(229, 184, 105, 0.6);
  color: #fff;
  width: auto;
  height: 52px;
  padding: 0 22px;
  border-radius: 9999px;
  gap: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(229, 184, 105, 0.3);
}

.vr-launcher-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: rotate(30deg);
  animation: shine-sweep 4s infinite linear;
}

@keyframes shine-sweep {
  0% { transform: translateX(-100%) rotate(30deg); }
  100% { transform: translateX(100%) rotate(30deg); }
}

.vr-launcher-btn:hover {
  background: linear-gradient(135deg, rgba(229, 184, 105, 0.4), rgba(56, 189, 248, 0.4));
  border-color: var(--accent-gold);
  color: #fff;
  box-shadow: 0 0 35px rgba(229, 184, 105, 0.6);
  transform: scale(1.05);
}

.vr-btn-label {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ==========================================================================
   Menu Minimalista de Seleção de Ambientes (Inferior)
   ========================================================================== */

.bottom-bar {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  max-width: 90vw;
}

.rooms-carousel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--bg-card);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-width: 100%;
}

.rooms-carousel::-webkit-scrollbar {
  display: none;
}

.room-card {
  position: relative;
  width: 110px;
  height: 75px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  border: 2px solid transparent;
  transition: var(--transition-smooth);
}

.room-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  filter: brightness(0.85);
}

.room-card:hover img {
  transform: scale(1.1);
  filter: brightness(1);
}

.room-card:hover {
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-4px);
}

.room-card.active {
  border-color: var(--accent-gold);
  box-shadow: 0 0 15px rgba(229, 184, 105, 0.5);
  transform: translateY(-4px);
}

.room-card.active img {
  filter: brightness(1.05);
}

.room-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 4px 4px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
  text-align: center;
}

.room-card-title {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dica de Navegação */
.nav-hint {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   Modal Informativo / Instruções Meta Quest
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

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

.modal-box {
  background: #12151c;
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  padding: 32px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .modal-box {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close-btn:hover {
  color: #fff;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.modal-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.modal-section {
  margin-bottom: 20px;
}

.modal-section-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-gold);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-section p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ==========================================================================
   Responsividade Mobile & Headset Meta Quest
   ========================================================================== */

@media (max-width: 768px) {
  .top-bar {
    top: 14px;
    left: 14px;
    right: 14px;
  }
  
  .brand-subtitle {
    display: none;
  }
  
  .current-room-pill {
    padding: 8px 16px;
  }
  
  .current-room-name {
    font-size: 12px;
  }
  
  .action-controls {
    right: 14px;
    gap: 8px;
  }
  
  .control-btn {
    width: 42px;
    height: 42px;
  }
  
  .vr-launcher-btn {
    height: 46px;
    padding: 0 16px;
  }
  
  .vr-btn-label {
    display: none;
  }
  
  .bottom-bar {
    bottom: 14px;
    max-width: 95vw;
  }
  
  .room-card {
    width: 90px;
    height: 64px;
  }
}
