/* Test Page Styles */

/* Navigation */
.test-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: var(--primary-color);
    transform: translateX(-4px);
}

.test-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

.current-question {
    color: var(--primary-color);
    font-weight: 600;
}

/* Header */
.test-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.test-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.test-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.test-description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

.test-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

.info-item i {
    color: var(--primary-color);
}

/* Test Screens */
.test-container {
    max-width: 800px;
    margin: 0 auto;
}

.test-screen {
    display: none;
}

.test-screen.active {
    display: block;
}

/* Start Screen */
.start-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1.5rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.start-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4ade80, #22c55e);
    border-radius: 0;
}

.start-content:hover {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.15), rgba(34, 197, 94, 0.08));
    border-color: #4ade80;
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(74, 222, 128, 0.2);
}

.start-content h2 {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 1rem;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.start-content:hover h2 {
    color: #4ade80;
}

.start-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.125rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.start-content:hover p {
    color: rgba(255, 255, 255, 0.95);
}

.test-rules {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    padding: 2rem;
    margin: 2rem 0;
    text-align: left;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.test-rules:hover {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.1), rgba(34, 197, 94, 0.05));
    border-color: rgba(74, 222, 128, 0.3);
}

.test-rules h3 {
    color: #4ade80;
    margin: 0 0 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.test-rules ul {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    padding-left: 1.5rem;
}

.test-rules li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.guidelines-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0;
    padding: 2rem;
    margin: 2rem 0;
    text-align: left;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.guidelines-card:hover {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.1), rgba(34, 197, 94, 0.05));
    border-color: rgba(74, 222, 128, 0.3);
}

.guidelines-card h3 {
    color: #4ade80;
    margin: 0 0 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.guidelines-card ul {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    padding-left: 1.5rem;
}

.guidelines-card li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Question Container */
/* Question Container */
.question-container {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1.5rem;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.question-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4ade80, #22c55e);
    border-radius: 1.25rem 1.25rem 0 0;
}

.question-number {
    color: #4ade80;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.question-text {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 2rem;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

.options-container {
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.option input[type="radio"] {
    display: none;
}

.option {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(5px);
}

.option:hover {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.1), rgba(34, 197, 94, 0.05));
    border-color: rgba(74, 222, 128, 0.3);
    transform: translateY(-2px);
}

.option.selected {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.2), rgba(34, 197, 94, 0.1));
    border-color: #4ade80;
}

.option-letter {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.option.selected .option-letter {
    background: #4ade80;
    color: white;
}

.option-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.5;
    flex: 1;
}

.option.selected .option-text {
    color: white;
}

/* Question Actions */
.question-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white !important;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.5) !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
}

.btn-primary {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: white !important;
    border: none;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 222, 128, 0.4);
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white !important;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    color: white !important;
    border-color: #4ade80;
}

.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white !important;
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.4);
    color: white !important;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: 1rem;
}

/* Results Screen */
.results-container {
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1.25rem;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.results-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4ade80, #22c55e);
    border-radius: 1.25rem 1.25rem 0 0;
}

.results-container:hover {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.15), rgba(34, 197, 94, 0.08));
    border-color: #4ade80;
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(74, 222, 128, 0.2);
}

.results-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.results-container:hover .results-icon {
    transform: scale(1.1);
}

.results-icon.pass {
    color: #f59e0b;
}

.results-icon.fail {
    color: #ef4444;
}

.results-container h2 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 1rem;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.results-container:hover h2 {
    color: #4ade80;
}

.results-message {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.125rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.results-container:hover .results-message {
    color: rgba(255, 255, 255, 0.95);
}

/* Score Display */
.score-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin: 3rem 0;
    position: relative;
    flex-wrap: wrap;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(var(--primary-color) 0deg, rgba(255,255,255,0.1) 0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow:
        0 8px 32px rgba(74, 222, 128, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
    transition: all 0.5s ease;
    animation: scorePulse 2s ease-in-out infinite;
}

.score-circle::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    z-index: -1;
    opacity: 0.3;
    animation: scoreGlow 3s ease-in-out infinite alternate;
}

@keyframes scorePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 8px 32px rgba(74, 222, 128, 0.3),
            inset 0 2px 4px rgba(255, 255, 255, 0.1);
    }
    50% {
        transform: scale(1.05);
        box-shadow:
            0 12px 40px rgba(74, 222, 128, 0.4),
            inset 0 2px 4px rgba(255, 255, 255, 0.15);
    }
}

@keyframes scoreGlow {
    0% {
        opacity: 0.2;
        transform: scale(1);
    }
    100% {
        opacity: 0.4;
        transform: scale(1.02);
    }
}

