@import url('theme.css');

/* 习惯打卡 — 使用 theme.css 统一深色主题 */
html {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar {
    display: none;
}

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

body {
    font-family: var(--c-font-family);
    background: var(--c-bg-body);
    color: var(--c-text);
    min-height: 100vh;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body::-webkit-scrollbar {
    display: none;
}

.navbar {
    background: var(--c-bg-sidebar);
    border-bottom: 1px solid var(--c-border-subtle);
    box-shadow: none;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    white-space: nowrap;
}

.logo-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    filter: var(--c-icon-accent-filter);
}

.logo-text {
    background: var(--c-gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.back-btn {
    padding: 8px 16px;
    background: var(--c-bg-surface);
    border: 1px solid var(--c-border-subtle);
    border-radius: 8px;
    color: var(--c-text-secondary);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.back-btn:hover {
    background: var(--c-bg-card-hover);
    border-color: var(--c-border);
}

.container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 40px;
}

.page-header {
    background: var(--c-bg-card);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 24px;
    border: 1px solid var(--c-border-subtle);
    box-shadow: var(--c-shadow-card);
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--c-text);
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--c-text-muted);
    font-size: 14px;
}

.main-grid {
    position: relative;
    margin-bottom: 24px;
}

/* 日历热力图区域 */
.calendar-section {
    background: var(--c-bg-card);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--c-border-subtle);
    box-shadow: var(--c-shadow-card);
    width: 100%;
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--c-text);
}

.calendar-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.control-btn {
    padding: 8px 12px;
    background: var(--c-bg-surface);
    border: 1px solid var(--c-border-subtle);
    border-radius: 8px;
    color: var(--c-text-secondary);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.control-btn:hover:not(:disabled) {
    background: var(--c-bg-card-hover);
    border-color: var(--c-border);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.current-date {
    font-weight: 600;
    color: var(--c-accent);
    font-size: 15px;
    min-width: 120px;
    text-align: center;
}

/* GitHub 风格的热力图 */
.heatmap-container {
    overflow-x: auto;
    padding: 16px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.heatmap-container::-webkit-scrollbar {
    display: none;
}

.heatmap-wrapper {
    display: flex;
    flex-direction: column;
    width: fit-content;
    margin: 0 auto;
}

.heatmap-months {
    position: relative;
    margin-left: 26px;
    /* weekdays width + margin */
    margin-bottom: 8px;
    height: 20px;
}

.heatmap-month {
    position: absolute;
    font-size: 12px;
    color: var(--c-text-muted);
    text-align: left;
    padding: 0 2px;
}

.heatmap-content {
    display: flex;
    gap: 4px;
}

.heatmap-weekdays {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-right: 6px;
    flex-shrink: 0;
}

.heatmap-weekday {
    font-size: 10px;
    color: var(--c-text-muted);
    height: 18px;
    line-height: 18px;
    text-align: right;
    white-space: nowrap;
}

.heatmap {
    display: grid;
    grid-template-rows: repeat(7, 18px);
    grid-auto-flow: column;
    gap: 4px;
}

.heatmap-cell {
    width: 18px;
    height: 18px;
    background: var(--c-bg-raised);
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.heatmap-cell:hover {
    outline: 2px solid var(--c-accent);
    outline-offset: 1px;
    transform: scale(1.15);
    z-index: 10;
}

.heatmap-cell.level-0 {
    background: var(--c-bg-raised);
}

.heatmap-cell.level-1 {
    background: rgba(34, 197, 94, 0.25);
}

.heatmap-cell.level-2 {
    background: rgba(34, 197, 94, 0.45);
}

.heatmap-cell.level-3 {
    background: rgba(34, 197, 94, 0.7);
}

.heatmap-cell.level-4 {
    background: #16a34a;
}

.heatmap-cell.today {
    outline: 2px solid var(--c-accent);
}

.heatmap-cell.selected {
    outline: 3px solid var(--c-success);
    outline-offset: 2px;
    box-shadow: 0 0 0 2px var(--c-success-border);
}

.heatmap-cell.today.selected {
    outline: 3px solid var(--c-success);
    box-shadow: 0 0 0 2px var(--c-success-border), 0 0 0 4px var(--c-accent-border);
}

.heatmap-cell-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    line-height: 1;
    pointer-events: none;
    z-index: 5;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
}

.heatmap-cell.has-icon {
    position: relative;
}

@media (max-width: 968px) {
    .heatmap-cell-icon {
        font-size: 10px;
    }
}

/* 悬浮提示 */
.tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    pointer-events: none;
    z-index: 1000;
    display: none;
    max-width: 300px;
    line-height: 1.6;
}

.tooltip.show {
    display: block;
}

.tooltip-date {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--c-accent);
}

.tooltip-lunar {
    font-size: 12px;
    color: var(--c-warning);
    margin-bottom: 8px;
    font-weight: 500;
}

.tooltip-item {
    margin: 4px 0;
    padding-left: 8px;
    border-left: 3px solid var(--c-accent);
}

.tooltip-item.completed {
    border-left-color: var(--c-success);
    color: #86efac;
}

.tooltip-item.pending {
    border-left-color: var(--c-warning);
    color: #fcd34d;
}

.tooltip-memorial-icons {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tooltip-memorial-icons-label {
    font-size: 12px;
    color: var(--c-text-faint);
    margin-right: 4px;
    width: 100%;
    margin-bottom: 4px;
}

.tooltip-memorial-icon {
    font-size: 28px;
    line-height: 1;
    padding: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    transition: transform 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
}

.tooltip-memorial-icon:hover {
    transform: scale(1.15);
    background: rgba(255, 255, 255, 0.25);
}

/* 任务列表和纪念日列表容器 */
.tasks-memorial-container {
    display: flex;
    gap: 20px;
    width: 100%;
}

/* 任务列表区域 */
.tasks-section {
    background: var(--c-bg-card);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--c-border-subtle);
    box-shadow: var(--c-shadow-card);
    display: flex;
    flex-direction: column;
    height: 550px;
    flex: 1;
    min-width: 0;
}

.tasks-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    padding-right: 12px;
    margin-right: 0;
    box-sizing: border-box;
    margin-top: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tasks-content::-webkit-scrollbar {
    display: none;
}

.task-type-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--c-border-subtle);
    padding-bottom: 8px;
    flex-shrink: 0;
}

