/* Paleta de colores personalizada */
:root {
  --color-background: #E5E5E5;
  --color-foreground: #172a49;
  --color-accent1: #541c4c;
  --color-accent2: #920e50;
  --color-accent3: #d00054;
  --color-white: #ffffff;
  --color-text-dark: #1a1a1a;
  --color-text-medium: #333333;
  --color-text-light: #4a4a4a;
  
  /* Estados de salud */
  --color-green: #10b981;
  --color-yellow: #f59e0b;
  --color-red: #ef4444;
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, var(--color-background) 0%, #f5f5f5 100%);
  color: var(--color-text-dark);
  line-height: 1.7;
  min-height: 100vh;
  font-size: 16px;
  overflow-x: hidden;
}

#app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px;
}

/* Hero Header - Nuevo diseño impactante */
.hero-header {
  position: relative;
  text-align: center;
  padding: 60px 20px 50px;
  background: linear-gradient(135deg, var(--color-foreground) 0%, var(--color-accent1) 80%, var(--color-accent2) 100%);
  color: var(--color-white);
  border-radius: 24px;
  margin-bottom: 25px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(23, 42, 73, 0.4);
}

.hero-icons {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

.floating-icon {
  position: absolute;
  font-size: 80px;
  opacity: 0.06;
  color: rgba(255, 255, 255, 0.15);
  animation: float 8s ease-in-out infinite;
  font-weight: 300;
}

.floating-icon:nth-child(1) {
  top: 10%;
  left: 10%;
}

.floating-icon:nth-child(2) {
  top: 20%;
  right: 15%;
}

.floating-icon:nth-child(3) {
  bottom: 20%;
  left: 15%;
}

.floating-icon:nth-child(4) {
  bottom: 15%;
  right: 10%;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-badge i {
  font-size: 18px;
  animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  10%, 30% { transform: scale(1.1); }
  20% { transform: scale(0.9); }
}

.hero-title {
  font-size: 3em;
  font-weight: 800;
  margin-bottom: 15px;
  line-height: 1.1;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.3em;
  opacity: 0.95;
  font-weight: 400;
  margin-bottom: 0;
}

/* Welcome Card */
.welcome-card {
  background: var(--color-white);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 25px;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}

.welcome-icon-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}

.welcome-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.icon-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent2) 0%, var(--color-accent3) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 15px rgba(146, 14, 80, 0.3);
  transition: transform 0.3s ease;
}

.welcome-icon-item:hover .icon-circle {
  transform: scale(1.1) rotate(5deg);
}

.welcome-icon-item span {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-medium);
}

.welcome-text {
  margin-bottom: 25px;
}

.welcome-text p {
  color: var(--color-text-medium);
  font-size: 1.05em;
  line-height: 1.7;
  margin-bottom: 15px;
}

/* Header - Estilo anterior para otras pantallas */
.header {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--color-foreground) 0%, var(--color-accent1) 100%);
  color: var(--color-white);
  border-radius: 20px;
  margin-bottom: 25px;
  box-shadow: 0 10px 30px rgba(23, 42, 73, 0.3);
}

