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

:root {
    --primary-color: #FFD700;
    --bg-color: #f5f5f5;
    --card-bg: white;
    --text-color: #333;
    --disabled-color: rgba(0, 0, 0, 0.3);
    --day-bg: #f8f8f8;
    --day-hover: #eee;
}

[data-theme="dark"] {
    --primary-color: #FFD700;
    --bg-color: #1a1a1a;
    --card-bg: #2d2d2d;
    --text-color: #ffffff;
    --disabled-color: rgba(255, 255, 255, 0.3);
    --day-bg: #3d3d3d;
    --day-hover: #4d4d4d;
}

body {
    font-family: 'Syne', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: block;
    align-content: center;
    min-height: 100vh;
    /* background-color: var(--bg-color); */
    background: linear-gradient(109.6deg, rgb(255, 230, 109) 11.2%, rgb(87, 232, 107) 100.2%);
    color: var(--text-color);
    text-align: center;
}

.container {
    background: var(--card-bg);
    padding: 1.5rem;
    max-width: 370px;
    width: 90%;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    margin: 2rem auto;
}

.site-title {
    text-align: center;
    color: #333333;
    font-size: 3rem;
}

.site-description {
    text-align: center;
    color: #333333;
}

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

.calendar-header {
    font-weight: 500;
    text-align: center;
    padding: 4px;
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1;
}

.calendar-title {
    text-align: center;
    margin-bottom: 1rem;
}

.calendar-day {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    /* background: var(--day-bg); */
    transition: background-color 0.2s;
    line-height: 1;
    margin: 0 auto;
    font-family: Arial, Helvetica, sans-serif;
}

.calendar-day:hover {
    background: var(--day-hover);
}

.calendar-day.selected {
    background: var(--primary-color);
    color: #000;
}

.calendar-day.disabled {
    opacity: 1;
    color: var(--disabled-color);
    cursor: default;
}

.download-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: #000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.download-btn:hover {
    background: #e6c200;
}

.watermark {
    text-align: center;
    color: var(--disabled-color);
    font-size: 0.8rem;
    margin-top: 1rem;
}

.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 2;
}

.theme-toggle-btn {
    background: var(--card-bg);
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.theme-toggle-btn:hover {
    background: var(--day-hover);
}

.reset-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.5rem; /* Adjust size as needed */
    color: var(--text-color);
    z-index: 3; /* Ensure it is above other elements */
    opacity: 0.7;
}

.reset-btn:hover {
    color: var(--primary-color); /* Change color on hover */
}

.reset-btn svg {
    width: 24px; /* Adjust size as needed */
    height: 24px; /* Adjust size as needed */
}

.attribution {
    text-align: center;
    margin-top: 2rem;
    color: #333;
    font-size: 0.9rem;
}

.attribution a {
    color: #333;
    text-decoration: none;
}

.attribution a:hover {
    text-decoration: underline;
}

.site-header {
    position: relative;
    text-align: center;
    display: inline-block;
}

.out-of-office {
    position: absolute;
    right: -30px;
    top: 0;
    background: #000;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    transform: rotate(15deg);
}

[data-theme="light"] .calendar-day.today {
    opacity: 1;
    border: 1px solid #000;
}

[data-theme="dark"] .calendar-day.today {
    opacity: 1;
    border: 1px solid #fff;
}

/* Dim the weekends */
.calendar-header:first-child,
.calendar-header:nth-child(7) {
    opacity: 0.5;
}

.calendar-day:nth-child(7n+1),
.calendar-day:nth-child(7n) {
    opacity: 0.5;
    background: transparent;
}

.calendar-day:nth-child(7n+1).selected,
.calendar-day:nth-child(7n).selected {
    opacity: 1;
    background: var(--primary-color);
}

/* Dim the past days */
.calendar-day.past {
    opacity: 0.5;
}

.calendar-day.past.selected {
    opacity: 1;
    background: var(--primary-color);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .site-title {
        font-size: 2rem;
    }

    .out-of-office {
        font-size: 0.8rem;
        right: -20px;
        padding: 3px 10px;
    }

    .site-description {
        font-size: 0.9rem;
    }
}

/* Make the Christmas and New Year days bigger */
.calendar-day[data-day="25"],
.calendar-day:last-child {
    font-size: 1.3rem;
}