/**
 * CK Mock Test System - Modern Theme for Test Interface
 */

/* Test Interface */
.ck-mock-test-interface {
    max-width: 1400px;
    margin: 0 auto;
    background: #f5f7fa;
    min-height: 100vh;
}

.ck-mock-test-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.test-title {
    font-size: 20px;
    font-weight: 700;
}

.test-timer {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.timer-icon {
    font-size: 28px;
}

/* Test Content */
.ck-mock-test-content {
    display: flex;
    gap: 20px;
    padding: 20px;
}

/* Sidebar */
.ck-mock-test-sidebar {
    width: 280px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 100px;
    height: fit-content;
}

.ck-mock-test-sidebar h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.question-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.question-nav-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e0e0e0;
    background: #fff;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.question-nav-btn:hover {
    border-color: #667eea;
    transform: scale(1.1);
}

.question-nav-btn.current {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.question-nav-btn.answered {
    background: #4caf50;
    color: #fff;
    border-color: #4caf50;
}

.legend {
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
}

.legend-dot {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid #e0e0e0;
}

.legend-dot.answered {
    background: #4caf50;
    border-color: #4caf50;
}

.legend-dot.current {
    background: #667eea;
    border-color: #667eea;
}

.legend-dot.unanswered {
    background: #fff;
}

/* Questions Area */
.ck-mock-test-questions {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.ck-mock-question {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.question-number {
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
}

.question-marks {
    background: #e3f2fd;
    color: #1976d2;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.question-text {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 30px;
}

.question-text p {
    margin: 10px 0;
}

/* Options */
.question-options {
    margin-bottom: 30px;
}

.option-label {
    display: flex;
    align-items: flex-start;
    padding: 18px 20px;
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    background: #fff;
}

.option-label:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.option-label.selected {
    border-color: #667eea;
    background: #e8eeff;
}

.option-label input[type="radio"] {
    margin-right: 15px;
    margin-top: 3px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.option-text {
    flex: 1;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.option-text strong {
    color: #667eea;
    margin-right: 8px;
}

/* Question Actions */
.question-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

/* Test Footer */
.ck-mock-test-footer {
    padding: 20px 30px;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    bottom: 0;
    text-align: center;
}

/* Test Result */
.ck-mock-test-result {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.result-header {
    text-align: center;
    padding: 50px 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.result-header.passed {
    background: linear-gradient(135deg, #4caf50 0%, #8bc34a 100%);
    color: #fff;
}

.result-header.failed {
    background: linear-gradient(135deg, #f44336 0%, #e91e63 100%);
    color: #fff;
}

.result-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.result-header h2 {
    margin: 20px 0;
    font-size: 32px;
}

.result-score {
    font-size: 64px;
    font-weight: 700;
}

/* Result Summary */
.result-summary {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.summary-item {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
}

.summary-item.correct {
    background: #e8f5e9;
}

.summary-item.wrong {
    background: #ffebee;
}

.summary-item.unanswered {
    background: #fff3e0;
}

.summary-item.time {
    background: #e3f2fd;
}

.summary-value {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 5px;
}

.summary-item.correct .summary-value {
    color: #4caf50;
}

.summary-item.wrong .summary-value {
    color: #f44336;
}

.summary-item.unanswered .summary-value {
    color: #ff9800;
}

.summary-item.time .summary-value {
    color: #2196f3;
}

.summary-label {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

/* Answer Review */
.result-answers {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.result-answers h3 {
    margin-top: 0;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.answer-review-item {
    margin-bottom: 30px;
    padding: 25px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
}

.answer-review-item.correct {
    border-color: #4caf50;
    background: #f1f8f4;
}

.answer-review-item.wrong {
    border-color: #f44336;
    background: #fef5f5;
}

.answer-review-item.unanswered {
    border-color: #ff9800;
    background: #fff9f0;
}

.answer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.answer-number {
    font-weight: 700;
    font-size: 18px;
}

.answer-status {
    font-weight: 600;
}

.answer-question {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #333;
}

.answer-options {
    margin-bottom: 15px;
}

.answer-option {
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #e0e0e0;
}

.answer-option.correct-answer {
    background: #e8f5e9;
    border-color: #4caf50;
    font-weight: 600;
}

.answer-option.wrong-answer {
    background: #ffebee;
    border-color: #f44336;
}

.correct-indicator {
    color: #4caf50;
    margin-left: 10px;
}

.wrong-indicator {
    color: #f44336;
    margin-left: 10px;
}

.your-answer-indicator {
    color: #2196f3;
    margin-left: 10px;
    font-size: 13px;
}

.answer-explanation {
    padding: 15px;
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
}

.answer-explanation strong {
    color: #1976d2;
}

/* Result Actions */
.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* Single Test View */
.ck-mock-test-single {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

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

.ck-mock-test-header h2 {
    margin: 0;
    color: #333;
}

.ck-mock-test-description {
    margin-bottom: 30px;
    line-height: 1.8;
    color: #666;
}

.ck-mock-test-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-item strong {
    color: #333;
    font-size: 14px;
}

.info-item span {
    font-size: 18px;
    color: #667eea;
    font-weight: 600;
}

.ck-mock-test-actions-single {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
}

/* Admin Styles */
.ck-mock-admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    font-size: 48px;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #333;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.ck-mock-admin-shortcuts {
    margin: 30px 0;
}

.ck-mock-admin-shortcuts .button {
    margin-right: 10px;
}

.ck-mock-admin-info {
    margin-top: 40px;
}

/* Responsive */
@media (max-width: 1024px) {
    .ck-mock-test-content {
        flex-direction: column;
    }

    .ck-mock-test-sidebar {
        width: 100%;
        position: relative;
        top: 0;
    }

    .question-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

@media (max-width: 768px) {
    .ck-mock-test-header-bar {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .test-title {
        font-size: 16px;
    }

    .test-timer {
        font-size: 20px;
    }

    .question-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .ck-mock-test-questions {
        padding: 20px;
    }

    .question-text {
        font-size: 16px;
    }

    .option-text {
        font-size: 14px;
    }

    .question-actions {
        flex-direction: column;
    }

    .result-score {
        font-size: 48px;
    }

    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .result-actions {
        flex-direction: column;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .question-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }
}
