/* 1. Import Inter font from Google Fonts (replacing the <link> tag) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap');

:root { /* Instead of tailwind*/
    --primary-blue: #60A5FA; 
    --color-red-500: #EF4444; 
    --color-white: #ffffff;
    --color-primary-leaf: #d97706;
    --color-secondary-brown: #92400e;
    --color-main-beige: #FFF4E3;
    --color-indigo-500: #6366f1;
    --color-indigo-100: #eef2ff;
    --color-indigo-200: #e0e7ff;
    --color-indigo-600: #4f46e5;
    --color-indigo-700: #4338ca;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-green-600: #059669;
    --shadow-weak-dark: rgba(0, 0, 0, 0.1);
    --shadow-strong-dark: rgba(0, 0, 0, 0.3);
}

/*html.dark:root :root {*/
html.dark:root {
    --primary-blue: #60a5fa;      
    --primary-blue-dark: #3b82f6; 
    --secondary-grey: #4b5563;    
    --secondary-grey-dark: #6b7280; 
    --text-dark: #f3f4f6;         
    --text-light: #d1d5db;        
    --background-light: #1f2937;  
    --background-white: #374151;  
    --shadow-light: rgba(255, 255, 255, 0.1);
    --shadow-medium: rgba(255, 255, 255, 0.2);
}

/*html.light:root {
    color-scheme: light !important; 
    filter: none !important;
    -webkit-filter: none !important;
}

html.dark:root {
    color-scheme: dark !important; 
    filter: none !important;
    -webkit-filter: none !important;
}

html {
    filter: none !important;
    -webkit-filter: none !important;
}*/

:root:root { 
    filter: none !important; 
    -webkit-filter: none !important;
}

html.light:root body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-main-beige) !important;
    color: var(--color-gray-800) !important;
}

html.light:root #quiz-container {
    background-color: var(--color-white) !important;
    box-shadow: 0 25px 50px -12px var(--shadow-strong-dark) !important;
}

html.light:root .prototype-text {
    /* --color-secondary-brown is defined as #795548 */
    border-color: var(--color-secondary-brown) !important;
}

html.light:root .bg-indigo-50 {
    background-color: var(--color-white) !important;
    color: var(--color-gray-800) !important; 
    border-color: var(--color-indigo-500) !important;
}

html.light:root page-header {
    color: var(--color-secondary-brown) !important;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
    font-size: 2.0rem;
    font-weight: 700;
    text-align: center;
    /*display: block;*/
}

html.light:root section-header {
    color: var(--color-secondary-brown) !important;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
    font-size: 1.3rem;
    font-weight: 700;
    display: block;
}

html.light:root #quiz-title {
    color: var(--color-gray-800) !important;
}

html.light:root #copy-message {
    color: #4ade80 !important;
}

html.light:root #question-text {
    color: var(--color-indigo-600) !important;
}

html.light:root #progress-text {
    color: var(--color-indigo-600) !important;
}

html.light:root header {
    background-color: var(--color-white) !important;
    text-align: center;
    margin-bottom: 2em;
    box-shadow: 0 4px 6px -1px var(--shadow-weak-dark), 0 2px 4px -2px var(--shadow-weak-dark) !important;
}

html.light:root #header a {
    color: var(--color-secondary-brown) !important;
}

html.light:root #header a:hover {
    color: var(--color-primary-leaf) !important;
}

html.light:root #header p {
    color: var(--color-secondary-brown) !important;
}

header page-header {
    margin-bottom: 0.2em;
}

html.light:root #mobileMenu {
    background-color: var(--color-secondary-brown) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

html.light:root #mobileMenu a {
    color: var(--color-main-beige) !important;
}

html.light:root #mobileMenu a:hover {
    color: var(--color-primary-leaf) !important;
}

html.light:root .data-table-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    border-collapse: collapse;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: #ffffff !important;
    border-radius: 8px;
    overflow: hidden;
}
html.light:root .data-table-container th, 
html.light:root .data-table-container td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0 !important; 
    font-size: 14px;
}
html.light:root .data-table-container th {
    background-color: #f3f4f6 !important;
    font-weight: bold;
    text-transform: uppercase;
}

