/* styles.css */

body {
    font-family: Arial, sans-serif;
    background-color: #eef2f3;
    margin: 0;
    padding: 0;
}
body.opendyslexic-font {
    font-family: 'Open-Dyslexic', sans-serif;
}

.container {
    max-width: 800px;
    margin: 50px auto;
    background: #ffffff;
    padding: 30px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.hidden {
    display: none;
}

h1, h2 {
    text-align: center;
    color: #333333;
}

p {
    text-align: center;
    color: #555555;
    font-size: 1.1em;
}

#landing-buttons, #navigation-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

#landing-buttons button, #navigation-buttons button {
    padding: 15px 25px;
    font-size: 1.2em;
    background-color: #007BFF;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

#landing-buttons button:hover,
#navigation-buttons button:hover,
#landing-buttons button:focus,
#navigation-buttons button:focus {
    background-color: #0056b3;
    transform: scale(1.05);
}

#landing-buttons button:disabled,
#navigation-buttons button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

#options {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.option-btn {
    padding: 15px 30px;
    font-size: 1.2em;
    background-color: #007BFF;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    flex: 1;
    max-width: 150px;
}

.option-btn:hover,
.option-btn:focus {
    background-color: #0056b3;
    transform: scale(1.05);
}

.option-btn.selected {
    background-color: #28a745;
}

#navigation-buttons {
    justify-content: space-between;
    margin: 20px 0;
}

#navigation-buttons button:first-child {
    background-color: #6c757d; /* Back button color */
}

#navigation-buttons button:first-child:hover,
#navigation-buttons button:first-child:focus {
    background-color: #5a6268;
}

#navigation-buttons button#save-btn {
    background-color: #17a2b8; /* Save Progress button color */
}

#navigation-buttons button#save-btn:hover,
#navigation-buttons button#save-btn:focus {
    background-color: #138496;
}

#progress-container {
    width: 100%;
    background-color: #ddd;
    border-radius: 20px;
    margin: 20px 0;
    height: 20px;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background-color: #4CAF50;
    border-radius: 20px;
    transition: width 0.3s ease;
}

/* Past Results Styling */
#past-results {
    margin-top: 20px;
}

#results-list li {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dddddd;
}

/* Clear History Button */
#clear-history-btn {
    display: block;
    margin: 20px auto 0 auto;
    padding: 15px 25px;
    font-size: 1.2em;
    background-color: #dc3545; /* Bootstrap Danger Color */
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

#clear-history-btn:hover,
#clear-history-btn:focus {
    background-color: #c82333;
    transform: scale(1.05);
}

#clear-history-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Responsive Enhancements */
@media (max-width: 600px) {
    #options {
        flex-direction: column;
        align-items: center;
    }

    .option-btn {
        width: 80%;
        margin-bottom: 10px;
    }

    #landing-buttons, #navigation-buttons {
        flex-direction: column;
        gap: 10px;
    }

    #navigation-buttons button {
        width: 100%;
    }
}

/* Existing styles remain unchanged */

/* Venn Diagram Tooltip */
.venn-tooltip {
    position: absolute;
    text-align: center;
    width: 120px;
    height: 28px;
    padding: 2px;
    font: 12px sans-serif;
    background: lightsteelblue;
    border: 0px;
    border-radius: 8px;
    pointer-events: none;
}

/* Style for Load Progress Button */
#load-btn {
    background-color: #17a2b8; /* Bootstrap Info Color */
}

#load-btn:hover,
#load-btn:focus {
    background-color: #138496;
}

/* Style for Save Progress Button */
#save-btn {
    background-color: #ffc107; /* Bootstrap Warning Color */
    color: #333333;
}

#save-btn:hover,
#save-btn:focus {
    background-color: #e0a800;
}

/* Adjust Radar Chart and Venn Diagram Responsiveness */
#results-chart {
    max-width: 100%;
    height: auto;
}

#venn-diagram {
    max-width: 100%;
    height: auto;
}

/* Additional Responsive Adjustments */
@media (max-width: 800px) {
    #venn-diagram {
        width: 100%;
        height: auto;
    }
}


/* styles.css */

/* CSS Variables for Theming and Fonts */
:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --button-bg: #007BFF;
    --button-hover-bg: #0056b3;
    --button-text: #ffffff;
    --save-button-bg: #ffc107;
    --save-button-hover-bg: #e0a800;
    --back-button-bg: #6c757d;
    --back-button-hover-bg: #5a6268;
    --clear-button-bg: #dc3545;
    --clear-button-hover-bg: #c82333;
    --progress-bar-color: #4CAF50;
    --selected-button-bg: #28a745;
}

