:root {
    --primary-color: #2c3e50;
    --secundary-color: #ff0000; 
    --terciary-color: #810101;
    --accent-color: #3498db;
    --text-color: #333;
    --transition-speed: 0.3s;
}

/* Estilos base mejorados */
body {
    font-family: system-ui, -apple-system, sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1.5;
    background-image: url('../images/fondo.jpg');

}

/* Estructura principal */
.container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
}



/* Botón flotante de instrucciones */
.float-instructions-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--secundary-color);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: transform var(--transition-speed) ease;
    z-index: 100;
}

.float-instructions-btn:hover {
    background: var(--terciary-color);
    transform: translateY(-2px);
}

.icon {
    font-weight: bold;
    font-size: 1.2rem;
}

/* Sección principal */
.main-section {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.main-section {
    position: relative;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 400px; /* Ajusta según tu diseño */
    margin: auto;
    margin-top: 50px;
}

.title {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
}

/* Logo */
.logo-container {
    margin: 2rem 0;
}

.logo {
    width: 120px;
    height: auto;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: rotate(-5deg) scale(1.05);
}

/* animacion de carga */
@keyframes loading {
    0%, 100% {
      margin-top: 25px;
      height: 10px;
    }
    50% {
      margin-top: 0px;
      height: 50px;
    }
  }
  
  .loading-container {
      display: none; /* Oculto por defecto */
      justify-content: center;
      align-items: center;
      gap: 5px;
      height: 250px;
  }
  .loading-container ul {
    display: flex; /* Asegura que los elementos estén en línea */
    justify-content: center; /* Centra horizontalmente */
    align-items: center; /* Centra verticalmente */
    gap: 5px;
    list-style: none; /* Oculta los puntos de la lista */
    padding: 0;
}
  
  .loading-container li {
      background-color: var(--secundary-color);
      width: 10px;
      height: 20px;
      animation: loading 1s ease-in-out infinite;
      list-style: none; /* Asegura que los puntos de la lista no se vean */
      display: inline-block; /* Asegura que los elementos se alineen horizontalmente */
  }
  
  .loading-container li:nth-child(1) { animation-delay: 0s; }
  .loading-container li:nth-child(2) { animation-delay: -0.2s; }
  .loading-container li:nth-child(3) { animation-delay: -0.4s; }
  .loading-container li:nth-child(4) { animation-delay: -0.6s; }
  .loading-container li:nth-child(5) { animation-delay: -0.8s; }
  
  .logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.logo {
    width: 120px;
    height: auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.logo.hidden {
    display: none;
}

/* Grupo de entrada unificado */
.input-group {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.unified-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    background: #f8f9fa;
    font-size: 1rem;
}
.unified-input:focus {
    border: 1px solid var(--secundary-color);
    border-top-left-radius: 50px;
    border-bottom-left-radius: 50px;

}
.unified-button {
    padding: 1rem 2rem;
    background: var(--secundary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease;
}

.unified-button:hover {
    background: var(--terciary-color);
}

/* Sidebar de instrucciones */
.instructions-sidebar {
    display: none;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    width:500px;
    
}

/* Modal para móviles */
.instructions-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
   
}

.modal-content {
    position: relative;
    background: white;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 15px;
    max-width: 500px;
    animation: modalSlideIn 0.3s ease;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
}

/* Animaciones */
@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Contador regresivo */
.contador {
    margin-top: 1rem;
    font-size: 1.2rem;
    color: #007bff;
    font-weight: bold;
}

.tab-menu {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%); /* Para pegarlos arriba */
    display: flex;
    gap: 10px;
}

.tab-btn {
    background: white;
    padding: 8px 15px;
    border: 1px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    font-size: 14px;
}

.tab-btn.active {
    background: red;
    color: white;
}


/* Media Queries para responsive */
@media (min-width: 900px) {
    .container {
        grid-template-columns: 1fr 300px;
        align-items: start;
    }
    
    .instructions-sidebar {
        display: block;
        position: sticky;
        top: 2rem;
    }
    
    .float-instructions-btn {
        display: none;
    }
}

@media (max-width: 899px) {
    .instructions-sidebar {
        display: none;
    }
}

@media (max-width: 450px) {
    body {
        padding: 0;
        margin: 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .container {
        width: 100%;
        padding: 1rem;
        height: 500px;
    }

    .main-section {
        width: 350px;
        padding: 1rem;
        text-align: center;
    }

    .logo {
        max-width: 80px; /* Reduce el logo en móviles */
    }

    .input-group {
        width: 100%;
        height: 40px;
    }

    .unified-input {
        width: 60%;
        font-size: 14px;
        padding: 8px;
    }

    .unified-button {
        width: 30%;
        font-size: 14px;
        padding: 8px;
    }

    .tab-menu {
        display: flex;
        justify-content: center;
        gap: 5px;
        margin-top: 0.1rem;
    }

    .tab-btn {
        font-size: 12px;
        padding: 6px 10px;
    }

    .float-instructions-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .loading-container {
        display: none; /* Oculto por defecto */
        justify-content: center;
        align-items: center;
        gap: 5px;
        height: 130px;
    }
}
