.widget {
    --background-color: #ffffff;
    --font-color: #000000;
    --border-color: #cccccc;
    --hover-color: #9e9e9e;
    --other-color: #858585;
    --date-color: #4899f4;
    --shadow-color: 0, 0, 0;

}

[data-theme="dark"] .widget {
    --background-color: #121212;
    --font-color: #e8e8e8;
    --border-color: #e8e8e8;
    --hover-color: #888888;
    --other-color: #c4c4c4;
    --date-color: #c00000;
    --shadow-color: 255, 255, 255;
}

/* 根容器 */
.sidebar-widget {
    margin: -50px 0 0;
    padding: 0;
    text-align: center;
    background-color: var(--background-color);
    border: 0 solid var(--border-color);
    border-radius: 10px;
}

/* 时间模块 */
.time-section {
    margin-bottom: 1.5px;
}

.current-time {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--font-color);
}

/* 日期模块 */
.date-section {
    margin-bottom: 6px;
}

.current-date {
    font-size: 1rem;
    font-weight: 500;
    color: var(--font-color);
}

/* 天气模块 */
.weather-section {
    margin-bottom: 5px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.current-weather {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--font-color);
    line-height: 1.5;
    white-space: pre-line;
}

/* 日历根容器 */
.calendar-section {
    margin-bottom: 0;
}

/* 日历头部 */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

/* 日历头部 h3 */
.calendar-header h3 {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--font-color);
    margin: 0;
}

/* 日历头部按钮 */
.calendar-nav-btn {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--font-color);
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s;
    transform: translateY(-1px);
}

.calendar-nav-btn:hover {
    background-color: var(--hover-color);
}

/* 日历星期栏 */
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 0;
}

.calendar-weekdays div {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--font-color);
    text-align: center;
    padding: 0;
}

/* 日历日期栏 */
.calendar-dates {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
}

.calendar-dates div {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--font-color);
    text-align: center;
    margin: 0;
    padding: 0;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
}

/* 其他月份日期 */
.calendar-dates .other-month {
    color: var(--other-color);
    opacity: 0.8;
}

/* 当前月份日期 */
.calendar-dates .current-month {
    color: var(--font-color);
}

/* 今日日期 */
.calendar-dates .today {
    color: var(--font-color);
    background-color: var(--date-color);
    box-shadow: 0 2px 5px rgba(var(--shadow-color), 0.3);
}

.calendar-dates .date-item:hover:not(.today) {
    background-color: var(--hover-color);
}

@media (max-width: 768px) {
    .current-time {
        font-size: 1.8rem;
    }

    .current-date {
        font-size: 0.9rem;
    }
}