.calendar-container {
    text-align: center;
    margin: 20px auto;
    max-width: 587px;
}
.calendar-block {

}
.calendar-block h1 {
    margin: 15px 0 50px;
    text-align: center;
}
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.calendar-controls button {
    padding: 5px 10px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.calendar-controls button:hover {
    background-color: #0056b3;
}

.month-title {
    font-size: 1.5em;
}

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

.day {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    height: 60px;
    width: 80px;
    box-sizing: border-box;
}

.day:hover {
    background-color: #f0f0f0;
}

.event {
    background-color: #a56ad4;
    color: #fff;
}
.home {
    background-color: #00a2ff;
}
.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: bold;
    margin-bottom: 5px;
}

.weekdays div {
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 80px;
    background-color: #eee;
}

#event-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    z-index: 1000;
    width: 320px;
}

#event-popup button {
    padding: 8px 15px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 7px;
    cursor: pointer;
}

#event-popup button:hover {
    background-color: #0056b3;
}

#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
    z-index: 1001;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.border-block {
    display: block;
}

.current-day {
    position: relative;
}

.current-day::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: red;
    display: block;
}