.section-title .date-range-text {
    font-size: 18px;
    font-weight: 500;
    color: var(--c-accent);
    margin-left: 8px;
}

.section-title .lunar-text {
    font-size: 14px;
    font-weight: 400;
    color: var(--c-warning);
    margin-left: 12px;
}

.task-type-tab {
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 8px 8px 0 0;
    color: var(--c-text-muted);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.task-type-tab.active {
    background: var(--c-gradient-accent);
    color: white;
}

.task-type-tab:hover:not(.active) {
    background: var(--c-bg-surface);
    color: var(--c-text-secondary);
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    padding: 16px;
    background: var(--c-bg-surface);
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
}

.task-item:hover {
    border-color: var(--c-accent);
    background: var(--c-bg-card);
    box-shadow: 0 2px 8px var(--c-accent-soft);
}

.task-item.completed {
    opacity: 0.6;
    background: var(--c-bg-card-hover);
}

.task-item.completed .task-content {
    text-decoration: line-through;
    color: var(--c-text-faint);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.task-content {
    font-size: 15px;
    font-weight: 500;
    color: var(--c-text);
}

.task-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: var(--c-accent);
    color: white;
}

.task-badge.daily {
    background: var(--c-accent);
}

.task-badge.weekly {
    background: var(--c-success);
}

.task-badge.monthly {
    background: var(--c-warning);
}

.task-badge.yearly {
    background: #6366f1;
}

.task-badge.memorial {
    background: var(--c-danger);
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--c-text-muted);
}

.check-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-success);
    color: white;
    font-size: 14px;
}

.add-task-btn {
    width: 100%;
    padding: 14px;
    background: var(--c-gradient-accent);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
    transition: all 0.2s;
}

.add-task-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--c-shadow-accent);
}

.add-memorial-btn {
    background: linear-gradient(135deg, var(--c-danger) 0%, #dc2626 100%);
}

.add-memorial-btn:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

/* 纪念日列表区域 */
.memorial-section {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, var(--c-bg-card) 100%);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.12);
    display: flex;
    flex-direction: column;
    height: 550px;
    flex: 1;
    min-width: 0;
    border: 2px solid rgba(239, 68, 68, 0.25);
}

