/* ============================================================
   组件卡片内部样式 v2（玻璃拟态）
   ============================================================ */

.widget-card {
    width: 100%; height: 100%;
    background: var(--glass); backdrop-filter: blur(28px) saturate(1.7);
    -webkit-backdrop-filter: blur(28px) saturate(1.7);
    border: 1px solid var(--glass-border); border-radius: var(--r-lg);
    box-shadow: var(--shadow-1);
    display: flex; flex-direction: column; overflow: hidden;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
    position: relative;
}
.widget-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.widget-title {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 15px 8px;
    font-size: 12.5px; font-weight: 700; color: var(--text-2);
    letter-spacing: 0.5px; flex-shrink: 0;
}
.widget-title .wt-actions { display: flex; gap: 5px; }
.widget-title .wt-btn {
    width: 22px; height: 22px; border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-3); font-size: 11px; transition: all 0.15s;
}
.widget-title .wt-btn:hover { background: var(--brand); color: #fff; }
.widget-content {
    flex: 1 1 auto; min-height: 0; padding: 4px 15px 14px;
    display: flex; flex-direction: column;
}

/* 日历 */
.widget-calendar { gap: 6px; }
.cal-top {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 12.5px; font-weight: 700; color: var(--text-1);
}
.cal-top button {
    width: 24px; height: 24px; border-radius: 8px; font-size: 14px;
    color: var(--text-2); display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.cal-top button:hover { background: rgba(79,107,255,0.12); color: var(--brand); }
.widget-calendar table { width: 100%; border-collapse: collapse; flex: 1; }
.widget-calendar th { font-size: 10px; color: var(--text-3); font-weight: 600; padding: 3px 0; }
.widget-calendar td {
    font-size: 11px; text-align: center; padding: 2.5px 0;
    color: var(--text-1); border-radius: 7px; font-variant-numeric: tabular-nums;
}
.widget-calendar td.today { background: var(--brand-grad); color: #fff; font-weight: 700; box-shadow: 0 3px 8px rgba(79,107,255,0.35); }
.widget-calendar td.other { color: transparent; }

/* 天气 */
.widget-weather { align-items: center; text-align: center; gap: 2px; justify-content: center; }
.w-city { font-size: 12px; color: var(--text-2); font-weight: 600; }
.w-temp { font-size: 38px; font-weight: 200; line-height: 1.1; font-variant-numeric: tabular-nums; }
.w-desc { font-size: 12px; color: var(--text-2); }
.w-forecast { display: flex; gap: 4px; width: 100%; margin-top: 8px; }
.w-day {
    flex: 1; padding: 6px 2px; border-radius: 10px;
    background: rgba(255,255,255,0.4); font-size: 10px; color: var(--text-2);
    text-align: center; line-height: 1.5;
}
.w-day .w-t { font-weight: 700; color: var(--text-1); font-size: 10.5px; }

/* 热搜 */
.widget-hotsearch { gap: 0; overflow: hidden; padding-top: 2px; }
.hs-item {
    display: flex; align-items: center; gap: 8px;
    padding: 4.5px 6px; border-radius: 8px; cursor: pointer;
    font-size: 12px; transition: background 0.15s;
}
.hs-item:hover { background: rgba(79,107,255,0.1); }
.hs-rank {
    width: 17px; height: 17px; border-radius: 5px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700;
    background: rgba(28,31,39,0.08); color: var(--text-3);
}
.hs-rank.top { background: var(--danger); color: #fff; }
.hs-rank.top:nth-child(1) { background: #ff453a; }
.hs-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-1); }

/* 待办 */
.todo-input { display: flex; gap: 7px; margin-bottom: 9px; }
.todo-input input {
    flex: 1; min-width: 0; height: 32px; padding: 0 11px;
    border: 1.5px solid var(--line); border-radius: 9px; font-size: 12px;
    background: rgba(255,255,255,0.6);
}
.todo-input input:focus { border-color: var(--brand); }
.todo-input button {
    padding: 0 13px; border-radius: 9px; font-size: 12px; font-weight: 600;
    background: var(--brand-grad); color: #fff;
}
.todo-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.todo-item {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 8px; border-radius: 8px; font-size: 12px;
    background: rgba(255,255,255,0.4);
}
.todo-item.done span { text-decoration: line-through; color: var(--text-3); }
.todo-item input { accent-color: var(--brand); }
.todo-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-del { color: var(--text-3); cursor: pointer; font-size: 11px; flex-shrink: 0; }
.todo-del:hover { color: var(--danger); }

/* 记事本 */
.widget-notepad textarea {
    width: 100%; height: 100%; resize: none; border: none; background: transparent;
    font-size: 12.5px; line-height: 1.7; color: var(--text-1);
}
.widget-notepad textarea::placeholder { color: var(--text-3); }

/* 图片格式转换 */
.wg-convert { align-items: center; justify-content: center; gap: 10px; text-align: center; }
.wg-convert .wc-zone {
    width: 100%; padding: 18px 10px; border-radius: 12px;
    border: 1.5px dashed rgba(28,31,39,0.2); cursor: pointer;
    font-size: 12px; color: var(--text-2); transition: all 0.2s;
}
.wg-convert .wc-zone:hover { border-color: var(--brand); color: var(--brand); }
.wg-convert .wc-btns { display: flex; gap: 7px; }
.wg-convert select {
    height: 30px; border-radius: 8px; border: 1.5px solid var(--line);
    padding: 0 8px; font-size: 12px; background: rgba(255,255,255,0.7);
}

/* 倒计时/纪念日（由 widget-editor 控制视觉，无配置时使用简洁默认） */
.wg-cd-simple { align-items: center; justify-content: center; gap: 5px; text-align: center; }
.wg-cd-simple .cd-days { font-size: 42px; font-weight: 200; line-height: 1; color: var(--text-1); font-variant-numeric: tabular-nums; }
.wg-cd-simple .cd-label { font-size: 12px; color: var(--text-2); }
.wg-cd-simple .cd-date { font-size: 11px; color: var(--text-3); }
.wg-cd-simple .cd-edit-btn {
    margin-top: 6px; padding: 6px 14px; border-radius: 999px;
    background: var(--brand-grad); color: #fff; font-size: 12px; font-weight: 600;
    box-shadow: 0 4px 12px rgba(79,107,255,0.35);
}