.score-inner {
    text-align: center;
    position: relative;
    z-index: 1;
}

.score-percentage {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
    margin-bottom: 0.25rem;
    animation: scoreFadeIn 1s ease-out;
}

@keyframes scoreFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.score-label {
    font-size: 0.875rem;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.6);
    font-weight: 600;
    animation: scoreFadeIn 1s ease-out 0.2s both;
}

.score-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 1.5rem;
    min-width: 120px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.score-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 222, 128, 0.2);
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.15), rgba(34, 197, 94, 0.08));
}

.score-item strong {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: scoreNumber 1s ease-out;
}

@keyframes scoreNumber {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.score-item span {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* Results Actions */
.results-actions {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.results-actions h3 {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    width: 100%;
    text-align: center;
}

.results-actions p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    text-align: center;
    width: 100%;
}

.results-actions .btn {
    margin: 0;
    flex: 1;
    min-width: 180px;
    justify-content: center;
}

/* Review Screen */
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.review-header h2 {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.review-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.review-question {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 2rem;
}

.review-question.correct {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.05);
}

.review-question.incorrect {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.review-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.review-item.correct {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.05);
}

.review-item.incorrect {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.review-item h3 {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.review-item .review-question {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.5;
}

.review-item .review-answer,
.review-item .review-correct {
    margin-bottom: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.review-item .review-answer {
    background: rgba(116, 103, 252, 0.1);
    border: 1px solid var(--primary-color);
    color: white;
}

.review-item .review-correct {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid #22c55e;
    color: #22c55e;
}

.review-item .review-explanation {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    line-height: 1.4;
    margin-top: 1rem;
}

.review-question-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.review-status {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.review-status.correct {
    background: #22c55e;
    color: white;
}

.review-status.incorrect {
    background: #ef4444;
    color: white;
}

.review-question-title {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.review-question-text {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
}

.review-answer {
    margin-bottom: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.review-answer.user-answer {
    background: rgba(116, 103, 252, 0.1);
    border: 1px solid var(--primary-color);
    color: white;
}

.review-answer.correct-answer {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid #22c55e;
    color: #22c55e;
}

.review-answer.user-incorrect {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
}

/* Certificate Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    padding: 2rem;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.certificate-modal-content {
    max-width: 700px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    margin: 0;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.close-modal {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: white;
}

.modal-body {
    padding: 2rem;
}

/* Certificate */
.certificate {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 5px solid #d4af37;
    border-radius: 1.5rem;
    padding: 4rem 3rem;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.certificate::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 2px solid #d4af37;
    border-radius: 1rem;
    z-index: 0;
}

.certificate::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
    z-index: 0;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.certificate-header {
    position: relative;
    z-index: 1;
    margin-bottom: 2.5rem;
}

.certificate-logo {
    font-size: 4rem;
    color: #d4af37;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.certificate-header h2 {
    color: #1a365d;
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.certificate-body {
    position: relative;
    z-index: 1;
    margin-bottom: 2.5rem;
}

.cert-line {
    color: #4a5568;
    margin: 0.75rem 0;
    font-size: 1.125rem;
    font-weight: 500;
}

.student-name {
    color: #1a365d;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 1.5rem 0;
    border-bottom: 3px solid #d4af37;
    padding-bottom: 0.75rem;
    display: inline-block;
    font-family: 'Georgia', serif;
    font-style: italic;
}

.course-name {
    color: #2b6cb0;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 1.5rem 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.final-score {
    background: linear-gradient(135deg, #d4af37, #f6ad55);
    color: white;
    font-size: 3rem;
    font-weight: 800;
    padding: 1.25rem 2.5rem;
    border-radius: 1.5rem;
    display: inline-block;
    margin: 1.5rem 0;
    box-shadow: 0 8px 16px rgba(212, 175, 55, 0.3);
    border: 2px solid #b7791f;
}

.cert-date {
    color: #718096;
    font-size: 1rem;
    margin-top: 1.5rem;
    font-weight: 500;
}

.certificate-footer {
    position: relative;
    z-index: 1;
    margin-top: 3rem;
    border-top: 2px solid #e2e8f0;
    padding-top: 2rem;
}

.signature-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}

.signature-section {
    text-align: center;
    flex: 1;
}

.signature-section p {
    color: #4a5568;
    margin: 0.25rem 0;
    font-weight: 600;
}

.signature-section:first-child::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 2px;
    background: #4a5568;
    bottom: 2rem;
    left: 2rem;
}

.cert-id {
    font-size: 0.875rem;
    color: #a0aec0;
    text-align: center;
    margin-top: 1rem;
    font-family: 'Courier New', monospace;
}

.certificate-decorations {
    position: absolute;
    top: 2rem;
    left: 2rem;
    right: 2rem;
    bottom: 2rem;
    pointer-events: none;
    z-index: 0;
}

.decoration-corner {
    position: absolute;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #d4af37, transparent);
    opacity: 0.3;
}

.decoration-corner.top-left {
    top: 0;
    left: 0;
    border-radius: 0 0 100% 0;
}

.decoration-corner.top-right {
    top: 0;
    right: 0;
    border-radius: 0 0 0 100%;
}

.decoration-corner.bottom-left {
    bottom: 0;
    left: 0;
    border-radius: 0 100% 0 0;
}

.decoration-corner.bottom-right {
    bottom: 0;
    right: 0;
    border-radius: 100% 0 0 0;
}

.certificate-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Name Input Modal */
.name-modal-content {
    max-width: 500px;
    text-align: center;
}

.name-modal-content .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0;
}

.name-modal-content .modal-header h3 {
    color: #4ade80;
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.name-modal-content .modal-body {
    padding: 2rem 1.5rem;
}

.name-modal-content .modal-body p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.name-modal-content .name-input-group {
    margin-bottom: 1rem;
    position: relative;
}

.name-modal-content .name-input-group input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.75rem;
    color: white;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
    text-align: center;
}

.name-modal-content .name-input-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.name-modal-content .name-input-group input:focus {
    border-color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.1);
}

.name-modal-content .name-input-group input:valid:not(:placeholder-shown) {
    border-color: rgba(74, 222, 128, 0.6);
    background: rgba(74, 222, 128, 0.08);
    padding-right: 3rem;
}

.name-modal-content .name-input-group input:valid:not(:placeholder-shown) + .input-validation-icon {
    display: block;
}

.name-modal-content .input-validation-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #4ade80;
    font-size: 1.125rem;
    display: none;
}

.name-modal-content .input-hint {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    font-style: italic;
}

.name-preview {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 0.75rem;
    text-align: center;
}

.name-preview p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin: 0 0 0.5rem 0 !important;
}

.preview-name {
    color: #4ade80;
    font-size: 1.25rem;
    font-weight: 600;
    font-family: 'Georgia', serif;
    letter-spacing: 0.5px;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-footer .btn {
    min-width: 120px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .test-header h1 {
        font-size: 2rem;
    }

    .test-info {
        gap: 1rem;
        margin-top: 0.5rem;
    }

    .info-item {
        font-size: 0.8125rem;
    }

    .start-content,
    .question-container,
    .results-container {
        padding: 2rem 1.5rem;
        margin: 1rem;
        border-radius: 1.25rem;
    }

    .question-text {
        font-size: 1.25rem;
    }

    .option {
        padding: 1rem;
    }

    .option-letter {
        width: 28px;
        height: 28px;
        font-size: 0.875rem;
    }

    .score-display {
        flex-direction: column;
        gap: 2rem;
        margin: 2rem 0;
    }

    .score-circle {
        width: 120px;
        height: 120px;
    }

    .score-percentage {
        font-size: 1.5rem;
    }

    .score-details {
        flex-direction: row;
        gap: 1rem;
        justify-content: center;
    }

    .question-actions {
        flex-direction: column;
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .question-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .results-actions .btn {
        width: 100%;
        margin: 0.5rem 0;
        min-width: unset;
        flex: none;
    }

    .certificate {
        padding: 2rem 1rem;
    }

    .certificate-header h2 {
        font-size: 1.75rem;
    }

    .certificate-logo {
        font-size: 3rem;
    }

    .student-name {
        font-size: 1.75rem;
    }

    .course-name {
        font-size: 1.25rem;
    }

    .final-score {
        font-size: 2rem;
        padding: 0.75rem 1.5rem;
    }

    .cert-line {
        font-size: 1rem;
    }

    .signature-line {
        flex-direction: column;
        gap: 1rem;
    }

    .decoration-corner {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .test-nav {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .test-progress {
        align-self: center;
    }

    .test-header {
        padding: 1rem 0;
    }

    .test-icon {
        font-size: 3rem;
    }

    .test-header h1 {
        font-size: 1.75rem;
    }

    .test-info {
        gap: 0.75rem;
        justify-content: space-around;
    }

    .start-content,
    .question-container,
    .results-container {
        padding: 1.5rem 1rem;
        margin: 0.5rem;
        border-radius: 1rem;
    }

    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }

    .modal-header,
    .modal-body {
        padding: 1.5rem;
    }

    .certificate-actions {
        flex-direction: column;
    }

    .certificate-actions .btn {
        width: 100%;
    }

    .score-details {
        flex-direction: column;
        gap: 1rem;
    }

    .score-item {
        min-width: unset;
        width: 100%;
    }
}