:root {
  --rojo-oscuro: #a61a17;
  --rojo: #e52621;
  --amarillo: #f9b20c;
  --amarillo-suave: #fcd34d;
  --texto-gris: #5b5b5b;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  background: var(--rojo);
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

.card {
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1099 / 2305;
  background-image: url('../img/fondo.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  position: relative;
  container-type: inline-size;
}

.card form {
  position: absolute;
  inset: 0;
}

.field {
  position: absolute;
  display: block;
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.field-1 { left: 13.74%; top: 35.75%; width: 72.52%; height: 4.86%; }
.field-2 { left: 13.83%; top: 46.68%; width: 72.43%; height: 4.90%; }
.field-3 { left: 13.92%; top: 57.66%; width: 72.34%; height: 4.86%; }
.field-4 { left: 13.92%; top: 68.59%; width: 72.43%; height: 4.86%; }

.field__icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 55%;
  width: auto;
}

.field-1 .field__icon { left: 6.02%; }
.field-2 .field__icon { left: 6.16%; }
.field-3 .field__icon { left: 4.78%; }
.field-4 .field__icon { left: 5.40%; }

.field__input {
  position: absolute;
  top: 0;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 3.4cqw;
  color: #2b2b2b;
  font-family: inherit;
}

.field__input::placeholder {
  color: #8a8a8a;
}

.field__input[data-invalid="1"] {
  color: #b91c1c;
}

.field-1 .field__input { left: 17.43%; width: 78%; }
.field-2 .field__input { left: 20.58%; width: 75%; }
.field-3 .field__input { left: 17.71%; width: 78%; }
.field-4 .field__input { left: 17.07%; width: 78%; }

.field-error {
  position: absolute;
  left: 13.9%;
  color: #fff0d6;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  padding: 0.4% 2%;
  font-size: 2.6cqw;
  z-index: 3;
}

.field-error-1 { top: 40.9%; }
.field-error-2 { top: 51.9%; }
.field-error-3 { top: 62.8%; }
.field-error-4 { top: 73.8%; }

.terms {
  position: absolute;
  left: 23.5%;
  top: 76.4%;
  width: 62%;
  display: flex;
  align-items: flex-start;
  gap: 1.5%;
  color: #ffe9e9;
  font-size: 2.55cqw;
  line-height: 1.25;
}

.terms input {
  appearance: none;
  -webkit-appearance: none;
  width: 3.2cqw;
  height: 3.2cqw;
  min-width: 11px;
  min-height: 11px;
  margin: 0.2em 0 0;
  border: 1.5px solid #ffffff;
  border-radius: 2px;
  background: transparent;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
}

.terms input:checked {
  background: var(--amarillo);
  border-color: var(--amarillo);
}

.terms input:checked::after {
  content: "";
  position: absolute;
  left: 28%;
  top: 8%;
  width: 30%;
  height: 55%;
  border: solid #5a3d00;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.terms a {
  color: #ffffff;
  text-decoration: underline;
}

.field-error-terms {
  position: absolute;
  left: 23.9%;
  top: 79.6%;
  color: #fff0d6;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  padding: 0.4% 2%;
  font-size: 2.6cqw;
}

.btn-participar {
  position: absolute;
  left: 23.29%;
  top: 82.69%;
  width: 53.14%;
  height: 4.86%;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-size: 3.4cqw;
  color: #5a3d00;
  background: linear-gradient(180deg, var(--amarillo-suave), var(--amarillo));
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.btn-participar:hover {
  filter: brightness(1.08);
}

.notice {
  position: absolute;
  left: 13.7%;
  top: 30.5%;
  width: 72.5%;
  padding: 1.2% 3%;
  border-radius: 10px;
  font-size: 2.7cqw;
  z-index: 3;
}

.notice.success {
  background: #d9f7d9;
  color: #1c5c1c;
}

.notice.error {
  background: #ffe0e0;
  color: #7a1414;
}

/* --- Admin --- */
.admin-body {
  background: #f4f4f4;
  display: block;
  padding: 0;
}

.admin-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px;
}

.admin-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  padding: 24px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.admin-header h1 {
  font-size: 20px;
  margin: 0;
  color: var(--rojo);
}

table.participantes {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.participantes th,
table.participantes td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  text-align: left;
}

table.participantes th {
  background: #faf4e6;
  color: #7a1418;
}

.btn {
  display: inline-block;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.btn-primary {
  background: var(--rojo);
  color: #fff;
}

.btn-secondary {
  background: #eee;
  color: #333;
}

.login-wrap {
  max-width: 380px;
  margin: 80px auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  padding: 32px;
}

.login-wrap h1 {
  color: var(--rojo);
  font-size: 20px;
  margin-top: 0;
}

.login-wrap input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 14px;
}

.login-wrap button {
  width: 100%;
}

.pass-field {
  position: relative;
}

.pass-field input {
  width: 100%;
  padding-right: 40px;
}

.pass-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 6px;
  border-radius: 6px;
}

.pass-toggle:hover {
  background: rgba(0, 0, 0, 0.06);
}
