/* ==================== TRAINING DASHBOARD CSS ==================== */
/* Course Platform Style - Left Sidebar Layout (1/3 sidebar, 2/3 content) */

/* Header */
.training-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #820c22, #a01030);
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(130, 12, 34, 0.2);
}

.training-header-info {
    flex: 1;
}

.training-welcome {
    font-size: 24px;
    color: white;
    margin: 0 0 6px 0;
    font-weight: 700;
}

.training-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.training-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.training-logo {
    height: 50px;
    width: auto;
}

/* Main Content Layout - Sidebar Left (1/3), Levels Right (2/3) */
.training-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* Levels Section - Takes 2/3 */
.training-levels-section {
    flex: 2;
    min-width: 0;
}

/* Sidebar - Takes 1/3 */
.training-sidebar {
    flex: 1;
    min-width: 280px;
    max-width: 380px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.30);
    overflow: hidden;
    position: sticky;
    top: 20px;
}

.sidebar-title-bar {
    padding: 16px 18px;
    background: linear-gradient(135deg, #820c22, #a01030);
    color: white;
}

.sidebar-title-bar h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
}

.sidebar-subtitle {
    font-size: 12px;
    opacity: 0.85;
}

.sidebar-loading {
    display: flex;
    justify-content: center;
    padding: 30px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #820c22;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner.small {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Live Lessons List in Sidebar */
.live-lessons-list {
    padding: 12px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.live-lesson-card {
    padding: 14px;
    background: #fafafa;
    border-radius: 10px;
    border: 1px solid #eee;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.live-lesson-card:last-child {
    margin-bottom: 0;
}

.live-lesson-card.status-live {
    border-color: #4caf50;
    background: linear-gradient(135deg, #f0fff0, #fff);
}

.live-lesson-card.status-upcoming {
    border-color: #ff9800;
    background: linear-gradient(135deg, #fffdf5, #fff);
}

.live-lesson-card.status-ended {
    border-color: #bdbdbd;
    background: #fafafa;
    opacity: 0.75;
}

.lesson-teacher-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.lesson-student-info {
    font-size: 11px;
    color: #666;
    margin-bottom: 6px;
}

.lesson-time-info {
    font-size: 10px;
    color: #888;
    margin-bottom: 6px;
    display: flex;
    gap: 10px;
}

.lesson-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lesson-status-badge {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 12px;
}

.lesson-status-badge.status-live {
    background: #e8f5e9;
    color: #2e7d32;
}

.lesson-status-badge.status-upcoming {
    background: #fff3e0;
    color: #e65100;
}

.lesson-status-badge.status-ended {
    background: #f5f5f5;
    color: #757575;
}

.lesson-duration-info {
    font-size: 10px;
    color: #888;
}

.btn-join-lesson {
    margin-top: 10px;
    width: 100%;
    padding: 8px;
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-join-lesson:hover {
    background: linear-gradient(135deg, #388e3c, #4caf50);
    transform: translateY(-1px);
}

.btn-rate-lesson {
    margin-top: 8px;
    width: 100%;
    padding: 8px;
    background: linear-gradient(135deg, #ff9800, #ffb74d);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-rate-lesson:hover {
    background: linear-gradient(135deg, #f57c00, #ff9800);
    transform: translateY(-1px);
}

.rated-badge {
    display: block;
    margin-top: 8px;
    padding: 6px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

.no-lessons-message {
    text-align: center;
    padding: 20px;
    color: #888;
}

.no-lessons-message p {
    margin: 0;
    font-size: 13px;
}

.no-lessons-message span {
    display: block;
    font-size: 11px;
    margin-top: 4px;
}

/* Levels Grid View (Default) */
.levels-grid-view {
    background: #efefef;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.30);
}

.levels-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.levels-grid-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.levels-progress {
    display: flex;
    align-items: center;
}

.progress-star-score {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 18px;
    border-radius: 12px;
    letter-spacing: 0.5px;
}

.progress-star-score img {
    width: 28px;
    height: 28px;
}

#lesson-stars-info {
    margin-right: 12px;
}

.lesson-stars-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
}

/* Star Score Badge on Level Card */
.level-card-star-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgb(255 255 255 / 65%);
    color: #000000;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 16px;
    backdrop-filter: blur(4px);
}

.level-card-star-badge.earned {
    background: rgb(0 0 0 / 56%);
    color: #f9a825;
    border: 1px solid rgba(255, 193, 7, 0.4);
}

.level-card-star-badge img {
    width: 18px;
    height: 18px;
}

/* Grid Layout for Level Cards */
.levels-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Date Group Header */
.levels-date-header {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    background: linear-gradient(135deg, #f6f1e8, #e9e0c5);
    padding: 10px 18px;
    border-radius: 10px;
    margin-top: 12px;
    border-right: 4px solid #910e29;
}

.levels-date-header:first-child {
    margin-top: 0;
}

/* Day Grid - cards within a date group */
.levels-day-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 8px;
}

.training-levels-loading {
    text-align: center;
    padding: 40px;
    color: #888;
}

/* Level Card */
.level-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e8e8e8;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.level-card:hover {
    border-color: #820c22;
    box-shadow: 0 8px 24px rgba(130, 12, 34, 0.12);
    transform: translateY(-2px);
}

.level-card.level-completed {
    border-color: #1565c0;
}

.level-card.level-available {
    border-color: #4caf50;
}

.level-card.level-locked {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}

.level-card.level-past {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}

.levels-date-header.past-date {
    opacity: 0.6;
}

/* Level Card Image */
.level-card-image {
    width: 100%;
    height: 140px;
    background-size: cover;
    background-position: center;
    background-color: #f5f5f5;
    position: relative;
}

.level-card-image.level-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
}

.level-card-image.level-no-image span {
    font-size: 48px;
    opacity: 0.35;
}

.level-card-type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.level-card-type-badge.type-live {
    background: rgba(244, 67, 54, 0.9);
    color: white;
}

.level-card-type-badge.type-recorded {
    background: rgba(33, 150, 243, 0.9);
    color: white;
}


/* Level Card Content */
.level-card-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Header Row - Number and Title in same row */
.level-card-header-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.level-card-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #820c22, #b81d3a);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 13px;
    flex-shrink: 0;
}

.level-card.level-completed .level-card-number {
    background: linear-gradient(135deg, #1565c0, #1e88e5);
}

.level-card.level-available .level-card-number {
    background: linear-gradient(135deg, #2e7d32, #4caf50);
}

.level-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.4;
    flex: 1;
    padding-top: 4px;
}

.level-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: #666;
    margin-top: auto;
}

.level-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.level-card-date {
    font-size: 11px;
    color: #888;
}

/* Footer - positioned at end (left in RTL) */
.level-card-footer {
    padding: 12px 16px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background: #fafafa;
}

.level-card-action {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    padding: 6px 14px;
    border-radius: 20px;
    background: #e0e0e0;
    transition: all 0.2s;
}

.level-card.level-available .level-card-action {
    color: #2e7d32;
    background: #e8f5e9;
}

/* Completed status - green background with white text */
.level-card.level-completed .level-card-action {
    color: white;
    background: linear-gradient(135deg, #2e7d32, #4caf50);
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.3);
}

.level-card.level-completed .level-card-action.status-completed {
    color: white;
    background: linear-gradient(135deg, #2e7d32, #4caf50);
}

/* Level Content View (Split Layout) */
.level-content-view {
    display: flex;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    min-height: calc(100vh - 300px);
}

/* Course Sidebar (Left) */
.course-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #fafafa;
    border-left: 1px solid #e8e8e8;
    overflow-y: auto;
}

.course-sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #e8e8e8;
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.course-sidebar-header h3 {
    margin: 12px 0 0 0;
    font-size: 16px;
    color: #333;
}

.btn-back {
    width: 100%;
    background: linear-gradient(135deg, #820c22, #a01030);
    border: none;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 10px;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-back:hover {
    background: linear-gradient(135deg, #a01030, #c01040);
    transform: translateY(-1px);
}

.sidebar-levels-list {
    padding: 8px;
}

.sidebar-level-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.sidebar-level-item:hover {
    background: #f0f0f0;
}

.sidebar-level-item.active {
    background: linear-gradient(135deg, #fce4ec, #fff);
    border: 1px solid #820c22;
}

.sidebar-level-item.completed {
    opacity: 0.8;
}

.sidebar-level-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.sidebar-level-item.completed .sidebar-level-number {
    background: #1565c0;
    color: white;
}

.sidebar-level-item.active .sidebar-level-number {
    background: linear-gradient(135deg, #820c22, #b81d3a);
    color: white;
}

.sidebar-level-info {
    flex: 1;
    min-width: 0;
}

.sidebar-level-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-level-status {
    font-size: 10px;
    color: #888;
}

.sidebar-level-item.completed .sidebar-level-status {
    color: #1565c0;
}

/* Course Content (Right) */
.course-content {
    flex: 1;
    overflow-y: auto;
    background: white;
}

.course-content-inner {
    padding: 24px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

/* Expanded Level View */
.expanded-level-header {
    margin-bottom: 24px;
}

.expanded-level-image {
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    margin-bottom: 20px;
    background-color: #f5f5f5;
}

.expanded-level-header h2 {
    font-size: 24px;
    color: #333;
    margin: 0 0 8px 0;
}

.expanded-level-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

.expanded-description {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 24px 0;
}

/* Videos Section - Multiple Videos Support */
.videos-section {
    margin-bottom: 24px;
}

.videos-section-title {
    font-size: 18px;
    color: #333;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #820c22;
}

.video-block {
    margin-bottom: 20px;
    background: #fafafa;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e8e8e8;
}

.video-block:last-child {
    margin-bottom: 0;
}

.video-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

/* Video Container */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    color: #888;
}

.video-placeholder span {
    font-size: 48px;
    margin-bottom: 8px;
}

/* Content Section */
.content-section {
    margin-bottom: 24px;
}

.content-section h3 {
    font-size: 16px;
    color: #333;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.content-section p {
    color: #555;
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
}

/* Start Test Button */
.start-test-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #820c22, #b81d3a);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

.start-test-btn:hover {
    background: linear-gradient(135deg, #6a0d1c, #820c22);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(130, 12, 34, 0.25);
}

.start-test-btn:disabled {
    background: #ccc;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.view-result-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #1565c0, #1e88e5);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

.view-result-btn:hover {
    background: linear-gradient(135deg, #0d47a1, #1565c0);
}

/* Result Stars Display */
.result-stars-display {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #fff8e1, #fff3c4);
    border: 2px solid #ffe082;
    border-radius: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.result-star {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.result-star.earned {
    filter: drop-shadow(0 2px 4px rgba(255, 193, 7, 0.4));
}

.btn-view-test-answers {
    background: #820c22;
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    margin-right: 12px;
    white-space: nowrap;
    transition: background 0.2s;
}

.btn-view-test-answers:hover {
    background: #a01030;
}

.result-score-text {
    margin-right: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.answers-review-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 4px;
}

.answers-review-summary-bar {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    background: #f8f4f5;
    border: 1px solid #e0d0d4;
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #444;
}

.answers-review-summary-bar strong {
    color: #820c22;
}

.answer-review-card {
    border-radius: 10px;
    padding: 16px;
    border: 1px solid #e0e0e0;
    background: #fff;
}

.answer-review-correct {
    border-color: #c8e6c9;
    background: #f1f8f2;
}

.answer-review-wrong {
    border-color: #ffcdd2;
    background: #fff5f5;
}

.answer-review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.answer-review-num {
    font-weight: 700;
    font-size: 14px;
    color: #820c22;
}

.answer-review-score {
    font-size: 12px;
    color: #888;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
}

.answer-review-icon {
    font-size: 18px;
    margin-right: auto;
}

.answer-review-text {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    line-height: 1.6;
}

.answer-review-choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.answer-review-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    background: #fafafa;
    font-size: 14px;
}

.answer-review-choice.review-choice-correct {
    background: #e8f5e9;
    border-color: #81c784;
}

.answer-review-choice.review-choice-wrong {
    background: #ffebee;
    border-color: #ef9a9a;
}

.review-choice-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e0e0e0;
    font-weight: 700;
    font-size: 13px;
    color: #555;
    flex-shrink: 0;
}

.review-choice-correct .review-choice-letter {
    background: #4caf50;
    color: #fff;
}

.review-choice-wrong .review-choice-letter {
    background: #e53935;
    color: #fff;
}

.review-choice-text {
    flex: 1;
}

.review-badge {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.review-badge-correct {
    background: #c8e6c9;
    color: #2e7d32;
}

.review-badge-wrong {
    background: #ffcdd2;
    color: #c62828;
}

/* Test Modal */
.test-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.test-modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

.test-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, #fce4ec, #fff);
}

.test-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #820c22;
}

.test-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #888;
    line-height: 1;
}

.test-close-btn:hover {
    color: #333;
}

.test-modal-body {
    padding: 24px;
}

.test-modal-footer {
    padding: 16px 24px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

/* Question Block */
.question-block {
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.question-text {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.choices-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.choice-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.choice-option:hover {
    border-color: #820c22;
}

.choice-option.selected {
    border-color: #820c22;
    background: linear-gradient(135deg, #fce4ec, #fff);
}

.choice-option.correct {
    border-color: #4caf50;
    background: linear-gradient(135deg, #e8f5e9, #fff);
}

.choice-option.wrong {
    border-color: #f44336;
    background: linear-gradient(135deg, #ffebee, #fff);
}

.choice-option input {
    display: none;
}

.choice-label {
    font-size: 13px;
    color: #333;
}

.choice-marker {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    flex-shrink: 0;
}

.choice-option.selected .choice-marker {
    background: #820c22;
    color: white;
}

/* Score Display */
.score-display {
    text-align: center;
    padding: 40px;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8f5e9, #fff);
    border: 4px solid #4caf50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.score-circle.score-low {
    background: linear-gradient(135deg, #ffebee, #fff);
    border-color: #f44336;
}

.score-circle.score-mid {
    background: linear-gradient(135deg, #fff3e0, #fff);
    border-color: #ff9800;
}

.score-number {
    font-size: 32px;
    font-weight: 700;
    color: #333;
}

.score-label {
    font-size: 12px;
    color: #666;
}

.score-message {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
}

.score-details {
    font-size: 13px;
    color: #666;
}

.score-stars-earned {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #fff8e1, #fff3c4);
    border: 1px solid #ffe082;
    border-radius: 12px;
    font-size: 15px;
    color: #333;
}

.score-stars-earned img {
    width: 26px;
    height: 26px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #820c22, #b81d3a);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #6a0d1c, #820c22);
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.btn-secondary:hover {
    background: #e8e8e8;
}

/* No Content */
.no-content-message {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.no-content-message span {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

/* ==================== LEADERBOARD ==================== */
.leaderboard-section {
    background: #900e28;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(144, 14, 40, 0.3);
    margin-bottom: 20px;
    overflow: hidden;
}

.leaderboard-header {
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.leaderboard-header h3 {
    margin: 0;
    font-size: 16px;
    color: #fff;
}

.leaderboard-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px 16px 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.25) transparent;
}

.leaderboard-scroll::-webkit-scrollbar {
    height: 6px;
}

.leaderboard-scroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.25);
    border-radius: 3px;
}

.leaderboard-loading {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.leaderboard-track {
    display: flex;
    gap: 20px;
    direction: rtl;
    min-width: max-content;
}

.lb-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 70px;
    position: relative;
    padding: 8px 4px;
    border-radius: 12px;
    transition: all 0.3s;
}

.lb-item.lb-me {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transform: scale(1.08);
    padding: 10px 8px;
}

.lb-item.lb-first {
    transform: scale(1.12);
}

.lb-item.lb-first.lb-me {
    transform: scale(1.18);
}

.lb-crown {
    font-size: 22px;
    line-height: 1;
    margin-bottom: -4px;
    filter: drop-shadow(0 2px 4px rgba(255, 193, 7, 0.5));
    animation: crownBounce 2s ease-in-out infinite;
}

@keyframes crownBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.lb-medal {
    font-size: 16px;
    line-height: 1;
    margin-top: -4px;
}

.lb-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 255, 255, 0.25);
    transition: all 0.3s;
}

.lb-item.lb-first .lb-circle {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #ffd54f, #ffb300);
    border-color: #ffe082;
    box-shadow: 0 4px 20px rgba(255, 193, 7, 0.5);
}

.lb-item.lb-top3 .lb-circle {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
}

.lb-item.lb-me .lb-circle {
    background: #fff;
    border-color: #fff;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.3);
}

.lb-item.lb-me.lb-first .lb-circle {
    background: linear-gradient(135deg, #ffd54f, #ffb300);
    border-color: #ffe082;
    box-shadow: 0 4px 20px rgba(255, 193, 7, 0.6);
}

.lb-rank {
    font-size: 16px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.8);
}

.lb-item.lb-first .lb-rank {
    color: #5d4037;
    font-size: 20px;
}

.lb-item.lb-me .lb-rank {
    color: #900e28;
}

.lb-item.lb-me.lb-first .lb-rank {
    color: #5d4037;
}

.lb-name {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lb-item.lb-first .lb-name {
    color: #ffd54f;
    font-weight: 700;
    font-size: 12px;
}

.lb-item.lb-me .lb-name {
    color: #fff;
    font-weight: 700;
}

.lb-score {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.lb-item.lb-me .lb-score {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.lb-score img {
    width: 12px;
    height: 12px;
}

.lb-you-badge {
    position: absolute;
    top: -6px;
    right: -4px;
    background: #fff;
    color: #900e28;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 1200px) {
    .training-content {
        flex-direction: column;
    }
    
    .training-sidebar {
        max-width: 100%;
        width: 100%;
        position: static;
    }
    
    .live-lessons-list {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        flex-wrap: nowrap;
        max-height: none;
    }
    
    .live-lesson-card {
        min-width: 250px;
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .leaderboard-track {
        gap: 14px;
    }

    .lb-circle {
        width: 42px;
        height: 42px;
    }

    .lb-item.lb-first .lb-circle {
        width: 50px;
        height: 50px;
    }

    .training-dashboard {
        padding: 12px;
    }
    
    .training-header {
        padding: 16px;
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .training-welcome {
        font-size: 20px;
    }
    
    .training-sidebar {
        order: 1;
    }
    
    .training-levels-section {
        order: 2;
    }
    
    .levels-grid-view {
        padding: 16px;
    }
    
    .levels-day-grid {
        grid-template-columns: 1fr;
    }
    
    .level-card-image {
        height: 180px;
    }
    
    .level-content-view {
        flex-direction: column;
    }
    
    .course-sidebar {
        width: 100%;
        max-height: 250px;
        border-left: none;
        border-bottom: 1px solid #e8e8e8;
    }
    
    .course-content-inner {
        padding: 16px;
    }
    
    .expanded-level-image {
        height: 180px;
    }
    
    .expanded-level-header h2 {
        font-size: 20px;
    }
    
    .test-modal-content {
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .training-logo {
        height: 40px;
    }
    
    .levels-grid-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .course-sidebar-header h3 {
        font-size: 14px;
    }
    
    .expanded-level-meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* ==================== RATING MODAL ==================== */

.rating-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 20px;
}

.rating-modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 450px;
    overflow: hidden;
    animation: ratingModalSlide 0.3s ease;
}

@keyframes ratingModalSlide {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.rating-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #820c22, #a01030);
    color: white;
}

.rating-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.rating-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.rating-close-btn:hover {
    color: white;
}

.rating-modal-body {
    padding: 24px;
}

.rating-stars-container {
    text-align: center;
    margin-bottom: 20px;
}

.rating-label {
    display: block;
    font-size: 15px;
    color: #333;
    margin-bottom: 16px;
    font-weight: 600;
}

.rating-stars {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.rating-stars .star {
    font-size: 36px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.rating-stars .star:hover {
    color: #ffc107;
    transform: scale(1.1);
}

.rating-stars .star.active {
    color: #ffc107;
    text-shadow: 0 2px 8px rgba(255, 193, 7, 0.4);
}

.rating-suggestions {
    margin-top: 20px;
}

.rating-suggestions label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.rating-suggestions textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.rating-suggestions textarea:focus {
    outline: none;
    border-color: #820c22;
}

.rating-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.rating-modal-footer .btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
}

.rating-modal-footer .btn-primary {
    background: linear-gradient(135deg, #820c22, #a01030);
    color: white;
}

.rating-modal-footer .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #6a0a1c, #820c22);
}

.rating-modal-footer .btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.rating-modal-footer .btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.rating-modal-footer .btn-secondary:hover {
    background: #e8e8e8;
}

/* ==================== STARS EARNED NOTIFICATION ==================== */

.stars-earned-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #fff8e1, #fff3c4);
    border: 2px solid #ffc107;
    border-radius: 16px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 8px 32px rgba(255, 193, 7, 0.4);
    z-index: 10002;
    animation: starsEarnedSlide 0.5s ease;
}

@keyframes starsEarnedSlide {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.stars-earned-notification img {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 4px 8px rgba(255, 193, 7, 0.5));
    animation: starPulse 0.5s ease infinite alternate;
}

@keyframes starPulse {
    from { transform: scale(1); }
    to { transform: scale(1.15); }
}

.stars-earned-content {
    text-align: right;
}

.stars-earned-title {
    font-size: 16px;
    font-weight: 700;
    color: #f57c00;
    margin-bottom: 4px;
}

.stars-earned-text {
    font-size: 14px;
    color: #333;
}

.stars-earned-text strong {
    color: #ff9800;
    font-size: 18px;
}

@media (max-width: 480px) {
    .stars-earned-notification {
        left: 10px;
        right: 10px;
        padding: 12px 16px;
    }
    
    .stars-earned-notification img {
        width: 40px;
        height: 40px;
    }
}