body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background: #f8f9fa; 
    font-family: 'Arial', sans-serif; 
    color: #343a40; 
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
    width: 100%; 
}

/* Dark Mode Styles */
body.dark-mode {
    background: #343a40; 
    color: #f8f9fa; 
}

/* Spiritual Background */
.spiritual-background {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cdefs%3E%3Cpattern id='spiritualPattern' width='20' height='20' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='10' cy='10' r='8' fill='rgba(156, 39, 176, 0.1)' /%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23spiritualPattern)' /%3E%3C/svg%3E");
    opacity: 0.4;
    animation: subtlePulse 20s linear infinite;
    top: 0;
    left: 0;
    pointer-events: none;
}

@keyframes subtlePulse {
    0% {
        opacity: 0.2;
        background-position: 0 0;
    }
    50% {
        opacity: 0.4;
        background-position: 10% 10%;
    }
    100% {
        opacity: 0.2;
        background-position: 0 0;
    }
}

.container {
    text-align: center;
    z-index: 2;
    margin-top: 30px;
    width: 90%;
    max-width: 1200px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.9); 
    border-radius: 12px; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); 
}

body.dark-mode .container {
    background: rgba(52, 58, 64, 0.9); 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

h1 {
    color: #343a40; 
    margin-bottom: 20px;
    font-size: 2.5em; 
    font-weight: 600; 
}

body.dark-mode h1 {
    color: #f8f9fa; 
}

button {
    padding: 12px 24px;
    background-color: #007bff; 
    color: white;
    border: none;
    border-radius: 24px; 
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    margin-bottom: 15px;
}

button:hover {
    background-color: #0056b3; 
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.generated-image {
    margin-top: 20px;
    border-radius: 10px; 
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); 
    max-width: 220px; 
    max-height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}

.generated-image:hover {
    transform: scale(1.05); 
}

/* Zone Styles (Unified) */
.zone {
    max-width: 85%;
    margin: 25px auto; 
    padding: 20px; 
    border-radius: 12px; 
    background: rgba(255, 255, 255, 0.9); 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); 
    backdrop-filter: blur(5px); 
    text-align: center;
    transition: background-color 0.3s, box-shadow 0.3s;
}

body.dark-mode .zone {
    background: rgba(52, 58, 64, 0.9); 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.zone h2 {
    color: #343a40; 
    text-align: center;
    margin-bottom: 15px; 
    font-size: 1.8em; 
    font-weight: 500; 
}

body.dark-mode .zone h2 {
    color: #f8f9fa;
}

/* Feature Zone Button Styles */
.feature-zone button {
    padding: 10px 20px;
    background-color: #007bff; 
    color: white;
    border: none;
    border-radius: 20px; 
    font-size: 15px;
    cursor: pointer;
    margin: 8px; 
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.feature-zone button:hover {
    background-color: #0056b3; 
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Language Dropdown and Dark Mode Toggle (Unified Style) */
#languageSelect, #darkModeToggle {
    position: absolute;
    top: 10px;
    padding: 8px 12px; 
    border-radius: 6px; 
    background-color: rgba(255, 255, 255, 0.7); 
    border: 1px solid #ced4da; 
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

body.dark-mode #languageSelect, body.dark-mode #darkModeToggle {
    background-color: rgba(52, 58, 64, 0.7); 
    color: #f8f9fa;
    border-color: #adb5bd;
}

#languageSelect:hover, #darkModeToggle:hover {
    background-color: rgba(230, 230, 230, 0.9);
}

#darkModeToggle {
    left: 10px;
}

#languageSelect {
    right: 10px;
}

/* Specific Styles for Lexicon */
#commandLine {
    padding: 10px 16px; 
    border: 1.5px solid #ced4da; 
    border-radius: 24px; 
    width: 60%;
    margin: 15px auto; 
    font-size: 15px; 
    text-align: center;
    background-color: rgba(255, 255, 255, 0.8); 
    transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}

body.dark-mode #commandLine {
    background-color: rgba(52, 58, 64, 0.8); 
    color: #f8f9fa;
    border-color: #adb5bd;
}

#commandLine:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.lexicon-image {
    margin-top: 15px; 
    border-radius: 10px; 
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); 
    max-width: 180px; 
    max-height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}

.lexicon-image:hover {
    transform: scale(1.05); 
}

.lexicon-zone {
    margin: 15px auto; 
    max-width: 80%;
    border-radius: 12px; 
    padding: 18px; 
    background: rgba(255, 255, 255, 0.9); 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); 
    backdrop-filter: blur(5px); 
    text-align: left;
    transition: background-color 0.3s, box-shadow 0.3s;
}

