:root {
    --primary-color: #4CAF50;
    --light-gray: #f4f4f4;
    --dark-gray: #333;
    --border-color: #ddd;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--light-gray);
    color: var(--dark-gray);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.app-container {
    width: 100%;
    max-width: 500px;
    background: #fff;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    margin: 1rem;
    overflow: hidden;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: center;
}

.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f9f9f9;
}

.calendar-controls button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
}

.calendar-controls h2 {
    margin: 0;
    font-size: 1.2rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 1rem;
}

.calendar-day, .calendar-header {
    text-align: center;
    padding: 0.5rem 0;
}

.calendar-header {
    font-weight: bold;
}

.calendar-day {
    background: #e9e9e9;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 50px;
}

.calendar-day.empty {
    background: transparent;
    cursor: default;
}

.calendar-day.today .date-num {
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    line-height: 28px;
}

.calendar-day:not(.empty):hover {
    background-color: #dcdcdc;
}

.entry-quantity {
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: bold;
    margin-top: 4px;
}

.monthly-summary {
    display: flex;
    justify-content: space-around;
    text-align: center;
    padding: 1rem;
    background: #f9f9f9;
    border-top: 1px solid var(--border-color);
}

.summary-item h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    font-weight: normal;
    color: #666;
}

.summary-item p {
    margin: 0;
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--dark-gray);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    border-radius: 8px;
    text-align: center;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#milk-entry-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

#milk-entry-form input[type="number"] {
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

#milk-entry-form button {
    padding: 0.75rem;
    font-size: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
