#contenedor-pregunta {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease-in-out;
    width: 100%;
    box-sizing: border-box;
}

#contenedor-pregunta.visible {
    opacity: 1;
    transform: translateY(0);
}

#contenedor-pregunta, 
.input-simple-container, 
#input-dinamico {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden;
}

.input-simple-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important; 
    padding: 15px 0;
}

#main_input {
    width: 100% !important;
    max-width: 500px !important;
    height: 45px;
    border-radius: 25px;
    border: 2px solid #777;
    padding: 0 20px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

#main_input:focus {
    border-color: #ee1515;
}

.multi-container {
    width: 100% !important;
    margin: 15px 0 !important;
}

.multi-row input[type="text"],
.multi-row input[type="number"],
.multi-row input:not([type="radio"]):not([type="checkbox"]) {
    height: 32px;
    border-radius: 30px;
    padding: 0px 20px;
    border: 1px solid #777;
    color: black;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.3s;
    width: 200px;
}

.multi-row input:focus {
    border-color: #ee1515;
}

.multi-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    border-radius: 12px;
    border: 1px solid #ccc;
}

.grid-opciones {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    width: 100%;
    margin-top: 20px;
}

.opcion-box {
    background: white;
    border: 2px solid #ddd;
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    font-weight: bold;
}

.opcion-box:hover {
    border-color: #ee1515;
    background: #fff5f5;
}

.botones-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    width: 100%;
}

.botones-wrapper {
    display: flex;
    justify-content: center;
    gap: 15px;
    min-height: 50px;
}

.botones-container button {
    min-width: 180px;
    padding: 12px 25px;
    border-radius: 50px;
    border: none;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#btn-comprobar { background: linear-gradient(145deg, #ee1515, #b31010); }
#btn-saltar { background: linear-gradient(145deg, #3aa1ff, #2980b9); }
#btn-nueva { background: linear-gradient(145deg, #2ecc71, #27ae60); }

.botones-container button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

#resultado {
    width: 100%;
    min-height: 120px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
}

.feedback-header {
    width: 100%;
    text-align: center;
    font-weight: bold;
    font-size: 1.4em;
    padding: 10px 0;
}

.solucion-box {
    width: 100% !important;
    box-sizing: border-box;
    background-color: #f9f9f9;
    border-left: 6px solid #ee1515;
    padding: 20px;
    border-radius: 8px;
    font-size: 1.1em;
}

#marcadores {
    min-height: 80px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    gap: 15px;
    border-radius: 15px;
    padding: 10px;
    margin-bottom: 15px;
    transition: background 0.3s ease;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .botones-container {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px;
    }

    .botones-container button {
        width: 100% !important;
        min-width: 0;
    }

    .multi-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .multi-row input:not([type="radio"]):not([type="checkbox"]) {
        width: 100% !important;
    }

    .grid-opciones {
        grid-template-columns: 1fr;
    }
}

.drag-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.drag-item {
    background: white;
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    cursor: grab;
    transition: all 0.2s ease;
    user-select: none;
}

.drag-item:active {
    cursor: grabbing;
}

.drag-item.dragging {
    opacity: 0.5;
    border-color: #ee1515;
    transform: scale(1.02);
}

.drag-item img {
    width: 50px;
    height: 50px;
    margin-right: 15px;
    pointer-events: none;
}

.drag-item p {
    margin: 0;
    font-weight: bold;
    color: #333;
}

.marcador-box {
    background-color: white;
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 15px 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 120px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.marcador-label {
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
    font-size: 0.9em;
    text-transform: uppercase;
}

.marcador-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

.btn-morado {
    background: linear-gradient(145deg, #a03aff, #8429b9);
}

.modal-overlay {
    display: none; 
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;

    justify-content: center;
    align-items: center;
    
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: white;
    width: 95%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transform: scale(0.7);
    transition: transform 0.3s ease-in-out;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.modal-header h2 { margin: 0; font-size: 1.5rem; color: #333; }
.close-btn { font-size: 28px; cursor: pointer; color: #aaa; font-weight: bold; }
.close-btn:hover { color: #e74c3c; }

.filtro-seccion { margin-top: 15px; }
.filtro-seccion h3 { margin-bottom: 8px; color: #555; font-size: 1rem; border-bottom: 1px solid #ddd; }
.opciones-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 0.9rem; }

.modal-footer {
    margin-top: 25px;
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.btn-aplicar { background-color: #2ecc71; color: white; border: none; padding: 10px; flex: 1; border-radius: 8px; cursor: pointer; font-weight: bold; }
.btn-restablecer { background-color: #95a5a6; color: white; border: none; padding: 10px; flex: 1; border-radius: 8px; cursor: pointer; font-weight: bold; }

.error-dialog {
    background-color: #fdecea;
    color: #d32f2f;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    margin-bottom: 15px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
