/* General Body Styles */
body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    margin: 0;
    padding: 0;
    transition: background-color 0.5s, color 0.5s;
    line-height: 1.8;
    font-size: 18px;
    min-height: 100vh; /* Ensure body fills the viewport */
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(200, 200, 200, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
}

#theme-switcher {
    background: none;
    border: 1px solid;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

/* Main Content */
.main-content {
    padding: 2rem;
    min-height: calc(100vh - 200px); /* Adjust based on header/footer height */
    transition: filter 0.3s;
}

.text-container {
    max-width: 800px;
    margin: 4rem auto;
    text-align: justify;
}

/* Toolbar */
.toolbar {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 1rem 2rem;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(200, 200, 200, 0.2);
    border-radius: 30px; /* Rounded corners */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tool {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toolbar button, .toolbar select {
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s;
    color: #333;
    white-space: nowrap; /* Prevent text wrapping */
}

.toolbar button:hover, .toolbar select:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.theme-dark .toolbar button, .theme-dark .toolbar select {
    background-color: rgba(0, 0, 0, 0.3);
    color: #f1f1f1;
}

.theme-dark .toolbar button:hover, .theme-dark .toolbar select:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Themes */
body.theme-light-green {
    background-color: #C7EDCC;
    color: #333;
}

body.theme-beige {
    background-color: #F5F5DC;
    color: #333;
}

body.theme-light-gray {
    background-color: #EAEAEA;
    color: #333;
}

body.theme-dark {
    background-color: #2c2c2c;
    color: #f1f1f1;
}

/* Reminder Popup */
.reminder-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 2000;
    text-align: center;
}

.reminder-popup.hidden {
    display: none;
}

.reminder-popup h2 {
    margin-top: 0;
}

/* Blue Light Filter Overlay */
.blue-light-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #FFD7A8;
    opacity: 0.3;
    pointer-events: none; /* Allows clicking through the overlay */
    z-index: 9999;
}

/* Breathing Background Animation */
@keyframes breathing {
    0% { background-color: inherit; }
    50% { background-color: rgba(0,0,0,0.05); }
    100% { background-color: inherit; }
}

body.breathing-bg.theme-dark {
    animation: breathing-dark 8s ease-in-out infinite;
}

@keyframes breathing-dark {
    0% { background-color: #2c2c2c; }
    50% { background-color: #3a3a3a; }
    100% { background-color: #2c2c2c; }
}

body.breathing-bg:not(.theme-dark) {
    animation: breathing-light 8s ease-in-out infinite;
}

@keyframes breathing-light {
    0% { background-color: inherit; }
    50% { filter: brightness(95%); }
    100% { background-color: inherit; filter: brightness(100%); }
}

/* Utility */
.hidden {
    display: none;
}
