/* ========== 后台写文章页面样式 ========== */
.netdisk-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #4e73df;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s;
    cursor: pointer;
}

.netdisk-toggle:hover {
    background: #f0f4ff;
    text-decoration: none;
    color: #2e59d9;
}

.netdisk-toggle i {
    font-size: 12px;
}

.netdisk-panel {
    display: none;
    margin-top: 10px;
    padding: 15px;
    background: #f8f9fc;
    border: 1px solid #e3e6f0;
    border-radius: 8px;
    animation: netdiskFadeIn 0.3s ease;
}

.netdisk-panel.active {
    display: block;
}

.netdisk-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.netdisk-row:last-child {
    margin-bottom: 0;
}

.netdisk-select {
    width: auto;
    min-width: 130px;
    padding: 8px 12px;
    border: 1px solid #d1d3e2;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
}

.netdisk-input {
    flex: 1;
    min-width: 180px;
    padding: 8px 12px;
    border: 1px solid #d1d3e2;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.netdisk-input:focus {
    border-color: #4e73df;
    outline: none;
    box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.1);
}

.netdisk-pwd {
    max-width: 120px;
}

.netdisk-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #5a5c69;
    cursor: pointer;
    margin: 0;
}

.netdisk-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ========== 前台下载模块样式 ========== */
.netdisk-download {
    margin: 24px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.netdisk-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
    cursor: pointer;
}

.netdisk-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: #d0d0d0;
    text-decoration: none !important;
}

.netdisk-card:active {
    transform: translateY(0);
}

/* 左侧图标 */
.netdisk-icon-wrap {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.netdisk-icon-wrap svg {
    width: 28px;
    height: 28px;
}

/* 中间信息区 */
.netdisk-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.netdisk-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.netdisk-meta {
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 8px;
}

.netdisk-count {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 8px;
    background: #f0f0f0;
    border-radius: 10px;
    font-size: 11px;
    color: #888;
}

.netdisk-count::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #1cc88a;
    border-radius: 50%;
}

.netdisk-pwd-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
    margin-top: 2px;
}

.netdisk-pwd-line code {
    font-family: "SF Mono", "Courier New", monospace;
    font-size: 14px;
    font-weight: 700;
    color: #e74a3b;
    background: #fff0f0;
    padding: 2px 10px;
    border-radius: 6px;
    border: 1px solid #ffd4d4;
    letter-spacing: 1.5px;
}

.netdisk-pwd-line .netdisk-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}

.netdisk-pwd-line .netdisk-copy-btn:hover {
    background: #ebebeb;
    border-color: #ccc;
}

.netdisk-pwd-line .netdisk-copy-btn svg {
    width: 12px;
    height: 12px;
}

.netdisk-pwd-line .netdisk-copy-btn.copied {
    background: #e8f5e9;
    border-color: #a5d6a7;
    color: #2e7d32;
}

/* 右侧下载按钮 */
.netdisk-action {
    flex-shrink: 0;
}

.netdisk-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.netdisk-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.netdisk-btn:active {
    transform: scale(0.95);
}

.netdisk-btn svg {
    width: 20px;
    height: 20px;
}

/* 暗色模式 */
@media (prefers-color-scheme: dark) {
    .netdisk-card {
        background: #1e1e1e;
        border-color: #333;
    }
    .netdisk-card:hover {
        border-color: #444;
    }
    .netdisk-title {
        color: #e8e8e8;
    }
    .netdisk-meta {
        color: #888;
    }
    .netdisk-count {
        background: #2a2a2a;
        color: #aaa;
    }
    .netdisk-pwd-line {
        color: #aaa;
    }
    .netdisk-pwd-line code {
        background: #2a1a1a;
        border-color: #5a3a3a;
    }
    .netdisk-pwd-line .netdisk-copy-btn {
        background: #2a2a2a;
        border-color: #3a3a3a;
        color: #bbb;
    }
    .netdisk-pwd-line .netdisk-copy-btn:hover {
        background: #333;
    }
}

/* 响应式 */
@media (max-width: 480px) {
    .netdisk-card {
        padding: 14px 16px;
        gap: 12px;
    }
    .netdisk-icon-wrap {
        width: 42px;
        height: 42px;
    }
    .netdisk-icon-wrap svg {
        width: 20px;
        height: 20px;
    }
    .netdisk-btn {
        width: 40px;
        height: 40px;
    }
    .netdisk-btn svg {
        width: 18px;
        height: 18px;
    }
    .netdisk-title {
        font-size: 14px;
    }
    .netdisk-row {
        flex-direction: column;
        align-items: stretch;
    }
    .netdisk-select, .netdisk-input, .netdisk-pwd {
        width: 100%;
        max-width: 100%;
    }
}


/* ========== 后台网盘图标预览（统一风格） ========== */
.netdisk-type-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.netdisk-icon-preview {
    display: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    background: #fff;
    border: 1px solid #d1d3e2;
}

.netdisk-icon-preview svg {
    width: 20px;
    height: 20px;
}

/* ========== 链接验证错误提示 ========== */
.netdisk-url-error {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fff0f0;
    border: 1px solid #e74a3b;
    border-radius: 6px;
    color: #e74a3b;
    font-size: 13px;
    animation: netdiskFadeIn 0.2s ease;
}

/* ========== 链接验证警告提示 ========== */
.netdisk-url-warn {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fff8e1;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    font-size: 13px;
    animation: netdiskFadeIn 0.2s ease;
}

/* ========== 输入框验证状态 ========== */
.netdisk-input.netdisk-url-invalid {
    border-color: #e74a3b !important;
    box-shadow: 0 0 0 3px rgba(231, 74, 59, 0.1) !important;
}

.netdisk-input.netdisk-url-valid {
    border-color: #1cc88a !important;
    box-shadow: 0 0 0 3px rgba(28, 200, 138, 0.1) !important;
}

@keyframes netdiskFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
