/* 123ONE 文章下载插件 — 前端样式 */

/* ========== 容器 ========== */
.one23-dl-box {
    margin: 2.5em 0;
    padding: 28px 28px 24px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
}

/* ========== 标题 ========== */
.one23-dl-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: #1d1d1f;
    letter-spacing: .3px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f2f2f2;
}
.one23-dl-title svg {
    flex-shrink: 0;
    opacity: .55;
}

/* ========== 链接列表 ========== */
.one23-dl-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ========== 单个下载行 ========== */
.one23-dl-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 12px;
    transition: all .25s cubic-bezier(.4,0,.2,1);
}

.one23-dl-item-row:hover {
    background: #f5f5f5;
    border-color: #ddd;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
}

/* ========== 左侧区域（图标 + 名称 + 徽章） ========== */
.one23-dl-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.one23-dl-item-left > svg:first-child {
    flex-shrink: 0;
    color: #999;
}

/* 平台名称 */
.one23-dl-label {
    font-size: 14px;
    font-weight: 400;
    color: #1d1d1f;
    white-space: nowrap;
    letter-spacing: .2px;
}

/* ========== 提取码 / 解压密码 徽章 ========== */
.one23-dl-badge {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
    cursor: pointer;
    font-weight: 500;
    letter-spacing: .2px;
    transition: all .2s ease;
    user-select: none;
}

.one23-dl-badge-code {
    background: #eef7ee;
    color: #2b7a2b;
    border: 1px solid #d4ebd4;
}
.one23-dl-badge-code:hover {
    background: #ddf2dd;
}

.one23-dl-badge-pwd {
    background: #fff5ed;
    color: #d46b08;
    border: 1px solid #ffe4cc;
}
.one23-dl-badge-pwd:hover {
    background: #ffead6;
}

/* ========== 立即下载按钮 ========== */
.one23-dl-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    background: #fafafa;
    color: #666;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all .25s cubic-bezier(.4,0,.2,1);
    letter-spacing: .3px;
}

.one23-dl-download-btn:hover {
    background: #f0f0f0;
    border-color: #ccc;
    color: #333;
}

.one23-dl-download-btn:active {
    transform: scale(.96);
}

/* 直接跳转模式 (<a> 标签) */
.one23-dl-download-btn--direct {
    text-decoration: none;
}
.one23-dl-download-btn--direct:hover {
    text-decoration: none;
}