.data-table-container tbody tr:last-child td {
    border-bottom: none;
}
.data-table-container td:first-child {
    font-weight: 600;
}

.personal-data-status {
    text-align: center;
    font-weight: bold;
}

.button-group {
    margin-top: 0.5rem;
    margin-bottom: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 10px;
    margin-bottom: 20px;
}

html.light:root .button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px var(--shadow-light) !important;
    min-width: 200px;
    max-width: 100%;
    border: 2px solid var(--color-secondary-brown) !important;
}

html.light:root .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
}

.button:active {
    transform: translateY(0);
}

html.light:root .button {
    background-color: var(--color-main-beige) !important;
    color: var(--color-gray-800);
}

html.light:root .button:hover {
    background-color: var(--color-main-beige) !important;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 1em;
    align-items: center;
}

@media (min-width: 600px) {
    .button-group {
        flex-direction: row;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .button-group {
        flex-direction: column;
    }
}

html.light:root .checkmark-icon {
    color: var(--color-secondary-brown) !important;
    margin-right: 0.8em;
}

html.light:root #options-container .correct,
html.light:root #options-container .correct:hover,
html.light:root #options-container .correct.selected,
html.light:root #options-container .correct.selected:hover {
    background-color: #10B981 !important; 
    color: var(--color-white) !important;
    border: 2px solid #059669 !important; 
    background-image: none !important;
}
html.light:root #options-container .incorrect,
html.light:root #options-container .incorrect:hover,
html.light:root #options-container .incorrect.selected,
html.light:root #options-container .incorrect.selected:hover {
    background-color: var(--color-red-500) !important; 
    color: var(--color-white) !important;
    border: 2px solid #DC2626 !important;
    background-image: none !important;
}

html.light:root #options-container button, 
html.light:root #autoNextToggle:not(.bg-indigo-500) {
    background-color: var(--color-indigo-100) !important; 
    color: var(--color-gray-800) !important;
    border-color: #c7d2fe !important;
}

html.light:root #options-container button:hover, 
html.light:root #autoNextToggle:not(.bg-indigo-500):hover {
    background-color: var(--color-indigo-200) !important;
}

html.light:root #autoNextToggle.bg-indigo-500 {
    background-color: var(--color-indigo-500) !important; 
    color: var(--color-white) !important; 
    border-color: var(--color-indigo-700) !important;
}

html.light:root #next-button,
html.light:root #stop-quiz-button,
html.light:root #result-area button:not(#share-button) {
    background-color: var(--color-indigo-600) !important;
    color: var(--color-white) !important;
}

html.light:root #next-button:hover,
html.light:root #stop-quiz-button:hover,
html.light:root #result-area button:not(#share-button):hover {
    background-color: var(--color-indigo-700) !important;
}

html.light:root #share-button {
    background-color: var(--color-gray-700) !important;
    color: var(--color-white) !important;
}

html.light:root #share-button:hover {
    background-color: var(--color-gray-800) !important;
}

html.light:root #result-area h2 {
    color: #4f46e5 !important;
}

html.light:root #result-area p.text-xl, 
html.light:root #result-area p.text-lg,
html.light:root #result-area p.text-sm {
    color: #374151 !important;
}

html.light:root #copy-message {
    color: var(--color-green-600) !important;
}

html.light:root .series-card { 
    background-color: var(--color-white) !important;
    border-top-color: var(--color-primary-leaf) !important;
}

/* FIX: Target h3 specifically and set it to secondary-brown */
html.light:root .series-card h3 {
    /* Set the color to the correct variable: secondary-brown */
    color: var(--color-secondary-brown) !important; 
    border-bottom-color: var(--color-gray-200) !important;
}

html.light:root .series-card p {
    color: var(--color-gray-800) !important; 
}
/* ... rest of the section ... */

html.light:root .series-card .text-primary-leaf {
    color: var(--color-primary-leaf) !important;
}

