body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column; /* Stack children vertically */
    justify-content: flex-start; /* Align items to the top */
    align-items: center; /* Center children horizontally */
    min-height: 100vh;
    margin: 0;
    padding-top: 50px; /* Space for fixed toggles */
    background-color: #f4f4f4;
    color: #333;
}

#mbti-test-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 90%;
    max-width: 600px;
}

h1 {
    color: #0056b3;
    margin-bottom: 20px;
}

p {
    font-size: 1.1em;
    line-height: 1.6;
}

.question-card {
    margin-bottom: 20px;
}

.question-card p {
    font-size: 1.2em;
    margin-bottom: 15px;
    font-weight: bold;
}

button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 20px;
    margin: 8px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
    width: calc(50% - 16px); /* Two buttons per line with margin */
    box-sizing: border-box;
}

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

#next-question-btn,
#submit-test-btn,
#restart-test-btn {
    width: auto; /* Reset width for these specific buttons */
    margin-top: 20px;
    padding: 15px 30px;
    font-size: 1.1em;
}

#results-container h2 {
    color: #28a745;
    margin-bottom: 10px;
}

#mbti-result {
    font-size: 2em;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 15px;
}

#mbti-description {
    font-size: 1.1em;
    color: #555;
}

/* Theme Toggle Button */
#theme-toggle {
    position: fixed;
    top: 5px;
    right: 5px;
    padding: 3px 2px; /* Changed from 3px 6px */
    font-size: 0.7em;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1000;
}

#lang-toggle {
    position: fixed;
    top: 5px;
    right: 60px;
    padding: 3px 2px; /* Changed from 3px 6px */
    font-size: 0.7em;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1000;
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode #mbti-test-container {
    background-color: #1e1e1e;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

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

body.dark-mode button {
    background-color: #bb86fc;
    color: #121212;
}

body.dark-mode button:hover {
    background-color: #9f6de6;
}

body.dark-mode #results-container h2 {
    color: #03dac6;
}

body.dark-mode #mbti-result {
    color: #bb86fc;
}

body.dark-mode #mbti-description {
    color: #bdbdbd;
}

body.dark-mode #theme-toggle {
    background-color: #e0e0e0;
    color: #121212;
}

/* Animations */
@keyframes fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes impactful-show {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.fade-out {
    animation: fade-out 0.5s forwards;
}

.fade-in {
    animation: fade-in 0.5s forwards;
}

#test-complete-message {
    font-size: 1.5em;
    color: #28a745;
    margin-bottom: 20px;
}

#mbti-result.impactful {
    animation: impactful-show 1s forwards;
}

#contact-form-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 90%;
    max-width: 600px;
    margin-top: 40px; /* Space from the MBTI test */
    margin-bottom: 40px;
}

#contact-form-container h2 {
    color: #007bff;
    margin-bottom: 20px;
}

#contact-form label {
    display: block;
    text-align: left;
    margin-bottom: 5px;
    font-weight: bold;
}

#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form textarea {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

#contact-form textarea {
    resize: vertical; /* Allow vertical resizing */
}

#contact-form button[type="submit"] {
    background-color: #28a745;
    width: auto;
    padding: 12px 25px;
    font-size: 1.1em;
}

#contact-form button[type="submit"]:hover {
    background-color: #218838;
}

#form-status {
    margin-top: 15px;
    font-weight: bold;
}

/* Dark mode for contact form */
body.dark-mode #contact-form-container {
    background-color: #1e1e1e;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

body.dark-mode #contact-form-container h2 {
    color: #03dac6;
}

body.dark-mode #contact-form input[type="text"],
body.dark-mode #contact-form input[type="email"],
body.dark-mode #contact-form textarea {
    background-color: #333;
    border-color: #555;
    color: #e0e0e0;
}
