/* ═══════════════════════════════════════════════
   下载页面组件 — 命名空间 .dl 隔离
   字体/宽度/间距与 privacy.blade.php 保持一致
   ═══════════════════════════════════════════════ */

/* ── 亮色变量 ── */
.dl-page {
    --dl-surface: #ffffff;
    --dl-surface-raised: #f7f8fa;
    --dl-border: #e5e7eb;
    --dl-text: #1f2937;
    --dl-text-sec: #6b7280;
    --dl-text-muted: #9ca3af;
    --dl-accent: #0d9488;
    --dl-accent-hover: #0f766e;
    --dl-accent-dim: #ccfbf1;
    --dl-accent-glow: rgba(13, 148, 136, 0.06);
    --dl-accent-rgb: 13, 148, 136;
    --dl-icon-bg: rgba(13, 148, 136, 0.08);
    --dl-icon-bd: rgba(13, 148, 136, 0.2);
    --dl-info-bg: #eff6ff;  --dl-info-bd: #bfdbfe;  --dl-info-tx: #1e40af;
    --dl-ok-bg: #f0fdfa;    --dl-ok-bd: #99f6e4;    --dl-ok-tx: #115e59;
    --dl-warn-bg: #fffbeb;  --dl-warn-bd: #fde68a;  --dl-warn-tx: #92400e;
    --dl-th-bg: #f9fafb;
    --dl-tr-alt: #fafbfc;
    --dl-hero-bg: linear-gradient(135deg, #f0fdfa 0%, #ecfeff 50%, #eff6ff 100%);
}

/* ── 暗色变量 ── */
[data-bs-theme="dark"] .dl-page {
    --dl-surface: #252a33;
    --dl-surface-raised: #2d333d;
    --dl-border: #3a404a;
    --dl-text: #e5e7eb;
    --dl-text-sec: #9ca3af;
    --dl-text-muted: #6b7280;
    --dl-accent: #2dd4bf;
    --dl-accent-hover: #14b8a6;
    --dl-accent-dim: #134e4a;
    --dl-accent-glow: rgba(45, 212, 191, 0.08);
    --dl-accent-rgb: 45, 212, 191;
    --dl-icon-bg: rgba(45, 212, 191, 0.1);
    --dl-icon-bd: rgba(45, 212, 191, 0.25);
    --dl-info-bg: rgba(96,165,250,.08);  --dl-info-bd: rgba(96,165,250,.2);  --dl-info-tx: #60a5fa;
    --dl-ok-bg: rgba(52,211,153,.08);    --dl-ok-bd: rgba(52,211,153,.2);    --dl-ok-tx: #34d399;
    --dl-warn-bg: rgba(251,191,36,.08);  --dl-warn-bd: rgba(251,191,36,.2);  --dl-warn-tx: #fbbf24;
    --dl-th-bg: #2d333d;
    --dl-tr-alt: #282e38;
    --dl-hero-bg: linear-gradient(135deg, #134e4a 0%, #1e3a5f 50%, #1a1e2e 100%);
}

/* ── 容器 ── */
.dl-page {
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem 1rem 1.5rem;
    color: var(--dl-text);
    font-size: 15px;
    line-height: 1.8;
}

/* ── 页头 ── */
.dl-header {
    text-align: center;
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--dl-border);
    position: relative;
}
.dl-header::after {
    content: '';
    position: absolute; bottom: -1px; left: 50%; transform: translateX(-50%);
    width: 100px; height: 2px;
    background: linear-gradient(90deg, transparent, var(--dl-accent), transparent);
}
.dl-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
    color: var(--dl-accent);
    background: var(--dl-accent-glow);
    border: 1px solid var(--dl-icon-bd);
    padding: 4px 14px; border-radius: 100px; margin-bottom: 12px;
}
.dl-header h1 {
    font-size: clamp(22px, 4vw, 32px); font-weight: 700;
    color: var(--dl-text); margin: 0 0 8px;
}
.dl-subtitle { font-size: 14px; color: var(--dl-text-sec); max-width: 500px; margin: 0 auto; }
.dl-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin-top: 12px; font-size: 12px; color: var(--dl-text-muted); }
.dl-meta span { display: flex; align-items: center; gap: 4px; }

/* ── 章节卡片 ── */
.dl-sec {
    background: var(--dl-surface);
    border: 1px solid var(--dl-border);
    border-radius: 10px;
    padding: 22px 20px;
    margin-bottom: 12px;
    transition: border-color .2s, box-shadow .2s;
    opacity: 0; transform: translateY(10px);
    animation: dl-up .4s ease forwards;
}
.dl-sec:nth-child(1){animation-delay:.02s}
.dl-sec:nth-child(2){animation-delay:.04s}
.dl-sec:nth-child(3){animation-delay:.06s}
.dl-sec:nth-child(4){animation-delay:.08s}
.dl-sec:nth-child(5){animation-delay:.10s}
.dl-sec:nth-child(6){animation-delay:.12s}
.dl-sec:nth-child(7){animation-delay:.14s}
.dl-sec:nth-child(8){animation-delay:.16s}
@keyframes dl-up { to { opacity:1; transform:translateY(0) } }

