/* Enhanced ASVAB Test Styling */
/* Building on your existing asvab-enhanced.css */

/* Menu Page Styles */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.container h1 {
    text-align: center;
    color: red;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.container .description {
    text-align: center;
    color: white;
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.stat-card {
    background: linear-gradient(135deg, #1a0000, #330000);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid darkred;
    box-shadow: 0 6px 15px rgba(139, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 0, 0, 0.5);
}

.stat-label {
    color: #ff6b6b;
    font-size: 0.95rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.stat-value {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Subject Grid */
.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.subject-card {
    background: linear-gradient(135deg, #1a0000 0%, #2d0000 50%, #1a0000 100%);
    border-radius: 15px;
    padding: 30px;
    border: 3px solid;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
    overflow: hidden;
}

.subject-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 0, 0, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.subject-card:hover::before {
    opacity: 1;
}

.subject-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(255, 0, 0, 0.4);
    border-color: red !important;
}

.subject-card.featured {
    background: linear-gradient(135deg, #330000 0%, #660000 50%, #330000 100%);
    border-width: 4px;
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.5);
}

.subject-card.featured:hover {
    box-shadow: 0 15px 40px rgba(255, 0, 0, 0.7);
}

.subject-icon {
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 5px;
    filter: drop-shadow(0 0 10px currentColor);
}

.subject-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.subject-name {
    color: white;
    font-size: 1.4rem;
    margin: 0 0 12px 0;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.subject-description {
    color: #ffcccc;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

.subject-category {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid currentColor;
}

.subject-action {
    margin-top: auto;
    position: relative;
    z-index: 1;
}

.start-btn {
    width: 100%;
    padding: 14px;
    border: 2px solid white;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.start-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.start-btn:hover::before {
    width: 300px;
    height: 300px;
}

.start-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.3);
    border-color: currentColor;
}

/* Recent Tests Section */
.recent-tests {
    background: linear-gradient(135deg, #1a0000, #330000);
    padding: 30px;
    border-radius: 15px;
    border: 3px solid darkred;
    box-shadow: 0 8px 20px rgba(139, 0, 0, 0.4);
}

.recent-tests h3 {
    color: red;
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.8rem;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

#recent-tests-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recent-test-item {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 10px;
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 20px;
    align-items: center;
    border: 2px solid #660000;
    transition: all 0.3s ease;
}

.recent-test-item:hover {
    border-color: red;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.test-subject {
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
}

.test-score {
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 0 10px currentColor;
}

.test-score.pass {
    color: #00ff00;
}

.test-score.fail {
    color: #ff4444;
}

.test-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #ffcccc;
    font-size: 0.95rem;
}

.test-date {
    font-size: 0.85rem;
    color: #ff9999;
}

.review-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, darkred, #cc0000);
    color: white;
    border: 2px solid red;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.review-btn:hover {
    background: linear-gradient(135deg, red, #ff3333);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.5);
}

/* Responsive Design for Menu */
@media (max-width: 1024px) {
    .subject-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 768px) {
    .subject-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .subject-card {
        padding: 25px;
    }

    .subject-icon {
        font-size: 3rem;
    }

    .subject-name {
        font-size: 1.2rem;
    }

    .recent-test-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 15px;
    }

    .test-score {
        font-size: 2.5rem;
    }

    .container h1 {
        font-size: 2rem;
    }

    .container .description {
        font-size: 1rem;
        padding: 0 10px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 10px;
    }

    .subject-card {
        padding: 20px;
    }

    .subject-icon {
        font-size: 2.5rem;
    }

    .start-btn {
        font-size: 1rem;
        padding: 12px;
    }

    .container h1 {
        font-size: 1.6rem;
    }
}

/* Test completion and feedback enhancements */
.feedback-message {
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-weight: 500;
    border-left: 4px solid;
}

.feedback-message.success {
    background-color: #f0fdf4;
    color: #166534;
    border-left-color: #22c55e;
}

.feedback-message.error {
    background-color: #fef2f2;
    color: #dc2626;
    border-left-color: #ef4444;
}

.feedback-message.warning {
    background-color: #fffbeb;
    color: #d97706;
    border-left-color: #f59e0b;
}

.feedback-message .explanation {
    margin-top: 10px;
    font-style: italic;
    opacity: 0.9;
    font-weight: normal;
}

/* Test completion styles */
.test-complete {
    text-align: center;
    padding: 20px;
}

.score-display {
    margin: 20px 0;
}

.percentage {
    font-size: 3rem;
    font-weight: bold;
    color: #2563eb;
    margin-bottom: 10px;
}

.score-details {
    font-size: 1.2rem;
    color: #374151;
    margin-bottom: 8px;
}

.time-taken {
    color: #6b7280;
    font-size: 1rem;
}

/* Enhanced choice styling */
.choice-item {
    margin: 10px 0;
    transition: all 0.2s ease;
}

.choice-item label {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.choice-item label:hover {
    border-color: #3b82f6;
    background-color: #f8fafc;
}

.choice-item input[type="radio"] {
    display: none;
}

.choice-item input[type="radio"]:checked + label {
    border-color: #2563eb;
    background-color: #eff6ff;
    color: #1e40af;
}

.choice-letter {
    font-weight: bold;
    margin-right: 12px;
    min-width: 20px;
    color: #6b7280;
}

.choice-item input[type="radio"]:checked + label .choice-letter {
    color: #2563eb;
}

/* Form controls */
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    margin-bottom: 15px;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Button enhancements */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Review section enhancements */
.review-header {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.review-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.review-stats span {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
}

.correct-count {
    background-color: #dcfce7;
    color: #166534;
}

.incorrect-count {
    background-color: #fef2f2;
    color: #dc2626;
}

.accuracy {
    background-color: #dbeafe;
    color: #1e40af;
}

.review-content {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.review-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.review-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.review-item.correct {
    border-left: 4px solid #22c55e;
}

.review-item.incorrect {
    border-left: 4px solid #ef4444;
}

.question-header {
    background: #f8fafc;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
}

.question-number {
    font-weight: 600;
    color: #374151;
}

.status-icon {
    font-weight: bold;
    font-size: 1.1rem;
}

.status-icon.correct {
    color: #22c55e;
}

.status-icon.incorrect {
    color: #ef4444;
}

.question-text {
    padding: 16px;
    font-weight: 500;
    line-height: 1.5;
}

.answer-details {
    padding: 16px;
    background: #fefefe;
    border-top: 1px solid #f3f4f6;
}

.your-answer, .correct-answer, .explanation {
    margin-bottom: 12px;
}

.answer-value {
    font-weight: 500;
}

.answer-value.correct {
    color: #166534;
}

.answer-value.incorrect {
    color: #dc2626;
}

.explanation {
    font-style: italic;
    color: #6b7280;
    line-height: 1.5;
}

/* Progress bar enhancements */
.progress {
    background-color: #f3f4f6;
    border-radius: 8px;
    height: 8px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    transition: width 0.3s ease;
    border-radius: 8px;
}

/* Status info styling */
#status-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 10px;
}

#timer {
    font-weight: 600;
    color: #1f2937;
}

#score {
    font-weight: 500;
    color: #374151;
}

/* Question card enhancements */
.question-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.question-card p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #1f2937;
    margin: 0;
}

.answer-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Responsive design improvements */
@media (max-width: 768px) {
    .choice-item label {
        padding: 12px;
    }

    .percentage {
        font-size: 2.5rem;
    }

    .review-stats {
        flex-direction: column;
        align-items: center;
    }

    #status-info {
        flex-direction: column;
        text-align: center;
    }

    .question-card, .answer-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .choice-item label {
        padding: 10px;
        flex-direction: column;
        align-items: flex-start;
    }

    .choice-letter {
        margin-bottom: 5px;
    }

    .percentage {
        font-size: 2rem;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Focus indicators for keyboard navigation */
button:focus,
input:focus,
label:focus-within {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .choice-item label {
        border-width: 3px;
    }

    .choice-item input[type="radio"]:checked + label {
        border-width: 3px;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #3b82f6;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Notification/toast styles for better user feedback */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-width: 300px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success {
    border-left: 4px solid #22c55e;
}

.notification.error {
    border-left: 4px solid #ef4444;
}

.notification.warning {
    border-left: 4px solid #f59e0b;
}