/* Navigation styles - high specificity */
body .quiz-container .quiz-section .nav-controls {
    display: flex;
    justify-content: space-between; /* Spread buttons to both sides */
    align-items: center;
    width: 100%;
    margin: 20px 0;
    padding: 0;
    position: relative;
}

.control-btn {
    min-width: 100px;
    padding: 8px 16px;
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-weight: normal;
    font-size: 14px;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.control-btn:hover:not(:disabled) {
    background: #3a3a3a;
    border-color: #111;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.08);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
    border-color: #ddd;
}


.section-heading {
    margin: 2em 0 1em;
    color: #2c3e50;
    font-size: 1.75em;
}

.subsection-heading {
    margin: 1.5em 0 1em;
    color:rgb(48, 48, 48);
    font-size: 1.4em;
}

.word-list {
    list-style: none;
    padding: 0;
    margin: 1em 0;
}

.word-list li {
    margin: 0.5em 0;
    padding: 0.5em;
    border-bottom: 1px solid #eee;
}

.content-block {
    margin: 1.5em 0;
}

.pattern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2em 0;
    font-family: system-ui, -apple-system, sans-serif;
}

.pattern-table th {
    background: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    padding: 15px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
}

.pattern-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
    color: #444;
}

.pattern-table tr:hover td {
    background-color: #f8f9fa;
}

.highlight {
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 2px 5px;
    border-radius: 3px;
}

.quiz-container {
    max-width: 700px;
    margin: 15px auto;
    padding: 15px;
}

.quiz-section {
    position: relative;
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
}

.question {
    display: none;
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    border: 1px solid #e1e4e8;
    position: relative;
    min-height: 200px;
}

.question.active {
    display: block;
}

.question p {
    margin-bottom: 15px;
    color: #2c3e50;
    line-height: 1.6;
    display: block;
    width: 100%;
}

.answer-select {
    display: inline-block;
    min-width: 120px;
    padding: 6px 10px;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    font-size: 0.95em;
    margin: 0 4px;
}


.question input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;  /* Reduced from 18px */
    height: 16px;  /* Reduced from 18px */
    border: 2px solid #e1e4e8;
    border-radius: 50%;
    margin-right: 8px;  /* Reduced from 12px */
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.question input[type="radio"]:hover {
    border-color: #bfe9cc;
}

.question input[type="radio"]:checked {
    border-color: #28a745;
    border-width: 4px;  /* Reduced from 5px */
    background: #fff;
}

.question input[type="radio"] + span {
    color: #2c3e50;
    font-size: 1em;
    line-height: 1.4;
}

.question label:has(input[type="radio"]:checked) {
    background: #f8fff9;
    border-color: #28a745;
}*/

.quiz-navigation {
    display: flex!important;
    justify-content: space-between !important;
    margin: 20px 0;
    position: sticky;
    bottom: 20px;
    gap: 24px; /* Increased gap for better spacing */
    background: transparent;
    z-index: 2;
}

.nav-button {
    background: #fff;
    color: #111; /* Black text */
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    width: 130px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.nav-button:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #bfe9cc;
    transform: translateX(0);
}

.nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f1f1f1;
}

.prev-btn {
    transform: translateX(-10px);
}

.next-btn {
    transform: translateX(10px);
}

.check-button {
    width: auto;
    min-width: 150px;
    margin: 15px auto 0;
    padding: 8px 20px;  /* Reduced from 10px 25px */
    background: #bfe9cc;
    color: #155724;
    border: none;
    border-radius: 4px;
    font-size: 0.95em;  /* Slightly smaller font */
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
}

.check-button:hover {
    background: #28a745;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.question-counter {
    text-align: center;
    margin: 10px 0;
    color: #666;
}

.check-button {
    display: none;  /* Hide by default */
}

.check-button {
    display: block;
    width: 100%;
    padding: 12px;
    background: #bfe9cc;
    color: #333;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    margin: 15px 0;
    transition: all 0.2s ease;
}

.check-button:hover {
    background: #28a745;
    color: #fff;
}

.score {
    background: #f8f9fa;
    border-left: 4px solid #bfe9cc;
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
    text-align: center;
    font-size: 1.2em;
    color: #155724;
}

