body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 40px 20px;
    transition: background-color 1s ease;
    background-color: var(--bg-color);
    color: var(--text-color);
    text-align: center;
    box-sizing: border-box;
    overflow-x: hidden; /* Prevent horizontal scroll on body */
}
.moon-graphic {
    font-size: 4rem;
    margin-bottom: 1rem;
}
.content {
    width: 100%;
    max-width: 600px;
    margin-bottom: 40px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
h1 { 
    font-family: var(--font-family), cursive; 
    font-size: clamp(2.5rem, 12vw, 4rem); 
    margin: 0.5rem 0;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    line-height: 1.1;
}
h3 { font-family: sans-serif; text-transform: uppercase; letter-spacing: 2px; opacity: 0.7; font-weight: normal; margin-top: 0; font-size: 0.8rem; }
.wotd-def { font-family: serif; font-style: italic; font-size: 1.3rem; opacity: 0.9; line-height: 1.4; max-width: 100%; }
.quote-container { margin: 30px 0; padding: 20px; border-left: 3px solid rgba(255,255,255,0.2); text-align: left; max-width: 90%; align-self: center; box-sizing: border-box; }
.quote-text { font-family: var(--font-family), cursive; font-size: 1.8rem; line-height: 1.3; opacity: 0.8; overflow-wrap: break-word; }
.quote-author { font-family: sans-serif; font-size: 0.9rem; margin-top: 10px; opacity: 0.6; text-transform: uppercase; letter-spacing: 1px; }
.history-list { text-align: left; list-style-type: none; padding: 0; margin-top: 20px; width: 100%; }
.history-item { margin-bottom: 15px; font-family: serif; font-size: 1.1rem; line-height: 1.4; opacity: 0.9; overflow-wrap: break-word; }
.history-year { font-weight: bold; color: var(--text-color); opacity: 0.7; margin-right: 10px; font-family: sans-serif; font-size: 0.9rem; }
.photo-container { margin: 20px 0; width: 100%; }
.photo-of-the-day { width: 100%; max-width: 500px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); height: auto; }
.photo-attribution { font-size: 0.7rem; opacity: 0.6; margin-top: 5px; font-family: sans-serif; }
.photo-attribution a { color: inherit; text-decoration: underline; }
.trivia-container { background: rgba(255, 255, 255, 0.05); padding: 25px; border-radius: 15px; margin: 30px 0; border: 1px solid rgba(255, 255, 255, 0.1); text-align: left; max-width: 100%; box-sizing: border-box; }
.trivia-question { font-family: serif; font-size: 1.3rem; line-height: 1.4; margin-bottom: 20px; overflow-wrap: break-word; }
.trivia-option { display: block; width: 100%; padding: 12px 15px; margin-bottom: 10px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 8px; color: inherit; cursor: pointer; text-align: left; transition: all 0.2s; font-family: sans-serif; font-size: 1rem; box-sizing: border-box; overflow-wrap: break-word; }
.trivia-option:hover { background: rgba(255, 255, 255, 0.2); }
.trivia-option.correct { background: #2e7d32 !important; color: white; border-color: #1b5e20; }
.trivia-option.incorrect { background: #c62828 !important; color: white; border-color: #b71c1c; }
.trivia-feedback { margin-top: 15px; font-weight: bold; text-align: center; height: auto; min-height: 1.5rem; }
.message { font-size: 1.2rem; opacity: 0.7; font-style: italic; margin-top: 40px; padding: 0 20px; }

.divider {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(255,255,255,0), currentColor, rgba(255,255,255,0));
    width: 80%;
    margin: 40px 0;
    opacity: 0.3;
}

.curlicue-divider {
    font-size: 1.2rem;
    opacity: 0.2;
    margin: -10px 0; /* Tighten up the 35px gap from the container */
    text-align: center;
    width: 100%;
    font-family: serif;
    pointer-events: none;
    user-select: none;
}

/* Holiday and Country Styles */
.holiday-banner {
    font-family: var(--font-family), cursive; /* Using the daily font */
    font-size: clamp(1.2rem, 5vw, 1.8rem); 
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 25px;
    border-radius: 30px;
    display: inline-block;
    margin-bottom: 15px;
    max-width: 90%;
    overflow-wrap: break-word;
}

/* Calendar Styles */
.cal-container { 
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px; 
    border-radius: 12px; 
    backdrop-filter: blur(5px);
    width: 320px; 
    max-width: 100%;
    box-sizing: border-box;
}
.cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.cal-header button { 
    cursor: pointer; padding: 5px 10px; 
    border: 1px solid rgba(255, 255, 255, 0.3); 
    background: rgba(255, 255, 255, 0.1); 
    color: inherit;
    border-radius: 4px; 
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; text-align: center; }
.day-name { font-weight: bold; font-size: 0.7rem; opacity: 0.6; margin-bottom: 5px; text-transform: uppercase; }
.day { 
    padding: 10px 0; border: 1px solid transparent; cursor: pointer; border-radius: 4px; 
    transition: all 0.2s; font-size: 0.9rem; font-family: sans-serif;
}
.day:hover { background-color: rgba(255, 255, 255, 0.2); }
.day.highlight { font-weight: bold; text-decoration: underline; }
.day.selected { background-color: rgba(255, 255, 255, 0.3); border-color: currentColor; }
.today-btn { 
    margin-top: 20px; padding: 10px; cursor: pointer; 
    background: var(--text-color); color: var(--bg-color); 
    border: none; border-radius: 4px; width: 100%; font-weight: bold;
    text-transform: uppercase; letter-spacing: 1px;
}
.footer {
    margin-top: 30px;
    font-family: sans-serif;
    font-size: 0.7rem;
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.creature-image {
    width: 100%;
    max-width: 400px;
    border-radius: 15px;
    margin: 20px auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 4px solid rgba(255, 255, 255, 0.1);
    height: auto;
}
/* Fortune Cookie Styles */
.fortune-icon {
    font-size: 3rem;
    margin-top: 30px;
    margin-bottom: 20px; /* Added space between cookie and slip */
    z-index: 2;
    position: relative;
}
.fortune-slip {
    background-color: #fffae6; /* Faded paper look */
    color: #222; /* High contrast against the paper */
    padding: 20px 30px;
    border: 1px dashed #c4b5a3;
    border-radius: 4px;
    font-family: monospace;
    width: 90%;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: 2px 4px 10px rgba(0,0,0,0.2);
    box-sizing: border-box;
}
.fortune-text {
    font-size: 1.1rem;
    margin-bottom: 15px;
    overflow-wrap: break-word;
}
.lucky-numbers {
    font-weight: bold;
    color: #b71c1c; /* Classic red ink for lotto numbers */
    letter-spacing: 2px;
    overflow-wrap: break-word;
}
.fine-print {
    font-family: sans-serif;
    font-size: 0.6rem;
    opacity: 0.4;
    margin-top: 10px;
    line-height: 1.2;
}

/* Articles of the Day Styles */
.articles-container {
    display: flex;
    flex-direction: column;
    gap: 35px;
    margin: 30px 0;
    text-align: left;
    width: 100%;
}
.article-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s, background 0.2s;
    box-sizing: border-box;
}
.article-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}
.article-source {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.5;
    margin-bottom: 8px;
    font-family: sans-serif;
}
.article-title {
    margin: 0 0 10px 0;
    font-family: serif;
    font-size: 1.4rem;
    line-height: 1.3;
    overflow-wrap: break-word;
}
.article-title a {
    color: inherit;
    text-decoration: none;
}
.article-title a:hover {
    text-decoration: underline;
}
.article-summary {
    font-size: 1rem;
    opacity: 0.8;
    line-height: 1.4;
    margin: 0;
    font-family: sans-serif;
    overflow-wrap: break-word;
}

@media (max-width: 480px) {
    body {
        padding: 20px 15px;
    }
    .moon-graphic {
        font-size: 3rem;
    }
}
