:root {
  --info: #17a2b8;
  --warning: #ffc107;
  --danger: #dc3545;
  --success: #28a745;
  --light: #f8f9fa;
  --dark: #343a40;
  --gray: #6c757d;
}

* {
  box-sizing: border-box;
  font-family: system-ui, sans-serif;
}

body {
  margin: 0;
  background: var(--light);
  color: var(--dark);
}

header {
  background: linear-gradient(45deg, #6a1b9a 0%, #4a148c 25%, #5d4037 50%, #3e2723 75%, #1a237e 100%);
  color: #fff;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(
    90deg,
    #ff6b6b 0%,
    #feca57 15%,
    #48dbfb 30%,
    #1dd1a1 45%,
    #5f27cd 60%,
    #ff9ff3 75%,
    #ff6b6b 90%,
    #feca57 100%
  );
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 8s linear infinite;
  filter: contrast(1.1) brightness(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@keyframes gradient-shift {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* Estilo especial para el grupo de Expertos en IA */
.group-details.ai-experts > summary .group-title span {
  background: linear-gradient(
    90deg,
    #ff6b6b 0%,
    #feca57 15%,
    #48dbfb 30%,
    #1dd1a1 45%,
    #5f27cd 60%,
    #ff9ff3 75%,
    #ff6b6b 90%,
    #feca57 100%
  );
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 8s linear infinite;
  filter: contrast(1.1) brightness(1.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 800;
}

.group-details.ai-experts > summary {
  background: linear-gradient(135deg, #1a237e 0%, #4a148c 50%, #6a1b9a 100%);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

#scoreboard {
  display: flex;
  gap: 1.5rem;
  font-weight: 600;
}

#scoreboard span {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  color: #ffffff;
}

#scoreboard strong {
  color: #ffffff;
  font-size: 1.1rem;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

#points-container {
  transition: border-color 0.3s ease;
}

main {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Estilos para acordeón de dos niveles */
.group-details {
  background: #fff;
  border: 2px solid #dee2e6;
  border-radius: 0.5rem;
  margin-bottom: 1.2rem;
  overflow: hidden;
}

.group-details > summary {
  background: linear-gradient(135deg, var(--info) 0%, #138496 100%);
  color: #fff;
  font-size: 1.1rem;
  padding: 1rem 1.5rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.group-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.group-title i {
  font-size: 1.3rem;
  opacity: 0.9;
}

.group-details > summary::-webkit-details-marker {
  display: none;
}

.group-details > summary::after {
  content: "▼";
  font-size: 0.9rem;
  transition: transform 0.2s;
}

.group-details[open] > summary::after {
  transform: rotate(180deg);
}

.group-content {
  padding: 1rem;
  background: #f8f9fa;
}

details {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.4rem;
  margin-bottom: 0.8rem;
  overflow: hidden;
}

summary {
  padding: 0.9rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "▼";
  font-size: 0.8rem;
  transition: transform 0.2s;
}

details[open] summary::after {
  transform: rotate(180deg);
}

.questions {
  padding: 0 1.2rem 1.2rem;
}

.question {
  margin-bottom: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.question label {
  flex: 1 1 250px;
}

select {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--gray);
  border-radius: 0.25rem;
  background: #fff;
}

footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.85rem;
  color: var(--gray);
}
