/* estudio.css - Estilos para el módulo de Flashcards IA */

.estudio-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    animation: fadeIn 0.5s ease;
}

.study-header {
    margin-bottom: 2rem;
    text-align: center;
}

.flashcard-carousel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* Escena 3D para el flip de la tarjeta */
.flashcard-scene {
    width: 100%;
    max-width: 500px;
    height: 320px;
    perspective: 1000px;
    cursor: pointer;
}

.flashcard {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.flashcard.is-flipped {
    transform: rotateY(180deg);
}

.flashcard-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.flashcard-front {
    background: linear-gradient(135deg, var(--surface-2), var(--surface-1));
    color: var(--text-color);
}

.flashcard-back {
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    color: white;
    transform: rotateY(180deg);
}

.flashcard-face h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.flashcard-face p {
    font-size: 1.1rem;
    line-height: 1.6;
}

.flashcard-source {
    position: absolute;
    bottom: 1rem;
    right: 1.5rem;
    font-size: 0.75rem;
    opacity: 0.6;
    font-weight: 500;
}

/* Controles del carrusel */
.carousel-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn-carousel {
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-carousel:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.btn-carousel:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.carousel-progress {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Formulario de generación */
.gen-form {
    background: var(--surface-1);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.gen-form .form-group {
    flex: 1;
    min-width: 200px;
    margin: 0;
}

/* --- NUEVOS ESTILOS v5.8.0 --- */

/* Botones de revisión en el reverso */
.review-controls {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    width: 100%;
    justify-content: center;
}

.btn-review {
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-review-ok {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.btn-review-ok:hover {
    background: #22c55e;
    color: white;
}

.btn-review-fail {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-review-fail:hover {
    background: #ef4444;
    color: white;
}

/* Historial de sesiones */
.study-history {
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.history-item {
    background: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.history-item:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

.history-info {
    flex: 1;
    cursor: pointer;
}

.history-info h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-color);
}

.history-info p {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.history-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon-del {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-icon-del:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

