/* Design System & Aesthetics - Rutas Patagonia PWA */
:root {
  --bg-dark: #070d19;
  --bg-gradient: radial-gradient(circle at 50% 20%, #0e243a 0%, #070d19 80%);
  --card-bg: rgba(16, 32, 54, 0.65);
  --card-border: rgba(0, 229, 255, 0.15);
  --card-glow: rgba(0, 229, 255, 0.08);
  --accent-cyan: #00e5ff;
  --accent-blue: #0284c7;
  --accent-gold: #f59e0b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

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

body {
  font-family: var(--font-family);
  background: var(--bg-dark);
  background-image: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 48px 16px 24px 16px;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Background Lights */
.bg-glow-top {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.18) 0%, rgba(2, 132, 199, 0) 70%);
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
}

.bg-glow-bottom {
  position: absolute;
  bottom: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
}

.container {
  width: 100%;
  max-width: 460px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* Header */
.header {
  text-align: center;
  margin-top: 12px;
}

.header .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--accent-cyan);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.header h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 30%, #a5f3fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header p {
  color: var(--text-muted);
  font-size: 15px;
  margin-top: 6px;
  line-height: 1.4;
}

/* Central Interactive Logo Button Card */
.button-card {
  width: 100%;
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.logo-container {
  position: relative;
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-bottom: 20px;
}

.logo-glow-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, var(--accent-cyan) 180deg, transparent 360deg);
  animation: rotateRing 8s linear infinite;
  opacity: 0.6;
  filter: blur(8px);
}

.logo-pulse-circle {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  animation: pulsePulse 2.5s ease-in-out infinite;
  opacity: 0.4;
}

.logo-img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  border-radius: 28px;
  z-index: 2;
  position: relative;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  background: #ffffff;
  padding: 10px;
}

.logo-container:hover .logo-img {
  transform: scale(1.06);
  box-shadow: 0 16px 40px rgba(0, 229, 255, 0.4);
}

.logo-container:active .logo-img {
  transform: scale(0.96);
}

/* Primary Install Action Button */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-blue) 0%, #024b7a 100%);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: #ffffff;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.35);
  transition: all 0.25s ease;
  margin-top: 8px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 229, 255, 0.4);
  background: linear-gradient(135deg, #029be5 0%, #026aa7 100%);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  margin-top: 12px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Acordeón de Instrucciones de Descarga */
details.accordion {
  width: 100%;
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

details.accordion:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.35);
}

details.accordion[open] {
  background: rgba(16, 32, 54, 0.85);
  border-color: rgba(0, 229, 255, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

summary.accordion-header {
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-cyan);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  list-style: none !important;
  list-style-type: none !important;
  transition: color 0.2s ease;
  outline: none;
}

summary.accordion-header::-webkit-details-marker,
summary.accordion-header::marker {
  display: none !important;
  content: "" !important;
}

summary.accordion-header:hover {
  color: #ffffff;
}

.accordion-icon {
  font-size: 12px;
  color: var(--accent-cyan);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  margin-left: 8px;
}

details.accordion[open] .accordion-icon {
  transform: rotate(90deg);
}

.accordion-content {
  padding: 0 18px 16px 18px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: center;
  border-top: 1px solid rgba(0, 229, 255, 0.1);
  margin-top: 2px;
  padding-top: 12px;
  animation: accordionFade 0.3s ease-out;
  box-sizing: border-box;
}

.accordion-content p {
  margin: 0;
  padding: 0;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.5;
}

@keyframes accordionFade {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}



/* Instructions Cards */
.instructions-card {
  width: 100%;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.instructions-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 229, 255, 0.15);
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.step-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.4;
  padding-top: 3px;
}

.step-text strong {
  color: var(--text-main);
}

/* Standalone Splash Overlay (When launched as installed PWA) */
.standalone-splash {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  background-image: var(--bg-gradient);
  z-index: 9999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  transition: opacity 0.4s ease;
}

.standalone-splash.active {
  display: flex;
}

.splash-logo {
  width: 150px;
  height: 150px;
  object-fit: contain;
  margin-bottom: 24px;
  animation: floatBounce 3s ease-in-out infinite;
  background: #ffffff;
  padding: 12px;
  border-radius: 28px;
  box-shadow: 0 10px 30px rgba(0, 229, 255, 0.3);
}

.splash-loader {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(0, 229, 255, 0.2);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

.splash-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.splash-sub {
  font-size: 14px;
  color: var(--text-muted);
}

/* Footer */
.footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  z-index: 1;
  padding: 16px 0;
}

/* Keyframes Animations */
@keyframes rotateRing {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulsePulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.1); opacity: 0.7; }
}

@keyframes floatBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

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

/* Responsive adjustments */
@media (max-width: 380px) {
  .header h1 { font-size: 24px; }
  .logo-container { width: 130px; height: 130px; }
  .logo-img { width: 115px; height: 115px; }
}
