body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8fafc;
    color: #1f2937;
}

header {
    background-color: #1e40af;
    color: #ffffff;
    padding: 1rem;
    position: relative;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.hamburger {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    display: none; /* Hidden by default on large screens */
}

.nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 200px;
    background-color: #1e40af;
    flex-direction: column;
    padding: 1rem;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-menu.active {
    display: flex;
}

.nav-menu a {
    color: #ffffff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: block;
}

.nav-menu a:hover {
    background-color: #1e3a8a;
}

main {
    padding: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

section {
    background: #ffffff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

h2 {
    color: #1e40af;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

button {
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-radius: 6px;
    font-size: 1rem;
    margin: 0.5rem 0;
    color: #ffffff;
}

.add-water {
    background-color: #1e40af;
}

.add-water:hover {
    background-color: #1e3a8a;
}

.set-goal {
    background-color: #10b981;
}

.set-goal:hover {
    background-color: #059669;
}

.reset-day {
    background-color: #ef4444;
}

.reset-day:hover {
    background-color: #dc2626;
}

.master-reset {
    background-color: #b91c1c;
}

.master-reset:hover {
    background-color: #991b1b;
}

input[type="number"], select {
    padding: 0.75rem;
    margin: 0.5rem 0;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
}

input[type="number"] {
    width: 100px;
}

.goal-input, .water-input, .convert-form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.input-row, .output-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.convert-form input[type="number"] {
    width: 150px;
}

.convert-result {
    margin: 1rem 0;
    font-weight: 600;
}

.progress-bar {
    background-color: #e5e7eb;
    height: 12px;
    border-radius: 6px;
    position: relative;
    margin: 1rem 0;
}

#progress {
    background-color: #1e40af;
    height: 100%;
    width: 0%;
    border-radius: 6px;
    transition: width 0.3s ease;
}

#progressLabel {
    text-align: center;
    color: #1f2937;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

#status {
    font-weight: 600;
    font-size: 1rem;
}

ul {
    list-style: none;
    padding: 0;
}

li {
    background: #f1f5f9;
    padding: 0.75rem;
    margin: 0.5rem 0;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.delete-btn {
    background: #f97316;
    color: #ffffff;
    border: none;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 4px;
    padding: 0;
}

.delete-btn:hover {
    background: #ea580c;
}

footer {
    background-color: #e5e7eb;
    color: #1f2937;
    padding: 1rem;
    text-align: center;
}

footer p {
    margin: 0.25rem 0;
}

footer a {
    color: #1e40af;
    text-decoration: none;
    margin: 0 0.5rem;
}

footer a:hover {
    text-decoration: underline;
}

.liters {
    color: #1e40af;
}

.ounces {
    color: #f97316;
}

select.liters {
    color: #1e40af;
}

select.ounces {
    color: #f97316;
}

select option.liters {
    color: #1e40af;
}

select option.ounces {
    color: #f97316;
}

.ads-section {
    max-width: 600px;
    margin: 1rem auto;
    text-align: center;
    padding: 1rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ads-section h3 {
    color: #1e40af;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.ads-app {
    min-height: 100px;
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 1rem;
}

.adNotice {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: #f1f5f9;
}

.adNotice a {
    color: #1e40af;
    text-decoration: none;
}

.adNotice a:hover {
    text-decoration: underline;
}

.ads-section small {
    color: #6b7280;
    font-size: 0.75rem;
}

.ads-section small a {
    color: #6b7280;
    text-decoration: none;
}

.ads-section small a:hover {
    text-decoration: underline;
}

.support {
    margin: 1rem 0;
    text-align: center;
}

.btn-support {
    background-color: #10b981;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 1rem;
}

.btn-support:hover {
    background-color: #059669;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #ffffff;
    margin: 15% auto;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 400px;
    position: relative;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #6b7280;
    font-size: 1.5rem;
    cursor: pointer;
}

.close:hover {
    color: #1f2937;
}

@media (max-width: 600px) {
    header h1 {
        font-size: 1.25rem;
    }
    .hamburger {
        display: block; /* Show hamburger on small screens */
    }
    .nav-menu {
        display: none; /* Ensure menu is hidden by default on small screens */
    }
    .nav-menu.active {
        display: flex; /* Show menu when active */
    }
    .goal-input, .water-input, .convert-form {
        flex-direction: column;
        align-items: stretch;
    }
    footer a {
        display: inline;
        margin: 0 0.5rem;
    }
    .ads-app {
        min-height: 50px;
    }
}

@media (min-width: 601px) {
    .nav-menu {
        display: flex;
        position: static;
        width: auto;
        flex-direction: row;
        padding: 0;
        box-shadow: none;
        background-color: transparent;
    }
    .nav-menu a {
        margin: 0 1rem;
    }
    .hamburger {
        display: none; /* Hide hamburger on large screens */
    }
}