html.light:root .series-card .text-stone-700 {
    color: var(--color-gray-700) !important;
}

html.light:root .series-card a:hover .group-hover\:text-secondary-brown {
    color: var(--color-secondary-brown) !important;
}

html.light:root .unpublished-blog-link {
    pointer-events: none;
    cursor: default;
    opacity: 0.6;
}

html.light:root .unpublished-blog-link .text-primary-leaf {
    color: var(--color-gray-700) !important;
}

html.light:root .unpublished-blog-link .text-stone-700,
html.light:root .unpublished-blog-link:hover .group-hover\:text-secondary-brown {
    color: var(--color-gray-700) !important;
}

html.light:root .unpublished-blog-link div.py-2.px-3:hover {
    background-color: transparent !important;
}

html.light:root footer {
    background-color: var(--color-secondary-brown) !important;
    color: var(--color-main-beige) !important;
}

html.light:root footer a {
    color: var(--color-main-beige) !important;
}

html.light:root #header button,
html.light:root #header svg {
    color: var(--color-secondary-brown) !important;
}

html.light:root #header svg {
    stroke: var(--color-secondary-brown) !important;
    fill: var(--color-secondary-brown) !important;
}

html.light:root #header button:hover,
html.light:root #header svg:hover {
    color: var(--color-secondary-brown) !important;
}

html.light:root #header svg:hover {
    stroke: var(--color-primary-leaf) !important;
    fill: var(--color-secondary-brown) !important;
}

html.light:root #theme-toggle {
    background-color: var(--color-gray-200) !important;
    color: var(--color-gray-800) !important;
}

/*html.light:root .theme-toggle:hover .theme-toggle-text {
    color: var(--color-secondary-brown) !important; 
}*/

html.light:root #theme-toggle:hover {
    background-color: var(--color-gray-300) !important;
}

html.light:root main {
    color: var(--color-secondary-brown) !important;
}

html.light:root .mb-8.p-4 {
    background-color: var(--color-white) !important;
    border-color: var(--color-gray-200) !important;
    box-shadow: 0 4px 8px var(--shadow-weak-dark) !important;
    color: var(--color-secondary-brown) !important;
}

html.light:root .mb-8.p-4 header {
    background-color: transparent !important;
    margin-bottom: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

html.light:root .mb-8.p-4 page-header {
    color: var(--color-secondary-brown) !important;
}

html.light:root .mb-8.p-4 p {
    color: var(--color-secondary-brown) !important;
}

html.light:root .mb-8.p-4 a {
    color: var(--color-primary-leaf) !important;
}

html.light:root .mb-8.p-4 a:hover {
    color: var(--color-secondary-brown) !important;
}

html.light:root .milestone-alert {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
    border-color: var(--color-green-600) !important;
}

html.dark:root body {
    background-color: var(--background-light) !important; 
    color: var(--text-light) !important; 
}

html.dark:root #quiz-container {
    background-color: var(--background-white) !important; 
    box-shadow: 0 25px 50px -12px var(--shadow-light) !important;
}

html.dark:root .bg-indigo-50 {
    background-color: var(--background-white) !important;
    color: var(--text-dark) !important; 
    border-color: var(--primary-blue-dark) !important;
}

html.dark:root header {
    background-color: var(--background-light) !important;
    text-align: center;
    margin-bottom: 2em;
    box-shadow: 0 4px 6px -1px var(--shadow-light), 0 2px 4px -2px var(--shadow-light) !important;
}

html.dark:root header a.text-3xl {
    color: var(--text-dark) !important;
}

html.dark:root #header a:hover {
    color: var(--primary-blue) !important;
}

html.dark:root header p.text-sm {
    color: var(--text-light) !important;
}

html.dark:root header nav a {
    color: var(--text-light) !important; 
}

html.dark:root header nav a:hover {
    color: var(--primary-blue) !important;
}

html.dark:root #next-button,
html.dark:root #stop-quiz-button,
html.dark:root #result-area button:not(#share-button) {
    background-color: var(--primary-blue-dark) !important;
    color: var(--color-white) !important;
}

