/* Test Container Styles */
.test-container {
    background-color: var(--light);
    border-radius: var(--border-radius);
    padding: var(--space-md);
    margin: var(--space-md) 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.test-instructions {
    background-color: rgba(246, 156, 0, 0.1);
    padding: var(--space-md);
    border-radius: var(--border-radius);
    margin-bottom: var(--space-md);
    border-left: 4px solid var(--secondary);
}

.test-instructions p {
    margin-bottom: 0;
}

.timer-container {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin: var(--space-md) 0;
    color: var(--accent);
}

.question-card {
    margin-bottom: var(--space-lg);
    display: none;
}

.question-card.active {
    display: block;
}

.question-text {
    font-weight: 500;
    margin-bottom: var(--space-md);
}

.test-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-md);
}

.nav-btn {
    background-color: var(--primary);
    color: var(--light);
    border: none;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.3s;
}

.nav-btn:hover:not(:disabled) {
    background-color: var(--accent);
}

.nav-btn:disabled {
    background-color: var(--gray);
    cursor: not-allowed;
}

.test-controls {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.control-btn {
    background-color: var(--accent);
    color: var(--light);
    border: none;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.control-btn:hover:not(:disabled) {
    background-color: #7e1445;
    transform: translateY(-2px);
}

.control-btn:disabled {
    background-color: var(--gray);
    cursor: not-allowed;
}

.site-policies {
    display: flex;
    flex-direction: column;
    max-width: 200px;
}

.site-policies a {
    opacity: 80%;
    text-decoration: none;
    margin-bottom: var(--space-sm);
}

.site-policies a:hover {
    color: orange;
    transition: all ease 0.3s;
}

/* For Section B sub-question numbering */
.sub-question-number {
    list-style-type: lower-alpha;
    margin-left: var(--space-sm);
}

/* Visual indicator for disabled tests */
.test-disabled {
    opacity: 0.6;
    pointer-events: none;
}

/* Style for the timer when time is running low */
.timer-warning {
    color: #ff5722;
    font-weight: bold;
}

.timer-critical {
    color: #f44336;
    animation: blink 1s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}


/* ---------------------------------------------------------------------- */
/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    overflow-y: auto;
}

.modal-content {
    background-color: var(--light);
    margin: 5% auto;
    padding: var(--space-md);
    border-radius: var(--border-radius);
    max-width: 800px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    position: relative;
}

.modal-content h3 {
    color: var(--primary);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.modal-content p {
    margin-bottom: var(--space-md);
    color: var(--gray-dark);
}

.close-modal {
    position: absolute;
    right: var(--space-md);
    top: var(--space-sm);
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-dark);
    transition: all 0.3s;
}

.close-modal:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

.year-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.year-btn {
    padding: var(--space-sm) var(--space-md);
    background-color: var(--primary-light);
    border: 2px solid var(--primary);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.year-btn:hover {
    background-color: var(--primary);
    color: var(--light);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.year-btn.recent {
    background-color: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent-dark);
}

.year-btn.recent:hover {
    background-color: var(--accent);
    color: var(--light);
}

.year-btn .format-badge {
    font-size: 0.7rem;
    margin-top: var(--space-xs);
    padding: 2px 5px;
    border-radius: 10px;
    background-color: var(--secondary-light);
    color: var(--secondary-dark);
}

.pdf-badge {
    background-color: #ffebee;
    color: #c62828;
}

.web-badge {
    background-color: #e8f5e9;
    color: #2e7d32;
}

@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 90%;
    }
    
    .year-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}

/* ---------------------------------------------------------------------- */

/* Add to your CSS file */
.timer-container {
    background: #f5f5f5;
    padding: 10px 15px;
    border-radius: 5px;
    margin: 15px 0;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    border: 1px solid #ddd;
}

.timer-warning {
    color: #ff9800;
}

.timer-critical {
    color: #f44336;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.control-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s;
}

.control-btn:hover {
    background: #45a049;
}

.control-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

#google-form-container {
    margin-top: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

/* Custom Form Styling */
#custom-form-container {
    margin: 20px 0;
}

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

.question-text {
    font-size: 1.1em;
    font-weight: 500;
    margin-bottom: 15px;
    color: #333;
}


/* Navigation buttons */
.test-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.nav-btn {
    padding: 8px 20px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.nav-btn:hover {
    background: #0d8bf2;
}

.nav-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

/* Timer styles (same as before) */
.timer-container {
    background: #f5f5f5;
    padding: 10px 15px;
    border-radius: 5px;
    margin: 15px 0;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    border: 1px solid #ddd;
}

.timer-warning {
    color: #ff9800;
}

.timer-critical {
    color: #f44336;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Google Form Styles */
#google-form-container {
    margin: 2rem 0;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#google-form-iframe {
    border: none;
    min-height: 1500px;
}

@media (max-width: 768px) {
    #google-form-iframe {
        min-height: 2000px; /* May need adjustment based on your form */
    }
}

#form-submit-message {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #4a6baf;
    margin-top: 1rem;
}

@media (max-width: 375px) {
    #google-form-iframe {
        min-height: 2200px; /* May need adjustment */
        transform: scale(0.9);
        transform-origin: top left;
        width: 111.11%; /* Counteract scaling */
    }
    
    .test-controls {
        flex-direction: column;
    }
    
    .control-btn {
        width: 100%;
        margin-bottom: var(--space-sm);
    }
}

