/* Test Room Styles */

:root {
    --success-color: #10b981;
    --danger-color: #ef4444;
    --primary-color: #2563eb;
}

.test-room-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: calc(100vh - 64px);
}

/* Header Section */
.test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.test-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
}

.test-header .btn-exit {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.test-header .btn-exit:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Progress Section */
.progress-section {
    margin-bottom: 0.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-exit-test {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 24px;
    background: #ef4444;
    color: white;
    border: 2px solid #ef4444;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-exit-test::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: 0;
}

.btn-exit-test:hover::before {
    width: 300px;
    height: 300px;
}

.btn-exit-test:hover {
    background: #dc2626;
    border-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
}

.btn-exit-test:active {
    transform: translateY(0);
}

.btn-exit-test svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
    position: relative;
    z-index: 1;
}

.progress-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.775rem;
    justify-content: center;
}

.progress-stat {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.progress-stat-left {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.progress-stat-label {
    font-weight: 500;
}

.progress-stat-value {
    font-weight: 700;
    transition: all 0.3s ease;
}

.progress-stat-value.updated {
    animation: statUpdate 0.5s ease;
}

@keyframes statUpdate {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
        color: #111827;
    }

    100% {
        transform: scale(1);
    }
}

.progress-stat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.progress-stat-dot.correct {
    background-color: var(--success-color);
}

.progress-stat-dot.wrong {
    background-color: var(--danger-color);
}

.progress-stat-dot.unanswered {
    background-color: #d1d5db;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: #f3f4f6;
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #c2eaff, #a8dcff);
    border-radius: 999px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Question Navigation */
.question-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-bottom: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
}

.question-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}

.question-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.2s;
}

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

.question-btn:hover::before {
    opacity: 1;
}

.question-btn.active {
    border-color: #c2eaff;
    background: #c2eaff;
    color: #111827;
    box-shadow: 0 4px 12px rgba(194, 234, 255, 0.6);
    transform: translateY(-2px);
}

.question-btn.correct {
    border-color: var(--success-color);
    background: var(--success-color);
    color: white;
}

.question-btn.wrong {
    border-color: var(--danger-color);
    background: var(--danger-color);
    color: white;
}

/* Question Container */
.question-container {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
    overflow: hidden;
}

