:root {
    --font-family: Arial, sans-serif;
    --background-color: #ffffff;
    --text-color: #000;
    --button-bg-color: #D3D3D3;
    --button-hover-bg-color: #ccc;
    --button-border-radius: 5px;
    --modal-bg-color: #ffffff;
    --modal-border-radius: 8px;
    --modal-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
    --calendar-cell-bg-color: #fff;
    --calendar-cell-hover-bg-color: #D3D3D3;
    --calendar-cell-today-bg-color: #D3D3D3;
    --day-name-bg-color: #fff;
    --day-name-hover-bg-color: #2A2D30;
    --calendar-grid-gap: 10px;
    --calendar-font-size: 1.8vw;
    --header-font-size: 2vw;
    --close-button-color: #aaa;
    --close-button-hover-color: red;
    --delete-button-bg-color: #fff;
    --delete-button-hover-bg-color: #D3D3D3;
}

[data-theme="dark"] {
    --background-color: #121212;
    --text-color: #fff;
    --button-bg-color: #333;
    --button-hover-bg-color: #555;
    --button-border-radius: 5px;
    --modal-bg-color: #333;
    --modal-border-radius: 8px;
    --modal-shadow: 0 4px 6px rgba(0, 0, 0, 0.6);
    --calendar-cell-bg-color: #444;
    --calendar-cell-hover-bg-color: #555;
    --calendar-cell-today-bg-color: #555;
    --day-name-bg-color: #444;
    --day-name-hover-bg-color: #555;
    --calendar-grid-gap: 12px;
    --calendar-font-size: 1.8vw;
    --header-font-size: 2vw;
    --close-button-color: #ddd;
    --close-button-hover-color: red;
    --delete-button-bg-color: #444;
    --delete-button-hover-bg-color: #555;
}

#calendar {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#calendar-controls, .calendar-button {
    display: flex;
    color: var(--text-color);
    padding: 10px 20px;
    border: none;
    border-radius: var(--button-border-radius);
    transition: background-color 0.3s;
}

#month-header {
    margin: 0;
    font-size: var(--header-font-size);
    text-align: center;
    flex: 1;
}

#month-header:hover {
    cursor: default;
}

.calendar-button {
    padding: 10px 15px;
    font-size: 14px;
    border: none;
    border-radius: var(--button-border-radius);
    cursor: pointer;
    box-sizing: border-box;
    transition: box-shadow 0.3s;
    background-color: var(--button-bg-color);
}

.calendar-button:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--calendar-grid-gap);
    margin-top: 10px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.calendar-cell {
    background-color: var(--calendar-cell-bg-color);
    color: var(--text-color);
    padding: 1vw 2vw;
    text-align: center;
    border-radius: 5px;
    font-size: var(--calendar-font-size);
    transition: background-color 0.3s;
}

.calendar-cell:hover {
    background-color: var(--calendar-cell-hover-bg-color);
    cursor: pointer;
}

.day-name {
    background-color: var(--day-name-bg-color);
    color: var(--text-color);
    font-weight: bold;
    padding: 0.7vw;
}

.day-name:hover {
    cursor: default;
	background-color: var(--day-name-bg-color)
}

.empty {
    background-color: transparent;
}

.calendar-cell.today {
    background-color: var(--calendar-cell-today-bg-color);
    padding: 1vw;
    text-align: center;
    border-radius: 5px;
    font-size: var(--calendar-font-size);
    transition: background-color 0.3s;
}

.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 {
    max-width: 600px;
    margin: auto;
    padding: 20px;
    background-color: var(--modal-bg-color);
    border-radius: var(--modal-border-radius);
    box-shadow: var(--modal-shadow);
    color: var(--text-color);
    font-family: var(--font-family);
}

.close-button {
    color: var(--close-button-color);
    float: right;
    font-size: 28px;
    font-weight: bold;
    transition: color 0.3s;
}

.close-button:hover,
.close-button:focus {
    color: var(--close-button-hover-color);
    text-decoration: none;
    cursor: pointer;
}

.modal-content h2 {
    margin: 0;
    font-size: 24px;
    color: var(--text-color);
}

.modal-content p {
    font-size: 16px;
    color: var(--text-color);
}

.calendar-cell {
    position: relative;
}

.calendar-cell.has-event {
    position: relative;
}

.calendar-cell.has-event::after {
    content: '';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 0.5em;
    height: 0.5em;
    background-color: red;
    border-radius: 50%;
}

.delete-event-button {
    background-color: var(--delete-button-bg-color);
    color: var(--text-color);
    padding: 10px 20px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.delete-event-button:hover {
    background-color: var(--delete-button-hover-bg-color);
}

.event-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.events-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}
