* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, sans-serif;
}

html, body {
  width: 100%;
  height: 100%;
  font-size: 18px;
  line-height: 1.4;
}

/* Ajuste para tarjetas de forma responsiva */
.card {
  width: 100%;
  max-width: 1200px;
  margin: 20px auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: white;
  padding: 10px;
  box-sizing: border-box;
}

.card-header {
  padding: 20px 20px 0;
  border-bottom: 1px solid #e5e7eb;
}

.card-title {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 10px;
}

.card-content {
  padding: 20px;
  background-color: #f9f9f9;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.column {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  background-color: #fcfcfc;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.header-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1px solid #eaeaea;
  padding-bottom: 15px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
}

.reset-button {
  padding: 8px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  touch-action: manipulation;
}

.reset-button:hover {
  background: #f9fafb;
}

.feature-item {
  margin-bottom: 24px;
}

.feature-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.feature-label {
  font-size: 16px;
  font-weight: 500;
}

.weight-value {
  font-size: 16px;
  color: #6b7280;
  margin-left: 8px;
}

.slider {
  width: 100%;
  max-width: 130px;
  appearance: none;
  background: transparent;
  --slider-thumb-color: #3b82f6;
}

.slider:focus {
  outline: none;
}

.slider::-webkit-slider-runnable-track {
  height: 4px;
  background: #d1d5db;
  border-radius: 2px;
}

.slider::-webkit-slider-thumb {
  appearance: none;
  width: 24px;
  height: 24px;
  background: var(--slider-thumb-color);
  border-radius: 50%;
  margin-top: -10px;
  cursor: pointer;
}

.slider::-moz-range-track {
  height: 4px;
  background: #d1d5db;
  border-radius: 2px;
}

.slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: var(--slider-thumb-color);
  border-radius: 50%;
  cursor: pointer;
}

.results {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
  flex-wrap: nowrap;
}

.result-item:last-child {
  border-bottom: none;
}

.rank {
  width: 32px;
  font-size: 16px;
  color: #6b7280;
  padding-top: 2px;
}

.ia-name {
  flex: 1;
  font-weight: 500;
  font-size: 16px;
}

.score-container {
  display: flex;
  flex-direction: column;
  min-width: 120px;
}

.score-bar {
  height: 8px;
  background-color: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4px;
}

.score-fill {
  height: 100%;
  border-radius: 4px;
}

.score-value {
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}

.score-fill-green  { background-color: #22c55e; }
.score-fill-blue   { background-color: #3b82f6; }
.score-fill-yellow { background-color: #eab308; }
.score-fill-orange { background-color: #f97316; }
.score-fill-red    { background-color: #ef4444; }

.score-rating {
  font-size: 12px;
  text-align: right;
}

.rating-excellent { color: #22c55e; }
.rating-good { color: #3b82f6; }
.rating-average { color: #eab308; }
.rating-fair { color: #f97316; }
.rating-poor { color: #ef4444; }

.footer {
  margin-top: 24px;
  text-align: center;
  font-size: 16px;
  color: #6b7280;
}

.footer a {
  color: inherit;
  text-decoration: underline;
}

.footer a:hover {
  color: #374151;
}

.explanation {
  margin-top: 16px;
  font-size: 15px;
  color: #555;
}

.language-switcher {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 15px;
}

.lang-btn {
  padding: 6px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: white;
  cursor: pointer;
  font-size: 12px;
  text-transform: uppercase;
  transition: all 0.2s;
  touch-action: manipulation;
}

.lang-btn:hover {
  background: #f3f4f6;
  transform: scale(1.05);
}

.lang-btn.active {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

@media (max-width: 480px) {
  html, body {
    font-size: 16px;
  }
  .card {
    margin: 10px;
    padding: 5px;
  }
  .card-content {
    padding: 10px;
  }
  .card-title {
    font-size: 22px;
  }
  .section-title {
    font-size: 18px;
  }
  .reset-button {
    padding: 6px 12px;
    font-size: 14px;
  }
  .feature-label {
    font-size: 16px;
    margin-bottom: 4px;
    width: 100%;
  }
  .weight-value {
    font-size: 14px;
    width: 100%;
    text-align: right;
  }
  .slider {
    max-width: 100%;
    margin-top: 5px;
  }
  .feature-item {
    margin-bottom: 16px;
  }
  .rank,
  .ia-name {
    font-size: 16px;
  }
  .score-container {
    min-width: 110px;
  }
  .score-value {
    font-size: 14px;
  }
  .score-rating {
    font-size: 12px;
  }
  .footer {
    font-size: 14px;
  }
}

@media (max-width: 360px) {
  .result-item {
    flex-wrap: wrap;
  }
  .rank {
    width: 15%;
  }
  .ia-name {
    width: 80%;
  }
  .score-container {
    width: 100%;
    margin-top: 5px;
    margin-left: 15%;
  }
}