/* ==========================================================================
   下载页（/download 软件下载 · /download/server 我的世界服务端下载）
   颜色 / 圆角 / 阴影都取 theme.css 的设计令牌，深浅色自动跟着走。
   ========================================================================== */

.dl-hero {
    position: relative;
    overflow: hidden;
    padding: 2.2rem;
    margin-bottom: 1.2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(120% 140% at 0% 0%, var(--accent-soft) 0%, transparent 55%),
        var(--panel);
    box-shadow: var(--shadow-sm);
}

.dl-hero::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--ambient-1, rgba(147, 197, 253, .35)) 0%, transparent 70%);
    pointer-events: none;
}

.dl-hero-tag {
    display: inline-block;
    margin-bottom: .7rem;
    padding: 3px 12px;
    border: 1px solid var(--accent-border);
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .04em;
}

.dl-hero h1 {
    margin: 0 0 .5rem;
    font-size: 1.9rem;
    color: var(--text-strong);
}

.dl-hero-sub {
    margin: 0 0 .7rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--accent-dark);
}

.dl-hero-text {
    max-width: 720px;
    margin: 0;
    line-height: 1.8;
    color: var(--muted);
    white-space: pre-line;
}

.dl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.dl-card {
    display: flex;
    flex-direction: column;
    gap: .8rem;
    padding: 1.4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--panel);
    box-shadow: var(--shadow-sm);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.dl-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-border);
    box-shadow: var(--shadow-hover);
}

.dl-card.is-pending {
    opacity: .92;
}

.dl-card-head {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
}

.dl-card-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    background: var(--panel-sunken);
    font-size: 1.6rem;
}

.dl-card-head h2,
.dl-card-head h3 {
    margin: .1rem 0 .35rem;
    font-size: 1.12rem;
    color: var(--text-strong);
}

.dl-badge {
    display: inline-block;
    margin-bottom: .25rem;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: .72rem;
    font-weight: 600;
}

.dl-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.dl-meta span {
    padding: 2px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--panel-soft);
    color: var(--muted);
    font-size: .78rem;
}

.dl-note {
    margin: 0;
    line-height: 1.7;
    color: var(--muted);
    font-size: .93rem;
}

.dl-btn {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .72rem 1.1rem;
    border-radius: var(--radius);
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: background .16s ease;
}

.dl-btn:hover {
    background: var(--accent-strong);
    color: #fff;
}

.dl-btn.is-disabled {
    background: var(--panel-sunken);
    color: var(--muted);
    cursor: not-allowed;
}

.dl-notice {
    padding: 1.1rem 1.3rem;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    background: var(--panel-soft);
    color: var(--muted);
    line-height: 1.8;
}

.dl-notice strong {
    display: block;
    margin-bottom: .25rem;
    color: var(--text-strong);
}

.dl-notice p {
    margin: 0;
    white-space: pre-line;
}

.dl-empty {
    grid-column: 1 / -1;
    padding: 2rem;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    text-align: center;
    color: var(--muted);
}

/* —— 分服务器标签 + 分组标题 —— */
.dl-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 0 0 1.2rem;
}

.dl-tab {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .5rem .95rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--panel);
    color: var(--muted);
    font-weight: 600;
    text-decoration: none;
    transition: border-color .16s ease, color .16s ease, background .16s ease;
}

.dl-tab:hover {
    border-color: var(--accent-border);
    color: var(--accent-dark);
}

.dl-tab.is-active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.dl-tab-count {
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--panel-sunken);
    color: var(--muted);
    font-size: .78rem;
}

.dl-tab.is-active .dl-tab-count {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

.dl-group + .dl-group {
    margin-top: .3rem;
}

.dl-group-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin: 0 0 .8rem;
}

.dl-group-head h2 {
    margin: 0 0 .2rem;
    font-size: 1.25rem;
    color: var(--text-strong);
}

.dl-group-head p {
    margin: 0;
    color: var(--muted);
    font-size: .9rem;
}

.dl-group-link {
    color: var(--accent-dark);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
}

.dl-group-link:hover {
    text-decoration: underline;
}

/* —— 后台：下载项编辑器 —— */
.dl-admin-row {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: .9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel-soft);
}

.dl-admin-row-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .5rem;
}

.dl-admin-row-file,
.dl-admin-row-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

.dl-admin-row-file [data-item-url] {
    flex: 1 1 260px;
    min-width: 0;
}

.dl-admin-row-foot [name="item_badge"] {
    max-width: 180px;
}

.dl-admin-row [data-item-status] {
    color: var(--muted);
    font-size: .82rem;
}

.dl-admin-hint {
    margin: .3rem 0 .8rem;
    padding: .6rem .8rem;
    border-left: 3px solid var(--accent);
    background: var(--accent-soft);
    color: var(--muted);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: .88rem;
    line-height: 1.7;
}

@media (max-width: 640px) {
    .dl-hero {
        padding: 1.5rem;
    }

    .dl-hero h1 {
        font-size: 1.5rem;
    }

    .dl-grid {
        grid-template-columns: 1fr;
    }
}
