/* lock-screen.css — 锁屏与「今日一句」编辑弹窗（由 style.css 拆出） */

/* 今日一句编辑弹窗 */
.lock-screen-quote-modal-content {
    max-width: 360px;
    border-radius: 16px;
}

.lock-screen-quote-modal-content .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 14px;
    border-bottom: 1px solid #eee;
}

.lock-screen-quote-modal-content .modal-header h3 {
    flex: 1;
    text-align: center;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.lock-screen-quote-modal-content .modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    border-radius: 8px;
}

.lock-screen-quote-modal-content .modal-close:hover {
    background: rgba(0, 0, 0, 0.06);
}

.lock-screen-quote-modal-content .modal-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lock-screen-quote-search-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.lock-screen-quote-search-btn {
    flex-shrink: 0;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    background: #9D4EDD;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.lock-screen-quote-search-btn:hover {
    background: #7B2CBF;
}

.lock-screen-quote-result-hint {
    font-size: 12px;
    color: #888;
    min-height: 16px;
}

.lock-screen-quote-results {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lock-screen-quote-result-item {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e8e0f0;
    background: rgba(157, 78, 221, 0.04);
    cursor: pointer;
    transition: background 0.15s;
}

.lock-screen-quote-result-item:hover,
.lock-screen-quote-result-item:active {
    background: rgba(157, 78, 221, 0.12);
    border-color: rgba(157, 78, 221, 0.4);
}

.lock-screen-quote-result-text {
    font-size: 13px;
    line-height: 1.5;
    color: #333;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lock-screen-quote-result-author {
    font-size: 11px;
    color: #9D4EDD;
    font-weight: 500;
}

.lock-screen-quote-custom-row {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-top: 4px;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.lock-screen-quote-custom-label {
    font-size: 12px;
    color: #888;
    flex-shrink: 0;
    font-weight: 500;
}

.lock-screen-quote-custom-confirm-btn {
    flex-shrink: 0;
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    background: #333;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.lock-screen-quote-modal-content .modal-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 14px 20px 18px;
    border-top: 1px solid #eee;
}

.lock-screen-quote-modal-content .modal-footer .horoscope-edit-btn {
    min-width: 108px;
    min-height: 44px;
    padding: 10px 26px;
    box-sizing: border-box;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    border: none;
}

.lock-screen-quote-modal-content .modal-footer .horoscope-edit-btn-cancel {
    background: #f0f0f0;
    color: #555;
}

/* 名言板块整体右对齐样式（与地名同高对齐） */
.lock-screen-quote {
    align-items: flex-end;
    text-align: right;
    gap: 0;
    justify-content: space-evenly;
    padding-top: 8px;
    padding-bottom: 10px;
}

.lock-screen-quote .lock-screen-widget-label {
    width: 100%;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.02em;
    opacity: 1;
    color: rgba(20, 50, 38, 0.95);
    text-align: right;
    flex-shrink: 0;
}

.lock-screen-q-text {
    margin: 0;
    width: 100%;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.45;
    color: rgba(20, 50, 38, 0.9);
    text-align: right;
    display: -webkit-box;
    -webkit-line-clamp: 7;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    min-height: 0;
    align-self: stretch;
}

/* 名言板块点击样式 */
.lock-screen-quote[role="button"] {
    cursor: pointer;
}

.lock-screen-quote[role="button"]:hover {
    background: rgba(255, 255, 255, 0.55);
}

@media (max-width: 375px), (max-height: 700px) {
    .lock-screen-quote .lock-screen-widget-label {
        font-size: 15px;
    }

    .lock-screen-q-text {
        font-size: 10px;
        -webkit-line-clamp: 6;
    }
}


/* 自 style.css 深色分组拆出：仅锁屏名言卡片 */
html[data-appearance="dark"] .lock-screen-quote {
    color: #f4f3fb;
}

/* ========== 锁屏（向右滑动解锁） ========== */
@font-face {
    font-family: "HuiwenMingChao";
    src: url("assets/汇文明朝体.otf") format("opentype");
    font-display: swap;
}

.lock-screen {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    box-sizing: border-box;
    z-index: 100050;
    pointer-events: auto;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
    overflow: hidden;
    border-radius: inherit;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    transition: opacity 0.38s ease, transform 0.42s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.lock-screen.lock-screen--unlocked {
    pointer-events: none;
    opacity: 0;
    transform: translateX(18%);
}

.lock-screen.lock-screen--gone {
    visibility: hidden;
    opacity: 0;
    transform: translateX(100%);
}

.lock-screen-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(255, 248, 236, 0.18) 0%, rgba(255, 248, 236, 0) 34%),
        linear-gradient(150deg, #8B9DC5 0%, #7388A3 52%, rgb(90, 42, 42) 100%);
    z-index: 0;
}

/* 主题自定义锁屏壁纸：底图由 theme-module 写入，上层 .lock-screen-scrim 仍保留可读性 */
.lock-screen-bg.lock-screen-bg--custom {
    background-color: #5a2a2a;
}

.lock-screen-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        180deg,
        rgba(255, 250, 240, 0.08) 0%,
        rgba(255, 250, 240, 0.02) 38%,
        rgba(58, 28, 28, 0.14) 100%
    );
    pointer-events: none;
}

