/* MÓDULO DE APRENDIZAJE - ESTILOS PREMIUM */

:root {
    --learn-primary: #58cc02;
    --learn-primary-dark: #46a302;
    --learn-secondary: #1cb0f6;
    --learn-accent: #ffc800;
    --learn-danger: #ff4b4b;
    --learn-bg: #f7f7f7;
    --learn-card-shadow: 0 8px 0 rgba(0,0,0,0.1);
}

#aprendizaje-content {
    background-color: var(--learn-bg) !important;
    min-height: 60vh !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
    font-family: 'Inter', sans-serif !important;
}

.smallest {
    font-size: 0.65rem !important;
    line-height: 1.1 !important;
}

/* DASHBOARD */
.learn-category-card {
    background: white !important;
    border: 2px solid #e5e5e5 !important;
    border-bottom-width: 4px !important;
    border-radius: 12px !important;
    padding: 0.85rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
    box-shadow: 0 4px 0 rgba(0,0,0,0.05);
}

.learn-category-card:hover {
    transform: translateY(-2px);
    background-color: #f8f9fa;
    border-color: var(--learn-secondary);
}

.learn-category-card:active {
    transform: translateY(2px);
    border-bottom-width: 2px;
}

.learn-icon-circle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--learn-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    color: white;
    font-size: 1.3rem;
    box-shadow: 0 3px 0 rgba(0,0,0,0.1);
}

/* JUEGO: FLASHCARDS */
.flashcard-container {
    perspective: 1000px;
    width: 100%;
    max-width: 450px;
    height: 280px;
    margin: 0.25rem auto;
}

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

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

.flashcard-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: white;
    border: 2px solid #e5e5e5;
    border-bottom-width: 6px;
    border-radius: 20px;
    text-align: center;
    overflow-y: auto;
}

.flashcard-back {
    transform: rotateY(180deg);
    background-color: var(--learn-secondary);
    color: white;
    border-color: rgba(255,255,255,0.2);
}

.flashcard-word {
    font-size: 1.3rem !important;
    font-weight: 800 !important;
    margin-bottom: 0.2rem !important;
    color: inherit !important;
}

.flashcard-sub {
    font-size: 0.8rem !important;
    opacity: 0.8 !important;
}

/* CLOZE TESTS */
.learn-category-card p {
    font-size: 0.85rem;
    margin-bottom: 0;
}

/* GAME VIEW OPTIMIZATION */
.game-split-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.game-main-panel {
    flex: 1;
    min-width: 0;
}

.game-side-panel {
    width: 320px;
    flex-shrink: 0;
    background: #ffffff;
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 400px;
}

@media (max-width: 991px) {
    .game-split-layout {
        flex-direction: column;
    }
    .game-side-panel {
        width: 100%;
    }
}

/* CLOZE TESTS */
.cloze-sentence {
    font-size: 1.3rem;
    line-height: 1.5;
    text-align: left;
    margin-bottom: 1.5rem;
    padding: 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.03);
}

.cloze-input {
    border: none;
    border-bottom: 2px dashed var(--learn-secondary);
    background: transparent;
    width: auto;
    min-width: 80px;
    text-align: center;
    font-weight: bold;
    color: var(--learn-secondary);
    outline: none;
}

.cloze-input:focus {
    border-bottom-style: solid;
}

.cloze-sentence-card {
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.4;
    padding: 0 10px;
}

.cloze-gap-placeholder {
    color: var(--learn-secondary);
    text-decoration: underline;
    text-underline-offset: 8px;
    font-family: monospace;
}

.cloze-answer-highlight {
    background-color: rgba(255, 255, 255, 0.25);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* BUTTONS DUOLINGO STYLE */
.btn-learn {
    background: white;
    border: 2px solid #e5e5e5;
    border-bottom-width: 4px;
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.1s ease;
}

.btn-learn-primary {
    background: var(--learn-primary);
    border-color: var(--learn-primary-dark);
    color: white;
}

.btn-learn-primary:hover {
    background: #61e002;
    color: white;
}

.btn-learn:active {
    transform: translateY(2px);
    border-bottom-width: 2px;
}

/* PROGRESS BAR */
.learn-progress {
    height: 8px;
    background-color: #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.learn-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--learn-primary), #78eb17);
    width: 0%;
    transition: width 0.3s ease;
}

/* CRUD UI */
.learn-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--learn-card-shadow);
}

.learn-table th {
    background-color: #f8f9fa;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: #afafaf;
    padding: 1rem;
}
.learn-details-toggle {
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: bold;
    color: rgba(255,255,255,0.9);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    background: rgba(255,255,255,0.1);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.3);
    display: inline-block;
}

.learn-details-toggle:hover {
    background: rgba(255,255,255,0.2);
    color: white;
    transform: scale(1.05);
}

.learn-extra-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    width: 100%;
}

.learn-extra-content.show {
    max-height: 500px;
}

.flashcard-back .text-dark {
    color: #1a1a1a !important;
}

.flashcard-back .bg-light, .flashcard-back .bg-info-soft {
    background-color: rgba(255,255,255,0.9) !important;
}