.memorial-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    padding-right: 12px;
    margin-right: 0;
    box-sizing: border-box;
    margin-top: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.memorial-content::-webkit-scrollbar {
    display: none;
}

.memorial-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.memorial-item {
    padding: 12px;
    background: var(--c-bg-card);
    border-radius: 12px;
    border: 2px solid;
    transition: all 0.3s;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 110px;
}

.memorial-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: currentColor;
}

.memorial-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.memorial-item.today {
    border-width: 3px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.memorial-item.passed {
    opacity: 0.6;
}

.memorial-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.memorial-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--c-text);
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    line-height: 1.3;
}

.memorial-title-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.memorial-days {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 8px;
}

.memorial-days.today {
    background: linear-gradient(135deg, var(--c-success) 0%, #16a34a 100%);
}

.memorial-days.passed {
    background: linear-gradient(135deg, var(--c-text-muted) 0%, var(--c-text-faint) 100%);
}

.memorial-date {
    font-size: 12px;
    color: var(--c-text-secondary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    line-height: 1.4;
}

.memorial-date-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.memorial-description {
    font-size: 12px;
    color: var(--c-text-muted);
    line-height: 1.4;
    margin-top: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 统计区域 */
.stats-grid {
    display: flex;
    flex-direction: row;
    gap: 16px;
    width: 100%;
    margin-top: 24px;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--c-bg-card);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    flex: 1;
    min-width: 200px;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.stat-card:nth-child(1) {
    border-left-color: var(--c-accent);
}

.stat-card:nth-child(1) .stat-value {
    background: var(--c-gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-card:nth-child(2) {
    border-left-color: var(--c-success);
}

.stat-card:nth-child(2) .stat-value {
    background: linear-gradient(135deg, var(--c-success) 0%, #16a34a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-card:nth-child(3) {
    border-left-color: var(--c-warning);
}

.stat-card:nth-child(3) .stat-value {
    background: linear-gradient(135deg, var(--c-warning) 0%, #d97706 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-card:nth-child(4) {
    border-left-color: #6366f1;
}

.stat-card:nth-child(4) .stat-value {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 13px;
    color: var(--c-text-muted);
    margin-bottom: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--c-overlay);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--c-bg-card);
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.modal-content::-webkit-scrollbar {
    display: none;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--c-text);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--c-text-muted);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--c-bg-surface);
    color: var(--c-text);
}

.form-hint {
    font-size: 12px;
    color: var(--c-text-muted);
    margin-top: 4px;
}

.completion-display {
    text-align: center;
    margin-top: 8px;
    font-weight: 600;
    color: var(--c-accent);
}

.task-date-info {
    font-size: 12px;
}

.task-date-info--muted {
    color: var(--c-text-muted);
}

.task-date-info--danger {
    color: var(--c-danger);
}

.task-date-info--warning {
    color: var(--c-warning);
}


.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--c-text);
    margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--c-border-subtle);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    background: var(--c-bg-surface);
    color: var(--c-text);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--c-accent);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: var(--c-gradient-accent);
    color: white;
    flex: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--c-shadow-accent);
}

.btn-secondary {
    background: var(--c-bg-surface);
    color: var(--c-text-secondary);
    border: 1px solid var(--c-border-subtle);
}

.btn-secondary:hover {
    background: var(--c-bg-card-hover);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--c-text-muted);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* 自定义日历选择器 */
.lunar-calendar-picker {
    display: none;
    border: 2px solid var(--c-border-subtle);
    border-radius: 12px;
    padding: 16px;
    background: var(--c-bg-card);
    margin-top: 8px;
}

.lunar-calendar-picker.show {
    display: block;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.calendar-nav-btn {
    padding: 6px 12px;
    background: var(--c-bg-surface);
    border: 1px solid var(--c-border-subtle);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.calendar-nav-btn:hover {
    background: var(--c-bg-card-hover);
}

.calendar-month-year {
    font-weight: 600;
    color: var(--c-text);
    font-size: 16px;
}

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

.calendar-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--c-text-muted);
    padding: 8px 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    position: relative;
}

.calendar-day:hover {
    background: var(--c-bg-surface);
    border-color: var(--c-border);
}

