/* 123ONE 文章下载插件 — 前端样式 */

/* ========== 容器 ========== */
.one23-dl-box {
    margin: 2.5em 0;
    padding: 28px 28px 24px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.02);
}

/* ========== 标题 ========== */
.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-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: 20px;
    padding: 36px 32px 28px;
    max-width: 380px;
    width: 90vw;
    position: relative;
    box-shadow: 0 24px 64px rgba(0,0,0,.2);
    animation: one23SlideUp .3s cubic-bezier(.4,0,.2,1);
    text-align: center;
}

@keyframes one23SlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========== 关闭按钮 ========== */
.one23-dl-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    color: #999;
    font-size: 18px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s ease;
    line-height: 1;
}
.one23-dl-modal-close:hover {
    background: #e8e8e8;
    color: #333;
}

/* ========== 二维码区域 ========== */
.one23-dl-modal-qr-wrap {
    margin-bottom: 24px;
}

.one23-dl-modal-qr {
    display: block;
    width: 180px;
    height: 180px;
    margin: 0 auto 12px;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 8px;
    background: #fff;
}

.one23-dl-modal-qr-tip {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}
.one23-dl-modal-qr-tip strong {
    color: #1d1d1f;
    font-weight: 600;
}

/* ========== 下载链接区域 ========== */
.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: 10px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 13px;
    color: #1d1d1f;
    background: #f9f9f9;
    outline: none;
    min-width: 0;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.5;
}
.one23-dl-modal-link-input:hover {
    border-color: #999;
    background: #fff;
}

.one23-dl-modal-copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: #f5f5f5;
    color: #999;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all .2s ease;
}
.one23-dl-modal-copy-btn:hover {
    background: #e8e8e8;
    color: #555;
}
.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;
        box-shadow: 0 2px 16px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.04);
    }
    .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-modal {
        background: #1c1c1e;
    }
    .one23-dl-modal-close {
        background: #2c2c2e;
        color: #888;
    }
    .one23-dl-modal-close:hover {
        background: #3a3a3c;
        color: #fff;
    }
    .one23-dl-modal-qr {
        border-color: #333;
        background: #252527;
    }
    .one23-dl-modal-qr-tip {
        color: #999;
    }
    .one23-dl-modal-qr-tip strong {
        color: #e5e5e7;
    }
    .one23-dl-modal-link-label {
        color: #777;
    }
    .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 {
        background: #2c2c2e;
        color: #999;
        border-color: #3a3a3c;
    }
    .one23-dl-modal-copy-btn:hover {
        background: #333;
        color: #ccc;
    }
    .one23-dl-modal-copy-btn.copied {
        background: #1a3a1a !important;
        color: #6bbf6b !important;
        border-color: #2d5a2d !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 {
        padding: 28px 20px 22px;
        max-width: 90vw;
    }
    .one23-dl-modal-qr {
        width: 150px;
        height: 150px;
    }
}