body.dark-mode {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --button-bg: #1f6feb;
    --button-hover-bg: #1558b0;
    --button-text: #ffffff;
    --save-button-bg: #ffb300;
    --save-button-hover-bg: #ffa000;
    --back-button-bg: #5a5a5a;
    --back-button-hover-bg: #4c4c4c;
    --clear-button-bg: #b71c1c;
    --clear-button-hover-bg: #8e0000;
    --progress-bar-color: #81c784;
    --selected-button-bg: #66bb6a;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

header {
    display: flex;
    justify-content: flex-end;
    padding: 10px 20px;
    background-color: var(--bg-color);
    transition: background-color 0.3s ease;
}

.controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Visually Hidden Label for Accessibility */
.visually-hidden { 
    position: absolute; 
    width: 1px; 
    height: 1px; 
    padding: 0; 
    margin: -1px; 
    overflow: hidden; 
    clip: rect(0, 0, 0, 0); 
    white-space: nowrap; 
    border: 0; 
}

/* Font Selection Dropdown */
#font-select {
    padding: 10px;
    font-size: 1em;
    border: 1px solid #cccccc;
    border-radius: 4px;
    cursor: pointer;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

#font-select:focus {
    outline: none;
    border-color: #007BFF;
}

/* Theme Toggle Switch */
.theme-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.theme-switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.theme-switch .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.theme-switch input:checked + .slider {
    background-color: #2196F3;
}

.theme-switch input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

.theme-switch input:checked + .slider:before {
    transform: translateX(26px);
}

/* Landing Page Styles */
#landing-page {
    text-align: center;
    padding: 50px 20px;
}

#landing-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

#landing-buttons button {
    padding: 15px 25px;
    font-size: 1.2em;
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

#landing-buttons button:hover,
#landing-buttons button:focus {
    background-color: var(--button-hover-bg);
    transform: scale(1.05);
}

#landing-buttons button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Questionnaire Styles */
#questionnaire {
    padding: 20px;
}

#question-container {
    max-width: 700px;
    margin: 0 auto;
}

#question-number {
    font-size: 1.5em;
    margin-bottom: 10px;
}

#question-text {
    font-size: 1.3em;
    margin-bottom: 20px;
}

#options {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.option-btn {
    padding: 15px 30px;
    font-size: 1.2em;
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    flex: 1;
    max-width: 150px;
}

.option-btn:hover,
.option-btn:focus {
    background-color: var(--button-hover-bg);
    transform: scale(1.05);
}

.option-btn.selected {
    background-color: var(--selected-button-bg);
}

#navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
}

#navigation-buttons button {
    padding: 10px 20px;
    font-size: 1em;
    background-color: var(--back-button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

#navigation-buttons button:hover,
#navigation-buttons button:focus {
    background-color: var(--back-button-hover-bg);
    transform: scale(1.05);
}

#navigation-buttons button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

#save-btn {
    background-color: var(--save-button-bg);
    color: #333333;
}

#save-btn:hover,
#save-btn:focus {
    background-color: var(--save-button-hover-bg);
}

/* Progress Bar */
#progress-container {
    width: 100%;
    background-color: #ddd;
    border-radius: 20px;
    margin: 20px 0;
    height: 20px;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--progress-bar-color);
    border-radius: 20px;
    transition: width 0.3s ease;
}

/* Results Page Styles */
#results-page {
    padding: 20px;
    text-align: center;
}

#results-chart {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

#venn-diagram {
    max-width: 100%;
    height: auto;
}

#recommendations {
    margin: 30px 0;
    font-size: 1.2em;
    color: var(--text-color);
}

#results-page button {
    padding: 15px 25px;
    font-size: 1.2em;
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    margin: 10px;
}

#results-page button:hover,
#results-page button:focus {
    background-color: var(--button-hover-bg);
    transform: scale(1.05);
}

#clear-history-btn {
    background-color: var(--clear-button-bg);
}

#clear-history-btn:hover,
#clear-history-btn:focus {
    background-color: var(--clear-button-hover-bg);
}

#past-results {
    margin-top: 20px;
}

#results-list li {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dddddd;
}

/* Responsive Enhancements */
@media (max-width: 600px) {
    #options {
        flex-direction: column;
        align-items: center;
    }

    .option-btn {
        width: 80%;
        margin-bottom: 10px;
    }

    #landing-buttons, #navigation-buttons {
        flex-direction: column;
        gap: 10px;
    }

    #navigation-buttons button {
        width: 100%;
    }

    header {
        justify-content: center;
    }

    .controls {
        flex-direction: column;
        gap: 10px;
    }
}
/* styles.css */

/* CSS Variables for Theming and Fonts */
:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --button-bg: #007BFF;
    --button-hover-bg: #0056b3;
    --button-text: #ffffff;
    --save-button-bg: #ffc107;
    --save-button-hover-bg: #e0a800;
    --back-button-bg: #6c757d;
    --back-button-hover-bg: #5a6268;
    --clear-button-bg: #dc3545;
    --clear-button-hover-bg: #c82333;
    --progress-bar-color: #4CAF50;
    --selected-button-bg: #28a745;
}

body.dark-mode {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --button-bg: #1f6feb;
    --button-hover-bg: #1558b0;
    --button-text: #ffffff;
    --save-button-bg: #ffb300;
    --save-button-hover-bg: #ffa000;
    --back-button-bg: #5a5a5a;
    --back-button-hover-bg: #4c4c4c;
    --clear-button-bg: #b71c1c;
    --clear-button-hover-bg: #8e0000;
    --progress-bar-color: #81c784;
    --selected-button-bg: #66bb6a;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease, font-size 0.3s ease;
}

