/* ============================================================
   KZ Windows 桌面皮肤层  kz-win-skin.css
   —— 只作用于 #windowsDesktopSystem，安卓桌面完全不加载
   —— 所有选择器以 .kz-skn 开头，纯新增，不改原站任何样式
   ============================================================ */

.kz-skn {
    position: fixed;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    font-family: inherit;
    opacity: 0;
    transition: opacity .5s ease;
}
.kz-skn.kz-skn-in { opacity: 1; }
.kz-skn.kz-skn-off { display: none; }

/* ---------------- 卡片基座 ---------------- */
.kz-skn-card {
    position: absolute;
    pointer-events: auto;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: 24px;
    color: #fff;
    cursor: default;
    user-select: none;
    transition: box-shadow .25s ease, transform .18s ease, background .3s ease;
    will-change: transform;
    overflow: hidden;
}
.kz-skn-card.kz-drag { transition: none; cursor: grabbing; }

/* 【20261030T】触屏可拖：不写 touch-action，手指一按浏览器就当成「滚动页面」，
   pointermove 全被吃掉 —— 手机上所有小组件都拖不动就是这个原因。 */
.kz-skn-card,
.kz-skn-grip,
.kz-skn-music .cov { touch-action: none; }
.kz-skn-card:hover { box-shadow: 0 14px 34px rgba(0, 0, 0, .3); }

.kz-skn-card > *:not(.kz-skn-grip):not(.kz-skn-tools) { position: relative; z-index: 1; }

/* 拖动把手 */
.kz-skn-grip {
    position: absolute;
    inset: 0 0 auto 0;
    height: 26px;
    cursor: grab;
    z-index: 2;
}
.kz-skn-card.kz-drag .kz-skn-grip { cursor: grabbing; }

/* 右上角操作 */
.kz-skn-tools {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity .2s ease;
    z-index: 3;
}
.kz-skn-card:hover .kz-skn-tools { opacity: 1; }
.kz-skn-tools button {
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .28);
    color: #fff;
    font-size: 10px;
    line-height: 18px;
    cursor: pointer;
    padding: 0;
    backdrop-filter: blur(6px);
}
.kz-skn-tools button:hover { background: rgba(239, 68, 68, .9); }

/* ---------------- 配色：果冻玻璃（蓝调） ---------------- */
.kz-skn[data-palette="jelly"] .kz-skn-card {
    background: linear-gradient(160deg, rgba(96, 165, 250, .82), rgba(37, 99, 235, .72));
    border: 1px solid rgba(255, 255, 255, .45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -10px 24px rgba(2, 22, 64, .18), 0 16px 36px rgba(2, 20, 60, .3);
    backdrop-filter: blur(16px) saturate(170%);
    text-shadow: 0 1px 3px rgba(0, 20, 60, .35);
}
.kz-skn[data-palette="jelly"] .kz-skn-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 55% at 20% 0%, rgba(255, 255, 255, .22), transparent 55%);
    pointer-events: none;
    z-index: 0;
    opacity: .8;
}

/* ---------------- 配色：黑白极简 ---------------- */
.kz-skn[data-palette="mono"] .kz-skn-card {
    background: rgba(255, 255, 255, .92);
    color: #111;
    border: 1px solid rgba(0, 0, 0, .06);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18), inset 0 1px 0 #fff;
    text-shadow: none;
}
.kz-skn[data-palette="mono"] .kz-skn-dark {
    background: #111;
    color: #fff;
    border-color: rgba(255, 255, 255, .08);
}

/* ---------------- 配色：星空深色 ---------------- */
.kz-skn[data-palette="space"] .kz-skn-card {
    background: rgba(8, 12, 30, .58);
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: 0 16px 44px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .18);
    backdrop-filter: blur(18px) saturate(150%);
    color: #eaf2ff;
}

/* ---------------- 配色：赛博霓虹 ---------------- */
.kz-skn[data-palette="neon"] .kz-skn-card {
    background: linear-gradient(160deg, rgba(24, 8, 40, .8), rgba(10, 4, 24, .86));
    border: 1px solid rgba(244, 114, 182, .55);
    box-shadow: 0 0 26px -6px rgba(244, 114, 182, .8), inset 0 0 24px rgba(124, 58, 237, .3);
    backdrop-filter: blur(14px);
    color: #ffe9fb;
}

