/* NH Driver's Ed Practice Test - Stylesheet */

.nh-practice-test-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Header */
.test-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #003d82;
}

.test-header h2 {
    color: #003d82;
    font-size: 2.2em;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.test-subtitle {
    color: #666;
    font-size: 1.1em;
    margin: 0;
}

/* Setup Card */
.setup-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.setup-card h3 {
    color: #003d82;
    font-size: 1.6em;
    margin: 0 0 30px 0;
    text-align: center;
}

.setup-option {
    margin-bottom: 25px;
}

.setup-option label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1.05em;
}

.test-select {
    width: 100%;
    padding: 12px 15px;
    font-size: 1em;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.test-select:hover {
    border-color: #003d82;
}

.test-select:focus {
    outline: none;
    border-color: #003d82;
    box-shadow: 0 0 0 3px rgba(0, 61, 130, 0.1);
}

/* AI Badge */
.ai-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.ai-icon {
    font-size: 1.5em;
}

/* Buttons */
.btn-start-test,
.btn-retake,
.btn-review,
.btn-next-question,
.btn-back {
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
    margin-top: 20px;
}

.btn-start-test {
    background: #003d82;
    color: white;
}

.btn-start-test:hover:not(:disabled) {
    background: #002d62;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 61, 130, 0.3);
}

.btn-start-test:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.btn-retake {
    background: #003d82;
    color: white;
}

.btn-retake:hover {
    background: #002d62;
    transform: translateY(-2px);
}

.btn-review {
    background: #28a745;
    color: white;
}

.btn-review:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-next-question {
    background: #007bff;
    color: white;
    margin-top: 15px;
    width: auto;
    padding: 12px 30px;
}

.btn-next-question:hover {
    background: #0056b3;
}

.btn-back {
    background: #6c757d;
    color: white;
    margin-top: 30px;
}

.btn-back:hover {
    background: #5a6268;
}

/* Test Info */
.test-info {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-top: 30px;
}

.test-info h4 {
    color: #003d82;
    margin: 0 0 15px 0;
    font-size: 1.2em;
}

.test-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.test-info li {
    padding: 8px 0;
    color: #333;
    font-size: 1em;
}

/* Progress Bar */
.test-progress-bar {
    background: #e9ecef;
    height: 40px;
    border-radius: 20px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, #003d82 0%, #0056b3 100%);
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 20px;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333;
    font-weight: 600;
    font-size: 0.95em;
}

/* Question Card */
.question-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.question-number {
    color: #003d82;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.question-text {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 30px;
    line-height: 1.5;
    font-weight: 500;
}

/* Answer Choices */
.answer-choices {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answer-choice {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    padding: 15px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
    font-size: 1.05em;
}

.answer-choice:hover:not(:disabled) {
    border-color: #003d82;
    background: #e7f3ff;
    transform: translateX(5px);
}

.answer-choice:disabled {
    cursor: not-allowed;
}

.choice-letter {
    background: #003d82;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1em;
    flex-shrink: 0;
}

.choice-text {
    color: #333;
    line-height: 1.4;
}

/* Correct/Incorrect Answer States */
.answer-choice.correct {
    background: #d4edda;
    border-color: #28a745;
    border-width: 3px;
}

.answer-choice.correct .choice-letter {
    background: #28a745;
}

.answer-choice.incorrect {
    background: #f8d7da;
    border-color: #dc3545;
    border-width: 3px;
}

.answer-choice.incorrect .choice-letter {
    background: #dc3545;
}

/* Feedback */
.question-feedback {
    margin-top: 25px;
    padding: 20px;
    border-radius: 8px;
}

.feedback-correct {
    background: #d4edda;
    border-left: 5px solid #28a745;
}

.feedback-incorrect {
    background: #f8d7da;
    border-left: 5px solid #dc3545;
}

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

.feedback-icon {
    font-size: 1.5em;
}

.feedback-result {
    font-weight: 700;
    font-size: 1.1em;
}

.feedback-correct .feedback-result {
    color: #28a745;
}

.feedback-incorrect .feedback-result {
    color: #dc3545;
}

.feedback-explanation {
    color: #333;
    line-height: 1.6;
    font-size: 1.05em;
}

/* Results Card */
.results-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.score-display {
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.grade-a {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.grade-b {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.grade-c {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.grade-d {
    background: linear-gradient(135deg, #ff9966 0%, #ff5e62 100%);
}

.grade-f {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
}

.score-number {
    font-size: 3em;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
}

.score-percentage {
    font-size: 4em;
    font-weight: 700;
    color: white;
}

.results-grade {
    font-size: 2em;
    font-weight: 700;
    color: #003d82;
    margin-bottom: 15px;
}

.results-text {
    font-size: 1.2em;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Results Stats */
.results-stats {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin: 30px 0;
}

.stat-box {
    flex: 1;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #dee2e6;
}

.stat-value {
    font-size: 2.5em;
    font-weight: 700;
    color: #003d82;
}

.stat-label {
    font-size: 1em;
    color: #666;
    margin-top: 5px;
}

/* Review Container */
.review-container {
    padding: 20px 0;
}

.review-title {
    font-size: 1.8em;
    color: #003d82;
    text-align: center;
    margin-bottom: 30px;
}

.review-question {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.review-correct {
    border-left: 5px solid #28a745;
}

.review-incorrect {
    border-left: 5px solid #dc3545;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.review-number {
    font-weight: 600;
    color: #003d82;
}

.review-icon {
    font-size: 1.5em;
}

.review-correct .review-icon {
    color: #28a745;
}

.review-incorrect .review-icon {
    color: #dc3545;
}

.review-text {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 20px;
    font-weight: 500;
}

.review-answers {
    margin-bottom: 20px;
}

.review-choice {
    padding: 10px 15px;
    margin: 8px 0;
    border-radius: 6px;
    background: #f8f9fa;
}

.review-correct-answer {
    background: #d4edda;
    border: 2px solid #28a745;
}

.review-wrong-answer {
    background: #f8d7da;
    border: 2px solid #dc3545;
}

.review-explanation {
    background: #fff3cd;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
    color: #333;
    line-height: 1.6;
}

/* Confetti Animation */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    z-index: 9999;
    animation: confetti-fall 3s linear forwards;
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nh-practice-test-container {
        padding: 20px;
        margin: 20px auto;
    }
    
    .test-header h2 {
        font-size: 1.6em;
    }
    
    .setup-card {
        padding: 25px;
    }
    
    .question-text {
        font-size: 1.1em;
    }
    
    .answer-choice {
        padding: 12px 15px;
        font-size: 1em;
    }
    
    .choice-letter {
        width: 30px;
        height: 30px;
        font-size: 1em;
    }
    
    .score-number {
        font-size: 2em;
    }
    
    .score-percentage {
        font-size: 3em;
    }
    
    .results-stats {
        flex-direction: column;
    }
    
    .stat-box {
        margin-bottom: 15px;
    }
}

/* Print Styles */
@media print {
    .btn-start-test,
    .btn-retake,
    .btn-review,
    .btn-next-question,
    .test-progress-bar {
        display: none;
    }
    
    .nh-practice-test-container {
        box-shadow: none;
    }
}
