.calendar-day {
        min-height: 80px;
        cursor: pointer;
        transition: transform 0.2s, box-shadow 0.2s;
        display: flex;
        flex-direction: column;
        align-items: center;
        /* Adjusted justification for when the icon is removed */
        justify-content: space-around;
        padding: 4px;
    }
    .calendar-day:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    .day-number {
        font-size: 1.1rem;
        font-weight: 600;
    }
    /* The .moon-icon style has been completely removed */
    .quality-indicator {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        margin-top: 4px;
    }

.log-indicator {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 0.9rem;
    color: #e6c96b;
}

.log-indicator i {
    display: inline-block;
    animation: fish-pulse 2s ease-in-out infinite;
}

.dark .log-indicator {
    color: #F2F0D8;
}

    .quality-excellent { background-color: #10b981; }
    .quality-good { background-color: #3b82f6; }
    .quality-average { background-color: #f59e0b; }
    .quality-poor { background-color: #ef4444; }
    .quality-text {
        font-size: 0.7rem;
        font-weight: bold;
        opacity: 0;
        transition: opacity 0.2s;
        margin-top: 2px;
    }
    .calendar-day:hover .quality-text {
        opacity: 1;
    }
body.modal-open {
    overflow: hidden;
}

    .modal {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
    background-color: rgba(0, 0, 0, 0.5); /* Added for backdrop */
}

.modal.is-visible {
    opacity: 1;
    visibility: visible;
}

.modal > div { /* This targets the modal content box */
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.modal.is-visible > div {
    opacity: 1;
    transform: scale(1);
    }
    .modal-close-button {
        z-index: 60;
    }
    .moon-phase-info {
        font-size: 0.85rem;
        color: #6b7280;
        margin-top: 0.5rem;
    }
    .bite-time-item {
        display: flex;
        align-items: center;
        margin-bottom: 0.5rem;
    }
    .nav-button {
        transition: all 0.2s ease;
    }
    .nav-button:hover:not(:disabled) {
        transform: scale(1.05);
    }
    .nav-button:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

#calendarDays.fade-in {
    animation: fadeIn 0.15s ease-in-out;
}

#calendarDays.fade-out {
    animation: fadeOut 0.15s ease-in-out;
}

/* Responsive Refinements */
@media (max-width: 768px) {
    h1 {
        font-size: 1.875rem; /* 30px, Tailwind's 3xl */
    }

    #currentMonth {
        font-size: 1.125rem; /* 18px, Tailwind's xl */
    }

    .modal > div {
        max-height: 95vh; /* Ensure modal content doesn't go off-screen */
    }
}

@media (max-width: 480px) {
    .container {
        padding-left: 0.75rem; /* smaller horizontal padding */
        padding-right: 0.75rem;
    }

    #prevMonth, #nextMonth {
        padding: 0.5rem 0.75rem; /* Smaller nav buttons */
        font-size: 0.875rem;
    }

    .calendar-day {
        min-height: 65px; /* Reduce day height slightly */
    }

    h1 {
        font-size: 1.5rem; /* 24px, Tailwind's 2xl */
    }

    .day-number {
        font-size: 1rem;
    }

    /* Adjust modal padding and width on small screens */
    .modal > div {
        margin: 0.5rem;
        max-width: 100%;
    }
}

@keyframes fish-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

#best-performing-insights p {
    margin-bottom: 0.5rem;
}

.modal-content-covered {
    pointer-events: none;
    /* This prevents the underlying modal from shifting or its animations from interfering */
    transition: none !important;
    transform: scale(1) !important;
    opacity: 1 !important;
}

/* Custom button colors */
.bg-main-500 {
    background-color: #0AA689;
}
.bg-main-500:hover {
    background-color: #089479;
}
.current-day-highlight {
    box-shadow: 0 0 0 2px #0AA689;
}