.header-icon {
  font-size: 48px;
  margin-bottom: 15px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.header h1 {
  font-size: 2.2em;
  margin-bottom: 10px;
  font-weight: 700;
}

.header p {
  font-size: 1.2em;
  opacity: 1;
  font-weight: 400;
}

/* Cards */
.card {
  background: var(--color-white);
  border-radius: 18px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card h2 {
  color: var(--color-foreground);
  font-size: 1.6em;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.card h3 {
  color: var(--color-foreground);
  font-size: 1.3em;
  margin: 20px 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.card p {
  color: var(--color-text-medium);
  margin-bottom: 15px;
  line-height: 1.7;
  font-size: 1em;
}

.card ul {
  margin-left: 20px;
  color: var(--color-text-medium);
}

.card ul li {
  margin-bottom: 10px;
  line-height: 1.7;
  font-size: 0.98em;
}

/* Buttons */
.btn-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
}

.btn {
  padding: 16px 30px;
  border: none;
  border-radius: 50px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent2) 0%, var(--color-accent3) 100%);
  color: var(--color-white);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(146, 14, 80, 0.4);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: linear-gradient(135deg, var(--color-foreground) 0%, var(--color-accent1) 100%);
  color: var(--color-white);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(23, 42, 73, 0.4);
}

/* Privacy badge */
.privacy-badge {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 20px;
  border-radius: 16px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.privacy-icon {
  min-width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.privacy-badge strong {
  font-size: 1.1em;
  display: block;
  margin-bottom: 5px;
}

.privacy-badge p {
  font-size: 0.95em;
  line-height: 1.5;
  opacity: 0.95;
  margin: 0;
}

/* Question Section */
.question-block {
  margin-bottom: 30px;
  padding: 25px;
  background: linear-gradient(to right, #fafafa, #ffffff);
  border-left: 4px solid var(--color-accent2);
  border-radius: 16px;
}

.question-block-title {
  color: var(--color-foreground);
  font-size: 1.4em;
  margin-bottom: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.question-block p {
  color: var(--color-text-light);
  font-size: 0.95em;
  font-style: italic;
}

.question-item {
  margin-bottom: 25px;
  padding: 20px;
  background: var(--color-white);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.question-text {
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: 15px;
  font-size: 1.05em;
  line-height: 1.5;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.radio-option {
  flex: 1;
  min-width: 90px;
}

.radio-option input[type="radio"] {
  display: none;
}

.radio-option label {
  display: block;
  padding: 12px 14px;
  background: var(--color-background);
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  font-weight: 600;
  font-size: 0.95em;
  color: var(--color-text-dark);
}

.radio-option input[type="radio"]:checked + label {
  background: linear-gradient(135deg, var(--color-accent2) 0%, var(--color-accent3) 100%);
  color: var(--color-white);
  border-color: var(--color-accent3);
  transform: scale(1.03);
  box-shadow: 0 3px 10px rgba(146, 14, 80, 0.3);
}

.radio-option label:hover {
  border-color: var(--color-accent2);
}

/* Progress Bar */
.progress-container {
  position: sticky;
  top: 15px;
  background: var(--color-white);
  padding: 18px;
  border-radius: 14px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.progress-bar {
  height: 10px;
  background: var(--color-background);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent2) 0%, var(--color-accent3) 100%);
  transition: width 0.5s ease;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(146, 14, 80, 0.5);
}

.progress-text {
  text-align: center;
  color: var(--color-text-dark);
  font-weight: 600;
  font-size: 1em;
}

/* Results Section */
.results-header {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--color-foreground) 0%, var(--color-accent1) 100%);
  color: var(--color-white);
  border-radius: 20px;
  margin-bottom: 25px;
}

.score-display {
  font-size: 3.5em;
  font-weight: 700;
  margin: 15px 0;
}

.zone-badge {
  display: inline-block;
  padding: 10px 25px;
  border-radius: 50px;
  font-size: 1.2em;
  font-weight: 700;
  margin-top: 12px;
}

.zone-green {
  background: linear-gradient(135deg, var(--color-green) 0%, #059669 100%);
  color: white;
}

.zone-yellow {
  background: linear-gradient(135deg, var(--color-yellow) 0%, #d97706 100%);
  color: white;
}

.zone-red {
  background: linear-gradient(135deg, var(--color-red) 0%, #dc2626 100%);
  color: white;
}

.block-scores {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin: 25px 0;
}

.block-score-card {
  padding: 20px;
  background: var(--color-white);
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.block-score-card h4 {
  color: var(--color-foreground);
  margin-bottom: 12px;
  font-size: 1.1em;
  font-weight: 700;
}

.block-score-card p {
  color: var(--color-text-light);
  font-size: 0.9em;
}

.block-score-value {
  font-size: 2.2em;
  font-weight: 700;
  color: var(--color-accent2);
  margin: 10px 0;
}

.block-bar {
  height: 6px;
  background: var(--color-background);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 12px;
}

.block-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent2) 0%, var(--color-accent3) 100%);
  border-radius: 10px;
  transition: width 0.5s ease;
}

/* Insights */
.insight-box {
  padding: 20px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left: 4px solid var(--color-yellow);
  border-radius: 14px;
  margin: 18px 0;
}

.insight-box p {
  color: var(--color-text-dark);
  font-size: 1em;
  line-height: 1.6;
  font-weight: 500;
}

.insight-box i {
  color: #d97706;
  margin-right: 10px;
}

/* Action Plan */
.action-item {
  padding: 20px;
  background: var(--color-white);
  border-radius: 14px;
  margin-bottom: 15px;
  border-left: 4px solid var(--color-accent2);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.action-item h4 {
  color: var(--color-foreground);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15em;
  font-weight: 700;
}

.action-item p {
  color: var(--color-text-medium);
  font-size: 1em;
  line-height: 1.6;
}

/* Footer */
.footer {
  text-align: center;
  padding: 25px;
  background: var(--color-foreground);
  color: var(--color-white);
  border-radius: 16px;
  margin-top: 30px;
}

.footer p {
  margin-bottom: 8px;
  opacity: 0.95;
  font-size: 0.95em;
}

/* Responsive - Mobile First */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }
  
  #app {
    padding: 12px;
  }
  
  .hero-header {
    padding: 50px 15px 40px;
    border-radius: 20px;
  }
  
  .hero-title {
    font-size: 2.2em;
  }
  
  .hero-subtitle {
    font-size: 1.1em;
  }
  
  .welcome-icon-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .icon-circle {
    width: 55px;
    height: 55px;
    font-size: 22px;
  }
  
  .welcome-icon-item span {
    font-size: 12px;
  }
  
  .welcome-card {
    padding: 20px;
  }
  
  .card {
    padding: 20px;
    border-radius: 16px;
  }
  
  .card h2 {
    font-size: 1.4em;
  }
  
  .header h1 {
    font-size: 1.8em;
  }
  
  .header p {
    font-size: 1.05em;
  }
  
  .btn-group {
    flex-direction: column;
    gap: 10px;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
    font-size: 1.05em;
    padding: 14px 24px;
  }
  
  .radio-group {
    flex-direction: column;
  }
  
  .radio-option {
    min-width: 100%;
  }
  
  .radio-option label {
    font-size: 1em;
    padding: 14px 16px;
  }
  
  .block-scores {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .question-text {
    font-size: 1.05em;
  }
  
  .question-block {
    padding: 20px;
  }
  
  .question-item {
    padding: 18px;
  }
  
  .score-display {
    font-size: 3em;
  }
  
  .privacy-badge {
    flex-direction: column;
    text-align: center;
    padding: 18px;
  }
  
  .privacy-icon {
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2em;
  }
  
  .hero-badge {
    font-size: 13px;
    padding: 8px 16px;
  }
  
  .floating-icon {
    font-size: 30px;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Loading spinner */
.spinner {
  border: 4px solid var(--color-background);
  border-top: 4px solid var(--color-accent2);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 50px auto;
}

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

/* Hidden class */
.hidden {
  display: none !important;
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 48px;
  }
  
  .radio-option label {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