/* 纯色按钮配色（多方案） */
.one23-dl-download-btn--blue   { background:#145BF5; color:#fff; border-color:#145BF5; }
.one23-dl-download-btn--green  { background:#07c160; color:#fff; border-color:#07c160; }
.one23-dl-download-btn--purple { background:#6341f0; color:#fff; border-color:#6341f0; }
.one23-dl-download-btn--orange { background:#ff6a00; color:#fff; border-color:#ff6a00; }
.one23-dl-download-btn--red    { background:#e60012; color:#fff; border-color:#e60012; }
.one23-dl-download-btn--cyan   { background:#00b3c4; color:#fff; border-color:#00b3c4; }
.one23-dl-download-btn--dark   { background:#1d1d1f; color:#fff; border-color:#1d1d1f; }

.one23-dl-download-btn--blue,
.one23-dl-download-btn--green,
.one23-dl-download-btn--purple,
.one23-dl-download-btn--orange,
.one23-dl-download-btn--red,
.one23-dl-download-btn--cyan,
.one23-dl-download-btn--dark { color:#fff; }

.one23-dl-download-btn--blue:hover,
.one23-dl-download-btn--green:hover,
.one23-dl-download-btn--purple:hover,
.one23-dl-download-btn--orange:hover,
.one23-dl-download-btn--red:hover,
.one23-dl-download-btn--cyan:hover,
.one23-dl-download-btn--dark:hover { color:#fff; filter:brightness(1.08); }

/* ========== 侧边栏小工具优化（窄容器） ========== */
/* 侧边栏宽度有限，改为纵向紧凑布局：图标+名称一行，按钮全宽 */
.one23-dl-widget {
    margin: 0;
}
.one23-dl-widget .one23-dl-box {
    margin: 0;
    padding: 20px 18px 18px;
    border-radius: 14px;
}
.one23-dl-widget .one23-dl-title {
    font-size: 15px;
    margin-bottom: 14px;
    padding-bottom: 12px;
}
.one23-dl-widget .one23-dl-item-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px 14px;
}
.one23-dl-widget .one23-dl-item-left {
    width: 100%;
}
.one23-dl-widget .one23-dl-download-btn {
    width: 100%;
    padding: 10px 16px;
}

/* ========== 弹窗遮罩 ========== */
.one23-dl-modal-overlay {
    display: none;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    animation: one23FadeIn .2s ease;
}

@keyframes one23FadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ========== 弹窗主体（基础） ========== */
.one23-dl-modal {
    background: #fff;
    border-radius: 22px;
    max-width: 400px;
    width: 92vw;
    position: relative;
    box-shadow: 0 24px 64px rgba(20,20,40,.22);
    animation: one23SlideUp .32s cubic-bezier(.2,.8,.2,1);
    overflow: hidden;
}

@keyframes one23SlideUp {
    from {
        opacity: 0;
        transform: translateY(18px) scale(.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========== 关闭按钮 ========== */
.one23-dl-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    border: none;
    background: #f3f4f6;
    color: #9aa0aa;
    font-size: 16px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s ease;
    line-height: 1;
    z-index: 3;
}
.one23-dl-modal-close:hover {
    background: #e8e8e8;
    color: #333;
}

/* ========== 二维码卡片 ========== */
.one23-dl-modal-qr-card {
    position: relative;
    width: 196px;
    height: 196px;
    margin: 0 auto 16px;
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 18px;
    padding: 12px;
    box-sizing: border-box;
    box-shadow: 0 8px 22px rgba(20,20,40,.06);
}
.one23-dl-modal-qr {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.one23-dl-modal-qr svg,
.one23-dl-modal-qr img {
    display: block;
    width: 100%;
    height: 100%;
}
/* 二维码定位角标（方案A） */
.one23-dl-qr-corner {
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2.5px solid var(--one23-pc, #6341f0);
    border-radius: 3px;
}
.one23-dl-qr-corner.c1 { top:-2px; left:-2px; border-right:none; border-bottom:none; }
.one23-dl-qr-corner.c2 { top:-2px; right:-2px; border-left:none; border-bottom:none; }
.one23-dl-qr-corner.c3 { bottom:-2px; left:-2px; border-right:none; border-top:none; }
.one23-dl-qr-corner.c4 { bottom:-2px; right:-2px; border-left:none; border-top:none; }

/* ========== 提示文案 ========== */
.one23-dl-modal-qr-tip {
    margin: 0 0 16px;
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
    text-align: center;
}
.one23-dl-modal-qr-tip strong {
    color: var(--one23-pc, #1d1d1f);
    font-weight: 700;
}

/* ========== 提取码 / 解压密码 信息卡 ========== */
.one23-dl-creds {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}
.one23-dl-cred {
    flex: 1;
    min-width: 0;
    background: #f8f9fb;
    border: 1px solid #eef0f4;
    border-radius: 14px;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    transition: all .2s ease;
}
.one23-dl-cred:hover {
    background: #f1f3f7;
    border-color: #dfe3ea;
}
.one23-dl-cred-label {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 3px;
}
.one23-dl-cred-val {
    font-size: 15px;
    font-weight: 700;
    color: #1d1d1f;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.one23-dl-cred-txt {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.one23-dl-cred-copy {
    color: var(--one23-pc, #6341f0);
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

/* ========== 方案A：品牌色头部 ========== */
.one23-dl-scheme-a .one23-dl-modal { text-align: center; }
.one23-dl-modal-hd {
    position: relative;
    padding: 22px 24px;
    color: #fff;
    background: linear-gradient(135deg, var(--one23-pc, #6341f0), var(--one23-pc2, #8b6bff));
    overflow: hidden;
}
.one23-dl-modal-hd::after {
    content: "";
    position: absolute;
    right: -30px;
    top: -30px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
}
.one23-dl-modal-hd::before {
    content: "";
    position: absolute;
    right: 40px;
    bottom: -40px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
}
.one23-dl-modal-hd-row {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
}
.one23-dl-modal-pic {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(255,255,255,.18);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.one23-dl-modal-pic svg {
    width: 28px;
    height: 28px;
}
.one23-dl-modal-hd-txt {
    text-align: left;
}
.one23-dl-modal-ey {
    font-size: 11px;
    opacity: .85;
    letter-spacing: 1px;
    font-weight: 600;
}
.one23-dl-modal-pn {
    font-size: 18px;
    font-weight: 800;
    margin-top: 2px;
}
.one23-dl-scheme-a .one23-dl-modal-close {
    background: rgba(255,255,255,.2);
    color: #fff;
}
.one23-dl-scheme-a .one23-dl-modal-close:hover {
    background: rgba(255,255,255,.32);
    color: #fff;
}
.one23-dl-modal-bd {
    padding: 24px 26px 22px;
}

/* ========== 方案B：极简居中 ========== */
.one23-dl-scheme-b .one23-dl-modal {
    text-align: center;
    padding: 30px 26px 24px;
}
.one23-dl-modal-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--one23-pc-soft, #f0ecff);
    color: var(--one23-pc, #6341f0);
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 13.5px;
    font-weight: 700;
    margin-bottom: 18px;
}
.one23-dl-modal-pill svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ========== 下载链接区域 ========== */
.one23-dl-modal-link-wrap {
    text-align: left;
}

.one23-dl-modal-link-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #999;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.one23-dl-modal-link-row {
    display: flex;
    gap: 8px;
}

.one23-dl-modal-link-input {
    flex: 1;
    padding: 11px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 12.5px;
    color: #374151;
    background: #f9fafb;
    outline: none;
    min-width: 0;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.5;
    text-align: left;
}
.one23-dl-modal-link-input:hover {
    border-color: #cfd4dc;
    background: #fff;
}

.one23-dl-modal-copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    background: var(--one23-pc, #6341f0);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all .2s ease;
}
.one23-dl-scheme-b .one23-dl-modal-copy-btn {
    background: #1d1d1f;
}
.one23-dl-modal-copy-btn:hover {
    filter: brightness(1.08);
    color: #fff;
}
.one23-dl-modal-copy-btn.copied {
    background: #d4edda !important;
    color: #34c759 !important;
    border-color: #c3e6cb !important;
}

/* ========== 暗色模式 ========== */
@media (prefers-color-scheme: dark) {
    .one23-dl-box {
        background: #1c1c1e;
        border-color: #2c2c2e;
    }
    .one23-dl-title {
        color: #e5e5e7;
        border-bottom-color: #2c2c2e;
    }
    .one23-dl-title svg {
        opacity: .45;
    }
    .one23-dl-item-row {
        background: #252527;
        border-color: #333;
    }
    .one23-dl-item-row:hover {
        background: #2a2a2d;
        border-color: #444;
    }
    .one23-dl-label {
        color: #e5e5e7;
    }
    .one23-dl-item-left > svg:first-child {
        color: #888;
    }
    .one23-dl-badge-code {
        background: #1a3a1a;
        color: #6bbf6b;
        border-color: #2d5a2d;
    }
    .one23-dl-badge-code:hover {
        background: #224422;
    }
    .one23-dl-badge-pwd {
        background: #3a2410;
        color: #f0a050;
        border-color: #553a1e;
    }
    .one23-dl-badge-pwd:hover {
        background: #442c14;
    }
    .one23-dl-download-btn {
        background: #2c2c2e;
        color: #999;
        border-color: #3a3a3c;
    }
    .one23-dl-download-btn:hover {
        background: #333;
        color: #ccc;
        border-color: #555;
    }
    .one23-dl-download-btn--blue {
        background: #145BF5;
        color: #fff;
        border-color: #145BF5;
    }
    .one23-dl-download-btn--blue:hover {
        background: #3b7af7;
        color: #fff;
    }

    /* 暗色弹窗 */
    .one23-dl-modal {
        background: #1c1c1e;
    }
    .one23-dl-scheme-b .one23-dl-modal-close {
        background: #2c2c2e;
        color: #888;
    }
    .one23-dl-scheme-b .one23-dl-modal-close:hover {
        background: #3a3a3c;
        color: #fff;
    }
    .one23-dl-modal-qr-card {
        border-color: #333;
        background: #fff;
    }
    .one23-dl-modal-qr-tip {
        color: #c7c7cc;
    }
    .one23-dl-modal-qr-tip strong {
        color: #fff;
    }
    .one23-dl-cred {
        background: #252527;
        border-color: #3a3a3c;
    }
    .one23-dl-cred:hover {
        background: #2c2c2e;
        border-color: #555;
    }
    .one23-dl-cred-label {
        color: #999;
    }
    .one23-dl-cred-val {
        color: #e5e5e7;
    }
    .one23-dl-modal-link-input {
        background: #252527;
        border-color: #3a3a3c;
        color: #e5e5e7;
    }
    .one23-dl-modal-link-input:hover {
        border-color: #555;
        background: #2c2c2e;
    }
    .one23-dl-modal-copy-btn.copied {
        background: #1a3a1a !important;
        color: #6bbf6b !important;
    }
}

/* ========== 移动端 ========== */
@media (max-width: 600px) {
    .one23-dl-box {
        margin: 1.5em -12px;
        padding: 20px 16px 18px;
        border-radius: 12px;
        border-left: none;
        border-right: none;
    }
    .one23-dl-title {
        font-size: 15px;
        margin-bottom: 14px;
        padding-bottom: 10px;
    }
    .one23-dl-item-row {
        padding: 12px 14px;
        gap: 8px;
        border-radius: 10px;
    }
    .one23-dl-item-left {
        gap: 8px;
        flex-wrap: wrap;
    }
    .one23-dl-label {
        font-size: 13px;
    }
    .one23-dl-badge {
        font-size: 11px;
        padding: 3px 8px;
    }
    .one23-dl-download-btn {
        padding: 8px 14px;
        font-size: 13px;
        border-radius: 6px;
    }
    .one23-dl-modal {
        max-width: 92vw;
    }
    .one23-dl-scheme-b .one23-dl-modal {
        padding: 26px 20px 20px;
    }
    .one23-dl-modal-bd {
        padding: 20px 20px 18px;
    }
    .one23-dl-modal-qr-card {
        width: 172px;
        height: 172px;
    }
    .one23-dl-creds {
        gap: 8px;
    }
}
