* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ============================= */
/* Fondo general tipo app */
.app-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(191, 219, 254, 0.45), transparent 35%),
    linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.dark .app-body {
  background:
    radial-gradient(circle at top, rgba(30, 41, 59, 0.65), transparent 35%),
    linear-gradient(180deg, #020617 0%, #0f172a 100%);
}

/* ============================= */
/* Layout principal */
.main-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.hero-card {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(12px);
}

.dark .hero-card {
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(148, 163, 184, 0.12);
  box-shadow: 0 30px 60px rgba(2, 6, 23, 0.4);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.1);
}

.dark .hero-badge {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.14);
}

.hero-description {
  max-width: 520px;
  font-size: 1rem;
  line-height: 1.65;
  color: #475569;
  margin: 0;
}

.dark .hero-description {
  color: #cbd5e1;
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-panel {
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ============================= */
/* Labels y controles */
.app-label {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.dark .app-label {
  color: #f8fafc;
}

.app-select {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid #cbd5e1;
  background: rgba(255, 255, 255, 0.95);
  color: #1e293b;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.app-select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.18);
}

input[type="range"] {
  accent-color: #2563eb;
}

/* ============================= */
/* Botones */
.app-primary-button {
  width: 100%;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  padding: 1rem 1.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.app-primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 36px rgba(37, 99, 235, 0.32);
  filter: brightness(1.02);
}

.app-modal-button {
  border: none;
  border-radius: 16px;
  padding: 0.9rem 1.2rem;
  width: 100%;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.app-modal-button-pause {
  background: #1d4ed8;
  color: #fff;
}

.app-modal-button-cancel {
  background: #dc2626;
  color: #fff;
}

/* ============================= */
/* CÍRCULO CANÓNICO ORIGINAL */
.circle {
  position: relative;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, #6fbf73 30%, #4caf50 100%);
  border-radius: 9999px;
  box-shadow: 0 0 20px rgba(111, 191, 115, 0.5);
  overflow: hidden;
  transform: scale(1);
  transition: transform 4s ease-in-out, box-shadow 4s ease-in-out;
}

.circle::before,
.circle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150px;
  height: 150px;
  background: rgba(111, 191, 115, 0.2);
  border-radius: 9999px;
  transform: translate(-50%, -50%) scale(1);
  opacity: 0;
  animation: ripple 8s infinite;
}

.circle::after {
  animation-delay: 4s;
}

.circle-old {
  position: relative;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, #6fbf73 30%, #4caf50 100%);
  border-radius: 9999px;
  box-shadow: 0 0 20px rgba(111, 191, 115, 0.5);
  transition: transform 4s ease-in-out, box-shadow 4s ease-in-out;
  overflow: hidden;
}

.circle-old::before,
.circle-old::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150px;
  height: 150px;
  background: rgba(111, 191, 115, 0.2);
  border-radius: 9999px;
  transform: translate(-50%, -50%) scale(1);
  opacity: 0;
  animation: ripple 8s infinite;
}

.circle-old::after {
  animation-delay: 4s;
}

@keyframes ripple {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }

  100% {
    transform: translate(-50%, -50%) scale(2.5);
    opacity: 0;
  }
}

/* ============================= */
/* INTRO / ONBOARDING */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)) 16px;
  background:
    radial-gradient(circle at top, rgba(96, 165, 250, 0.15), transparent 35%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(239, 246, 255, 0.98));
  backdrop-filter: blur(8px);
}

.dark .intro-overlay {
  background:
    radial-gradient(circle at top, rgba(59, 130, 246, 0.12), transparent 35%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.98));
}

.intro-shell {
  position: relative;
  width: 100%;
  max-width: 460px;
  min-height: min(90vh, 760px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 32px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

.dark .intro-shell {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.1);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.45);
}

.intro-skip {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 4;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.85);
  color: #1e293b;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  cursor: pointer;
}

.dark .intro-skip {
  background: rgba(30, 41, 59, 0.9);
  color: #f8fafc;
}

.intro-track-wrap {
  overflow: hidden;
  width: 100%;
  flex: 1;
  touch-action: pan-y;
}

.intro-track {
  display: flex;
  width: 100%;
  height: 100%;
  will-change: transform;
  transition: transform 0.35s ease;
}

.intro-slide {
  min-width: 100%;
  width: 100%;
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1.5rem 1.5rem;
}

.intro-slide-content {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.intro-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.1);
  margin-bottom: 1.15rem;
}

.dark .intro-logo-badge {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.14);
}

.intro-title {
  margin: 1rem 0 0.85rem;
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1.05;
  font-weight: 900;
  color: #0f172a;
}

.dark .intro-title {
  color: #fff;
}

.intro-text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: #475569;
}

.dark .intro-text {
  color: #cbd5e1;
}

.intro-image {
  width: 100%;
  max-width: 280px;
  height: auto;
  object-fit: contain;
  margin-bottom: 1rem;
}

.intro-image-soft {
  opacity: 0.95;
}

.intro-footer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1rem 1.25rem;
}

.intro-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.intro-dot {
  width: 10px;
  height: 10px;
  border: none;
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.intro-dot.active {
  background: #2563eb;
  transform: scale(1.2);
}

.intro-actions {
  display: flex;
  gap: 0.75rem;
}

.intro-nav,
.intro-cta {
  border: none;
  border-radius: 18px;
  padding: 0.95rem 1.1rem;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}

.intro-nav {
  flex: 1;
}

.intro-nav-secondary {
  background: #e2e8f0;
  color: #1e293b;
}

.intro-nav-primary,
.intro-cta {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.22);
}

.intro-cta {
  width: 100%;
  margin-top: 1.25rem;
}

/* ============================= */
/* Utilidad */
.hidden {
  display: none !important;
}

/* ============================= */
/* Responsive */
@media (max-width: 640px) {
  .hero-card {
    padding: 1rem;
    border-radius: 24px;
  }

  .intro-shell {
    min-height: 100%;
    max-width: 100%;
    border-radius: 24px;
  }

  .intro-slide {
    padding: 4rem 1.25rem 1rem;
  }

  .intro-actions {
    flex-direction: row;
  }

  .app-modal-button {
    width: 100%;
  }

  .circle,
  .circle-old {
    width: 140px;
    height: 140px;
  }

  .circle::before,
  .circle::after,
  .circle-old::before,
  .circle-old::after {
    width: 140px;
    height: 140px;
  }
}