<style>

body {
  font-family: 'Segoe UI', sans-serif;
  margin: 5px;
  padding: 5px;
  background: #f9f9f9;
  color: #333;
}
main {
  padding: 20px;
}

.lottery-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    overflow-x: hidden;
}

.lottery-card {
    flex: 1 1 300px;
    max-width: 300px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 4px 8px #84b2b2;
    text-align: center;
    padding: 20px;
}

.lottery-logo {
  width: 70px;
  margin-bottom: 10px;
}

.lottery-title {
  font-size: 20px;
  color: #333;
  margin: 5px 0;
}

.lottery-date {
  color: #777;
  margin: 10px 0;
}


.lottery-prize {
  font-size: 14px;
  color: #444;
}

.lottery-button {
      display: inline-block;
    margin-top: 10px;
   color: black;
    text-decoration: none;
    
}

.lottery-button:hover {
  background: #007BFF;
  color: #fff;
}

footer {
    text-align:center;
    color:#fff;
    font-size:1rem;
    background:linear-gradient(to bottom,#008080 0%,#008080 100%);
    margin-top:25px;
    position:absolute;
    width:-webkit-fill-available;
    padding:8px
}
.color-footer {
    color:#fff
}
main>section.result,main>aside.ads {
    flex:0 0 100%;
    padding-top:60px
}
main {
    flex-wrap:wrap;
    margin:auto;
    padding:10px
}

a {
    text-decoration:none
}
.c {
    padding:5px 25px;
    margin:auto;
    max-width:1218px;
    display:flex;
    background-color:#008080;
    position:fixed;
    right:0;
    left:0;
    z-index:1
}
header .c {
    justify-content:flex-end;
    flex-wrap:wrap
}
.c nav,.c>a {
    flex:1 1 auto;
    text-align:right
}
.c>a {
    display:flex;
    align-self:stretch;
    align-items:center;
    flex-grow:1
}
nav>ul {
    display:none
}
.toggler {
    font-size:25px;
    padding:5px 10px;
    line-height:1
}
nav>ul.open {
    display:block;
    position:absolute;
    z-index:999;
    background-color:#0d0d0de3;
    left:0;
    right:0;
    text-align:center;
    padding:0;
    top:30px
}
nav>ul.open li {
    padding:10px;
    border-bottom:1px solid #eee
}
nav>ul.open a {
    text-align:center;
    color:#fff
}
nav>ul>li {
    display:block
}
nav>ul>li a {
    padding:18px 12px 17px;
    font-size:16px;
    line-height:1.3125;
    box-shadow:none;
    color:#fff;
    text-align:center;
    text-decoration:none;
    font-weight:700
}
.headerad {
    width:300px;
    height:250px
}
.head {
    width:300px;
    height:250px
}
.header {
    width:300px;
    height:100px
}
@media (min-width:1050px) {
    
    div.d {
        flex:0 0 30%;
        padding:5px
    }
    main {
        max-width:1200px
    }
    main>section.result {
        flex:0 0 60%
    }
    main>aside.ads {
        flex:0 0 39%;
        align-self:flex-start;
        top:0
    }
    nav>button {
        display:none
    }
    nav>ul {
        display:flex
    }
}
@media(min-width:468px) {
    .headerad {
        width:300px;
        height:250px
    }
    .head {
        width:300px;
        height:250px
    }
    .header {
        width:300px;
        height:250px
    }
}
@media(min-width:728px) {
    .headerad {
        width:700px;
        height:90px
    }
    .head {
        width:250px;
        height:550px
    }
    .header {
        width:700px;
        height:90px
    }
}
.date {
    display:block;
    text-align:center;
    margin:15px 10px;
    padding:5px;
    color:#fff
}




.today.juega-mas-pega-mas .b0,
.today.juega-mas-pega-mas .b1 {
  background-color: #326eb1 !important;
  color: white !important;
  border-radius: 30%;
}

/* Bolo 2 y 3 - Rojo */
.today.juega-mas-pega-mas .b2,
.today.juega-mas-pega-mas .b3 {
  background-color: #be1e2d !important;
  color: white !important;
  border-radius: 30%;
}

/* Bolo 4 - Blanco */
.today.juega-mas-pega-mas .b4 {
  background-color: #fff !important;
  color: #000 !important;
  border-radius: 30%;
  box-shadow: 0 0 0 1px #ccc;
}
.today:not(.juega-mas-pega-mas):not(.billete-domingo) .bola {
  background: -webkit-linear-gradient(45deg, #28a3cd 0, #0976d5 50%, #1678d4 51%, #a0cfffe6 100%);
  color: white !important;
  border-radius: 30%;
}

/* Bolo 0 y 1 - Azul */
.juega-mas-pega-mas .b0,
.juega-mas-pega-mas .b1,
.today.loto-mas .b7,
.loto-mas .b7,
.today.megalotto .b7,
.megalotto .b7,
.today.juega-mas-pega-mas .b0,
.today.juega-mas-pega-mas .b1 {
  background-color: #326eb1;
  color: white;
  border-radius: 30%;
}

/* Bolo 2 y 3 - Rojo */
.juega-mas-pega-mas .b2,
.juega-mas-pega-mas .b3,
.today.loto-mas .b6,
.loto-mas .b6,
.today.megalotto .b6,
.loto-5 .b5,
.today.loto-5 .b5,
.megalotto .b6,
.today.juega-mas-pega-mas .b2,
.today.juega-mas-pega-mas .b3 {
  background-color: #be1e2d;
  color: white;
  border-radius: 30%;
}

/* Bolo 4 - Blanco */
.juega-mas-pega-mas .b4,
.today.juega-mas-pega-mas .b4 {
  background-color: #fff;
  color: #000;
  border-radius: 30%;
  box-shadow: 0 0 0 1px #ccc;
}

.lottery-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.lottery-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-bottom: 0;
}

.lottery-title {
  font-size: 15px;
  margin: 0;
  color: #333;
  text-align: left;
}

.lottery-h {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 70px;
    margin-bottom: 10px;
}
.date input[type="date"] {
  padding: 10px 12px;
  font-size: 16px;
  border: 2px solid #007BFF;
  border-radius: 8px;
  background-color: #fff;
  color: #333;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: border-color 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.date input[type="date"]:hover {
  border-color: #0056b3;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.date input[type="date"]:focus {
  outline: none;
  border-color: #28a745;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

.selector-fecha label {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 10px;
  color: #006666;
 }

.selector-fecha {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 20px;
  background: #84b7b7;
  border-radius: 12px;
  margin: 20px auto;
  width: 100%;
  max-width: 300px;
  box-sizing: border-box;
}

.selector-fecha input[type="text"] {
  padding: 10px 12px;
  font-size: 16px;
  border: 2px solid #00a6a6;
  border-radius: 10px;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-align: center;
}
.selector-fecha input[type="text"]:focus {
  outline: none;
  border-color: #007BFF;
}
.lottery-balls {
  display: flex;
  flex-wrap: wrap; /* <-- permite salto de línea */
  justify-content: center;
  gap: 10px;
  margin: 15px 0;
  padding: 5px;
}

.lottery-balls span {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: #f0f0f0;
    border-radius: 50%;
    font-weight: bold;
    color: #000;
    padding: 10px 10px;
    font-size: 14px;
}
.selector-fecha input[type="text"] {
  min-height: 42px;
  min-width: 220px;
  padding: 8px;
  box-sizing: border-box;
}
.date {
  min-height: 60px;
}
.lottery-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: #f8f8f8;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 20px;
    text-decoration: none;
    transition: transform 0.1s ease-in-out;
  }

  .lottery-button:active {
    transform: scale(0.92);
    background: #e6e6e6;
  }
 .error-api {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    padding: 12px;
    margin: 20px;
    font-size: 16px;
    border-radius: 5px;
  }
  body.cargando::before {
    content: "? Cargando...";
    position: fixed;
    top: 10px;
    right: 10px;
    background: #fff;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    z-index: 9999;
    color: #333;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
  }
 .lottery-card {
    min-height: 220px; /* puedes ajustar según tu diseño */
    border: 1px solid #e0e0e0;
    padding: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 8px;
    transition: background 0.3s ease;
    position: relative;
  }

</style>