/* Add these styles to your existing bece-tests-general.css */

/* Test Container Styles */
.test-container {
    background-color: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.test-instructions {
    background-color: rgba(246, 156, 0, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid #F69C00;
}

.test-instructions p {
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.test-instructions h3 {
    color: #3E2F5D;
    margin-bottom: 1rem;
}

.timer-container {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin: 1.5rem 0;
    color: #951B58;
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.progress-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #4CAF50;
    width: 100%;
    transition: width 1s linear;
}

.question-card {
    margin-bottom: 2rem;
}

.question-text {
    font-weight: 500;
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
    line-height: 1.5;
}

.question-text img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    display: block;
}



.option {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.4rem;
}

.option .place {
    display: block;
    margin: auto;
    width: 100%;
}

.options-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.option:hover {
    background-color: rgba(57, 47, 93, 0.05);
    border-color: #3E2F5D;
}

.option.selected {
    background-color: rgba(36, 12, 122, 0.1);
    border-color: #6021dd;
}

.option-letter {
    font-weight: bold;
    margin-right: 1rem;
    color: #3E2F5D;
}

.option-text img {
    max-width: 100%;
    height: auto;
    display: inline-block;
    vertical-align: middle;
}

.test-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
}

#question-counter {
    font-size: 1.4rem;
    color: #555;
}

.nav-btn {
    background-color: #3E2F5D;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.4rem;
}

.nav-btn:hover:not(:disabled) {
    background-color: #2a1f42;
}

.nav-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.test-controls {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.control-btn {
    background-color: #951B58;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.4rem;
    font-weight: 500;
}

.control-btn:hover:not(:disabled) {
    background-color: #7e1445;
}

.control-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Results Section */
#results-section {
    margin-top: 2rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.result-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-top: 3px solid #ddd;
}

.result-card.correct {
    border-top-color: #4CAF50;
}

.result-card.incorrect {
    border-top-color: #F44336;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.question-number {
    font-weight: bold;
    color: #3E2F5D;
}

.result-status {
    font-weight: bold;
}

.result-card.correct .result-status {
    color: #4CAF50;
}

.result-card.incorrect .result-status {
    color: #F44336;
}

.question-preview {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.user-answer {
    font-size: 1.3rem;
    color: #555;
    margin-bottom: 1rem;
}

.view-solution {
    background-color: #3E2F5D;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.3rem;
}

.view-solution:hover {
    background-color: #2a1f42;
}

.solution-video {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Timer styles */
.timer-warning {
    color: #FF9800;
}

.timer-critical {
    color: #F44336;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .question-text, .option {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .test-container {
        padding: 1.5rem;
    }

    .options-container {
        grid-template-columns: 1fr;
    }
    
    .option {
        padding: 1rem;
    }
    
    .nav-btn, .control-btn {
        padding: 0.8rem 1.2rem;
    }
}

/* Welcome Screen Styles */
.welcome-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem;
}

.welcome-card {
    background-color: white;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 800px;
    width: 100%;
    text-align: center;
}

.welcome-card h2 {
    color: #3E2F5D;
    margin-bottom: 2rem;
    font-size: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.test-info {
    background: rgba(57, 47, 93, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.test-info p {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.test-info p i {
    color: #951B58;
    width: 24px;
    text-align: center;
}

.instructions {
    text-align: left;
    margin-bottom: 3rem;
}

.instructions h3 {
    color: #3E2F5D;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.instructions ol {
    padding-left: 2rem;
}

.instructions li {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    line-height: 1.6;
}

.start-test-btn {
    background-color: #951B58;
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.6rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.start-test-btn:hover {
    background-color: #7e1445;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(149, 27, 88, 0.3);
}

/* Results Summary Styles */
.results-summary {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.score-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.circle-progress {
    position: relative;
    width: 150px;
    height: 150px;
}

.circle-progress svg {
    width: 100%;
    height: 100%;
}

.circle-progress circle {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.circle-progress circle:first-child {
    stroke: #f0f0f0;
}

.circle-progress circle:last-child {
    stroke: #4CAF50;
    stroke-dasharray: 0;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s ease;
}

.score-percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.4rem;
    font-weight: bold;
    color: #3E2F5D;
}

.score-text {
    margin-top: 1rem;
    font-size: 1.6rem;
    font-weight: 500;
    color: #555;
}

.performance-feedback {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.performance-feedback h3 {
    color: #3E2F5D;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.performance-feedback p {
    font-size: 1.5rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

#retake-test-btn {
    align-self: flex-start;
    padding: 1rem 2.5rem;
}

.correct-answer {
    font-size: 1.3rem;
    color: #4CAF50;
    margin-bottom: 1rem;
    font-weight: 500;
}

.result-card.incorrect .correct-answer {
    color: #F44336;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .welcome-card {
        padding: 2rem;
    }
    
    .results-summary {
        grid-template-columns: 1fr;
    }
    
    .performance-feedback {
        text-align: center;
    }
    
    #retake-test-btn {
        align-self: center;
    }
}

@media (max-width: 480px) {
    .welcome-card {
        padding: 1.5rem;
    }
    
    .welcome-card h2 {
        font-size: 2rem;
    }
    
    .test-info p, .instructions li {
        font-size: 1.4rem;
    }
    
    .start-test-btn {
        padding: 1rem 2rem;
        font-size: 1.4rem;
    }
}