/* Importar fuentes modernas de Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --bg-primary: #092834;
  --bg-secondary: #0c3343;
  --bg-glow: #114256;
  --accent-red: #e34e4c;
  --accent-red-hover: #f85b59;
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --glass-bg: rgba(12, 51, 67, 0.4);
  --glass-border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  background-image: radial-gradient(circle at top right, var(--bg-glow), var(--bg-primary) 80%);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

/* Pantalla de carga / Redirección móvil */
#loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  max-width: 400px;
}

.spinner-container {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 2rem;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid transparent;
  border-top-color: var(--accent-red);
  border-bottom-color: var(--accent-red);
  animation: spin 1.5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  border-radius: 50%;
  border: 4px solid transparent;
  border-left-color: rgba(255, 255, 255, 0.3);
  border-right-color: rgba(255, 255, 255, 0.3);
  animation: spin 3s linear infinite reverse;
}

.logo-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  animation: pulse 2s ease-in-out infinite;
}

#redirect-status {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.6rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
}

.btn-primary {
  background: var(--accent-red);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 14px rgba(227, 78, 76, 0.4);
}

.btn-primary:hover {
  background: var(--accent-red-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(227, 78, 76, 0.6);
}

/* Pantalla de Escritorio (Desktop/Tablet) */
#desktop-screen {
  display: none;
  opacity: 0;
  width: 100%;
  max-width: 1200px;
  padding: 2rem;
  transition: opacity 0.5s ease;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4rem;
  width: 100%;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-full {
  height: 50px;
  width: auto;
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-text span.brand-red {
  color: var(--accent-red);
}

.logo-text span.brand-white {
  color: #ffffff;
  font-weight: 400;
  margin-left: 0.35rem;
}

.main-content {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

.hero-text h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-text p {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 540px;
}

/* Sección de descarga (Botones horizontales) */
.download-section {
  display: flex;
  align-items: center;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  padding: 1.25rem 2rem;
  border-radius: 20px;
  max-width: fit-content;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.badges-container {
  display: flex;
  flex-direction: row;
  gap: 1.25rem;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  color: #ffffff;
  text-decoration: none;
  transition: all 0.2s ease;
}

.store-badge:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-red);
  transform: translateY(-2px);
}

.store-badge svg {
  width: 24px;
  height: 24px;
}

.badge-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.badge-text .subtitle-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.badge-text .title-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
}

.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  padding: 0.75rem;
  border-radius: 16px;
  width: 150px;
  height: 150px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.qr-container img {
  width: 100%;
  height: auto;
}

.qr-caption {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 130px;
}

/* Mockup de teléfono en 3D/CSS */
.phone-mockup-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}

.phone-mockup {
  position: relative;
  width: 280px;
  height: 560px;
  background: #000000;
  border-radius: 40px;
  border: 12px solid #1e293b;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 40px rgba(227, 78, 76, 0.15);
  overflow: hidden;
  transform: rotateY(-10deg) rotateX(5deg);
  animation: float 6s ease-in-out infinite;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: #061e27;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 20px;
  background: #1e293b;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  z-index: 10;
}

/* Interfaz simulada de la app */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.app-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1rem;
  margin-top: 1.5rem;
}

.app-card-image {
  height: 120px;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-glow));
  border-radius: 12px;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.app-card-image::after {
  content: 'Tour 360° VR';
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  background: var(--accent-red);
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-weight: 600;
}

.app-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.app-card p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.app-explore-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.explore-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 0.75rem;
  text-align: center;
}

.explore-icon {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.explore-item span {
  font-size: 0.7rem;
  font-weight: 500;
  display: block;
}

.app-btn-start {
  background: var(--accent-red);
  color: white;
  text-align: center;
  padding: 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 1.5rem;
  box-shadow: 0 4px 10px rgba(227, 78, 76, 0.3);
}

/* Animaciones */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.85; }
}

@keyframes float {
  0%, 100% { transform: rotateY(-10deg) rotateX(5deg) translateY(0); }
  50% { transform: rotateY(-5deg) rotateX(10deg) translateY(-15px); }
}

/* Adaptación responsive */
@media (max-width: 968px) {
  .main-content {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  
  .hero-text p {
    margin: 0 auto 2rem auto;
  }
  
  .download-section {
    margin: 0 auto;
  }
  
  header {
    justify-content: center;
    margin-bottom: 2.5rem;
  }
}

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 2.5rem;
  }
  
  .download-section {
    padding: 1.5rem;
    max-width: 100%;
  }

  .badges-container {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
  }

  .store-badge {
    width: 100%;
    justify-content: center;
  }
}