.lock-screen-inner {
    position: relative;
    z-index: 2;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding-top: max(12px, env(safe-area-inset-top, 0px));
    padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

@supports (width: 1cqw) {
    .lock-screen-inner {
        padding-left: clamp(12px, 4.5cqw, 22px);
        padding-right: clamp(12px, 4.5cqw, 22px);
    }

    .lock-screen-date-line {
        font-size: clamp(22px, calc(3.8cqw + 8px), 26px);
    }

    .lock-screen-time {
        font-size: clamp(66px, calc(20.5cqw + 8px), 102px);
    }

    .lock-screen-widgets-row {
        --lock-widget-gap: clamp(10px, 5.5cqw, 28px);
        gap: var(--lock-widget-gap);
    }

    .lock-screen-unlock-wrap {
        max-width: min(320px, 92cqw);
        padding: 0 clamp(4px, 1.8cqw, 10px);
    }
}

.lock-screen-datetime {
    text-align: center;
    margin-top: 44px;
    margin-bottom: 26px;
    flex-shrink: 0;
}

.lock-screen-date-line {
    font-family: "HuiwenMingChao", "PingFang SC", "Microsoft YaHei", serif;
    font-size: 25px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: rgba(255, 250, 240, 0.9);
    text-shadow: 0 2px 10px rgba(42, 49, 66, 0.22);
    margin-bottom: 6px;
}

.lock-screen-time {
    font-family: "LoveMiOfflineDialogue", "SF Pro Display", "PingFang SC", "Microsoft YaHei", serif;
    font-size: clamp(66px, calc(15vmin + 8px), 102px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
    color: #fffaf0;
    text-shadow: 0 6px 18px rgba(42, 49, 66, 0.24);
}

.lock-screen-widgets-row {
    --lock-widget-gap: 28px;
    margin-top: 23px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: center;
    gap: var(--lock-widget-gap);
    flex: 1;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* 与主屏 .horoscope-card 同比例；窄宽时随行宽缩小，保持左右并排 */
.lock-screen-widget {
    width: min(166px, calc((100% - var(--lock-widget-gap)) / 2));
    height: min(166px, calc((100% - var(--lock-widget-gap)) / 2));
    flex-shrink: 0;
    box-sizing: border-box;
    border-radius: 22px;
    border: 1px solid rgba(255, 250, 240, 0.42);
    background: linear-gradient(180deg, rgba(255, 250, 240, 0.2) 0%, rgba(255, 250, 240, 0.1) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 28px rgba(42, 49, 66, 0.22);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: rgba(255, 250, 240, 0.96);
}

.lock-screen-widget-label {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.72;
    letter-spacing: 0.04em;
}

.lock-screen-weather {
    gap: 0;
    justify-content: space-evenly;
    align-items: stretch;
    padding-top: 8px;
    padding-bottom: 10px;
}

.lock-screen-w-city {
    font-family: "HuiwenMingChao", "PingFang SC", "Microsoft YaHei", serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.02em;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    align-self: stretch;
    text-align: left;
    flex-shrink: 0;
    color: #fffaf0;
}

.lock-screen-w-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
    color: rgba(255, 250, 240, 0.9);
    flex-shrink: 0;
}

.lock-screen-w-row--weather {
    gap: 4px;
}

.lock-screen-w-k {
    flex-shrink: 0;
    opacity: 0.72;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.lock-screen-w-cond {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.lock-screen-w-val {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.lock-screen-w-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    color: rgba(30, 77, 58, 0.88);
}

.lock-screen-w-icon svg,
.lock-screen-w-icon img.lock-screen-w-icon-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

/* mk681 线稿 PNG：与白底相容，乘法混合去除白底感并统一为与原 SVG 一致的深绿色调 */
.lock-screen-w-icon-img {
    mix-blend-mode: multiply;
    opacity: 0.92;
}

.lock-screen-quote {
    align-items: flex-end;
    text-align: right;
    gap: 0;
    justify-content: flex-start;
    padding-top: 8px;
    padding-bottom: 10px;
}

.lock-screen-quote .lock-screen-widget-label {
    width: 100%;
    font-family: "HuiwenMingChao", "PingFang SC", "Microsoft YaHei", serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.02em;
    opacity: 1;
    color: #fffaf0;
    text-align: right;
    flex-shrink: 0;
    padding-top: 5px;
}

.lock-screen-q-text {
    margin: 0;
    margin-top: 8px;
    width: 100%;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.45;
    color: rgba(255, 250, 240, 0.92);
    text-align: right;
    display: -webkit-box;
    -webkit-line-clamp: 7;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    min-height: 0;
    align-self: stretch;
}

.lock-screen-q-author {
    width: 100%;
    margin-top: 6px;
    font-size: 10px;
    line-height: 1.35;
    letter-spacing: 0.06em;
    text-align: right;
    color: rgba(255, 250, 240, 0.96);
}

.lock-screen-unlock-wrap {
    flex-shrink: 0;
    width: 100%;
    max-width: 320px;
    margin: 14px auto 6px;
    padding: 0 8px;
    box-sizing: border-box;
}

.lock-screen-unlock-track {
    position: relative;
    height: 52px;
    border-radius: 26px;
    background: rgba(255, 250, 240, 0.16);
    border: 1px solid rgba(255, 250, 240, 0.32);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 2px rgba(255, 250, 240, 0.06);
}

.lock-screen-unlock-hint {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 250, 240, 0.72);
    pointer-events: none;
    padding-left: 48px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.lock-screen-unlock-knob {
    position: absolute;
    left: 4px;
    top: 50%;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: #fffaf0;
    box-shadow: 0 3px 14px rgba(42, 49, 66, 0.2), 0 0 0 1px rgba(255, 250, 240, 0.2);
    cursor: grab;
    touch-action: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lock-screen-unlock-knob::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2.5px solid rgba(115, 136, 163, 0.88);
    border-top: 2.5px solid rgba(115, 136, 163, 0.88);
    transform: rotate(45deg) translateX(-1px);
}

.lock-screen-unlock-knob:active {
    cursor: grabbing;
}

.lock-screen.lock-screen--dragging .lock-screen-unlock-hint {
    opacity: 0.35;
}

@media (max-width: 375px), (max-height: 700px) {
    .lock-screen-widgets-row {
        --lock-widget-gap: 14px;
    }

    .lock-screen-w-city {
        font-size: 15px;
    }

    .lock-screen-quote .lock-screen-widget-label {
        font-size: 15px;
    }

    .lock-screen-w-row {
        font-size: 10px;
    }

    .lock-screen-w-icon {
        width: 22px;
        height: 22px;
    }

    .lock-screen-q-text {
        font-size: 10px;
        -webkit-line-clamp: 6;
    }
}

@media (max-width: 420px), (max-height: 600px) {
    .lock-screen-widgets-row {
        --lock-widget-gap: 12px;
    }

    .lock-screen-datetime {
        margin-top: 36px;
        margin-bottom: 20px;
    }

    .lock-screen-time {
        font-size: clamp(52px, calc(12vmin + 8px), 102px);
    }
}