.dl-sec:hover { border-color: var(--dl-accent-dim); box-shadow: 0 2px 12px var(--dl-accent-glow); }

@media (prefers-reduced-motion: reduce) {
    .dl-sec { opacity:1; transform:none; animation:none; }
    .dl-ripple-ring { animation: none !important; display: none; }
}

/* ── 章节头 ── */
.dl-head { display:flex; align-items:center; gap:10px; margin-bottom:12px; padding-bottom:10px; border-bottom:1px solid var(--dl-border); }
.dl-ico { width:30px; height:30px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:15px; flex-shrink:0; background:var(--dl-icon-bg); border:1px solid var(--dl-icon-bd); }
.dl-head h2 { font-size:16px; font-weight:700; color:var(--dl-text); margin:0; }

/* ── 主下载卡片 ── */
.dl-hero-sec {
    background: var(--dl-hero-bg);
    border-color: var(--dl-icon-bd);
    text-align: center;
    padding: 28px 20px;
}

/* ── 平台检测 ── */
.dl-platform-bar {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12px;
    color: var(--dl-text-sec);
    background: var(--dl-surface);
    border: 1px solid var(--dl-border);
    border-radius: 100px; padding: 6px 16px;
    margin-bottom: 24px;
}
.dl-platform-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--dl-accent);
    animation: dl-dot-pulse 2s ease-in-out infinite;
}
@keyframes dl-dot-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}

/* ── 下载按钮区 ── */
.dl-btn-area {
    position: relative;
    display: flex; flex-direction: column; align-items: center;
    padding: 8px 0 20px;
}
.dl-btn-wrap {
    position: relative;
    display: inline-flex;
}
.dl-btn {
    position: relative; z-index: 2;
    display: inline-flex; flex-direction: column; align-items: center; gap: 5px;
    padding: 20px 56px;
    border-radius: 16px;
    background: var(--dl-accent);
    color: #fff; border: none; cursor: pointer;
    transition: transform .25s cubic-bezier(.4,0,.2,1),
                box-shadow .25s,
                background .2s;
    box-shadow: 0 4px 24px rgba(var(--dl-accent-rgb), .25);
}
.dl-btn:hover {
    transform: scale(1.04);
    background: var(--dl-accent-hover);
    box-shadow: 0 8px 40px rgba(var(--dl-accent-rgb), .35);
}
.dl-btn:active { transform: scale(.97); }
.dl-btn.dl-loading {
    opacity: .6; pointer-events: none;
}
.dl-btn-label {
    font-size: 20px; font-weight: 700; letter-spacing: .06em;
}
.dl-btn-meta {
    font-size: 12px; opacity: .8;
}

/* ── 涟漪 ── */
.dl-ripple-ring {
    position: absolute; inset: 0;
    border-radius: 16px;
    border: 2px solid var(--dl-accent);
    pointer-events: none; z-index: 1;
    opacity: 0;
    animation: dl-ripple 2.8s cubic-bezier(0, 0, .2, 1) infinite;
}
.dl-ripple-ring:nth-child(2) { animation-delay: .9s; }
.dl-ripple-ring:nth-child(3) { animation-delay: 1.8s; }

@keyframes dl-ripple {
    0%   { transform: scale(1);   opacity: .4; }
    100% { transform: scale(1.7); opacity: 0; }
}

/* ── 备选下载 ── */
.dl-alt-row {
    display: flex; justify-content: center; flex-wrap: wrap;
    gap: 10px; margin-top: 20px;
}
.dl-alt-btn {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px;
    color: var(--dl-text-sec);
    background: var(--dl-surface);
    border: 1px solid var(--dl-border);
    border-radius: 8px; padding: 7px 14px;
    text-decoration: none;
    transition: border-color .2s, color .2s, background .2s;
    cursor: pointer;
}
.dl-alt-btn:hover {
    color: var(--dl-accent);
    border-color: var(--dl-accent-dim);
    background: var(--dl-accent-glow);
}

/* ── 内容 ── */
.dl-body p { color:var(--dl-text-sec); margin-bottom:8px; font-size:14px; line-height:1.85; }
.dl-body p:last-child { margin-bottom:0; }

/* ── 列表 ── */
.dl-ul { list-style:none; padding:0; margin:4px 0 8px; }
.dl-ul li { position:relative; padding:4px 0 4px 18px; font-size:14px; color:var(--dl-text-sec); line-height:1.8; }
.dl-ul li::before { content:''; position:absolute; left:2px; top:14px; width:5px; height:5px; border-radius:50%; background:var(--dl-accent-dim); }
.dl-ul li strong { color:var(--dl-text); font-weight:600; }

