.modern-calendar {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.current-month {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.nav-btn {
    background: #f5f5f7;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #1a1a1a;
    font-size: 1.2rem;
}

.nav-btn:hover {
    background: #e8e8e8;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.weekday {
    text-align: center;
    font-weight: 500;
    color: #666;
    padding: 8px;
    font-size: 0.9rem;
}

.days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.day {
    aspect-ratio: 1;
    background: #f5f5f7;
    border-radius: 8px;
    padding: 8px;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    min-height: 120px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.day:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.day.empty {
    background: transparent;
}

.day-number {
    font-size: 0.9rem;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.day.has-events {
    background: #fff;
    border: 1px solid #e8e8e8;
}

.events-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    max-height: calc(100% - 30px);
}

.event {
    background: #e8f4ff;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.event:hover {
    background: #d1e9ff;
}

.airline-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.event-title {
    color: #0066cc;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

/* Custom scrollbar for events container */
.events-container::-webkit-scrollbar {
    width: 4px;
}

.events-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.events-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.events-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .modern-calendar {
        padding: 16px;
    }

    .calendar-header {
        flex-wrap: wrap;
        gap: 12px;
    }

    .current-month {
        font-size: 1.2rem;
        order: 1;
    }

    .nav-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .weekday {
        font-size: 0.8rem;
        padding: 4px;
    }

    .day {
        min-height: 80px;
        padding: 4px;
    }

    .day-number {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }

    .event {
        padding: 4px 6px;
        font-size: 0.75rem;
    }

    .airline-logo {
        width: 16px;
        height: 16px;
    }

    .days {
        gap: 4px;
    }

    .weekdays {
        gap: 4px;
    }
}

/* Ensure consistent day sizes regardless of content */
@supports (aspect-ratio: 1) {
    .day {
        aspect-ratio: 1;
        height: auto;
    }
}

@supports not (aspect-ratio: 1) {
    .day {
        height: 0;
        padding-bottom: 100%;
    }
    
    .day > * {
        position: absolute;
        top: 8px;
        left: 8px;
        right: 8px;
        bottom: 8px;
    }
}