.correct { border-left-color: #28a745; }
.incorrect { border-left-color: #dc3545; }

.quick-tip {
    background: #f8f9fa;
    border-left: 4px solid #bfe9cc;
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 0 4px 4px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.quick-tip-title {
    color: #0c0c0c;
    font-weight: bold;
     padding-top: 5px;
    margin-bottom: -10px;
}

.usage-examples {
    margin: 10px 0;
}

.usage-examples p {
    margin: 6px 0;
    line-height: 1.5;
}

.usage-examples .check-mark {
    color: #2da44e;
    background: #bff1cc;
    padding: 0 5px;
    border-radius: 3px;
    display: inline-block;
    margin-right: 5px;
}

.usage-examples .x-mark {
    color: #cf222e;
    background: #FFEBE9;
    padding: 0 5px;
    border-radius: 3px;
    display: inline-block;
    margin-right: 5px;
}

.usage-examples em {
    font-style: italic;
}

.pattern-reference {
    margin: 2em 0;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.game-input {
    margin: 20px 0;
    display: flex;
    gap: 10px;
}

.game-input input {
    padding: 10px;
    border: 2px solid #007bff;
    border-radius: 4px;
    font-size: 1.2em;
    flex: 1;
}

.game-input button {
    background: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2em;
}

.power-ups {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.power-up {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    background: #17a2b8;
    color: white;
    cursor: pointer;
}

.power-up:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.timer {
    font-size: 1.5em;
    text-align: center;
    margin: 10px 0;
}

.current-word {
    font-size: 2em;
    font-weight: bold;
    color: #2c3e50;
    margin: 20px 0;
    text-align: center;
}

.main-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-family: system-ui, -apple-system, sans-serif;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.main-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.main-table th {
    text-align: left;
    padding: 12px 16px;
    color: #2c3e50;
    font-weight: 600;
    white-space: nowrap;
}

.main-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e1e4e8;
    vertical-align: top;
}

.main-table tr:hover td {
    background-color: #f8f9fa;
}

/* Remove old styles */
.latin-table {
    display: none;
}

/* Remove or comment out this style */
/*.question-number {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    background: #bfe9cc;
    color: #333;
    font-weight: bold;
    margin-right: 8px;
}*/

.citation-preview {
    background: #f8f9fa;
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    text-align: left;
    border: 1px solid #e1e4e8;
}

.cite-section {
    background: #f0f7ff;
    padding: 10px 15px;
    border-radius: 8px;
    margin: 40px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.citation-area {
    flex: 1;
}

.citation-preview {
    background: #f8f9fa;
    padding: 12px 15px;
    margin: 0;
    border-radius: 4px;
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    border: 1px solid #e1e4e8;
}

.cite-button {
    padding: 8px 16px;
    background: #fff;
    color: #333;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    font-size: 14px;
    height: fit-content;
    white-space: nowrap;
}

.sources-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.correct-answer {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    margin-top: 15px;
    border-radius: 4px;
    width: 100%;
    text-align: center;
    font-weight: bold;
}

label.correct-answer {
    background: #d4edda;
    border-radius: 4px;
}

/* Modern Citation Styles */
.citation-block {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin: 24px 0;
}

.citation-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.citation-text {
    flex: 1;
}

.citation-preview {
    margin: 0;
    line-height: 1.6;
    color: #111;
    font-family: system-ui, -apple-system, sans-serif;
}

.citation-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.citation-type {
    display: none; /* Removing type label for cleaner look */
}

.cite-button {
    background: #fff;
    color: #111;
    border: 1px solid #111;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.cite-button:hover {
    background: #111;
    color: #fff;
}

/* Modern Sources Styles */
.sources-block {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin: 24px 0;
}

.sources-heading {
    color: #111;
    font-size: 1.25em;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.sources-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.source-item {
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 6px;
    transition: transform 0.2s ease;
    border: 1px solid #e5e7eb;
}

.source-item:hover {
    transform: translateX(4px);
    background: #f3f4f6;
}

.source-text {
    color: #374151;
    line-height: 1.5;
    font-size: 0.95em;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .citation-content {
        flex-direction: column;
        gap: 12px;
    }
    
    .cite-button {
        width: 100%;
        justify-content: center;
    }
    
    .sources-block {
        padding: 16px;
    }
}

/* Mobile-friendly tables */
@media (max-width: 768px) {
    .pattern-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .pattern-table td, 
    .pattern-table th {
        min-width: 120px;
    }

    .latin-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Horizontal question slider */
.questions-container {
    width: 100%;
    margin: 20px 0;
}

.question {
    display: none;
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    border: 1px solid #e1e4e8;
}

.question.active {
    display: block;
}

.question p {
    margin-bottom: 15px;
    color: #2c3e50;
    line-height: 1.6;
}

.answer-select {
    display: inline-block;
    min-width: 120px;
    padding: 6px 10px;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    font-size: 0.95em;
    margin: 0 4px;
}

/* Question slide animation */
.slide-left {
    animation: slideLeft 0.3s forwards;
}

.slide-right {
    animation: slideRight 0.3s forwards;
}

@keyframes slideLeft {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes slideRight {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Mobile citation section */
@media (max-width: 768px) {
    .cite-section {
        flex-direction: column;
        padding: 15px 10px;
    }
    
    .citation-preview {
        font-size: 14px;
        padding: 10px;
    }
    
    .cite-button {
        width: 100%;
        margin-top: 10px;
    }
}

.missed-summary {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.missed-item {
    margin: 10px 0;
    padding: 10px;
    border-left: 4px solid #dc3545;
    background: #fff8f8;
}

.your-answer {
    color: #dc3545;
    margin: 5px 0;
}

.correct-answer {
    color: #28a745;
    margin: 5px 0;
}

.quiz-results {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    text-align: center;
}

.missed-answers {
    margin-top: 20px;
    padding: 15px;
    background: #fff8f8;
    border: 1px solid #dc3545;
    border-radius: 4px;
}

.missed-answers h3 {
    color: #dc3545;
    margin-top: 0;
}

.missed-answers ul {
    margin: 10px 0;
    padding-left: 20px;
}

.missed-answers li {
    margin: 5px 0;
    color: #666;
}

.quiz-success {
    margin-top: 20px;
    padding: 15px;
    background: #f0fff4;
    border: 1px solid #28a745;
    border-radius: 4px;
    color: #28a745;
    text-align: center;
    font-weight: bold;
}

.faq-container {
    max-width: 800px;
    margin: 20px auto 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.faq-item {
    border-bottom: 1px solid #e1e4e8;
    padding: 0;
    margin: 0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    padding: 15px;
    margin: 0;
    cursor: pointer;
    position: relative;
    font-size: 1em;
    color: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    padding: 0 15px;
    margin: 0;
    background: #f8f9fa;
    opacity: 0;
}

.faq-item.active .faq-answer {
    max-height: 500px; /* Increased max-height */
    padding: 15px;
    margin-bottom: 10px;
    opacity: 1;
}

.toggle {
    font-size: 1.2em;
    transition: transform 0.3s ease;
    display: inline-block;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 20px;
}

.faq-item.active .toggle {
    transform: rotate(45deg);
}

/* Mobile styles */
@media (max-width: 768px) {
    .section-heading {
        font-size: 1.5em;
    }

    .subsection-heading {
        font-size: 1.2em;
    }

    .quiz-container {
        padding: 15px;
    }

    .quiz-section {
        padding: 15px;
    }

    .question p {
        font-size: 1.1em;
    }

    .question label {
        padding: 6px;
        margin: 3px 0;
    }

    .nav-button {
        padding: 6px 12px;
        font-size: 0.9em;
    }

    .check-button {
        padding: 10px;
        font-size: 1em;
    }

    .score {
        font-size: 1.1em;
    }

    .quick-tip {
        padding: 10px;
    }

    .pattern-reference {
        padding: 15px;
    }

    .latin-table th, .latin-table td {
        padding: 10px;
    }

    .citation-preview {
        padding: 15px;
    }

    .faq-item {
        padding: 15px;
    }
}

.usage-note {
    background: #f8f9fa;
    border-left: 4px solid #bdf1c9;
    margin: 15px 0;
    padding: 12px 15px;
}

.usage-examples {
    margin: 10px 0;
}

.usage-examples p {
    margin: 6px 0;
    line-height: 1.5;
}

.usage-examples .check-mark {
    color: #2da44e;
    background: #bff1cc;
    padding: 0 5px;
    border-radius: 3px;
    display: inline-block;
    margin-right: 5px;
}

.usage-examples .x-mark {
    color: #cf222e;
    background: #FFEBE9;
    padding: 0 5px;
    border-radius: 3px;
    display: inline-block;
    margin-right: 5px;
}

.usage-examples em {
    font-style: italic;
}

.fill-blank {
    display: inline-block;
    min-width: 80px;
    padding: 2px 8px;
    margin: 0 6px;
    border: none;
    border-bottom: 2px solid #e1e4e8;
    border-radius: 0;
    font-size: 1em;
    text-align: center;
    background: transparent;
    transition: all 0.2s ease;
}

.fill-blank:focus {
    outline: none;
    border-bottom-color: #bfe9cc;
    background: #f8fff91a;
}

.answer-item {
    margin: 10px 0;
    padding: 10px;
    border-left: 4px solid #bfe9cc;
    background: #fff;
    border-radius: 0 4px 4px 0;
}

.answer-item.incorrect {
    border-left-color: #dc3545;
}

.answer-question {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 5px;
}

.answer-result {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.answer-select {
    display: inline-block;
    min-width: 120px;
    padding: 6px 10px;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    font-size: 0.95em;
    margin: 0 4px;
}

.answer-select:focus {
    outline: none;
    border-color: #bfe9cc;
    box-shadow: 0 0 0 2px rgba(191, 233, 204, 0.2);
}

.answer-select:hover {
    border-color: #bfe9cc;
}

.question label {
    display: block;
    padding: 4px 8px;  /* Reduced padding */
    margin: 2px 0;     /* Reduced margin */
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.question input[type="radio"] {
    margin-right: 4px;  /* Reduced margin */
    transform: scale(0.8);  /* Made radio smaller */
}

.blank-space {
    display: inline-block; 
    min-width: 80px;
    height: 2px;
    background-color: #bdf1c9;
    margin: 0 5px;
    vertical-align: bottom;
}

.answer-feedback {
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 4px;
    background: #fff;
    font-weight: 500;
    text-align: center;
    border: 1px solid #ddd;
}

.answer-feedback.correct {
    background: #f8fff9;
    color: #28a745;
    border-color: #28a745;
}

.answer-feedback.incorrect {
    background: #fff8f8;
    color: #dc3545;
    border-color: #dc3545;
}

.quiz-summary {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-top: 20px;
}

.quiz-summary h3 {
    margin: 0 0 10px;
    color: #2c3e50;
}

.correct-choice {
    border-color: #dcc8e2 !important;  /* Light purple */
    background: #f8f1ff !important;    /* Very light purple */
}

.wrong-choice {
    border-color: #dc3545 !important;  /* Red */
    background: #fff8f8 !important;    /* Light red */
}

.quiz-score {
    background: #f8f9fa;
    padding: 12px;
    margin: 15px 0;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
    color: #155724;
    border: 1px solid #bfe9cc;
}

.answer-key-section {
    background: #f8fff9;
    border: 1px solid #bfe9cc;
    border-radius: 4px;
    padding: 20px;
    margin: 30px 0;
    font-family: system-ui, -apple-system, sans-serif;
}

.answer-key-section p {
    margin: 15px 0;
    padding-left: 15px;
    color: #155724;
    border-left: 3px solid #bfe9cc;
}

.answer-key-section ul {
    margin: 5px 0 15px 20px;
    color: #666;
    font-size: 0.95em;
}

.check-button {
    width: 100%;
    padding: 12px;
    background: #bfe9cc;
    color: #333;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    margin: 15px 0;
    transition: all 0.2s ease;
}

.check-button:hover {
    background: #28a745;
    color: #fff;
}

@media (max-width: 768px) {
    .quiz-section {
        padding: 15px;
    }
    
    .check-button {
        position: sticky;
        bottom: 15px;
        z-index: 10;
        margin: 0;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .results-area {
        margin-bottom: 60px; /* Space for sticky check button */
    }
    
    .quiz-score {
        position: sticky;
        top: 0;
        z-index: 9;
        margin: 0 0 15px 0;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
}



