/* Test Page Styles */
.test-container {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
    background: var(--bg-light);
}

/* Instructions Section */
.instructions-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 0;
    animation: fadeIn 0.6s ease-out;
}

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

.instructions-badge {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.instructions-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.instructions-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.instructions-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
    align-items: start;
}

.instructions-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
}

.instruction-step-card {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 2rem;
    border: 2px solid var(--border-color);
    display: flex;
    gap: 1.5rem;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
    flex: 1;
}

.instruction-step-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.step-number-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 900;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.step-content h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.05rem;
}

.step-content strong {
    color: var(--text-primary);
    font-weight: 700;
}

.highlight-green {
    color: #22c55e;
    font-weight: 700;
}

.highlight-red {
    color: #ef4444;
    font-weight: 700;
}

.instructions-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
}

.important-note-card {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 2rem;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    flex: 1;
}

.note-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.note-icon {
    font-size: 2rem;
}

.note-header h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.note-content h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.note-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.quote-box {
    background: rgba(37, 99, 235, 0.1);
    border-left: 4px solid var(--primary-color);
    padding: 1.25rem;
    border-radius: 0.5rem;
    margin-top: 1.5rem;
}

.quote-box p {
    color: var(--text-primary);
    font-style: italic;
    margin: 0;
    line-height: 1.8;
}

.test-info-card {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 2rem;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.instructions-cta {
    text-align: center;
    margin-top: 3rem;
}

.btn-instructions-next {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    padding: 1.25rem 3rem;
    border-radius: 0.75rem;
    font-weight: 800;
    font-size: 1.15rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-instructions-next:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(37, 99, 235, 0.4);
}

.btn-instructions-next .arrow {
    font-size: 1.25rem;
    transition: transform 0.3s;
}

.btn-instructions-next:hover .arrow {
    transform: translateX(5px);
}

.test-info {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--border-color);
    animation: fadeIn 0.6s ease-out;
}

.test-info h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-align: center;
    font-weight: 800;
}

.test-info > p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.test-instructions {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.test-instructions h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.test-instructions ul {
    list-style: none;
    padding-left: 0;
}

.test-instructions li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.test-instructions li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.5rem;
}

.user-info-form {
    margin-bottom: 2rem;
}

.user-info-form h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-weight: 700;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
    background: var(--bg-white);
    color: var(--text-primary);
}

.form-group input::placeholder {
    color: var(--text-secondary);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Test Progress */
.test-progress {
    max-width: 800px;
    margin: 0 auto 2rem;
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

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

.progress-stats {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.progress-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.progress-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.progress-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.progress-percentage {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.progress-bar-container {
    position: relative;
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 16px;
    background: var(--bg-light);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    position: relative;
    border-radius: 10px;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-milestones {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    position: relative;
}

.milestone {
    position: relative;
    flex: 1;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.milestone::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    border: 2px solid var(--bg-white);
    transition: all 0.3s;
}

.milestone.reached {
    color: var(--primary-color);
    font-weight: 600;
}

.milestone.reached::before {
    background: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
    animation: pulse 1s ease-out;
}

@keyframes pulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.2); }
}

.progress-text {
    text-align: center;
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.motivational-message {
    text-align: center;
    margin-top: 1rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
    animation: fadeIn 0.5s;
}

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

.test-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.timer-icon {
    font-size: 1.2rem;
}

/* Test Questions */
.test-questions {
    max-width: 800px;
    margin: 0 auto;
}

.question-card {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease-out;
}

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

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

.question-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.question-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.option-item {
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: border-color 0.3s, background-color 0.3s, color 0.3s, box-shadow 0.3s;
    background: var(--bg-white);
    /* Fixed positioning to prevent jumping */
    position: relative;
    min-height: 60px;
    display: flex;
    align-items: center;
}

.option-item:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
    /* Removed transform to prevent jumping */
}

.option-item.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    /* Removed transform to prevent jumping - use box-shadow instead for visual effect */
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.option-item.selected label {
    font-weight: 600;
}

.option-item input[type="radio"] {
    margin-right: 1rem;
    cursor: pointer;
}

.option-item label {
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    width: 100%;
    color: var(--text-primary);
}

.option-item.selected label {
    color: white;
}

.question-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.question-navigation .btn {
    flex: 1;
}

/* Test Complete */
.test-complete {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 4rem 2rem;
    box-shadow: var(--shadow-lg);
}

.complete-icon {
    width: 80px;
    height: 80px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 2rem;
}

.complete-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.complete-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Question Navigation Mini Map */
.question-nav-map {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.question-nav-item {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    border: 2px solid var(--border-color);
    background: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.question-nav-item:hover {
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.question-nav-item.answered {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.question-nav-item.current {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

/* Save Progress Button */
.save-progress-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
}

.save-progress-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

.save-progress-btn.saved {
    background: var(--success-color);
    animation: checkmark 0.5s;
}

@keyframes checkmark {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Achievement Badge */
.achievement-badge {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    text-align: center;
    max-width: 400px;
    animation: achievementPop 0.5s;
    display: none;
}

.achievement-badge.show {
    display: block;
}

@keyframes achievementPop {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.achievement-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.achievement-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.achievement-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .instructions-content {
        grid-template-columns: 1fr;
    }

    .instructions-title {
        font-size: 2rem;
    }

    .instructions-subtitle {
        font-size: 1rem;
    }

    .instruction-step-card {
        padding: 1.5rem;
    }

    .step-number-circle {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .step-content h3 {
        font-size: 1.1rem;
    }

    .step-content p {
        font-size: 0.95rem;
    }

    .test-info {
        padding: 2rem 1.5rem;
    }

    .question-card {
        padding: 1.5rem;
    }

    .question-header h3 {
        font-size: 1.25rem;
    }

    .option-item {
        padding: 1rem;
    }

    .question-navigation {
        flex-direction: column;
    }

    .progress-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .progress-stats {
        width: 100%;
        justify-content: space-between;
    }

    .progress-percentage {
        font-size: 1.5rem;
    }

    .save-progress-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        bottom: 1rem;
        right: 1rem;
    }

    .question-nav-item {
        width: 35px;
        height: 35px;
        font-size: 0.75rem;
    }
}