html.dark:root #next-button:hover,
html.dark:root #stop-quiz-button:hover,
html.dark:root #result-area button:not(#share-button):hover {
    background-color: var(--primary-blue) !important;
}

html.dark:root #options-container button, 
html.dark:root #autoNextToggle:not(.bg-indigo-500) {
    background-color: var(--background-light) !important; 
    color: var(--text-dark) !important;
    border-color: var(--secondary-grey) !important;
}

html.dark:root #options-container button:hover, 
html.dark:root #autoNextToggle:not(.bg-indigo-500):hover {
    background-color: var(--secondary-grey) !important;
    color: var(--text-dark) !important;
}

html.dark:root #share-button {
    background-color: var(--primary-blue-dark) !important;
    color: var(--color-white) !important;
}

html.dark:root #share-button:hover {
    background-color: var(--primary-blue) !important;
}

html.dark:root #autoNextToggle.bg-indigo-100 {
    background-color: var(--background-light) !important; 
    color: var(--text-dark) !important; 
    border-color: var(--secondary-grey) !important; 
}

html.dark:root #autoNextToggle.bg-indigo-100:hover {
    background-color: var(--secondary-grey) !important; 
    color: var(--text-dark) !important; 
    border-color: var(--secondary-grey) !important; 
}

html.dark:root #autoNextToggle.bg-indigo-500 {
    background-color: var(--primary-blue-dark) !important;
    color: var(--text-dark) !important;
    border: none !important; 
}

html.dark:root #autoNextToggle.bg-indigo-500:hover {
    background-color: var(--primary-blue) !important;
}

html.dark:root #quiz-title {
    color: var(--text-dark) !important;
}

html.dark:root #result-area p.text-xl,
html.dark:root #result-area p.text-lg {
    color: var(--text-light) !important;
}

html.dark:root #result-area h2 {
    color: var(--text-dark) !important;
}

html.dark:root #copy-message {
    color: #4ade80 !important;
}

html.dark:root #question-text {
    color: var(--text-dark) !important;
}

html.dark:root #progress-text {
    color: var(--primary-blue) !important;
}

html.dark:root #quiz-container span,
html.dark:root #quiz-container h1,
html.dark:root #quiz-container h2,
html.dark:root #quiz-container h3 {
    color: var(--text-dark) !important; 
}

html.dark:root #options-container .correct,
html.dark:root #options-container .correct:hover,
html.dark:root #options-container .correct.selected,
html.dark:root #options-container .correct.selected:hover {
    background-color: #10B981 !important; 
    color: var(--color-white) !important;
    border: 2px solid #059669 !important;
}
html.dark:root #options-container .incorrect,
html.dark:root #options-container .incorrect:hover,
html.dark:root #options-container .incorrect.selected,
html.dark:root #options-container .incorrect.selected:hover {
    background-color: var(--color-red-500) !important; 
    color: var(--color-white) !important;
    border: 2px solid #DC2626 !important; 
}

html.dark:root .checkmark-icon {
    color: #f59e0b; 
}

html.dark:root footer {
    background-color: var(--background-light) !important;
    color: var(--text-light) !important;
}
html.dark:root footer a {
    color: var(--primary-blue) !important; 
}

html.dark:root #mobileMenu {
    background-color: var(--secondary-grey) !important;
    box-shadow: 0 4px 6px var(--shadow-medium); 
}

html.dark:root #mobileMenu a {
    color: var(--text-dark) !important;
}

html.dark:root #mobileMenu a:hover {
    color: var(--primary-blue) !important;
    background-color: var(--transparent) !important;
}

html.dark:root #header button,
html.dark:root #header svg {
    color: var(--text-dark) !important;
}

html.dark:root #header svg {
    stroke: var(--text-dark) !important;
    fill: var(--text-dark) !important;
}

html.dark:root #header button:hover,
html.dark:root #header svg:hover {
    color: var(--text-dark) !important;
}

html.dark:root #header svg:hover {
    stroke: var(--primary-blue) !important;
    fill: var(--text-dark) !important;
}

