/* Bird Test CSS Styles - Early 2000s Design */

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.4;
    background: #f0f0f0;
    font-size: 17px;
}

/* Fixed Progress Bar at Top */
.fixed-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #e0e0e0;
    border-bottom: 2px solid #666;    padding: 8px 12px;
    z-index: 1000;
    font-size: 13px;
    color: #000;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.fixed-progress-bar .progress-bar {
    width: 100%;
    height: 16px;
    background: #fff;
    border: 1px solid #999;
    margin: 4px 0 8px 0;
    position: relative;
}

.fixed-progress-bar .progress-fill {
    height: 100%;
    background: linear-gradient(to bottom, #4080ff, #2060df);
    border: none;
    transition: width 0.3s ease;
}

.fixed-progress-bar .progress-text {
    font-weight: bold;
    margin: 0;
    color: #000;
}

/* Body padding to account for fixed header */
body.test-page {
    padding-top: 80px;
}

/* Loading Overlay - Early 2000s Style */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
    color: #000;
}

.loading-spinner i {
    font-size: 2.4rem;
    margin-bottom: 1rem;
    color: #003366;
}

.loading-spinner p {
    font-size: 1.2rem;
    margin: 0;
    font-weight: bold;
}

/* Rate Limit Page Styles - Early 2000s */
.rate-limit-page {
    background: #e0e0e0;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rate-limit-container {
    max-width: 600px;
    padding: 30px;
    background: #fff;
    border: 2px solid #999;
    box-shadow: 4px 4px 8px rgba(0,0,0,0.5);
    color: #000;
    text-align: center;
}

.rate-limit-icon {
    font-size: 3.6rem;
    margin-bottom: 15px;
    color: #003366;
}

.rate-limit-title {
    font-size: 2.4rem;
    margin-bottom: 15px;
    font-weight: bold;
    color: #003366;
}

.rate-limit-message {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #000;
}