/* ---------------- 配色：奶油卡 ---------------- */
.kz-skn[data-palette="cream"] .kz-skn-card {
    background: rgba(255, 252, 246, .94);
    color: #4a3b2c;
    border: 1px solid rgba(255, 255, 255, .9);
    box-shadow: 0 14px 30px rgba(120, 80, 40, .18), inset 0 1px 0 #fff;
    text-shadow: none;
}

/* ---------------- 配色：动漫浅色 ---------------- */
.kz-skn[data-palette="anime"] .kz-skn-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, .82), rgba(226, 244, 255, .72));
    color: #16405c;
    border: 1px solid rgba(255, 255, 255, .95);
    box-shadow: 0 14px 32px rgba(30, 90, 130, .22), inset 0 1px 0 #fff;
    backdrop-filter: blur(12px) saturate(160%);
    text-shadow: none;
}

/* ============================================================
   卡片内容
   ============================================================ */
.kz-skn-label {
    font-size: 10px;
    letter-spacing: 1.2px;
    opacity: .6;
    text-transform: uppercase;
    margin-bottom: 4px;
}

/* ---- 时钟 ---- */
.kz-skn-clock { text-align: left; }
.kz-skn-clock .big {
    font-size: 44px;
    font-weight: 300;
    line-height: 1;
    letter-spacing: -1.5px;
    font-variant-numeric: tabular-nums;
}
.kz-skn-clock .sec {
    font-size: 15px;
    font-weight: 500;
    opacity: .7;
    margin-left: 4px;
    vertical-align: super;
}
.kz-skn-clock .sub {
    font-size: 11px;
    opacity: .78;
    margin-top: 6px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.kz-skn[data-palette="jelly"] .kz-skn-clock .big,
.kz-skn[data-palette="mono"] .kz-skn-clock .big { font-weight: 600; }

/* ---- 天气（对齐参考图：风向/温度区间/城市/大温度） ---- */
.kz-skn-weather .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12.5px;
    font-weight: 600;
    padding: 3px 0;
}
.kz-skn-weather .row span { flex: 1; }
.kz-skn-weather .row i {
    font-style: normal;
    font-size: 13px;
    opacity: .9;
    width: 16px;
    text-align: center;
}
.kz-skn-weather .bigrow {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: 6px;
    gap: 6px;
}
.kz-skn-weather .bigrow b {
    font-size: 34px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -1px;
}
.kz-skn-weather .bigrow .ic svg { width: 44px; height: 44px; display: block; }

/* ---- 饮水 ---- */
.kz-skn-water { text-align: center; }
.kz-skn-water .ctl {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
}
.kz-skn-water button {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, .32);
    color: inherit;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    flex: none;
}
.kz-skn-water .num { font-size: 22px; font-weight: 700; }
.kz-skn-water .num small { font-size: 10px; font-weight: 500; opacity: .7; margin-left: 2px; }

/* ---- 电量 ---- */
.kz-skn-bat .bars { display: flex; gap: 4px; margin-top: 6px; }
.kz-skn-bat .bars i {
    flex: 1;
    height: 34px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .18);
    position: relative;
    overflow: hidden;
}
.kz-skn-bat .bars i::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 0;
    background: linear-gradient(180deg, #a5f3fc, #22d3ee);
    transition: height .6s ease;
}
.kz-skn-bat .pct { font-size: 20px; font-weight: 700; }

/* ---- 倒计时 ---- */
.kz-skn-cd .item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    padding: 4px 0;
}
.kz-skn-cd .item b {
    margin-left: auto;
    font-size: 15px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.kz-skn-cd .bar {
    height: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .25);
    overflow: hidden;
    margin-top: 2px;
}
.kz-skn-cd .bar > i {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #67e8f9, #a78bfa);
}