.question-header {
    background: linear-gradient(135deg, #f6f8fb 0%, #ffffff 100%);
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.question-number {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.question-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.6;
}

.question-body {
    padding: 0.5rem;
}

/* Answer Options */
.answer-form {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.answer-option {
    display: flex;
    align-items: flex-start;
    padding: 1.25rem;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.answer-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #c2eaff;
    transform: scaleY(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.answer-option:hover {
    background: #f3f4f6;
    border-color: #c2eaff;
    transform: translateX(4px);
}

.answer-option:hover::before {
    transform: scaleY(1);
}

.answer-option input[type="radio"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    margin-right: 1rem;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 2px;
}

.answer-option input[type="radio"]::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #000000;
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.answer-option input[type="radio"]:checked {
    border-color: #000000;
}

.answer-option input[type="radio"]:checked::after {
    transform: scale(1);
}

.answer-option input[type="radio"]:disabled {
    cursor: not-allowed;
}

.answer-option.correct {
    background: #d1fae5 !important;
    border-color: var(--success-color) !important;
    animation: correctAnswer 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.answer-option.correct::before {
    background: var(--success-color);
    transform: scaleY(1);
}

.answer-option.wrong {
    background: #fee2e2 !important;
    border-color: var(--danger-color) !important;
    animation: wrongAnswer 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.answer-option.wrong::before {
    background: var(--danger-color);
    transform: scaleY(1);
}

@keyframes correctAnswer {

    0%,
    100% {
        transform: translateX(4px);
    }

    50% {
        transform: translateX(8px);
    }
}

@keyframes wrongAnswer {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    75% {
        transform: translateX(8px);
    }
}

/* Form Actions */
.form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    /* margin-top: 1rem; */
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    gap: 1rem;
}

.form-actions .back-btn {
    justify-self: start;
    grid-column: 1;
}

.form-actions-right {
    grid-column: 2 / 4;
    display: contents;
}

.form-actions .explanation-btn {
    justify-self: center;
    grid-column: 2;
}

.form-actions .next-btn {
    justify-self: end;
    grid-column: 3;
}

.btn {
    padding: 12px 32px;
    border-radius: 100px;
    font-weight: 500;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(194, 234, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: 0;
}

.btn:hover:not(:disabled)::before {
    width: 300px;
    height: 300px;
}

.btn>* {
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: #c2eaff;
    border-color: #c2eaff;
    color: #111827;
    box-shadow: 0 4px 12px rgba(194, 234, 255, 0.4);
}

.btn-primary:hover:not(:disabled) {
    background: #a8dcff;
    border-color: #a8dcff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(194, 234, 255, 0.6);
}

.btn-secondary {
    background: white;
    border-color: #e5e7eb;
    color: #111827;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.btn-secondary:hover:not(:disabled) {
    border-color: #c2eaff;
    color: #111827;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(194, 234, 255, 0.4);
}

.btn-outline {
    background: transparent;
    border-color: #e5e7eb;
    color: #111827;
}

.btn-outline:hover:not(:disabled) {
    background: rgba(194, 234, 255, 0.1);
    border-color: #c2eaff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(194, 234, 255, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:disabled::before {
    display: none;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: modalFadeIn 0.2s ease;
}

.modal.show {
    display: flex;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 80vh;
    overflow: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(20px) scale(0.95);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #f6f8fb 0%, #ffffff 100%);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.modal-header .close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.modal-header .close:hover {
    background: #f3f4f6;
    color: var(--text-primary);
}

#explanationContent {
    padding: 1rem;
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 1.125rem;
}

#explanationContent p {
    margin-bottom: 1rem;
}

#explanationContent ul,
#explanationContent ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

#explanationContent code {
    background: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.875em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .test-room-container {
        padding: 1rem;
    }

    .test-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .test-header h1 {
        font-size: 1.25rem;
    }

    /* Beautiful Mobile Progress Section */
    .progress-section {
        padding: 1rem;
        background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    }

    .progress-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .progress-stats-wrapper {
        order: -1;
    }

    .progress-title {
        font-size: 0.75rem;
        text-align: center;
        margin-bottom: 0.75rem;
        color: #6b7280;
    }

    .progress-stats {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

    .progress-stat {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        background: white;
        border-radius: 10px;
        border: 2px solid #e5e7eb;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    }

    .progress-stat:active {
        transform: scale(0.98);
    }

    .progress-stat-dot {
        width: 12px;
        height: 12px;
        margin-right: 0.75rem;
        box-shadow: 0 2px 6px currentColor;
    }

    .progress-stat.correct-stat {
        border-color: #10b981;
        background: linear-gradient(135deg, #d1fae5 0%, #ffffff 100%);
    }

    .progress-stat.wrong-stat {
        border-color: #ef4444;
        background: linear-gradient(135deg, #fee2e2 0%, #ffffff 100%);
    }

    .progress-stat.unanswered-stat {
        border-color: #f59e0b;
        background: linear-gradient(135deg, #fef3c7 0%, #ffffff 100%);
    }

    .progress-stat-left {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex: 1;
    }

    .progress-stat-label {
        font-size: 0.875rem;
        font-weight: 500;
        color: #374151;
    }

    .progress-stat-value {
        font-size: 1.25rem;
        font-weight: 700;
        color: #111827;
        min-width: 32px;
        text-align: right;
    }

    .btn-exit-test {
        justify-content: center;
        width: 100%;
        padding: 14px 24px;
        font-size: 1rem;
        box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
    }

    .question-nav {
        gap: 0.5rem;
        padding: 1rem;
    }

    .question-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        font-size: 0.7rem;
    }

    .question-text {
        font-size: 1rem;
    }

    .form-actions {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .form-actions .back-btn {
        grid-column: 1;
        order: 2;
    }

    .form-actions .explanation-btn {
        grid-column: 1;
        justify-self: stretch;
        order: 1;
    }

    .form-actions .next-btn {
        grid-column: 1;
        justify-self: stretch;
        order: 1;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .modal-content {
        max-height: 90vh;
        margin: 1rem;
    }

    #explanationContent {
        padding: 1.5rem;
    }
}

/* Loading State */
.answer-option.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Utility Classes */
.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

/* Results Modal */
.results-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: resultsModalFadeIn 0.3s ease;
}

.results-modal.show {
    display: flex;
}

@keyframes resultsModalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.results-modal-content {
    background: white;
    border-radius: 24px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    animation: resultsModalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

@keyframes resultsModalSlideIn {
    from {
        transform: translateY(30px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.results-header {
    text-align: center;
    padding: 3rem 2rem 2rem;
    background: linear-gradient(135deg, #f6f8fb 0%, #ffffff 100%);
    border-radius: 24px 24px 0 0;
}

.results-icon-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.results-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    animation: resultsIconPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s backwards;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

@keyframes resultsIconPop {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.results-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem 0;
    animation: resultsTitleSlide 0.5s ease 0.3s backwards;
}

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

.results-subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
    animation: resultsTitleSlide 0.5s ease 0.4s backwards;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 2rem;
}

.results-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    background: #f9fafb;
    border-radius: 16px;
    border: 2px solid #e5e7eb;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: statsCardSlide 0.5s ease backwards;
}

.results-stat-card:nth-child(1) {
    animation-delay: 0.5s;
}

.results-stat-card:nth-child(2) {
    animation-delay: 0.6s;
}

.results-stat-card:nth-child(3) {
    animation-delay: 0.7s;
}

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

.results-stat-card.correct {
    border-color: #10b981;
    background: #d1fae5;
}

.results-stat-card.correct .stat-icon {
    color: #10b981;
}

.results-stat-card.wrong {
    border-color: #ef4444;
    background: #fee2e2;
}

.results-stat-card.wrong .stat-icon {
    color: #ef4444;
}

.results-stat-card.unanswered {
    border-color: #f59e0b;
    background: #fef3c7;
}

.results-stat-card.unanswered .stat-icon {
    color: #f59e0b;
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-content {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.results-progress {
    padding: 0 2rem 2rem;
    animation: statsCardSlide 0.5s ease 0.8s backwards;
}

.results-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
}

.results-percentage {
    font-size: 1.25rem;
    color: #10b981;
}

.results-progress-bar {
    width: 100%;
    height: 12px;
    background: #f3f4f6;
    border-radius: 999px;
    overflow: hidden;
}

.results-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    border-radius: 999px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1) 0.9s;
    width: 0;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.results-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 2rem 2rem;
    animation: statsCardSlide 0.5s ease 0.9s backwards;
}

.results-btn {
    width: 100%;
    justify-content: center;
    font-size: 1rem;
    padding: 14px 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .results-modal-content {
        max-height: 95vh;
    }

    .results-header {
        padding: 2rem 1.5rem 1.5rem;
    }

    .results-title {
        font-size: 1.5rem;
    }

    .results-stats {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        gap: 0.75rem;
    }

    .results-stat-card {
        flex-direction: row;
        justify-content: flex-start;
        padding: 1rem;
    }

    .stat-content {
        text-align: left;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .results-progress {
        padding: 0 1.5rem 1.5rem;
    }

    .results-actions {
        padding: 0 1.5rem 1.5rem;
    }
}

/* Extra Small Mobile Screens */
@media (max-width: 480px) {
    .progress-section {
        padding: 0.875rem;
    }

    .progress-title {
        font-size: 0.7rem;
        margin-bottom: 0.625rem;
    }

    .progress-stats {
        gap: 0.625rem;
    }

    .progress-stat {
        padding: 0.625rem 0.875rem;
    }

    .progress-stat-dot {
        width: 10px;
        height: 10px;
    }

    .progress-stat-label {
        font-size: 0.8125rem;
    }

    .progress-stat-value {
        font-size: 1.125rem;
    }

    .btn-exit-test {
        padding: 12px 20px;
        font-size: 0.9375rem;
    }
}

/* ========================================
   DARK MODE SUPPORT
======================================== */
[data-theme="dark"] .test-room-container {
    background: #0f172a;
    min-height: calc(100vh - 64px);
}

[data-theme="dark"] .test-header {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    border: 1px solid #334155;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(30, 64, 175, 0.3);
}

[data-theme="dark"] .test-header h1 {
    color: #f1f5f9;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .test-header .btn-exit {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f1f5f9;
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .test-header .btn-exit:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .progress-section {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .progress-title {
    color: #94a3b8;
}

[data-theme="dark"] .progress-stat-label {
    color: #cbd5e1;
}

[data-theme="dark"] .progress-stat-value {
    color: #f1f5f9;
}

[data-theme="dark"] .btn-exit-test {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #ef4444;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.5);
}

[data-theme="dark"] .btn-exit-test:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 6px 24px rgba(239, 68, 68, 0.7);
}

[data-theme="dark"] .question-nav {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .question-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .question-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-bottom: 1px solid #334155;
}

[data-theme="dark"] .question-number {
    color: #60a5fa;
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
}

[data-theme="dark"] .question-text {
    color: #f1f5f9;
}

[data-theme="dark"] .answer-option {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 2px solid #334155;
    color: #f1f5f9;
}

[data-theme="dark"] .answer-option:hover {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-color: #60a5fa;
    box-shadow: 0 4px 16px rgba(96, 165, 250, 0.2);
}

[data-theme="dark"] .answer-option::before {
    background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
}

[data-theme="dark"] .answer-option input[type="radio"] {
    border-color: #475569;
}

[data-theme="dark"] .answer-option input[type="radio"]::after {
    background: #f1f5f9;
}

[data-theme="dark"] .answer-option input[type="radio"]:checked {
    border-color: #f1f5f9;
}

[data-theme="dark"] .answer-option.correct {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%) !important;
    border-color: #10b981 !important;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4), inset 0 0 30px rgba(16, 185, 129, 0.1) !important;
    color: #f1f5f9 !important;
}

[data-theme="dark"] .answer-option.correct::before {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
}

[data-theme="dark"] .answer-option.correct input[type="radio"] {
    border-color: #10b981 !important;
}

[data-theme="dark"] .answer-option.correct input[type="radio"]::after {
    background: #10b981 !important;
}

[data-theme="dark"] .answer-option.wrong {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.1) 100%) !important;
    border-color: #ef4444 !important;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4), inset 0 0 30px rgba(239, 68, 68, 0.1) !important;
    color: #f1f5f9 !important;
}

[data-theme="dark"] .answer-option.wrong::before {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%) !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.6);
}

[data-theme="dark"] .answer-option.wrong input[type="radio"] {
    border-color: #ef4444 !important;
}

[data-theme="dark"] .answer-option.wrong input[type="radio"]::after {
    background: #ef4444 !important;
}

[data-theme="dark"] .form-actions {
    border-top-color: #334155;
}

[data-theme="dark"] .btn-primary {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    border-color: #60a5fa;
    color: #fff;
    box-shadow: 0 4px 16px rgba(96, 165, 250, 0.4);
}

[data-theme="dark"] .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #3b82f6;
    box-shadow: 0 6px 24px rgba(96, 165, 250, 0.6);
}

[data-theme="dark"] .btn-secondary {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    border: 2px solid #475569;
    color: #f1f5f9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    border-color: #60a5fa;
    box-shadow: 0 6px 20px rgba(96, 165, 250, 0.3);
}

[data-theme="dark"] .btn-outline {
    background: transparent;
    border: 2px solid #475569;
    color: #f1f5f9;
}

[data-theme="dark"] .btn-outline:hover:not(:disabled) {
    background: rgba(96, 165, 250, 0.15);
    border-color: #60a5fa;
    box-shadow: 0 4px 16px rgba(96, 165, 250, 0.3);
}

[data-theme="dark"] .modal-content {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .modal-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-bottom: 1px solid #334155;
}

[data-theme="dark"] .modal-title {
    color: #f1f5f9;
    text-shadow: 0 2px 10px rgba(96, 165, 250, 0.2);
}

[data-theme="dark"] .modal-header .close {
    color: #94a3b8;
}

[data-theme="dark"] .modal-header .close:hover {
    background: #334155;
    color: #f1f5f9;
}

[data-theme="dark"] #explanationContent {
    color: #cbd5e1;
    background: #0f172a;
    border-radius: 12px;
    padding: 1.5rem;
}

[data-theme="dark"] #explanationContent code {
    background: #1e293b;
    color: #60a5fa;
    border: 1px solid #334155;
}

[data-theme="dark"] .question-btn {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 2px solid #334155;
    color: #f1f5f9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .question-btn:hover {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-color: #475569;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .question-btn.active {
    border-color: #60a5fa;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(96, 165, 250, 0.6);
}

[data-theme="dark"] .question-btn.correct {
    border-color: #10b981;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.6);
}

[data-theme="dark"] .question-btn.wrong {
    border-color: #ef4444;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.6);
}

[data-theme="dark"] .progress-bar-container {
    background-color: #0f172a;
    border: 1px solid #334155;
}

[data-theme="dark"] .progress-bar {
    background: linear-gradient(90deg, #60a5fa 0%, #3b82f6 100%);
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
}

[data-theme="dark"] .results-modal-content {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.9);
}

[data-theme="dark"] .results-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-bottom: 1px solid #334155;
}

[data-theme="dark"] .results-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.5);
}

[data-theme="dark"] .results-title {
    color: #f1f5f9;
    text-shadow: 0 2px 10px rgba(96, 165, 250, 0.2);
}

[data-theme="dark"] .results-subtitle {
    color: #94a3b8;
}

[data-theme="dark"] .results-stat-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 2px solid #334155;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .results-stat-card.correct {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-color: #10b981;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .results-stat-card.correct .stat-icon {
    filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.5));
}

