/* ========================================================= */
/* --- FIX GLOBAL ANTI SCROLL (NO VISUAL) --- */
/* ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

/* ========================================================= */
/* --- ESTILO LOTERÍA: ROJO BILLETE Y ORO DE LA SUERTE --- */
/* ========================================================= */

body {
  font-family: 'Arial Black', sans-serif; 
  margin: 0;
  padding: 0;
  background-color: #f7f3e8; /* Base color crema/papel viejo */
  color: #1a1a1a;
}

/* ========================================================= */
/* --- COLORES BASE --- */
/* ========================================================= */

:root {
  --color-main: #c42f27;        /* Rojo Lotería / Premios */
  --color-secondary: #ffc400;  /* Dorado / Amarillo Premios */
  --color-dark: #3a0000;       /* Rojo oscuro */
  --color-accent: #2e8b57;     /* Verde Billete */
  --color-media: #7a7a7a;
}

/* ========================================================= */
/* --- ENCABEZADO --- */
/* ========================================================= */

header {
  background-color: var(--color-main);
  color: white;
  padding: 20px 0;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

header h1 {
  margin: 0;
  font-size: 2.8em;
  text-shadow: 2px 2px 0 var(--color-dark); 
}

/* ========================================================= */
/* --- NAVEGACIÓN --- */
/* ========================================================= */

nav {
  background-color: #636442a7; 
  padding: 10px 0;
  text-align: center;
}

.dropbtn {
  background-color: #ffc400;
  color: white;
  padding: 12px 20px;
  font-size: 16px;
  border: none;
  cursor: pointer;
  border-radius: 5px;
}

.dropbtn:hover,
.dropbtn:focus {
  background-color: #ddec3a;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 200px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  border-radius: 5px;
  z-index: 10;
}

.dropdown-content a {
  color: #333;
  padding: 12px 16px;
  display: block;
}

.dropdown-content a:hover {
  background-color: #ddd;
}

.show {
  display: block;
}

/* ========================================================= */
/* --- CONTENEDOR PRINCIPAL --- */
/* ========================================================= */

.container {
  display: flex;
  max-width: 1600px;
  width: 100%;
  margin: 25px auto;
  padding: 0 20px;
}

/* ========================================================= */
/* --- SIDEBAR --- */
/* ========================================================= */

.sidebar {
  width: 280px;
  padding: 20px;
  background-color: #fcfcfc;
  border: 5px double var(--color-secondary); /* CUADRADO AMARILLO */
  border-radius: 8px;
  margin-right: 25px;
  height: fit-content;
  max-width: 100%;
}

.sidebar h2 {
  color: var(--color-main);
  border-bottom: 3px solid var(--color-secondary);
  padding-bottom: 10px;
  text-align: center;
}

/* ========================================================= */
/* --- CONTENIDO PRINCIPAL --- */
/* ========================================================= */

.main-content {
  flex-grow: 1;
  min-width: 0;
  background-color: #ffffff;
  padding: 20px;
  border-radius: 8px;
  max-width: 100%;
}

/* ========================================================= */
/* --- SECCIONES DE RESULTADOS (EUROMILLÓN / PRIMITIVA / BONOLOTO) --- */
/* ========================================================= */

.prediction-section {
  border: 3px solid var(--color-main);   /* MARCO ROJO */
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 30px;
  background-color: #fffaf0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.prediction-section .header-sorteo {
  text-align: center;
  border-bottom: 2px dashed var(--color-secondary);
  margin-bottom: 15px;
  padding-bottom: 5px;
}

.prediction-section h3 {
  color: var(--color-dark);
  margin: 0;
  font-size: 1.5em;
}

/* ========================================================= */
/* --- RESULTADOS DE HOY (RESALTADOS EN ROJO) --- */
/* ========================================================= */

.final-result {
  padding: 15px;
  background-color: var(--color-main); /* ROJO INTENSO */
  border-radius: 5px;
  border: 2px solid var(--color-secondary);
  box-shadow: 0 0 10px rgba(196, 47, 39, 0.5);
}

/* ========================================================= */
/* --- BOLAS (SE MANTIENEN TAL CUAL) --- */
/* ========================================================= */

.numbers-display {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
}

.ball,
.star-ball {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  font-weight: bold;
  font-size: 1.1em;
  border: 2px solid var(--color-dark);
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.ball {
  background-color: #008000;
  color: white;
}

.star-ball {
  background-color: var(--color-secondary);
  color: var(--color-dark);
}

/* ========================================================= */
/* --- RANKING (SIN CAMBIOS VISUALES) --- */
/* ========================================================= */

.ranking-sport {
  overflow-x: auto; /* SOLO FIX TÉCNICO */
}

.ranking-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
}
 /* --- SECCIÓN DE CONTACTO --- */
    .contact-footer {
      margin-top: 50px;
      background: var(--color-main);
      color: white;
      padding: 30px;
      border-radius: 15px;
      text-align: center;
      border-bottom: 5px solid var(--color-secondary);
    }

/* ========================================================= */
/* --- MEDIA QUERIES (SOLO ADAPTACIÓN) --- */
/* ========================================================= */

@media (max-width: 900px) {
  .ranking-grid {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
    padding: 10px;
  }

  .sidebar {
    width: 100%;
    margin-right: 0;
    margin-bottom: 20px;
  }
}

@media (max-width: 480px) {
  .ball,
  .star-ball {
    width: 30px;
    height: 30px;
    font-size: 1em;
  }
}