/* Containerul principal - Setat pe coloană pentru Titlu sus, Card la mijloc, Săgeți jos */
.nlm-flashcard-container.dark-mode {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 30px 15px;
    background: transparent; 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
    width: 100%;
    max-width: 100vw; 
    overflow-x: hidden; 
}

/* --- HEADER (TITLU ȘI SUBTITLU) --- */
.nlm-header {
    text-align: center;
    margin-bottom: 5px;
    width: 100%;
    max-width: 600px; 
}

.nlm-title {
    color: #E8EAED !important; 
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 8px 0 !important;
    line-height: 1.3;
}

.nlm-subtitle {
    color: #9AA0A6 !important; 
    font-size: 1.1rem;
    margin: 0 !important;
    line-height: 1.5;
}

/* Scena 3D */
.nlm-card-scene {
    width: 100%;
    max-width: 600px;
    height: 350px; 
    perspective: 1500px; 
    position: relative;
    box-sizing: border-box;
}

/* Cardul în sine - Baza invizibilă pe care stau fețele */
.nlm-card {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0; left: 0;
    cursor: pointer;
}

/* Fețele cardului - AICI ESTE ANIMAȚIA CORECTĂ */
.nlm-card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    background-color: #2D2E31;
    overflow: hidden; 
    /* Tranzitia care face întoarcerea fluidă: */
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
}

/* 1. Starea normală */
.nlm-front {
    transform: rotateY(0deg);
    z-index: 2;
}
.nlm-back {
    transform: rotateY(-180deg); 
    background-color: #3C4043;
}

/* 2. Starea FLIPPED (la click) */
.nlm-card.is-flipped .nlm-front {
    transform: rotateY(180deg);
}
.nlm-card.is-flipped .nlm-back {
    transform: rotateY(0deg); 
}

/* Containerul de conținut (unde stă textul) */
.nlm-content-box {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    padding: 30px 30px 60px 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow-y: auto; 
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nlm-content-box::-webkit-scrollbar { 
    display: none; 
}

.nlm-front .nlm-content-box, 
.nlm-back .nlm-content-box {
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Conținut text */
.nlm-content-box h3 {
    font-size: 1.5rem;
    line-height: 1.4;
    margin: 0 0 20px 0;
    font-weight: 500;
    color: #E8EAED;
}

.nlm-content-box p {
    font-size: 1.2rem;
    line-height: 1.5;
    color: #E8EAED;
    margin: 0 0 20px 0;
    word-wrap: break-word; 
    width: 100%;
}

/* Trigger-ul (textul cu "Vezi răspunsul") */
.nlm-flip-trigger, .nlm-flip-trigger-back {
    position: absolute;
    bottom: 25px;
    left: 0;
    width: 100%;
    font-size: 0.9rem;
    color: #8AB4F8;
    text-decoration: none;
    font-weight: 500;
    pointer-events: none;
    text-align: center;
    z-index: 10;
}

/* Container Săgeți */
.nlm-navigation {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 10px;
}

/* Săgețile de navigare */
.nav-arrow {
    background: #3C4043;
    border: none;
    color: #E8EAED;
    font-size: 1.5rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    outline: none;
    padding: 0;
}

.nav-arrow:hover:not(:disabled) {
    background: #5F6368;
}

.nav-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Contorul */
.nlm-counter-container {
    text-align: center;
    color: #9AA0A6;
    margin-top: 5px;
    font-size: 0.9rem;
}

/* --- RESPONSIVE (PENTRU MOBIL) --- */
@media (max-width: 768px) {
    .nlm-title {
        font-size: 1.5rem;
    }
    .nlm-subtitle {
        font-size: 1rem;
    }
    .nlm-flashcard-container.dark-mode {
        padding: 20px 0; 
    }
    .nlm-card-scene {
        width: 100%; 
        max-width: 100%; 
        height: 320px; 
    }
    .nlm-content-box {
        padding: 20px 20px 50px 20px; 
    }
    .nlm-content-box h3 {
        font-size: 1.3rem; 
    }
    .nlm-content-box p {
        font-size: 1.1rem;
    }
}

/* Fix global pentru telefoane care forțează scroll orizontal */
body, html {
    overflow-x: hidden !important;
}