/* ============================================================
   资源下载页：前台展示 + 后台编辑表单
   前台 download.php 与后台 admin_download.php 共用本文件
   ============================================================ */

/* ---------- 前台：覆盖 front.css 的固定布局，让页面可以正常滚动 ---------- */
body.dl-body{
    display:block;
    height:auto;
    min-height:100%;
    overflow-y:auto;
    overflow-x:hidden;
    background:#f5f7fa;
}
.dl-body .header{ height:60px; flex:none; }

.dl-wrap{ max-width:980px; margin:0 auto; padding:28px 24px 70px; }

/* 后台编辑页：不用 admin.css 的 100vh 固定布局，内容长时能正常滚动 */
body.dl-admin-body{
    min-height:100vh; height:auto; overflow-y:auto; overflow-x:hidden;
    background:#f5f7fa; color:#2d3748;
    font-family:"Microsoft YaHei",-apple-system,system-ui,sans-serif;
}
.dl-admin-wrap{ max-width:1000px; margin:0 auto; padding:28px 24px 70px; }

.dl-topbar{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:22px; flex-wrap:wrap; }
.dl-back{
    display:inline-flex; align-items:center; gap:8px;
    padding:9px 16px; border:1px solid #dbe3f0; border-radius:10px;
    background:#fff; color:#2563eb; font-size:14px; font-weight:600;
    text-decoration:none; transition:.18s; box-shadow:0 1px 2px rgba(16,24,40,.04);
}
.dl-back:hover{ border-color:#2563eb; background:#eff6ff; color:#1d4ed8; transform:translateX(-2px); }
.dl-back svg{ flex:none; }
.dl-top-note{ font-size:13px; color:#9aa3b2; }

/* ---------- 前台：顶部横幅 ---------- */
.dl-hero{
    position:relative; overflow:hidden;
    border-radius:20px; padding:38px 40px;
    background:#2563eb;
    background:linear-gradient(135deg,#2563eb 0%,#4f46e5 100%);
    color:#fff; box-shadow:0 14px 34px rgba(37,99,235,.22);
}
.dl-hero::after{
    content:""; position:absolute; right:-70px; top:-90px;
    width:280px; height:280px; border-radius:50%;
    background:radial-gradient(circle,rgba(255,255,255,.18),transparent 70%);
}
.dl-hero::before{
    content:""; position:absolute; right:90px; bottom:-110px;
    width:200px; height:200px; border-radius:50%;
    background:radial-gradient(circle,rgba(255,255,255,.10),transparent 70%);
}
.dl-hero h1{ position:relative; z-index:1; font-size:30px; font-weight:800; letter-spacing:.4px; line-height:1.3; }
.dl-hero p{ position:relative; z-index:1; margin-top:10px; width:auto; max-width:100%; font-size:14.5px; line-height:1.8; color:rgba(255,255,255,.9); }

/* ---------- 前台：区块标题 ---------- */
.dl-section{ margin-top:32px; }
.dl-sec-head{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:15px; flex-wrap:wrap; }
.dl-sec-head h2{ display:flex; align-items:center; gap:10px; font-size:19px; font-weight:700; color:#1f2733; }
.dl-bar{ display:inline-block; width:4px; height:18px; border-radius:3px; background:#2563eb; }
.dl-sec-note{ font-size:12.5px; color:#9aa3b2; }

/* ---------- 前台：下载卡片 ---------- */
.dl-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.dl-card{
    display:flex; flex-direction:column; min-width:0; min-height:218px;
    background:#fff; border:1px solid #e6e8ec; border-radius:16px;
    padding:24px 22px; color:#1f2733; text-decoration:none;
    box-shadow:0 1px 2px rgba(16,24,40,.05),0 1px 3px rgba(16,24,40,.06);
    transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}
.dl-card:hover{ transform:translateY(-4px); border-color:#bfdbfe; box-shadow:0 14px 32px rgba(16,24,40,.14); color:#1f2733; }
.dl-card-ic{
    width:46px; height:46px; border-radius:13px; flex:none;
    background:#eff6ff; color:#2563eb;
    display:flex; align-items:center; justify-content:center; margin-bottom:16px;
}
.dl-card-title{ font-size:17px; font-weight:700; line-height:1.4; }
.dl-card-descr{ flex:1; margin-top:8px; font-size:13.5px; line-height:1.75; color:#5b6573; }
.dl-card-btn{
    display:flex; align-items:center; justify-content:center; gap:8px;
    height:40px; margin-top:18px; border-radius:10px;
    background:#2563eb; color:#fff; font-size:14px; font-weight:600;
    transition:background .18s ease;
}
.dl-card:hover .dl-card-btn{ background:#1d4ed8; }
.dl-card-btn svg{ flex:none; }
.dl-card.is-pending{ cursor:default; }
.dl-card.is-pending:hover{ transform:none; border-color:#e6e8ec; box-shadow:0 1px 2px rgba(16,24,40,.05),0 1px 3px rgba(16,24,40,.06); }
.dl-card.is-pending .dl-card-btn{ background:#eef1f5; color:#98a2b3; }
.dl-card.is-pending .dl-card-ic{ background:#f3f5f8; color:#98a2b3; }
.dl-grid-empty{
    grid-column:1/-1; padding:40px 20px; text-align:center;
    background:#fff; border:1px dashed #dbe3f0; border-radius:14px;
    color:#9aa3b2; font-size:14px;
}

/* ---------- 前台：更新日志大框 ---------- */
.dl-log{
    background:#fff; border:1px solid #e6e8ec; border-radius:18px;
    padding:30px 34px; min-height:180px;
    box-shadow:0 1px 2px rgba(16,24,40,.05),0 1px 3px rgba(16,24,40,.06);
}
.dl-log.doc > :first-child{ margin-top:0; }
.dl-log-empty{ color:#9aa3b2; font-size:14px; }

.dl-foot{ margin-top:36px; text-align:center; }
.dl-foot a{ font-size:13.5px; color:#5b6573; text-decoration:none; }
.dl-foot a:hover{ color:#2563eb; }

/* ---------- 后台：编辑表单 ---------- */
.dl-admin{ max-width:920px; }
.dl-ok{
    background:#ecfdf5; border:1px solid #a7f3d0; color:#047857;
    padding:11px 16px; border-radius:9px; margin-bottom:18px; font-size:14px;
}
.dl-page-head{ margin-bottom:20px; }
.dl-page-head h1{ font-size:24px; font-weight:700; color:#1a1a2e; }
.dl-page-head p{ margin-top:7px; font-size:13.5px; color:#7b8494; line-height:1.7; }
.dl-panel{ background:#fff; border:1px solid #e9ecf3; border-radius:12px; padding:20px 22px; margin-bottom:18px; }
.dl-panel h3{
    display:flex; align-items:center; justify-content:space-between; gap:12px;
    font-size:16px; font-weight:700; color:#1a1a2e; margin-bottom:6px;
}
.dl-panel-sub{ font-size:12.5px; color:#9aa3b2; margin-bottom:12px; line-height:1.6; }
.dl-label{ display:block; font-size:13px; font-weight:600; color:#5b6573; margin:12px 0 6px; }
.dl-input{
    width:100%; padding:10px 12px; border:1px solid #e0e3e8; border-radius:8px;
    font-size:14px; outline:none; background:#fafbfc; color:#2d3748;
    transition:border-color .18s ease,box-shadow .18s ease;
}
.dl-input:focus{ border-color:#667eea; background:#fff; box-shadow:0 0 0 3px rgba(102,126,234,.12); }
textarea.dl-input{ min-height:72px; resize:vertical; line-height:1.7; }
.dl-hint{ font-size:12.5px; color:#9aa3b2; margin-top:7px; line-height:1.7; }
.dl-hint code{ background:#f1f3f7; padding:1px 5px; border-radius:4px; font-size:12px; color:#667eea; }

.dl-item{ border:1px solid #e9ecf3; border-radius:10px; padding:15px; margin-bottom:12px; background:#fbfcff; }
.dl-item-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
.dl-item-head strong{ font-size:13px; font-weight:700; color:#667eea; }
.dl-del{ border:none; background:#fff0f0; color:#d64545; padding:5px 12px; border-radius:6px; font-size:12px; cursor:pointer; }
.dl-del:hover{ background:#ffe2e2; }
.dl-item-grid{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.dl-item-grid .full{ grid-column:1/-1; }
.dl-on{ display:flex; align-items:center; gap:7px; font-size:13px; color:#5b6573; margin-top:11px; cursor:pointer; }
.dl-empty{ padding:18px; text-align:center; color:#9aa3b2; font-size:13.5px; }
.dl-actions{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:6px; }

/* ---------- 响应式 ---------- */
@media (max-width:860px){
    .dl-grid{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:600px){
    .dl-wrap{ padding:20px 14px 50px; }
    .dl-hero{ padding:28px 22px; border-radius:16px; }
    .dl-hero h1{ font-size:24px; }
    .dl-grid{ grid-template-columns:1fr; }
    .dl-log{ padding:22px 18px; }
    .dl-item-grid{ grid-template-columns:1fr; }
    .dl-item-grid .full{ grid-column:auto; }
    .dl-panel{ padding:16px 14px; }
}