/* ---- APP 网格 ---- */
.kz-skn-apps .grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.kz-skn-apps .app {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: transform .16s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.kz-skn-apps .app:hover { transform: translateY(-2px) scale(1.04); }

/* ---- 音乐 ---- */
.kz-skn-music { display: flex; gap: 10px; align-items: center; }
.kz-skn-music .cov {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    flex: none;
    background: linear-gradient(140deg, #22d3ee, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}
.kz-skn-music .txt { min-width: 0; flex: 1; }
.kz-skn-music .txt b {
    display: block;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kz-skn-music .txt span { font-size: 10px; opacity: .7; }
.kz-skn-music .btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, .28);
    color: inherit;
    cursor: pointer;
    flex: none;
}

/* ---- 日历小卡 ---- */
.kz-skn-cal .d { font-size: 30px; font-weight: 700; line-height: 1; }
.kz-skn-cal .m { font-size: 11px; opacity: .75; margin-top: 3px; }

/* ============================================================
   设置面板
   ============================================================ */
.kz-skn-set {
    margin: 0 0 18px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .86);
    border: 1px solid rgba(15, 23, 42, .07);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}
.night-mode .kz-skn-set {
    background: rgba(30, 41, 59, .8);
    border-color: rgba(255, 255, 255, .1);
}
.kz-skn-set h4 { margin: 0 0 10px; font-size: 13px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.kz-skn-set .hint { font-size: 11.5px; color: #64748b; line-height: 1.65; margin: 8px 0 0; }
.night-mode .kz-skn-set .hint { color: #94a3b8; }

.kz-skn-skins {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}
.kz-skn-pick {
    position: relative;
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16 / 10;
    background: #0f172a;
    padding: 0;
}
.kz-skn-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kz-skn-pick span {
    position: absolute;
    inset: auto 0 0 0;
    padding: 10px 6px 4px;
    font-size: 10px;
    color: #fff;
    background: linear-gradient(0deg, rgba(2, 6, 23, .9), transparent);
    text-align: left;
}
.kz-skn-pick.kz-cur { border-color: #22d3ee; box-shadow: 0 0 0 2px rgba(34, 211, 238, .3); }

.kz-skn-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 12.5px; }
.kz-skn-row > label { flex: 1; }
.kz-skn-row input[type=range] { width: 130px; accent-color: #6366f1; }
.kz-skn-sw {
    width: 40px;
    height: 22px;
    border-radius: 99px;
    background: rgba(100, 116, 139, .35);
    border: 0;
    position: relative;
    cursor: pointer;
    flex: none;
    transition: background .2s ease;
}
.kz-skn-sw i {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
    transition: transform .2s ease;
}
.kz-skn-sw.kz-on { background: linear-gradient(90deg, #22d3ee, #6366f1); }
.kz-skn-sw.kz-on i { transform: translateX(18px); }

@media (max-width: 640px) {
    .kz-skn-clock .big { font-size: 32px; }
    .kz-skn-card {
        border-radius: 18px;
        padding: 10px;
        /* 【20261030T】手机上卡片别再把整屏占满（音乐卡尤其明显） */
        max-width: 80vw !important;
    }
    .kz-skn-music .cov { width: 42px; height: 42px; }
}

/* 【20261030T】没有「悬停」的设备（手机 / 平板 / 触屏笔记本）：
   卡片右上角那颗 × 以前只在鼠标移上去才出现，触屏根本关不掉卡片。 */
@media (hover: none) {
    .kz-skn-tools { opacity: 1; }
}

/* ============================================================
   「深海毛玻璃」：无底板的大字幕钟 + 左侧竖排 Dock
   ============================================================ */
.kz-skn[data-palette="deepsea"] .kz-skn-card {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: #fff;
    text-shadow: 0 2px 16px rgba(0, 30, 55, .55);
}
.kz-skn[data-palette="deepsea"] .kz-skn-card::after { display: none; }
.kz-skn[data-palette="deepsea"] .kz-skn-clock .big {
    font-size: 62px;
    font-weight: 300;
    letter-spacing: -3px;
    text-shadow: 0 4px 26px rgba(0, 35, 60, .55);
}
.kz-skn[data-palette="deepsea"] .kz-skn-clock .sec { font-size: 18px; opacity: .85; }
.kz-skn[data-palette="deepsea"] .kz-skn-clock .sub { font-size: 12.5px; opacity: .92; }

.kz-skn-dock { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.kz-skn-dock .dw {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: transform .18s ease;
}
.kz-skn-dock .dw:hover { transform: translateY(-2px) scale(1.06); }
.kz-skn-dock .di {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 22px rgba(0, 25, 45, .38), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.kz-skn-dock .dl {
    font-size: 10.5px;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .55);
}