.calendar-day.selected {
    background: var(--c-accent);
    color: white;
    border-color: var(--c-accent);
}

.calendar-day.today {
    border-color: var(--c-success);
}

.calendar-day.other-month {
    opacity: 0.3;
}

.calendar-day-solar {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

.calendar-day-lunar {
    font-size: 10px;
    color: var(--c-warning);
    line-height: 1;
    margin-top: 2px;
}

.calendar-day.selected .calendar-day-lunar {
    color: rgba(255, 255, 255, 0.9);
}

.calendar-day-jieqi {
    font-size: 9px;
    color: var(--c-success);
    line-height: 1;
    margin-top: 2px;
    font-weight: 600;
}

.calendar-day.selected .calendar-day-jieqi {
    color: rgba(255, 255, 255, 0.9);
}

/* Switch 开关样式 */
.switch-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.switch-label {
    font-size: 14px;
    color: var(--c-text);
    font-weight: 500;
}

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--c-border);
    transition: 0.3s;
    border-radius: 24px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--c-bg-card);
    transition: 0.3s;
    border-radius: 50%;
}

.switch input:checked+.switch-slider {
    background-color: var(--c-accent);
}

.switch input:checked+.switch-slider:before {
    transform: translateX(24px);
}

.switch-slider:hover {
    background-color: var(--c-text-faint);
}

.switch input:checked+.switch-slider:hover {
    background-color: var(--c-accent-hover);
}

.selected-date-info {
    margin-top: 12px;
    padding: 12px;
    background: var(--c-bg-surface);
    border-radius: 8px;
    font-size: 14px;
    color: var(--c-text);
}

.selected-date-info strong {
    color: var(--c-accent);
}

/* 图标选择器 */
.icon-picker-group {
    display: none;
}

.icon-picker-group.show {
    display: block;
}

.icon-picker-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 12px;
    background: var(--c-bg-surface);
    border-radius: 8px;
    border: 2px solid var(--c-border-subtle);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.icon-picker-grid::-webkit-scrollbar {
    display: none;
}

.icon-picker-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-bg-card);
    border: 2px solid var(--c-border-subtle);
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    padding: 6px;
}

.icon-picker-item:hover {
    border-color: var(--c-accent);
    background: var(--c-bg-card-hover);
    transform: scale(1.1);
}

.icon-picker-item.selected {
    border-color: var(--c-accent);
    background: var(--c-accent);
    color: white;
    box-shadow: 0 2px 8px var(--c-accent-border);
}

.icon-picker-selected {
    margin-top: 12px;
    padding: 12px;
    background: var(--c-bg-surface);
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
}

.icon-picker-selected-label {
    font-size: 12px;
    color: var(--c-text-muted);
    margin-bottom: 4px;
}

.icon-picker-selected-icon {
    font-size: 24px;
}

@media (max-width: 968px) {
    .icon-picker-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 6px;
        max-height: 150px;
    }

    .icon-picker-item {
        font-size: 14px;
        padding: 4px;
    }
}


@media (max-width: 968px) {
    .container {
        padding: 0 20px;
    }

    .navbar {
        padding: 0 20px;
    }

    .tasks-memorial-container {
        flex-direction: column;
    }

    .tasks-section {
        padding: 20px;
    }

    .memorial-section {
        margin-top: 20px;
    }

    .memorial-list {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 12px;
    }

    .memorial-item {
        padding: 10px;
        min-height: 100px;
    }

    .stats-grid {
        position: relative;
        right: auto;
        top: auto;
        width: 100%;
        flex-direction: column;
        margin-top: 24px;
    }

    .stat-card {
        width: 100%;
    }

    .heatmap-cell {
        width: 14px;
        height: 14px;
    }

    .heatmap {
        grid-template-rows: repeat(7, 14px);
        gap: 3px;
    }

    .heatmap-weekday {
        height: 14px;
        line-height: 14px;
        font-size: 10px;
    }

    .heatmap-weekdays {
        gap: 3px;
    }

    .heatmap-content {
        gap: 3px;
    }

    .heatmap-month {
        font-size: 10px;
    }

    .heatmap-months {
        margin-left: 24px;
        /* 响应式下 weekday 宽度可能变化 */
    }
}