.countdown-container {
    background: #f8f8f8;
    padding: 15px;
    border: 2px solid #999;
    margin: 15px 0;
    color: #000;
    text-align: center;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.countdown-timer {
    font-size: 1.8rem;
    font-weight: bold;
    color: #003366;
    margin: 8px 0;
    font-family: 'Courier New', monospace;
}

.countdown-label {
    font-size: 13px;
    font-weight: bold;
    color: #000;
    text-transform: uppercase;
}

.refresh-button {
    background: linear-gradient(to bottom, #4080ff, #2060df);
    color: white;
    padding: 8px 16px;
    font-size: 13px;
    border: 1px solid #1050bf;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin-top: 15px;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-weight: bold;
    text-transform: uppercase;
}

.refresh-button:hover {
    background: linear-gradient(to bottom, #3070ef, #1050cf);
    color: white;
    text-decoration: none;
}

.back-link {
    color: #003366;
    text-decoration: underline;
    font-size: 13px;
    margin-top: 15px;
    display: inline-block;
    font-weight: bold;
}

.back-link:hover {
    color: #0066cc;
    text-decoration: underline;
}

/* Test Page Styles */
.test-page {
    background: #f0f0f0;
    min-height: 100vh;
    margin: 0;
    padding: 15px;
    padding-top: 80px;
}

.test-container {
    max-width: 900px;
    margin: 0 auto;
}

.test-header {
    text-align: center;
    margin-bottom: 15px;
    padding: 15px;
    background: #fff;
    border: 2px solid #ccc;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    position: relative;
}

.test-header h1 {
    font-size: 2.4rem;
    font-weight: bold;
    color: #003366;
    margin: 0;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
}

.test-header::after {
    content: '';
    display: block;
    width: 150px;
    height: 2px;
    background: #003366;
    margin: 10px auto;
}

/* Countdown Timer Styles */
.countdown-timer {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff6b6b;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: bold;
    border: 2px solid #ff5252;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 6px;
}

.countdown-timer.warning {
    background: #ff9800;
    border-color: #f57722;
    animation: pulse 1s infinite;
}

.countdown-timer.critical {
    background: #f44336;
    border-color: #d32f2f;
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Hide old progress sections */
.test-progress {
    display: none;
}

.test-progress-text {
    display: none;
}

/* Button styles - Early 2000s */
.nav-button, .submit-button, .print-btn {
    background: linear-gradient(to bottom, #f0f0f0, #d0d0d0);
    color: #000;
    border: 1px solid #999;
    padding: 6px 12px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    text-decoration: none;
    text-transform: uppercase;
}

.nav-button:hover, .submit-button:hover, .print-btn:hover {
    background: linear-gradient(to bottom, #e0e0e0, #c0c0c0);
    border-color: #666;
}

.nav-button:active, .submit-button:active, .print-btn:active {
    background: linear-gradient(to bottom, #c0c0c0, #a0a0a0);
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.submit-button {
    background: linear-gradient(to bottom, #4080ff, #2060df);
    color: white;
    border: 1px solid #1050bf;
    padding: 8px 16px;
    font-size: 17px;
}

.submit-button:hover {
    background: linear-gradient(to bottom, #3070ef, #1050cf);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: linear-gradient(to bottom, #999, #777);
    border-color: #666;
}

/* Speech Bubble for Grade Button */
.grade-speech-bubble {
    position: absolute;
    background: #fff;
    border: 2px solid #ff6b6b;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 14px;
    color: #333;
    z-index: 1000;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    max-width: 280px;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    margin-bottom: 10px;
    cursor: pointer;
}

@media (max-width: 600px) {
    .grade-speech-bubble {
        max-width: 250px;
        font-size: 13px;
        padding: 10px 14px;
    }
}

.grade-speech-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -8px;
    border: 8px solid transparent;
    border-top-color: #ff6b6b;
}

.grade-speech-bubble::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border: 6px solid transparent;
    border-top-color: #fff;
    z-index: 1;
}

.grade-speech-bubble.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.grade-speech-bubble .bubble-icon {
    color: #ff6b6b;
    margin-right: 8px;
}

.grade-speech-bubble .bubble-close {
    position: absolute;
    top: 4px;
    right: 8px;
    background: none;
    border: none;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grade-speech-bubble .bubble-close:hover {
    color: #ff6b6b;
}

.submit-container {
    position: relative;
}

/* Question Styles - Early 2000s */
.questions-container {
    display: grid;
    gap: 12px;
}

.question-row {
    background: #fff;
    border: 2px solid #ccc;
    padding: 12px;
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px;
    align-items: start;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.question-image {
    padding: 10px;
    background: #f8f8f8;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 1px 1px 2px rgba(0,0,0,0.1);
}

.question-image img {
    max-width: 100%;
    height: auto;
    border: 1px solid #999;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.question-image img:not(.loaded) {
    opacity: 0.7;
}

.question-image img.loaded {
    opacity: 1;
}

/* Image Loading Placeholder */
.image-placeholder {
    width: 100%;
    height: 120px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
}

.image-placeholder i {
    font-size: 1.44rem;
    margin-bottom: 5px;
    opacity: 0.7;
}

.question-choices {
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.question-number {
    font-size: 2.8rem;
    font-weight: bold;
    color: #003366;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.choices {
    display: grid;
    gap: 4px;
}

.option-group {
    margin: 0;
}

/* Radio button choices - Early 2000s style */
.choice {
    background: #fff;
    border: 1px solid #ccc;
    padding: 6px 8px;
    margin: 2px 0;
    cursor: pointer;
    display: flex;
    align-items: center;    position: relative;
    box-shadow: 1px 1px 1px rgba(0,0,0,0.2);
    font-size: 17px;
}

.choice:hover {
    background: #f8f8f8;
    border-color: #999;
}

.choice.selected {
    background: #e6f3ff;
    border-color: #4080ff;
    box-shadow: 1px 1px 2px rgba(64, 128, 255, 0.5);
}

.choice input[type="radio"] {
    margin-right: 6px;
    transform: scale(1.1);
    pointer-events: none;
}

.choice label {
    font-weight: normal;
    cursor: pointer;
    flex: 1;
    background: transparent;
    margin: 0;    padding: 0;
    display: flex;
    align-items: center;
    min-height: 16px;
    font-size: 13px;
    color: #000;
}

/* Submit container */
.submit-container {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: #fff;
    border: 2px solid #ccc;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Back to Browser Link */
.back-to-browser-test {
    text-align: center;
    margin: 30px 0 20px 0;
    padding: 20px;
}

.back-to-browser-test .back-link {
    color: #ffffff !important;
    text-decoration: none;
    font-size: 16px;
    padding: 10px 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 25px;
    transition: all 0.3s ease;
    display: inline-block;
}

.back-to-browser-test .back-link:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.6);
    color: #ffffff !important;
}

.back-to-browser-test .back-link i {
    margin-right: 8px;
}

/* Question Grid Visualization */
.question-grid-container {
    margin: 2em 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.question-grid-container h3 {
    margin-top: 0;
    margin-bottom: 1em;
    color: #333;
    text-align: center;
}

.question-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    gap: 8px;
    max-width: 600px;
    margin: 0 auto 20px auto;
    padding: 20px;
}

.question-square {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-weight: bold;
    font-size: 12px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    gap: 1px;
}

.question-square:hover {
    transform: scale(1.1);
    border-color: #333;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.question-square.correct {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.question-square.incorrect {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.question-square.unanswered {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}

/* Question square content layout */
.question-square {
    flex-direction: column;
    padding: 2px;
}

.question-number {
    font-size: 14px;
    line-height: 1;
    font-weight: bold;
}

.status-char {
    font-size: 10px;
    line-height: 1;
    font-weight: normal;
    opacity: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Enhanced incorrect question highlighting */
.incorrect-question {
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.incorrect-question:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.grid-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
}

.legend-square {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
}

.legend-square.correct {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.legend-square.incorrect {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.legend-square.unanswered {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}

.missed-summary {
    text-align: center;
    margin-top: 1em;
    padding: 15px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

.missed-summary h3 {
    margin: 0;
    color: #c0392b;
    font-size: 1.1em;
}

/* Responsive adjustments for question grid */
@media (max-width: 768px) {
    .question-grid {
        grid-template-columns: repeat(auto-fit, minmax(35px, 1fr));
        gap: 6px;
        padding: 15px;
    }
    
    .question-square {
        width: 35px;
        height: 35px;
        font-size: 11px;
    }
    
    .grid-legend {
        gap: 15px;
    }
    
    .legend-item {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .question-grid {
        grid-template-columns: repeat(auto-fit, minmax(30px, 1fr));
        gap: 4px;
        padding: 10px;
    }
    
    .question-square {
        width: 30px;
        height: 30px;
        font-size: 10px;
    }
    
    .grid-legend {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}

/* Results Page Styles - Early 2000s */
.results-page {
    background: #f0f0f0;
    min-height: 100vh;
    margin: 0;
    padding: 15px;
}

.results-container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border: 2px solid #999;
    box-shadow: 4px 4px 8px rgba(0,0,0,0.5);
}

.results-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ccc;
}

.score-display {
    font-size: 3.6rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #003366;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
}

.score-breakdown {
    font-size: 1.32rem;
    color: #000;
    margin-bottom: 15px;
    font-weight: bold;
}

.missed-questions {
    font-size: 1.2rem;
    color: #cc0000;
    font-weight: bold;
}

.navigation-links {
    text-align: center;
    margin: 25px 0;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(to bottom, #4080ff, #2060df);
    color: white;
    text-decoration: none;
    font-weight: bold;    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    border: 1px solid #1050bf;
    font-size: 17px;
    text-transform: uppercase;
}

.nav-link:hover {
    background: linear-gradient(to bottom, #3070ef, #1050cf);
    color: white;
    text-decoration: none;
}

.incorrect-answers {
    margin-top: 30px;
}

.incorrect-title {
    font-size: 1.5rem;
    color: #003366;
    margin-bottom: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.incorrect-title i {
    color: #cc0000;
}

.incorrect-table {
    display: grid;
    gap: 15px;
}

.incorrect-row {
    background: #fff;
    border: 2px solid #ffcccc;
    overflow: hidden;
    display: grid;
    grid-template-columns: 150px 1fr;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.incorrect-image {
    padding: 15px;
    background: #fff8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #ffcccc;
}

.incorrect-image img {
    width: 120px;
    height: auto;
    border: 1px solid #999;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.incorrect-details {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.correct-answer {
    color: #006600;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.correct-answer i {
    color: #006600;
}

.user-answer {
    color: #cc0000;
    font-weight: bold;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-answer i {
    color: #cc0000;
}

/* Error Pages - Early 2000s */
.error-page {
    background: #f0f0f0;
    color: #000;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.error-container {
    text-align: center;
    max-width: 500px;
    padding: 30px;
    background: #fff;
    color: #000;
    border: 2px solid #999;
    box-shadow: 4px 4px 8px rgba(0,0,0,0.5);
}

.error-title {
    font-size: 3.6rem;
    margin-bottom: 20px;
    font-weight: bold;
    color: #cc0000;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
}

.error-message {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 25px;
    color: #000;
}

/* Toast notifications - Early 2000s */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.toast {
    background: #fff;
    border: 1px solid #999;
    padding: 8px 12px;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    border-left: 4px solid #4080ff;
    display: flex;
    align-items: center;
    gap: 6px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: auto;
    max-width: 300px;
    font-size: 13px;
    border-radius: 4px;
}

.toast.show,
.toast.toast-show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    border-left-color: #006600;
    color: #006600;
}

.toast-error {
    border-left-color: #cc0000;
    color: #cc0000;
}

.toast-warning {
    border-left-color: #ff9900;
    color: #cc7700;
}

.toast-info {
    border-left-color: #0066cc;
    color: #0066cc;
}

.toast i {
    font-size: 17px;
    flex-shrink: 0;
}

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.toast-close:hover {
    color: #333;
}

/* Modal - Early 2000s */
.validation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.modal-content {
    background: white;
    padding: 0;
    max-width: 400px;
    width: 90%;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.7);
    border: 2px solid #999;
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(to bottom, #cc0000, #990000);
    color: white;
    padding: 15px;
    text-align: center;
}

.modal-header i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    display: block;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: bold;
}

.modal-body {
    padding: 20px;
    text-align: center;
    color: #000;    line-height: 1.6;
    font-size: 13px;
}

.modal-actions {
    padding: 15px 20px 20px;
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 8px 12px;
    border: 1px solid #999;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 17px;
    text-transform: uppercase;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    height: 40px;
    box-sizing: border-box;
}

.btn-primary {
    background: linear-gradient(to bottom, #4080ff, #2060df);
    color: white;
    border-color: #1050bf;
}

.btn-primary:hover {
    background: linear-gradient(to bottom, #3070ef, #1050cf);
}

.btn-secondary {
    background: linear-gradient(to bottom, #f0f0f0, #d0d0d0);
    color: #000;
    border-color: #999;
}

.btn-secondary:hover {
    background: linear-gradient(to bottom, #e0e0e0, #c0c0c0);
}

/* Mode Selection Page Styles */
.mode-selection-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 0;
}

.mode-selection-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

.mode-header h1 {
    color: white;
    font-size: 3em;
    margin-bottom: 0.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    font-weight: bold;
}

.mode-header h1 i {
    color: #ffd700;
    margin-right: 0.3em;
}

.mode-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 1.3em;
    margin-bottom: 3em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.mode-options {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3em;
}

.mode-card {
    background: white;
    border-radius: 15px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-width: 350px;
    flex: 1;
    min-width: 300px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.mode-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.mode-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
    color: white;
}

.mode-icon.quick {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.mode-icon.full {
    background: linear-gradient(135deg, #4834d4, #686de0);
}

.mode-card h2 {
    font-size: 2em;
    margin-bottom: 0.5em;
    color: #333;
}

.mode-description {
    color: #666;
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 1.5em;
}

.mode-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2em 0;
    text-align: left;
}

.mode-features li {
    padding: 8px 0;
    color: #555;
    display: flex;
    align-items: center;
}

.mode-features li i {
    color: #27ae60;
    margin-right: 10px;
    font-size: 1.1em;
}

.mode-button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.mode-button i {
    margin-right: 8px;
}

.quick-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

.quick-btn:hover {
    background: linear-gradient(135deg, #ee5a24, #ff6b6b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 90, 36, 0.4);
}

.full-btn {
    background: linear-gradient(135deg, #4834d4, #686de0);
    color: white;
}

.full-btn:hover {
    background: linear-gradient(135deg, #686de0, #4834d4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 52, 212, 0.4);
}

.mode-info {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 20px;
    margin-top: 2em;
}

.info-text {
    color: rgba(255,255,255,0.9);
    font-size: 1.1em;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.info-text i {
    color: #ffd700;
    margin-right: 8px;
}

/* Mode Card and Button Linked Hover Effects */

/* When hovering over the card, activate the button styles */
.mode-card:hover .quick-btn {
    background: linear-gradient(135deg, #ee5a24, #ff6b6b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 90, 36, 0.4);
}

.mode-card:hover .full-btn {
    background: linear-gradient(135deg, #686de0, #4834d4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 52, 212, 0.4);
}

/* When hovering over the button, activate the card - using :has() selector */
.mode-card:has(.mode-button:hover) {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* Enhanced button hover effects when card is also being hovered */
.mode-card:hover .mode-button:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* Fallback for browsers that don't support :has() - use JavaScript or additional classes if needed */
.mode-card.button-hovered {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* Active Session Button Styles - Green color scheme for ongoing tests */
.mode-button.active-session {
    background: linear-gradient(135deg, #27ae60, #2ecc71) !important;
    color: white;
    animation: pulse-green 2s infinite;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
}

.mode-button.active-session:hover {
    background: linear-gradient(135deg, #2ecc71, #27ae60) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.6);
}

/* Enhanced animation for active session buttons */
@keyframes pulse-green {
    0% {
        box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
    }
    50% {
        box-shadow: 0 4px 15px rgba(46, 204, 113, 0.7);
    }
    100% {
        box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
    }
}

/* Active session card hover effects */
.mode-card:hover .mode-button.active-session {
    background: linear-gradient(135deg, #2ecc71, #27ae60) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.6);
}

/* Enhanced active session button hover when card is also hovered */
.mode-card:hover .mode-button.active-session:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 25px rgba(46, 204, 113, 0.7);
}

/* Test ID Display */
.test-id-display {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-family: Arial, sans-serif;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.test-id-display code {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #ffd700;
}

@media (max-width: 480px) {
    .test-id-display {
        bottom: 10px;
        left: 10px;
        font-size: 11px;
        padding: 6px 8px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mode-options {
        flex-direction: column;
        gap: 20px;
    }
    
    .mode-card {
        min-width: auto;
        margin: 0 auto;
    }
    
    .mode-header h1 {
        font-size: 2.5em;
    }
    
    .mode-selection-container {
        padding: 20px 15px;
    }
}

@media (max-width: 480px) {
    .mode-header h1 {
        font-size: 2em;
    }
    
    .mode-subtitle {
        font-size: 1.1em;
    }
    
    .mode-card {
        padding: 30px 20px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .test-header h1 {
        font-size: 1.5rem;
    }
    
    .question-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .question-image {
        order: 2;
        padding: 8px;
    }
    
    .question-choices {
        order: 1;
        padding: 8px;
    }
    
    .incorrect-row {
        grid-template-columns: 1fr;
    }
    
    .incorrect-image {
        order: 2;
        border-right: none;
        border-bottom: 1px solid #ffcccc;
    }
    
    .incorrect-details {
        order: 1;
    }
    
    .navigation-links {
        flex-direction: column;
        align-items: center;
    }
      .score-display {
        font-size: 2.4rem;
    }
    
    .results-container,
    .rate-limit-container,
    .error-container {
        margin: 10px;
        padding: 20px;
    }      .toast-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
        align-items: stretch;
        max-width: none;
    }
    
    .toast {
        max-width: none;
    }
    
    .modal-content {
        margin: 20px;
        width: auto;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
      .fixed-progress-bar {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .fixed-progress-bar .progress-bar {
        height: 12px;
    }
    
    body.test-page {
        padding-top: 65px;
    }
}

/* Print styles */
@media print {
    .fixed-progress-bar,
    .nav-button,
    .submit-button,
    .print-btn {
        display: none !important;
    }
    
    body.test-page {
        padding-top: 0;
    }
    
    .question-row {
        break-inside: avoid;
        margin-bottom: 20px;
    }
    
    /* Enhanced question grid for print */
    .question-square {
        border: 2px solid #000 !important;
        color: #000 !important;
        text-shadow: none !important;
        background: #fff !important;
        font-weight: bold !important;
    }
    
    .question-square.correct {
        background: #e8f5e8 !important;
    }
    
    .question-square.incorrect {
        background: #fce8e8 !important;
    }
    
    .question-square.unanswered {
        background: #f0f0f0 !important;
    }
    
    .status-char {
        opacity: 1 !important;
        font-weight: bold !important;
        font-size: 9px !important;
    }
    
    .question-number {
        font-weight: bold !important;
    }
}