/* ── 信息网格 ── */
.dl-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}
.dl-mini-card {
    background: var(--dl-surface);
    border: 1px solid var(--dl-border);
    border-radius: 10px;
    padding: 16px 14px;
    display: flex; align-items: center; gap: 12px;
    transition: border-color .2s, box-shadow .2s;
    opacity: 0; transform: translateY(10px);
    animation: dl-up .4s ease forwards;
}
.dl-mini-card:nth-child(1) { animation-delay: .14s; }
.dl-mini-card:nth-child(2) { animation-delay: .18s; }
.dl-mini-card:nth-child(3) { animation-delay: .22s; }
.dl-mini-card:hover {
    border-color: var(--dl-accent-dim);
    box-shadow: 0 2px 10px var(--dl-accent-glow);
}
.dl-mini-ico {
    width: 36px; height: 36px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; flex-shrink: 0;
    background: var(--dl-icon-bg); border: 1px solid var(--dl-icon-bd);
}
.dl-mini-info {
    display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.dl-mini-label {
    font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
    color: var(--dl-text-muted);
}
.dl-mini-value {
    font-size: 15px; font-weight: 700; color: var(--dl-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── 表格 ── */
.dl-tbl-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; margin:10px 0; }
.dl-tbl { width:100%; border-collapse:collapse; font-size:13px; }
.dl-tbl thead th { text-align:left; padding:8px 12px; font-weight:600; color:var(--dl-text); background:var(--dl-th-bg); border-bottom:2px solid var(--dl-border); font-size:12px; letter-spacing:.03em; white-space:nowrap; }
.dl-tbl thead th:first-child { border-radius:6px 0 0 0; }
.dl-tbl thead th:last-child  { border-radius:0 6px 0 0; }
.dl-tbl tbody td { padding:8px 12px; color:var(--dl-text-sec); border-bottom:1px solid var(--dl-border); }
.dl-tbl tbody tr:nth-child(even) { background:var(--dl-tr-alt); }
.dl-tbl tbody tr:last-child td { border-bottom:none; }
.dl-ver-tag { font-weight:600; color:var(--dl-accent); }
.dl-size-tag { color:var(--dl-text-muted); }
.dl-dl-link {
    color: var(--dl-accent); text-decoration: none;
    border: 1px solid var(--dl-icon-bd);
    border-radius: 6px; padding: 3px 10px;
    font-size: 12px;
    transition: background .2s, color .2s;
    white-space: nowrap;
}
.dl-dl-link:hover { background: var(--dl-accent); color: #fff; }

/* ── 提示框 ── */
.dl-box { border-radius:8px; padding:11px 13px; margin:8px 0; font-size:13px; line-height:1.75; display:flex; gap:8px; align-items:flex-start; }
.dl-box-e { font-size:14px; flex-shrink:0; margin-top:1px; }
.dl-box-info { background:var(--dl-info-bg); border:1px solid var(--dl-info-bd); color:var(--dl-info-tx); }
.dl-box-ok   { background:var(--dl-ok-bg);   border:1px solid var(--dl-ok-bd);   color:var(--dl-ok-tx); }

/* ── 折叠 FAQ ── */
.dl-details { margin-top: 2px; }
.dl-summary {
    font-size: 15px; font-weight: 600;
    color: var(--dl-text); cursor: pointer;
    padding: 8px 0; list-style: none;
    display: flex; align-items: center; gap: 8px;
}
.dl-summary::-webkit-details-marker { display: none; }
.dl-summary::before {
    content: '▸'; font-size: 12px; color: var(--dl-accent);
    transition: transform .2s; display: inline-block;
}
.dl-details[open] .dl-summary::before { transform: rotate(90deg); }
.dl-details-body { padding-top: 8px; }

/* ── 错误状态 ── */
.dl-error { text-align: center; padding: 24px 16px; color: var(--dl-text-muted); font-size: 14px; }
.dl-error-btn {
    margin-top: 12px; display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--dl-accent); cursor: pointer;
    background: var(--dl-accent-glow); border: 1px solid var(--dl-icon-bd);
    border-radius: 8px; padding: 6px 16px;
    transition: background .2s;
}
.dl-error-btn:hover { background: var(--dl-accent-dim); }

/* ── 响应式 ── */
@media (max-width:600px) {
    .dl-page { padding:1rem .75rem 1rem; }
    .dl-sec { padding:16px 14px; }
    .dl-hero-sec { padding: 22px 14px; }
    .dl-meta { flex-direction:column; gap:3px; }
    .dl-grid { grid-template-columns: 1fr; }
    .dl-btn { padding: 16px 40px; }
    .dl-btn-label { font-size: 17px; }
    .dl-alt-row { flex-direction: column; align-items: center; }
    .dl-tbl { font-size:12px; }
    .dl-tbl thead th, .dl-tbl tbody td { padding:6px 8px; }
}
