* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    padding-top: 80px;
}

.score-container {
    position: fixed;
    top: 50px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.score-container.hidden {
    display: none;
}

.score {
    font-size: 18px;
    font-weight: bold;
    color: #e74c3c;
}

/* Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 10px 20px;
    background-color: #f0f0f0;
    z-index: 99;
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background-color: #ddd;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #3498db;
    width: 0%;
    transition: width 0.8s ease-out;
}

.progress-text {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    min-width: 50px;
    text-align: right;
}

.container {
    background: white;
    padding: 60px;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.screen {
    display: none;
    animation: fadeIn 1.2s ease-out;
}

.screen.active {
    display: block;
}

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

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

h1 {
    color: #333;
    margin-bottom: 30px;
    font-size: 32px;
}

h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
}

#resultTitle {
    font-size: 32px;
    margin-bottom: 20px;
}

h3 {
    color: #e74c3c;
    font-size: 24px;
    margin: 20px 0;
}

.url-box {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
    border-left: 4px solid #e74c3c;
}

.url-box p {
    font-family: 'Courier New', monospace;
    color: #333;
    word-break: break-all;
    margin: 5px 0;
}

.url-title {
    font-weight: bold;
    font-size: 16px;
}

.url-link {
    color: #e74c3c;
    font-size: 14px;
}

.content {
    text-align: left;
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    color: #555;
    font-size: 16px;
    line-height: 1.6;
}

.question-box {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 5px solid #e74c3c;
}

.question-box p {
    font-size: 18px;
    color: #333;
    line-height: 1.6;
    text-align: left;
}

.step-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    background: #ffe6e6;
    padding: 15px 20px;
    border-radius: 8px;
}

.step-number {
    font-size: 20px;
    font-weight: bold;
    color: #e74c3c;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.choice-btn {
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #e74c3c;
    background: white;
    color: #e74c3c;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-align: left;
}

.choice-btn:hover {
    background: #e74c3c;
    color: white;
    transform: translateX(5px);
}

.choice-btn:active {
    transform: translateX(5px) scale(0.98);
}

.btn {
    padding: 15px 40px;
    font-size: 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    margin-top: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 15px rgba(231, 76, 60, 0.4);
}

.btn-primary:active {
    transform: scale(0.98);
}

.nav-btn {
    width: 100%;
    margin-top: 30px;
    padding: 20px 40px;
    font-size: 20px;
}

.image-container {
    margin: 30px 0;
    padding: 20px;
    background: #f0f0f0;
    border-radius: 8px;
    text-align: center;
}

.image-container.hidden {
    display: none;
}

.explanation-container {
    margin: 20px 0;
    padding: 15px;
    background: #ffe0e0;
    border-left: 4px solid #e74c3c;
    border-radius: 4px;
    animation: slideIn 0.8s ease-out;
}

.explanation-container.hidden {
    display: none;
}

.explanation-text {
    color: #c0392b;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.explanation-correct {
    background: #e8f8f5 !important;
    border-left-color: #27ae60 !important;
}

.explanation-correct .explanation-text {
    color: #27ae60 !important;
}

.image-title {
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 15px;
    font-size: 16px;
}

.step-image {
    max-width: 100%;
    height: auto;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-next,
.btn-finish {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    border: none;
}

.btn-next:hover:not(:disabled),
.btn-finish:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(39, 174, 96, 0.4);
}

.btn-next:disabled,
.btn-finish:disabled {
    background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%);
    cursor: not-allowed;
    opacity: 0.6;
}

.video-container {
    margin: 30px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.results {
    background: #fff5f5;
    padding: 40px;
    border-radius: 8px;
    margin: 30px 0;
    border: 2px solid #e74c3c;
}

.results.results-success {
    background: #e8f8f5;
    border-color: #27ae60;
}

.results.results-average {
    background: #fef5e7;
    border-color: #f39c12;
}

.results.results-fail {
    background: #fadbd8;
    border-color: #e74c3c;
}

.results p {
    color: #555;
    font-size: 16px;
    margin-top: 15px;
    line-height: 1.8;
}

.results-message {
    font-style: italic;
    color: #333;
}

#finalScore {
    color: #e74c3c;
    font-weight: bold;
}

.results-success #finalScore {
    color: #27ae60;
}

.results-average #finalScore {
    color: #f39c12;
}

.results-fail #finalScore {
    color: #e74c3c;
}

/* Certificate Styles */
.certificate-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.certificate-container.hidden {
    display: none;
}

.certificate {
    border: 8px solid #8B7355;
    padding: 50px 60px;
    text-align: center;
    background: linear-gradient(135deg, #FFF8E7 0%, #FFFACD 100%);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    max-width: 600px;
    width: 100%;
}

.certificate h2 {
    font-size: 42px;
    color: #C41E3A;
    margin: 20px 0;
    font-family: Georgia, serif;
    letter-spacing: 2px;
}

.certificate h3 {
    font-size: 28px;
    color: #333;
    margin: 15px 0;
    font-family: Georgia, serif;
}

.certificate p {
    font-size: 16px;
    margin: 12px 0;
    color: #666;
    font-family: Georgia, serif;
}

.certificate .signature {
    font-style: italic;
    font-size: 18px;
    color: #C41E3A;
    margin-top: 30px;
}

.certificate .date {
    font-size: 14px;
    color: #555;
}

@media (max-width: 600px) {
    .container {
        padding: 40px 20px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    .score-container {
        top: 10px;
        right: 10px;
        padding: 10px 15px;
        font-size: 14px;
    }
}
