:root {
  --color-primary: #7c3aed;
  --color-primary-dark: #6d28d9;
  --color-secondary: #fef3c7;
  --color-accent: #10b981;
  --color-accent-hover: #059669;
  --color-text: #374151;
  --color-text-light: #6b7280;
  --color-white: #ffffff;
  --color-bg-light: #fef9f3;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Estilos generales */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
  font-family: "Inter", sans-serif;
  display: flex;
  flex-direction: column;
  color: var(--color-text);
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

/* Animaciones */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Header */
.header-banner {
  text-align: center;
  padding: 30px 20px;
  animation: fadeInDown 0.8s ease;
}

.main-title {
  font-size: clamp(32px, 5vw, 56px);
  font-family: "Merriweather", serif;
  font-weight: 900;
  font-style: italic;
  color: var(--color-white);
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header-banner img {
  max-width: 200px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* Sección de entrada */
.input-section {
  background-color: var(--color-bg-light);
  border-radius: 32px;
  padding: 30px 20px;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.8s ease;
}

.section-title {
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 20px;
  text-align: center;
}

/* Instrucciones */
.instructions {
  background-color: #ede9fe;
  border-left: 4px solid var(--color-primary);
  padding: 15px 20px;
  margin: 20px auto;
  max-width: 600px;
  border-radius: 8px;
  color: var(--color-text);
  line-height: 1.6;
}

.instructions p {
  margin: 0;
  font-size: clamp(13px, 2vw, 14px);
}

.instructions strong {
  color: var(--color-primary-dark);
  font-size: clamp(14px, 2vw, 15px);
}

/* Input wrapper */
.input-wrapper {
  display: flex;
  gap: 0;
  width: 100%;
  max-width: 600px;
  margin: 20px auto;
}

.input-name {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid var(--color-primary);
  border-right: none;
  border-radius: 25px 0 0 25px;
  font-size: 16px;
  font-family: "Inter", sans-serif;
  outline: none;
  transition: all 0.3s ease;
}

.input-name:focus {
  border-color: var(--color-primary-dark);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.input-name::placeholder {
  color: var(--color-text-light);
}

/* Botones */
button {
  padding: 14px 30px;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 600;
  border: 2px solid transparent;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.button-add {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-radius: 0 25px 25px 0;
  border: 2px solid var(--color-primary);
}

.button-add:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.button-add:active {
  transform: translateY(0);
}

/* Lista de nombres */
.name-list {
  list-style: none;
  max-width: 600px;
  margin: 20px auto;
  padding: 0;
  display: grid;
  gap: 10px;
}

.name-list li {
  background-color: var(--color-white);
  padding: 12px 20px;
  border-radius: 12px;
  color: var(--color-text);
  font-size: 16px;
  box-shadow: var(--shadow-sm);
  animation: slideIn 0.3s ease;
  transition: all 0.2s ease;
  border-left: 4px solid var(--color-primary);
}

.name-list li:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
}

/* Contenedor de resultado */
.result-container {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px auto;
  max-width: 600px;
}

.winner-message {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: var(--color-white);
  padding: 20px 30px;
  border-radius: 16px;
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 700;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: pulse 0.6s ease;
}

.winner-name {
  font-size: clamp(24px, 4vw, 32px);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-top: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Botón de sortear */
.button-container {
  width: 100%;
  max-width: 600px;
  margin: 20px auto 0;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.button-draw,
.button-reset {
  flex: 1;
  min-width: 200px;
}

.button-draw {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  color: var(--color-white);
  background-color: var(--color-accent);
  font-size: 16px;
  font-weight: 700;
  border: 2px solid var(--color-accent);
  gap: 12px;
}

.button-draw img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

.button-draw:hover {
  background-color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.button-draw:active {
  transform: translateY(0);
}

/* Botón de reiniciar */
.button-reset {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  color: var(--color-primary);
  background-color: var(--color-white);
  font-size: 16px;
  font-weight: 700;
  border: 2px solid var(--color-primary);
  gap: 8px;
}

.button-reset:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.button-reset:active {
  transform: translateY(0);
}

/* Footer */
.footer {
  background-color: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  color: var(--color-white);
  text-align: center;
  padding: 20px;
  margin-top: auto;
}

.footer p {
  font-size: 14px;
  margin: 0;
}

.footer strong {
  font-weight: 700;
}

/* Media Queries */
@media (max-width: 768px) {
  .main-content {
    padding: 15px;
  }

  .header-banner {
    padding: 20px 15px;
  }

  .header-banner img {
    max-width: 150px;
  }

  .input-section {
    padding: 25px 15px;
    border-radius: 24px;
  }

  .instructions {
    padding: 12px 15px;
    margin: 15px 0;
  }

  .input-wrapper {
    flex-direction: column;
    gap: 10px;
  }

  .input-name {
    border-radius: 25px;
    border: 2px solid var(--color-primary);
  }

  .button-add {
    border-radius: 25px;
    width: 100%;
  }

  .name-list li {
    font-size: 14px;
    padding: 10px 15px;
  }

  button {
    padding: 12px 24px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .main-title {
    font-size: 28px;
  }

  .section-title {
    font-size: 20px;
  }

  .instructions p {
    font-size: 12px;
  }

  .winner-message {
    padding: 15px 20px;
    font-size: 16px;
  }

  .winner-name {
    font-size: 20px;
  }
}

/* Modo oscuro (opcional) */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg-light: #1f2937;
    --color-text: #e5e7eb;
  }

  .input-section {
    background-color: var(--color-bg-light);
  }

  .name-list li {
    background-color: #374151;
    color: var(--color-white);
  }

  .instructions {
    background-color: #312e81;
  }
}