
/* --- General & Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    transition: background-color 0.3s ease, color 0.3s ease;
    padding-bottom: 60px; /* Add padding for the footer */
}

/* --- Header & Navigation --- */
.main-header {
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4a90e2;
}

.main-nav {
    display: flex;
    gap: 15px; /* Adjusted gap */
}

.nav-link {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    padding: 10px;
    border-bottom: 3px solid transparent;
    transition: color 0.3s ease, border-bottom 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: #4a90e2;
    border-bottom: 3px solid #4a90e2;
}

#toggle-dark-mode {
    background-color: #f0f2f5;
    color: #333;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* --- Page Content --- */
.page-content {
    padding-top: 100px; /* Add padding to push content below the fixed header */
    display: none; /* Hide pages by default */
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

.page-content.active {
    display: flex; /* Show active page */
}

/* --- Containers --- */
.container {
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 100%;
    max-width: 500px;
    margin-bottom: 20px;
}

.welcome-container {
    max-width: 700px;
}

.welcome-container h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.welcome-container > p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 40px;
}

.feature-description {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: left;
}

.feature-description h3 {
    margin-bottom: 10px;
    color: #4a90e2;
}

.text-container {
    max-width: 800px;
    text-align: left;
}

.text-container h1, .text-container h3 {
    margin-bottom: 15px;
}
.text-container p, .text-container li {
    margin-bottom: 15px;
    line-height: 1.7;
}

/* --- Lotto & Dinner Specific Styles --- */
h1, h2, h3 {
    color: #333;
    font-weight: 700;
    margin-bottom: 30px;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; margin-top: 20px; }

.numbers {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #4a90e2;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 600;
}

#dinner-recommendation-display {
    background-color: #e9ecef;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    min-height: 50px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.dinner-container hr {
    border: none;
    height: 1px;
    background-color: #ddd;
    margin: 40px 0;
}

/* --- Forms --- */
#contact-form, #dinner-recommendation-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

#contact-form label, #dinner-recommendation-form label {
    font-size: 1rem;
    color: #555;
    margin-bottom: -5px; /* Adjust spacing */
}

#contact-form input, #contact-form textarea,
#dinner-recommendation-form input, #dinner-recommendation-form textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
    background-color: #f8f8f8;
    color: #333;
}

/* --- Buttons --- */
button {
    cursor: pointer;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    padding: 12px 24px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#generate, #get-dinner-recommendation, #upload-button {
    background-color: #4a90e2;
    color: #fff;
    margin-top: 10px;
}
#generate:hover, #get-dinner-recommendation:hover, #upload-button:hover {
    background-color: #357abd;
}

#contact-form button, #dinner-recommendation-form button {
    background-color: #28a745;
    color: #fff;
    margin-top: 10px;
}
#contact-form button:hover, #dinner-recommendation-form button:hover {
    background-color: #218838;
}

/* --- Form Status --- */
#form-status, #dinner-form-status {
    margin-top: 15px;
    font-weight: bold;
}

/* --- Animal Face Test Styles --- */
#image-preview-container {
    margin: 20px auto;
    width: 250px;
    height: 250px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f8f8;
}

#image-preview {
    max-width: 100%;
    max-height: 100%;
    display: none; /* Hidden until an image is uploaded */
}

#label-container {
    margin-top: 20px;
    font-size: 1.2rem;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* --- Footer --- */
.main-footer-bottom {
    background-color: #e9ecef;
    padding: 15px 20px;
    text-align: center;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.05);
}

.footer-link {
    text-decoration: none;
    color: #555;
    margin: 0 15px;
    font-weight: 500;
}
.footer-link:hover {
    color: #4a90e2;
}

/* --- Dark Mode --- */
body.dark-mode {
    background-color: #121212;
    color: #eee;
}
body.dark-mode .main-header { background-color: #1e1e1e; }
body.dark-mode .container { background-color: #1e1e1e; }
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3 { color: #eee; }
body.dark-mode .nav-link { color: #ccc; }
body.dark-mode .nav-link:hover, body.dark-mode .nav-link.active {
    color: #bb86fc;
    border-bottom-color: #bb86fc;
}
body.dark-mode #toggle-dark-mode {
    background-color: #333;
    color: #eee;
    border-color: #555;
}
body.dark-mode #dinner-recommendation-display { background-color: #333; color: #eee; }
body.dark-mode .dinner-container hr { background-color: #444; }
body.dark-mode input, body.dark-mode textarea {
    background-color: #333 !important;
    border-color: #555 !important;
    color: #eee !important;
}
body.dark-mode #generate, body.dark-mode #get-dinner-recommendation, body.dark-mode #upload-button {
    background-color: #bb86fc;
}
body.dark-mode #contact-form button, body.dark-mode #dinner-recommendation-form button {
    background-color: #03dac6;
    color: #121212;
}
body.dark-mode #image-preview-container { background-color: #333; border-color: #555; }
body.dark-mode .feature-description { background-color: #2c2c2c; }
body.dark-mode .feature-description h3 { color: #bb86fc; }
body.dark-mode .main-footer-bottom { background-color: #1e1e1e; box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.2); }
body.dark-mode .footer-link { color: #ccc; }
body.dark-mode .footer-link:hover { color: #bb86fc; }

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }
    .main-nav { margin: 10px 0; }
    .page-content { padding-top: 150px; }
    .container { padding: 20px; }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }
    .number {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}