html.dark:root #theme-toggle {
    background-color: var(--background-white) !important;
    color: var(--color-gray-200) !important;
}

/*html.dark:root .theme-toggle:hover .theme-toggle-text {
    color: var(--color-secondary-brown) !important; 
}*/

html.dark:root #theme-toggle:hover {
    background-color: var(--primary-blue) !important;
}

html.dark:root #topBanner {
    background-color: var(--secondary-grey-dark) !important;
    color: var(--text-dark) !important;
}

html.dark:root #bannerLink {
    color: var(--text-dark) !important;
}

html.dark:root .mb-8.p-4 {
    background-color: var(--background-light) !important;
    border-color: var(--background-white) !important; 
    /*box-shadow: 0 10px 15px -3px var(--shadow-light) !important;*/
}

html.dark:root #seriesSearch {
    background-color: var(--background-light) !important;
    color: var(--text-dark) !important;
    border-bottom-color: var(--primary-blue-dark) !important; 
}

html.dark:root #seriesSearch::placeholder {
    color: var(--text-dark); 
    opacity: 1;
}

html.dark:root .series-card { 
    background-color: var(--secondary-grey) !important;
    border-top-color: var(--primary-blue-dark) !important;
}

html.dark:root .series-card h3, .series-card p { 
    color: var(--text-dark) !important; 
}

html.dark:root .series-card h3 {
    border-bottom-color: var(--secondary-grey-dark) !important; 
}

html.dark:root .series-card .text-primary-leaf {
    color: var(--primary-blue) !important;
}

html.dark:root .series-card .text-stone-700 {
    color: var(--text-light) !important;
}

html.dark:root .series-card a:hover .group-hover\:text-secondary-brown {
    color: var(--primary-blue) !important;
}

html.dark:root .unpublished-blog-link {
    pointer-events: none;
    cursor: default;
    opacity: 0.7;
}

html.dark:root .unpublished-blog-link .text-primary-leaf {
    color: var(--secondary-grey-dark) !important;
}

html.dark:root .unpublished-blog-link .text-stone-700,
html.dark:root .unpublished-blog-link:hover .group-hover\:text-secondary-brown {
    color: var(--secondary-grey-dark) !important;
}

html.dark:root .unpublished-blog-link div.py-2.px-3:hover {
    background-color: transparent !important;
}

html.dark:root main {
    color: var(--text-light) !important;
}

html.dark:root .mb-8.p-4 header {
    background-color: transparent !important;
    margin-bottom: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

html.dark:root .mb-8.p-4 {
    background-color: var(--background-white) !important;
    border-color: var(--secondary-grey) !important;
    box-shadow: 0 4px 8px var(--shadow-light) !important;
    color: var(--text-dark) !important;
}

html.dark:root .mb-8.p-4 p {
    color: var(--text-dark) !important;
}

html.dark:root .mb-8.p-4 page-header {
    color: var(--text-dark) !important;
}

html.dark:root .mb-8.p-4 a {
    color: var(--primary-blue) !important;
}

html.dark:root .mb-8.p-4 a:hover {
    color: var(--primary-blue-dark) !important;
}

html.dark:root .button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px var(--shadow-light) !important;
    min-width: 200px;
    max-width: 100%;
    border: 2px solid var(--primary-blue) !important;
}

html.dark:root .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
}

html.dark:root .button {
    background-color: var(--background-light) !important;
    color: var(--color-gray-800);
}

html.dark:root .button:hover {
    background-color: var(--background-light) !important;
}

html.dark:root page-header {
    color: var(--text-light) !important;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
    font-size: 2.0rem;
    font-weight: 700;
    text-align: center;
    /*display: block;*/
}

html.dark:root section-header {
    color: var(--text-light) !important;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
    font-size: 1.3rem;
    font-weight: 700;
    display: block;
}

html.dark:root .checkmark-icon {
    color: var(--text-dark);
}

html.dark:root .milestone-alert {
    background-color: #1a4f3d !important;
    color: #4ade80 !important;
    border-color: #4ade80 !important;
}