[data-theme="dark"] .results-stat-card.wrong {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
    border-color: #ef4444;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .results-stat-card.wrong .stat-icon {
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.5));
}

[data-theme="dark"] .results-stat-card.unanswered {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
    border-color: #f59e0b;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .results-stat-card.unanswered .stat-icon {
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.5));
}

[data-theme="dark"] .stat-value {
    color: #f1f5f9;
    text-shadow: 0 2px 8px rgba(96, 165, 250, 0.2);
}

[data-theme="dark"] .stat-label {
    color: #94a3b8;
}

[data-theme="dark"] .results-progress-bar {
    background: #0f172a;
    border: 1px solid #334155;
}

[data-theme="dark"] .results-progress-fill {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
}

[data-theme="dark"] .results-progress-label {
    color: #f1f5f9;
}

[data-theme="dark"] .results-percentage {
    color: #10b981;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

/* Mobile dark mode */
@media (max-width: 768px) {
    [data-theme="dark"] .test-room-container {
        background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    }

    [data-theme="dark"] .progress-section {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
        border: 1px solid #334155;
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
    }

    [data-theme="dark"] .progress-stat {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
        border: 2px solid #334155;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }

    [data-theme="dark"] .progress-stat.correct-stat {
        border-color: #10b981;
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, #1e293b 100%);
        box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
    }

    [data-theme="dark"] .progress-stat.wrong-stat {
        border-color: #ef4444;
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, #1e293b 100%);
        box-shadow: 0 4px 16px rgba(239, 68, 68, 0.2);
    }

    [data-theme="dark"] .progress-stat.unanswered-stat {
        border-color: #f59e0b;
        background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, #1e293b 100%);
        box-shadow: 0 4px 16px rgba(245, 158, 11, 0.2);
    }

    [data-theme="dark"] .progress-stat-label {
        color: #cbd5e1;
    }

    [data-theme="dark"] .progress-stat-value {
        color: #f1f5f9;
        text-shadow: 0 2px 8px rgba(96, 165, 250, 0.2);
    }

    [data-theme="dark"] .progress-title {
        color: #94a3b8;
    }

    [data-theme="dark"] .progress-stat-dot {
        box-shadow: 0 2px 8px currentColor;
    }
}