:root{
  --bg:#f7f9fb;
  --card:#ffffff;
  --accent:#0b5ed7;
  --text:#1f2937;
  --muted:#6b7280;
  --radius:12px;
  --shadow: 0 6px 18px rgba(16,24,40,0.08);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}
html,body{height:100%;margin:0;background:var(--bg);color:var(--text);}
.container{max-width:900px;margin:40px auto;padding:24px;}
.card{
  background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);padding:28px;
}
.logo img{max-width:100%;height:auto;}
h1{margin-top:0;font-size:1.6rem;}
p.lead{margin:8px 0 0;font-size:1rem;color:var(--muted);}
.meta{display:flex;gap:16px;align-items:center;margin-top:18px;flex-wrap:wrap;}
.meta .count{background:#f1f5f9;padding:10px 14px;border-radius:10px;font-weight:600;color:var(--text);}
.actions{margin-left:auto;display:flex;gap:10px;}
.btn{border:0;padding:10px 14px;border-radius:10px;font-weight:600;cursor:pointer;text-decoration:none;text-align:center;}
.btn-primary{background:var(--accent);color:white;}
.btn-outline{background:transparent;border:1px solid #d1d5db;color:var(--text);}
.btn-ghost{background:#fff;border:1px dashed #e5e7eb;color:var(--accent);}
table{width:100%;border-collapse:collapse;margin-top:20px;}
th,td{border:1px solid #d1d5db;padding:8px;text-align:left;}
th{background:#f1f5f9;}

tbody tr:nth-child(odd){background:#fafafa;}
tbody tr:hover{background:#f1f5f9;}

/* Asegurar box-sizing correcto para todos los elementos */
*, *::before, *::after {
  box-sizing: border-box;
}

/* FORMULARIOS */
form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
  width: 100%;
}

form label {
  font-weight: 600;
}

form input {
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  width: 100%;
  max-width: 100%;
  display: block;
}

input:focus {
  border-color: #0056b3;
  outline: none;
  box-shadow: 0 0 5px rgba(0, 86, 179, 0.4);
}

form input#condiciones {
  width: auto;
}

/* Checkbox y link */
.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.checkbox input[type="checkbox"] {
  transform: scale(1.2);
  cursor: pointer;
}

.checkbox a {
  color: #0056b3;
  text-decoration: underline;
}

/* Botón */
button.btn {
  background: #0056b3;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: background 0.3s ease;
}

button.btn:hover {
  background: #003f7f;
}

/* Evitar overflow por padding del section */
.card {
  padding: 24px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: white;
  padding: 20px;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

.modal h3 {
  margin-top: 0;
}

.modal-content {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
  max-height: 70vh;      /* altura máxima segura */
  overflow-y: auto;      /* scroll vertical */
  padding-right: 10px;   /* evita que tape el texto */
}

.close-btn {
  margin-top: 20px;
  text-align: right;
}


/* --- TABLA PARTICIPANTES --- */
.tabla-participantes {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.tabla-participantes td.derecha {
  text-align: right;
}

.tabla-participantes th,
.tabla-participantes td {
  border: 1px solid #d1d5db;
  padding: 8px;
  text-align: left;
}

.tabla-participantes th {
  background: #f1f5f9;
}

.ultimo-sorteo-box {
    background: #f1f8ff;
    border-left: 5px solid #007bff;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 8px;
}

.ultimo-sorteo-box h2 {
    margin-top: 0;
    color: #0056b3;
    font-size: 1.4em;
}


/* --- RESPONSIVE: Versión móvil --- */
@media (max-width: 768px) {
  .tabla-participantes,
  .tabla-participantes thead,
  .tabla-participantes tbody,
  .tabla-participantes th,
  .tabla-participantes td,
  .tabla-participantes tr {
    display: block;
    width: 100%;
  }

  .tabla-participantes thead {
    display: none; /* Oculta encabezado en móvil */
  }

  .tabla-participantes tr {
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
  }

  .tabla-participantes td {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    border: none;
    border-bottom: 1px solid #eee;
    font-size: 14px;
  }

  .tabla-participantes td::before {
    content: attr(data-label);
    font-weight: bold;
    flex-basis: 50%;
  }
}
/* --- TABLA GANADORES --- */
.tabla-ganadores {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.tabla-ganadores th,
.tabla-ganadores td {
  border: 1px solid #d1d5db;
  padding: 8px;
  text-align: left;
}

.tabla-ganadores th {
  background: #f1f5f9;
}

/* --- RESPONSIVE: Versión móvil --- */
@media (max-width: 768px) {
  .tabla-ganadores,
  .tabla-ganadores thead,
  .tabla-ganadores tbody,
  .tabla-ganadores th,
  .tabla-ganadores td,
  .tabla-ganadores tr {
    display: block;
    width: 100%;
  }

  .tabla-ganadores thead {
    display: none; /* Oculta encabezado en móvil */
  }

  .tabla-ganadores tr {
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
  }

  .tabla-ganadores td {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    border: none;
    border-bottom: 1px solid #eee;
    font-size: 14px;
  }

  .tabla-ganadores td::before {
    content: attr(data-label);
    font-weight: bold;
    flex-basis: 50%;
  }
}
.botones {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
}

/* Botones */
.btn {
  padding: 12px 20px;
  background: #0056b3;
  color: #fff;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  transition: background 0.3s ease;
}

.btn:hover {
  background: #003f7f;
}

/* --- RESPONSIVE: Móviles --- */
@media (max-width: 768px) {
  .botones {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}
.logo img {
  max-width: 100%;
  height: auto;
}

/* --- RESPONSIVE: Versión móvil --- */
@media (max-width: 768px) {
  .logo img {
    content: url("logo-vertical.jpg");
  }
}