body.dark-mode .lexicon-zone {
    background: rgba(52, 58, 64, 0.9); 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lexicon-zone h3 {
    color: #343a40; 
    text-align: left;
    margin-bottom: 10px; 
    font-size: 1.4em; 
    font-weight: 500; 
}

body.dark-mode .lexicon-zone h3 {
    color: #f8f9fa;
}

#explanation {
    margin-top: 15px; 
    color: #555;
    text-align: left;
    padding: 12px; 
    border: 1px solid rgba(108, 117, 123, 0.3); 
    border-radius: 8px; 
    background-color: rgba(255, 255, 255, 0.4); 
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); 
    overflow-wrap: break-word;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode #explanation {
    background-color: rgba(52, 58, 64, 0.4); 
    color: #ced4da;
    border-color: #adb5bd;
}

/* Collapsible styles */
.collapsible {
    width: 100%;
    margin-bottom: 15px;
}

.collapsible-button {
    background-color: #007bff;
    color: white;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    transition: 0.4s;
    border-radius: 12px;
}

.collapsible-button:hover {
    background-color: #0056b3;
}

.collapsible-content {
    padding: 0 18px;
    background-color: #f8f9fa;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    border-radius: 0 0 12px 12px;
    text-align: left;
}

body.dark-mode .collapsible-content {
    background-color: #343a40;
    color: #f8f9fa;
}

#dialogueContainer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow: auto;
}

#dialogueWindow {
    width: 80%;
    max-width: 800px;
    margin: 50px auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#dialogueHistory {
    height: 300px;
    overflow-y: scroll;
    border: 1px solid #ccc;
    padding: 10px;
    margin-bottom: 10px;
}

#dialogueInput {
    width: 70%;
    padding: 8px;
    margin-right: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#sendButton, #closeButton {
    padding: 8px 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.dialogue-message {
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 4px;
    background-color: #f0f0f0;
}

.dialogue-message.user {
    background-color: #e0f7fa;
    text-align: right;
}

/* Interactive World Religion Map */
#interactiveMap .map-container {
    width: 100%; /* Set width to 100% of its parent */
    padding: 0;    /* Remove any default padding */
    margin: 0;     /* Remove any default margin */
}

#interactiveMap iframe {
    width: 100%;   /* Make the iframe fill the container */
    height: 500px; /* Set a reasonable height */
    border: none;   /* Remove the border */
}

/* Quiz Section Enhancements */
#quizSection {
    position: relative; /* For positioning the score banner */
}

#quizContainer {
    margin-top: 20px;
}

.quiz-button-container {
    margin-bottom: 15px;
}

#speechBubble {
    background-color: #e0f7fa;
    border-radius: 20px;
    padding: 15px;
    margin-bottom: 20px;
    font-family: 'Arial', sans-serif;
    font-size: 1.2em;
    position: relative;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Speech bubble arrow */
#speechBubble:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 0;
    border: 20px solid transparent;
    border-top-color: #e0f7fa;
    border-bottom: 0;
    border-left: 0;
    margin-left: -20px;
    margin-bottom: -20px;
}

#quizOptions {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center buttons horizontally */
}

#quizOptions button {
    margin: 8px 0; /* Add vertical spacing between buttons */
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 25px;
    border: none;
    background-color: #00bcd4;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    width: 70%; /* Set a maximum width for each button */
    text-align: center; /* Ensure text is centered */
}

#quizOptions button:hover {
    background-color: #0097a7;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

#nextQuestion {
    padding: 12px 24px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

#nextQuestion:hover {
    background-color: #388e3c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

#quizResult {
    margin-top: 15px;
    font-size: 1.1em;
    color: #555;
    text-align: center;
}

#scoreBanner {
    position: absolute;
    top: 0;
    right: 0;
    background-color: rgba(255, 193, 7, 0.8); /* Amber color for the banner */
    color: #333;
    padding: 10px 20px;
    border-radius: 0 0 0 15px; /* Rounded bottom-left corner */
    font-size: 1.1em;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#meditationControls {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

#meditationControls button {
    margin: 0 5px;
    padding: 8px 16px;
}

#meditationPlaylist {
    text-align: center;
    margin-bottom: 10px;
}

#meditationPlaylist button {
    display: block;
    margin: 5px auto;
    padding: 8px 16px;
    border-radius: 20px;
}

#meditationPlayer {
    width: 100%;
}

#meditations a {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 20px;
    transition: background-color 0.3s;
}

#meditations a:hover {
    background-color: #0056b3;
}