 /* Chestionar simulare 30 intrebari */

 .quiz-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 2px solid #e9ecef;
}

.quiz-start-btn {
    display: block;
    padding: 12px 24px;
    background: #2271b1;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    margin-top: 20px;
    margin: 0 auto;
    width: fit-content;
}

.quiz-start-btn:hover {
    background: #135e96;
    color: #fff;
}

.quiz-timer {
    font-weight: bold;
    color: #dc3545;
}

.quiz-progress {
    font-weight: bold;
    color: #dc3545;
}

/* .quizContent {} */ 

.question-container {
    margin-bottom: 30px;
}

.question-text {
    font-size: 1.1em;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.answers-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
 
.quiz-rules, .quiz-categories {
    margin: 20px 0;
}

.quiz-rules ul, .quiz-categories ul {
    list-style: disc;
    margin-left: 20px;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 20px;
}

.answer-option {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.answer-option:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.answer-option.selected {
    background: #cce5ff;
    border-color: #0d6efd;
}

.answer-letter {
    font-weight: bold;
    margin-right: 15px;
    color: #0d6efd;
}

.answer-option.correct {
    background: #d4edda !important;
    border-color: #28a745 !important;
}

.answer-option.incorrect {
    background: #ffcccc !important;
    border-color: #fd0d0d !important;
}

/* .answer-text {} */

.question-image {
    margin: 15px 0;
    text-align: center;
}

.question-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: auto;
}

.quiz-navigation {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.reset-btn {
    background: #dc3545 !important;
    border-color: #dc3545 !important;
    display: inline-block !important; 
    margin-left: 20px;
    color: white !important;
}


.reset-btn:hover {
    background: #bb2d3b !important;
    border-color: #b02a37 !important;
}

.questions-overview {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 5px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.question-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.question-number:hover {
    background: #e9ecef;
}

.question-number.answered {
    background: #cce5ff;
    color: #0d6efd;
}

.question-number.current {
    background: #0d6efd;
    color: white;
}

.quiz-btn {
    padding: 10px 20px;
    display: inline-block;
    background: #0d6efd;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;

}

.quiz-btn:hover {
    background: #0b5ed7;
    color: white;
}

.quiz-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.quiz-btn-finish {
    background-color: #28a745;
    color: white;
}

.quiz-btn-primary {
    background: #2271b1 !important;
    border-color: #2271b1 !important;
    padding: 12px 24px !important;
}

.quiz-btn-primary[disabled] {
    opacity: 0.65 !important;
    cursor: not-allowed !important;
}

.results-container {
    text-align: center;
    padding: 40px 20px;
}

.quiz-results {
    max-width: 500px;
    margin: 0 auto;
}

.score-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 30px auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 10px solid;
}

.passed .score-circle {
    border-color: #28a745;
    color: #28a745;
}

.failed .score-circle {
    border-color: #dc3545;
    color: #dc3545;
}

.score-number {
    font-size: 2.5em;
    font-weight: bold;
    line-height: 1;
}

.score-text {
    font-size: 1.5em;
    font-weight: bold;
    margin-top: 10px;
}

.score-details {
    margin: 30px 0;
    font-size: 1.1em;
}

.quiz-actions {
    margin-top: 30px;
}

/* --- Mediu de invatare ---- */

/* .quiz-container .learning-environment {} */

.learning-environment .stats-bar {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    gap: 25px;
    align-items: center;
}

.stat-item {
    display: inline-block;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
    font-weight:bold;
}
 
.text-success { color: #28a745; }
.text-danger { color: #dc3545; }

.stat-item-reset-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    margin-left: auto;
    margin-right: 0;
}


/* --- Intrebari si raspunsuri ---  */

.quiz-categories-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 20px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.category-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px 20px 40px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    position: relative;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    border-color: #2271b1;
}

.category-header {
    display: flex;
   /*  align-items: center; */
    gap: 10px;
   /* margin-bottom: 15px; */
}

.category-header h3 {
    margin: 0;
    color: #1a1a1a;
    font-size: 1.2em;
}

.category-count {
    font-size: 0.9em;
    color: #666;
    text-align: right;
    right: 0;
    float: right;
    font-weight:bold;
    }


.category-count.intrebari {
    width: 100%;
    padding: 0px 20px 10px 0px;
    position: absolute;
    bottom: 0;
}

.questions-wrapper {
    margin-top: 40px;
    border-top: 2px solid #eee;
    padding-top: 30px;
}

.question-box {
   margin-bottom: 30px;
}

.question-text.repeated {
    border-color: #ffd700;
    background: #ede49f;
}

.answers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.answer-item {
    padding: 12px;
    margin: 8px 0;
    border-left: 4px solid transparent;
    background: #f8f9fa;
    border-radius: 4px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.answer-item.correct-answer {
    border-color: #28a745;
    background: #d4edda;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.question-number-span {
    font-weight: 600;
    color: #2271b1;
}

.question-thumbnail {
    margin: auto;
    border-radius: 4px;
}
.question-thumbnail img {
    margin: auto;
    border-radius: 4px;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: #2271b1;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* Animatie pentru scroll */
html {
    scroll-behavior: smooth;
}

/* Stiluri pentru mobil */
@media (max-width: 768px) {
    .questions-wrapper {
        margin-top: 20px;
        padding-top: 20px;
    }
    
    .category-card {
        margin-bottom: 15px;
    }
}

/* Buton fix în partea de sus */
.back-to-categories {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    text-align: center;
}

.back-to-categories button {
    padding: 8px 20px;
    font-size: 0.9em;
    border-radius: 20px;
    transition: all 0.3s ease;
}

/* Compensează spațiul pentru conținutul de sub buton */
.questions-wrapper {
    position: relative;
    padding-top: 60px; /* Spațiu pentru butonul sticky */
}

@media (max-width: 768px) {
    .sticky-button-container {
        top: 0;
        padding: 8px 0;
    }
    
    .questions-wrapper {
        padding-top: 50px;
    }
}

/* Container pentru buton sticky */
.sticky-button-container {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
     text-align: center;
}

/* --- Chestionar pe categorii --- */

.training-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding-bottom: 20px;
}

.category-card .training-card {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%; /* Asigură că elementele ocupă întreaga înălțime */
    position: relative;
}

.category-card .training-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.training-grid .category-card {
    position: relative;
    overflow: hidden;
}

.category-stats {
    display: block;
    margin: 10px 0;
    width: 100%;
}

.stat-icon {
    font-size: 1.2em;
}

.correct-count { color: #28a745; }
.correct-count-static { color: #28a745; }

.wrong-count { color: #dc3545; }
.wrong-count-static { color: #dc3545; }

.total-count { color: #6c757d; }

.category-progress {
    margin-top: 10px;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    position: absolute;
    width: 92%;
    bottom: 10px;

    
}

.category-progress .progress {
    height: 100%;
    background: #28a745;
    transition: width 0.5s ease;
}

.training-header {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.progress-bar {
    flex: 1;
    max-width: 300px;
    background: #e9ecef;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    background: #28a745;
    transition: width 0.3s ease;
}

.progress-text {
    position: absolute;
    width: 100%;
    text-align: center;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.training-stats {
    display: flex;
    gap: 15px;
    align-items: center;
}

.stat {
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
}

.correct-stat { color: #28a745; }
.wrong-stat { color: #dc3545; }
.total-stat { color: #000000; }

.progress-info {
    display: flex;
    
    gap: 10px;
    
    font-size: 0.9em;
}

.current { color: #2271b1; }
.total { color: #666; }

.next-question-btn {
   
    cursor: pointer;
    
}

.next-question-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

 

.congrats-message {
    border: 2px solid #28a745;
    background: #d4edda;
    padding: 25px;
    border-radius: 10px;
    margin-top: 30px;
}

.training-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%; /* Asigură că elementele ocupă întreaga înălțime */
}

.training-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Ascunde elementele inițiale */
.training-section {
     border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.training-section.active {
    opacity: 1;
    transform: translateY(0);
    display: block;
}





/* Search Container */
.quiz-container.search-container {
    background: #fff;
    border-radius: 12px;
    border: 2px solid #e0e6ed;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin: 0 auto 2rem auto;
    max-width: 100%;
    padding: 2rem;
}

.search-title {
    color: #1a445a;
    font-size: 1.1rem;
    margin: 0 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f4f9;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* Search Input */
.search-input-group {
    position: relative;
}

#searchInput {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #d3dde6;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: #f8fafc;
    color: #2d3748;
    padding-right: 120px;

}

#searchInput::placeholder {
    color: #94a3b8;
    opacity: 1;
}

#searchInput:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15);
    background: #fff;
}

/* Loading State */
.search-loader {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    align-items: center;
    gap: 0.8rem;
}

.search-loader.active {
    display: flex;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(34, 113, 177, 0.1);
    border-top-color: #2271b1;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.searching-text {
    color: #2271b1;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Results Container */
.search-results-wrapper {
    margin-top: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
}

/* Result Items */
.search-result {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.search-result:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.05);
    border-color: #cbd5e1;
}

.search-result:last-child {
    margin-bottom: 0;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.question-number-span {
    color: #2271b1;
    font-weight: 600;
    font-size: 0.9rem;
}

.question-category {
    background: #e3f2fd;
    color: #2271b1;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.question-text {
    color: #1e293b;
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-container.search-container {
        padding: 1.5rem;
        margin: 1rem;
    }
    
     
    .search-title {
        font-size: 1.3rem;
    }
    
    #searchInput {
        padding: 0.8rem 1.2rem;
        font-size: 0.95rem;
    }
}


.quiz-alert {
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
}

.quiz-alert.error {
    background: #ffebee;
    border: 1px solid #ffcdd2;
    color: #c62828;
}

.quiz-alert.info {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    color: #1565c0;
}

 



 








 



 