/* Estilos generales del contenedor */
#klci-app-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 250px;
    font-family: 'Montserrat', sans-serif;
    color: #333;
    padding: 0px;
    box-sizing: border-box;
}

.klci-card {
    background-color: #FFF;
    border-radius: 0px;
    padding: 50px;
    text-align: center;
    max-width: 800px;
    width: 100%;
    box-sizing: border-box;
    height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px solid #5f5ebe;
    position: relative;
}

.klci-back-arrow {
    position: absolute; 
    top: 20px;          
    left: 25px;         
    font-size: 28px;    
    font-weight: 900;
    color: #6a40ff; 
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.klci-back-arrow:hover {
    color: #4a28cc; 
    transform: translateX(-3px); 
}


.klci-title {
    font-size: 1.8em;
    margin-bottom: 25px;
    color: #4a4a4a;
    font-weight: 400;
}

.klci-buttons-container {
    display: flex;
    flex-direction: row;
    gap: 15px;
    width: 100%;
}

.klci-button {
    padding: 15px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1; 
}


.klci-button.single {
    flex-grow: 0;           /* Evita que el botón se estire */
    width: 70%;             /* Dale un ancho generoso pero no total */
    max-width: 280px;       /* Un ancho máximo para que no sea demasiado grande */
    margin: 0 auto;         /* Centra el botón horizontalmente */
}


/* Botón primario brillante */
.klci-button.primary {
    background: linear-gradient(180deg, #9D7BFF 0%, #683FE9 100%);
    color: #fff;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.25),
                inset 0 6px 8px rgba(255, 255, 255, 0.5),
                inset 0 -5px 8px rgba(0, 0, 0, 0.4);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-bottom-color: rgba(0, 0, 0, 0.2);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.klci-button.primary:hover {
    background: linear-gradient(180deg, #A98EFF 0%, #7956F0 100%);
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.3),
                inset 0 6px 8px rgba(255, 255, 255, 0.6),
                inset 0 -5px 8px rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
}

/* Botón secundario */
.klci-button.secondary {
    background-color: transparent;
    color: #555;
    border: 1px solid #5f5ebe;
    box-shadow: none;
}

.klci-button.secondary:hover {
    background-color: #FFF;
    border: 2px solid #5f5ebe;
}

.klci-button.primary .sparkle-icon {
    margin-left: 7px;
    width: 20px;
    height: 20px;
}

/* --- AJUSTE #2: HACER EL CONTENEDOR DE ARRASTRE MÁS GRANDE --- */
.klci-dropzone {
    width: 100%;
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px dashed #a0a0a0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    cursor: pointer;
    background-color: #f6f6ff;
    color: #777;
    transition: all 0.3s ease;
    font-size: 1.1em;
    margin-top: 40px; /* <-- LÍNEA AÑADIDA PARA CREAR ESPACIO */
}


/* Estilos restantes sin cambios */
.klci-dropzone.dragging {
    background-color: #e8f0ff;
    border-color: #6a40ff;
    color: #6a40ff;
}

.klci-dropzone input[type="file"] {
    display: none;
}

#file-name-display {
    margin-top: -10px;
    margin-bottom: 20px;
    font-style: italic;
    color: #666;
}

.klci-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #6a40ff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}



@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.klci-blinking-text {
    animation: blink 1.5s infinite alternate;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Responsive para móviles */
@media (max-width: 600px) {
    .klci-title {
        font-size: 1.5em;
    }
    .klci-buttons-container {
        flex-direction: column;
    }
    .klci-button {
        font-size: 1em;
        padding: 12px 25px;
    }
    .klci-button.single {
        width: 90%; /* En móvil, el botón solo puede ser más ancho */
    }
}

.klci-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #6a40ff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}