/* ==========================================================================
   Styling Dasar Kuis (Berlaku untuk semua mode)
   ========================================================================== */

.gtg-quiz-container {
    border: 1px solid #e0e0e0;
    padding: 20px 25px;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    max-width: 750px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    position: relative; /* Diperlukan untuk overlay */
}

.gtg-quiz-container h2 {
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
    color: #333;
    font-size: 1.8em;
}

.gtg-quiz-question {
    margin-bottom: 25px;
    border-bottom: 1px dashed #e0e0e0;
    padding-bottom: 20px;
}

.gtg-quiz-question:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.gtg-question-text {
    font-size: 1.2em;
    line-height: 1.5;
    margin-bottom: 15px;
    color: #444;
}

.gtg-quiz-options {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.gtg-quiz-option {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 14px;
    margin-bottom: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, transform 0.1s;
}

.gtg-quiz-options:not(.answered) .gtg-quiz-option:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

.gtg-quiz-option.correct {
    background-color: #d1e7dd !important;
    border-color: #badbcc !important;
    color: #0f5132 !important;
    font-weight: bold;
}

.gtg-quiz-option.incorrect {
    background-color: #f8d7da !important;
    border-color: #f5c2c7 !important;
    color: #842029 !important;
}

.gtg-quiz-options.answered .gtg-quiz-option {
    cursor: default;
}
.gtg-quiz-options.answered .gtg-quiz-option:hover {
    transform: none;
}


/* ==========================================================================
   Styling untuk Soal Isian Singkat
   ========================================================================== */
.gtg-quiz-fill-in-blank {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.gtg-fill-input {
    flex-grow: 1;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gtg-fill-input:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.gtg-fill-input.correct {
    background-color: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
    font-weight: bold;
}

.gtg-fill-input.incorrect {
    background-color: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

.gtg-fill-submit-btn {
    padding: 12px 18px;
    font-size: 1em;
    cursor: pointer;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.gtg-fill-submit-btn:hover {
    background-color: #5a6268;
}

.gtg-fill-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ==========================================================================
   Styling untuk Penjelasan Jawaban
   ========================================================================== */

.gtg-quiz-explanation {
    margin-top: 20px;
    padding: 18px;
    background-color: #e7f1ff;
    border-left: 5px solid #0d6efd;
    border-radius: 4px;
    font-size: 1em;
    line-height: 1.6;
    color: #052c65;
    animation: fadeInExplanation 0.5s ease-in-out;
}

.gtg-quiz-explanation::before {
    content: '💡';
    margin-right: 10px;
    font-size: 1.2em;
    float: left;
}

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

/* ==========================================================================
   Styling Spesifik untuk Mode "Satu per Satu"
   ========================================================================== */

.quiz-mode-one-by-one .gtg-quiz-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.quiz-mode-one-by-one .gtg-pagination-dot {
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 50%;
    background-color: #e9ecef;
    margin: 5px;
    font-weight: bold;
    user-select: none;
    transition: background-color 0.2s, transform 0.2s, color 0.2s;
    cursor: pointer;
}
.quiz-mode-one-by-one .gtg-pagination-dot.active {
    background-color: #0d6efd;
    color: white;
    transform: scale(1.1);
}
.quiz-mode-one-by-one .gtg-pagination-dot.answered {
    background-color: #6c757d;
    color: white;
}
.quiz-mode-one-by-one .gtg-pagination-dot.answered.active {
    background-color: #0d6efd;
}

.quiz-mode-one-by-one .gtg-quiz-navigation-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
}
.quiz-mode-one-by-one .gtg-quiz-navigation-buttons button {
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    background-color: #0d6efd;
    color: white;
    border: none;
    border-radius: 5px;
}

/* Styling untuk Paragraf Pengantar SEO */
.gtg-intro-paragraph {
    font-size: 1.1em;
    line-height: 1.7;
    color: #555;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

/* ==========================================================================
   Styling untuk Timer Kuis
   ========================================================================== */
.gtg-quiz-timer-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.gtg-quiz-timer {
    font-size: 1.2em;
    font-weight: bold;
    color: #495057;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.gtg-quiz-timer .gtg-timer-display {
    color: #0d6efd;
    min-width: 60px;
    display: inline-block;
    text-align: right;
}

.gtg-quiz-timer.low-time .gtg-timer-display {
    color: #dc3545;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ==========================================================================
   Styling untuk KARTU SKOR HASIL
   ========================================================================== */

.gtg-quiz-result-container {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin-top: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    animation: fadeInResult 0.6s ease-out;
}

.gtg-result-header {
    margin-bottom: 15px;
}

.gtg-result-icon {
    font-size: 3em;
    line-height: 1;
}
.gtg-result-icon.pass::before { content: '🎉'; }
.gtg-result-icon.good::before { content: '👍'; }
.gtg-result-icon.fail::before { content: '🤔'; }

.gtg-result-message {
    margin: 10px 0 0 0;
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
}
.gtg-result-intro {
    font-size: 1.1em;
    color: #6c757d;
    margin-bottom: 20px;
}
.gtg-result-score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 20px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #e9ecef;
    border-width: 8px;
    border-style: solid;
    transition: border-color 0.5s;
}
.gtg-result-score-circle.pass { border-color: #198754; }
.gtg-result-score-circle.good { border-color: #0d6efd; }
.gtg-result-score-circle.fail { border-color: #dc3545; }

.gtg-quiz-final-score {
    font-size: 4em;
    font-weight: bold;
    color: #212529;
}

.gtg-result-details {
    font-size: 1.1em;
    margin-bottom: 25px;
}

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

/* ==========================================================================
   Styling untuk Form Mulai & Overlay (BARU)
   ========================================================================== */
.gtg-quiz-start-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: 8px;
    flex-direction: column;
}

.gtg-quiz-start-box {
    background: #fff;
    padding: 30px 40px;
    border-radius: 8px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.gtg-quiz-start-box h3 {
    margin-top: 0;
}

.gtg-student-name-input {
    width: 100%;
    padding: 12px;
    margin: 15px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    text-align: center;
    font-size: 1.1em;
}
.gtg-student-name-input:focus {
    border-color: #0d6efd;
    outline: none;
    box-shadow: 0 0 5px rgba(13, 110, 253, 0.25);
}

.gtg-start-quiz-btn {
    padding: 12px 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    transition: background-color 0.2s;
}
.gtg-start-quiz-btn:hover {
    background-color: #218838;
}

/* ==========================================================================
   Styling untuk Tombol Aksi & Review (BARU)
   ========================================================================== */
.gtg-result-student-name {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #555;
}

.gtg-result-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.gtg-result-actions button {
    padding: 10px 20px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    transition: background-color 0.2s, transform 0.1s;
}

.gtg-result-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.gtg-result-actions button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.gtg-quiz-review-btn { background-color: #ffc107; color: #212529; }
.gtg-quiz-download-btn { background-color: #17a2b8; color: white; }
.gtg-quiz-retry-btn { background-color: #0d6efd; color: white; }

.gtg-back-to-score-btn {
    display: block;
    margin: -10px auto 25px auto;
    background-color: #6c757d;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.gtg-back-to-score-btn:hover {
    background-color: #5a6268;
}

/* ==========================================================================
   Styling untuk Template PDF (BARU)
   ========================================================================== */
.gtg-pdf-template {
    width: 800px;
    padding: 40px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #333;
    background-color: white;
}
.pdf-header { text-align: center; border-bottom: 2px solid #eee; padding-bottom: 20px; margin-bottom: 30px;}
.pdf-header h1 { font-size: 28px; color: #0d6efd; margin: 0; }
.pdf-body { text-align: center; }
.pdf-student-name { font-size: 32px; font-weight: bold; color: #dc3545; margin: 15px 0; }
.pdf-quiz-title { font-size: 22px; font-weight: normal; margin: 10px 0 20px 0; }
.pdf-date { font-weight: bold; }
.pdf-score-container {
    margin: 30px auto;
    border: 5px solid #0d6efd;
    border-radius: 10px;
    padding: 20px;
    max-width: 300px;
}
.pdf-score-label { font-size: 18px; color: #6c757d; }
.pdf-score-value { font-size: 72px; font-weight: bold; color: #0d6efd; line-height: 1; }
.pdf-score-details { font-size: 16px; margin-top: 20px; }
.pdf-footer { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid #eee; font-size: 12px; color: #999; }

/* ==========================================================================
   Styling untuk Soal Menjodohkan (BARU)
   ========================================================================== */
.gtg-matching-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 20px 0;
}

.gtg-matching-prompts,
.gtg-matching-answers {
    width: 48%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gtg-matching-item {
    border: 1px solid #ccc;
    padding: 12px;
    border-radius: 5px;
    background-color: #f9f9f9;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.gtg-prompt {
    background-color: #e9ecef;
    border: 2px dashed #ced4da;
    position: relative; /* Untuk garis koneksi */
}

.gtg-answer {
    cursor: grab;
    transition: background-color 0.2s, transform 0.2s;
}
.gtg-answer:active {
    cursor: grabbing;
}
.gtg-answer.dragging {
    opacity: 0.5;
    background: #d0eaff;
}

.gtg-prompt.over {
    border-color: #0d6efd;
    background-color: #dbeafe;
}

.gtg-prompt.correct {
    background-color: #d1e7dd !important;
    border-color: #a3cfbb !important;
}
.gtg-prompt.incorrect {
    background-color: #f8d7da !important;
    border-color: #f1c2c5 !important;
}

.gtg-matching-submit-btn {
    display: block;
    margin: 20px auto 0 auto;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
}
.gtg-matching-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}