* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 0px;
    background: #f5f5f5;
}

#lich_van_nien .card-body {
    padding: 20px;
}

#thang_nam_duong,
#thang_nam_am {
    text-transform: capitalize;
}

.card-header.calendar-header {
    text-transform: uppercase;
    font-size: 24px;
    font-weight: bold;
    padding: 10px 20px;
}

#ngay_duong {
    color: #78b43d;
}

#ngay_am {
    color: #1c763b;
}

#ngay_duong,
#ngay_am {
    font-size: 50px;
    font-weight: bold;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #4a90e2;
    color: white;
}

.calendar-header button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.calendar-header button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.calendar-header h2 {
    font-size: 24px;
    font-weight: 600;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e0e0e0;
    padding: 1px;
}

.weekday {
    background: #f8f9fa;
    padding: 15px;
    text-align: center;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.holiday,
.holiday * {
    color: #e74c3c !important;
    font-weight: bold !important;
}

.weekday.sunday {
    color: #e74c3c;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e0e0e0;
    padding: 1px;
    min-height: 500px;
}

.day-cell {
    background: white;
    padding: 10px;
    min-height: 100px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}

.day-cell:hover {
    background: #f8f9fa;
}

.day-cell.other-month {
    background: #fafafa;
    color: #ccc;
}

.day-cell.today {
    background: #e3f2fd;
}

.day-cell.selected {
    background: #bbdefb;
}

.day-number {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

/*.day-cell.saturday .day-number,*/
.day-cell.sunday .day-number {
    color: #e74c3c;
}

.day-content {
    text-align: center;
    font-size: 12px;
    color: #666;
    position: absolute;
    bottom: 0px;
    left: 0px;
    width: 100%;

}

.day-content div:last-child {
    font-size: 9.5px;
}

.controls {
    display: flex;
    gap: 10px;
}

.right-item a {
    text-decoration: none;
    color: #1c763b;
}

.right-item img {
    width: 100%;
}

.right-item figure {
    padding: 5px;
    border: 1px solid #e0e0e0;
    background: #fff;
}

figcaption {
    padding: 5px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .calendar-header {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .calendar-header h2 {
        font-size: 20px;
        order: -1;
    }

    .controls {
        width: 100%;
        justify-content: space-between;
    }

    .calendar-header>button {
        width: 100%;
    }

    .weekday {
        padding: 10px 5px;
        font-size: 12px;
    }

    .day-cell {
        min-height: 70px;
        padding: 5px;
    }

    .day-number {
        font-size: 12px;
    }

    .day-content {
        font-size: 9px;
    }

    .days-grid {
        min-height: 400px;
    }
}

@media (max-width: 480px) {
    .weekday {
        padding: 8px 2px;
        font-size: 11px;
    }

    .day-cell {
        min-height: 60px;
        padding: 3px;
    }

    .day-number {
        font-size: 11px;
    }

    .day-content div:last-child {
        font-size: 6px;
    }

    .calendar-header button {
        padding: 6px 10px;
        font-size: 14px;
    }

    .days-grid {
        min-height: 350px;
    }
}