header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 10px 20px;
    background-color: var(--bg-color);
    transition: background-color 0.3s ease;
}

.controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Visually Hidden Label for Accessibility */
.visually-hidden { 
    position: absolute; 
    width: 1px; 
    height: 1px; 
    padding: 0; 
    margin: -1px; 
    overflow: hidden; 
    clip: rect(0, 0, 0, 0); 
    white-space: nowrap; 
    border: 0; 
}

/* Font Selection Dropdown */
#font-select, #font-size-select {
    padding: 10px;
    font-size: 1em;
    border: 1px solid #cccccc;
    border-radius: 4px;
    cursor: pointer;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

#font-select:focus, #font-size-select:focus {
    outline: none;
    border-color: #007BFF;
}

/* Font Size Controls */
.font-size-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Theme Toggle Switch */
.theme-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.theme-switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.theme-switch .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.theme-switch input:checked + .slider {
    background-color: #2196F3;
}

.theme-switch input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

.theme-switch input:checked + .slider:before {
    transform: translateX(26px);
}

/* Landing Page Styles */
#landing-page {
    text-align: center;
    padding: 50px 20px;
}

#landing-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

#landing-buttons button {
    padding: 15px 25px;
    font-size: 1.2em;
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

#landing-buttons button:hover,
#landing-buttons button:focus {
    background-color: var(--button-hover-bg);
    transform: scale(1.05);
}

#landing-buttons button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Questionnaire Styles */
#questionnaire {
    padding: 20px;
}

#question-container {
    max-width: 700px;
    margin: 0 auto;
}

#question-number {
    font-size: 1.5em;
    margin-bottom: 10px;
}

#question-text {
    font-size: 1.3em;
    margin-bottom: 20px;
}

#options {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.option-btn {
    padding: 15px 30px;
    font-size: 1.2em;
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    flex: 1;
    max-width: 150px;
}

.option-btn:hover,
.option-btn:focus {
    background-color: var(--button-hover-bg);
    transform: scale(1.05);
}

.option-btn.selected {
    background-color: var(--selected-button-bg);
}

#navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
}

#navigation-buttons button {
    padding: 10px 20px;
    font-size: 1em;
    background-color: var(--back-button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

#navigation-buttons button:hover,
#navigation-buttons button:focus {
    background-color: var(--back-button-hover-bg);
    transform: scale(1.05);
}

#navigation-buttons button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

#save-btn {
    background-color: var(--save-button-bg);
    color: #333333;
}

#save-btn:hover,
#save-btn:focus {
    background-color: var(--save-button-hover-bg);
}

/* Progress Bar */
#progress-container {
    width: 100%;
    background-color: #ddd;
    border-radius: 20px;
    margin: 20px 0;
    height: 20px;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--progress-bar-color);
    border-radius: 20px;
    transition: width 0.3s ease;
}

/* Results Page Styles */
#results-page {
    padding: 20px;
    text-align: center;
}

#results-chart {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

#venn-diagram {
    max-width: 100%;
    height: auto;
}

#recommendations {
    margin: 30px 0;
    font-size: 1.2em;
    color: var(--text-color);
}

#results-page button {
    padding: 15px 25px;
    font-size: 1.2em;
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    margin: 10px;
}

#results-page button:hover,
#results-page button:focus {
    background-color: var(--button-hover-bg);
    transform: scale(1.05);
}

#clear-history-btn {
    background-color: var(--clear-button-bg);
}

#clear-history-btn:hover,
#clear-history-btn:focus {
    background-color: var(--clear-button-hover-bg);
}

#past-results {
    margin-top: 20px;
}

#results-list li {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dddddd;
}

/* Venn Diagram Tooltip */
.venn-tooltip {
    position: absolute;
    text-align: center;
    width: 120px;
    height: 28px;
    padding: 2px;
    font: 12px sans-serif;
    background: lightsteelblue;
    border: 0px;
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
}

/* Font Size Adjustments */
body {
    font-size: 16px; /* Default Medium */
}

/* Adjust Radar Chart and Venn Diagram Responsiveness */
#results-chart {
    max-width: 100%;
    height: auto;
}

#venn-diagram {
    max-width: 100%;
    height: auto;
}

/* Additional Responsive Adjustments */
@media (max-width: 800px) {
    #venn-diagram {
        width: 100%;
        height: auto;
    }
}

@media (max-width: 600px) {
    #options {
        flex-direction: column;
        align-items: center;
    }

    .option-btn {
        width: 80%;
        margin-bottom: 10px;
    }

    #landing-buttons, #navigation-buttons {
        flex-direction: column;
        gap: 10px;
    }

    #navigation-buttons button {
        width: 100%;
    }

    header {
        justify-content: center;
    }

    .controls {
        flex-direction: column;
        gap: 10px;
    }
}
