/* ============================================================
   Download Page — Redesigned v2 (3-column horizontal layout)
   ============================================================ */

/* ---- Page layout ---- */
.download-page-wrap {
    max-width: 1160px;
    margin: 0 auto;
}

/* ---- Engine selector tabs ---- */
.download-engine-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
}
.download-engine-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.25rem;
    border-radius: 40px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
    color: rgba(180,185,200,0.75);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}
.download-engine-tab img {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.download-engine-tab:hover {
    border-color: rgba(255,255,255,0.2);
    color: rgba(220,225,240,0.9);
    background: rgba(255,255,255,0.06);
}
.download-engine-tab:hover img { opacity: 1; }

/* ---- 3-column cards grid ---- */
.download-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    max-width: 1160px;
    margin: 0 auto;
}

/* ---- Card shell ---- */
.download-card {
    background: linear-gradient(160deg, rgba(16, 18, 36, 0.97) 0%, rgba(10, 11, 22, 0.99) 100%);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Top accent line per card type */
.download-card.card-personal::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0, 255, 136, 0.7) 35%,
        rgba(0, 212, 255, 0.7) 70%,
        transparent 100%);
}
.download-card.card-commercial::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0, 102, 255, 0.7) 35%,
        rgba(100, 180, 255, 0.7) 70%,
        transparent 100%);
}
.download-card.card-godot::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(71, 140, 191, 0.7) 35%,
        rgba(100, 200, 255, 0.7) 70%,
        transparent 100%);
}

.download-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.12);
}
.download-card.card-personal:hover {
    box-shadow: 0 20px 56px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 255, 136, 0.06);
}
.download-card.card-commercial:hover {
    box-shadow: 0 20px 56px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 102, 255, 0.06);
}
.download-card.card-godot:hover {
    box-shadow: 0 20px 56px rgba(0, 0, 0, 0.5), 0 0 40px rgba(71, 140, 191, 0.08);
}

/* ---- Logo stage (compact) ---- */
.engine-logo-unity,
.engine-logo-unreal,
.engine-logo-godot {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120px;
    margin: 0;
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

.engine-logo-unity::after,
.engine-logo-unreal::after,
.engine-logo-godot::after {
    content: '';
    position: absolute;
    bottom: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent, rgba(255, 255, 255, 0.06), transparent);
}

.engine-logo-unity {
    background:
        radial-gradient(ellipse at 50% 70%,
            rgba(0, 212, 255, 0.14) 0%,
            rgba(0, 60, 100, 0.20) 45%,
            transparent 75%);
}
.engine-logo-unreal {
    background:
        radial-gradient(ellipse at 50% 70%,
            rgba(60, 130, 255, 0.12) 0%,
            rgba(0, 40, 100, 0.18) 45%,
            transparent 75%);
}
.engine-logo-godot {
    background:
        radial-gradient(ellipse at 50% 70%,
            rgba(71, 140, 191, 0.16) 0%,
            rgba(30, 70, 120, 0.20) 45%,
            transparent 75%);
}

.engine-logo-unity img {
    width: 68px;
    height: 68px;
    filter: drop-shadow(0 0 18px rgba(0, 212, 255, 0.6));
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.engine-logo-unreal img {
    width: 68px;
    height: 68px;
    filter: brightness(0) invert(1) drop-shadow(0 0 18px rgba(80, 160, 255, 0.6));
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.engine-logo-godot img {
    width: 68px;
    height: 68px;
    filter: drop-shadow(0 0 18px rgba(71, 140, 191, 0.6));
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.download-card:hover .engine-logo-unity img,
.download-card:hover .engine-logo-unreal img,
.download-card:hover .engine-logo-godot img {
    transform: translateY(-4px) scale(1.05);
}

/* ---- Card body ---- */
.download-card-body {
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ---- Header row ---- */
.download-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.download-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}
.download-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

/* ---- Badge ---- */
.download-badge {
    padding: 0.18rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}
.download-badge-personal {
    background: rgba(0, 204, 128, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(0, 204, 128, 0.22);
}
.download-badge-commercial {
    background: rgba(0, 102, 255, 0.1);
    color: #7ab8ff;
    border: 1px solid rgba(0, 102, 255, 0.22);
}
.download-badge-godot {
    background: rgba(71, 140, 191, 0.1);
    color: #6bb8e0;
    border: 1px solid rgba(71, 140, 191, 0.25);
}

/* ---- Spec pills row ---- */
.download-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}
.download-spec-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: rgba(255,255,255,0.025);
    border: 1px solid transparent;
    font-size: 0.74rem;
    color: rgba(160,165,185,0.75);
    white-space: nowrap;
    cursor: default;
}
.download-spec-pill .spec-label {
    color: rgba(120,125,145,0.7);
    font-size: 0.7rem;
}
.download-spec-pill .spec-value {
    color: rgba(200,205,220,0.9);
    font-weight: 500;
}
.spec-value-primary { color: var(--primary-color) !important; }
.spec-value-blue    { color: #7ab8ff !important; }
.spec-value-godot   { color: #6bb8e0 !important; }

/* ---- Download items list (replaces table) ---- */
.dl-items-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 0;
    min-height: 96px;
}
/* Inner items container */
#unity-download-items,
#godot-download-items {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

/* Each download item as a clickable row */
.dl-item-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}
.dl-item-row:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
}
.card-personal .dl-item-row:hover {
    background: rgba(0,255,136,0.05);
    border-color: rgba(0,255,136,0.18);
}
.card-commercial .dl-item-row:hover {
    background: rgba(0,102,255,0.05);
    border-color: rgba(100,160,255,0.18);
}
.card-godot .dl-item-row:hover {
    background: rgba(71,140,191,0.05);
    border-color: rgba(71,140,191,0.18);
}

.dl-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}
.card-personal .dl-item-icon {
    background: rgba(0,204,128,0.1);
    color: var(--primary-color);
}
.card-commercial .dl-item-icon {
    background: rgba(0,102,255,0.1);
    color: #7ab8ff;
}
.card-godot .dl-item-icon {
    background: rgba(71,140,191,0.1);
    color: #6bb8e0;
}

.dl-item-info {
    flex: 1;
    min-width: 0;
}
.dl-item-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.dl-item-desc {
    font-size: 0.75rem;
    color: rgba(140,145,165,0.8);
    margin-top: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dl-item-arrow {
    flex-shrink: 0;
    opacity: 0.4;
    transition: opacity 0.2s, transform 0.2s;
    font-size: 0.8rem;
}
.dl-item-row:hover .dl-item-arrow {
    opacity: 0.8;
    transform: translateX(2px);
}

/* Loading / empty / error states */
.dl-list-hint {
    padding: 1.5rem 0;
    color: rgba(150, 155, 175, 0.7);
    font-size: 0.875rem;
    text-align: center;
}
.dl-list-error {
    color: var(--danger-color, #ff4d4f) !important;
}

/* ---- Info table (UE card) ---- */
.download-info {
    flex: 1;
    margin-bottom: 1rem;
}
.download-info-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.84rem;
    gap: 0.75rem;
}
.download-info-item:last-child {
    border-bottom: none;
}
.download-info-item span:first-child {
    color: rgba(150, 155, 175, 0.7);
    flex-shrink: 0;
}
.download-info-item span:last-child {
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
}

.info-primary  { color: var(--primary-color) !important; }
.info-warning  { color: var(--warning-color) !important; }
.info-secondary { color: #7ab8ff !important; }
.info-godot { color: #6bb8e0 !important; }
.info-sub {
    font-size: 0.78em;
    color: rgba(150, 155, 175, 0.6);
    margin-left: 0.4em;
    font-weight: 400;
}

/* ---- Action buttons ---- */
.download-btn-group {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.download-btn,
.download-btn-half {
    flex: 1;
    border-radius: 9px;
    padding: 0.6rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(220, 225, 240, 0.85);
    box-shadow: none;
    transform: none;
}
.download-btn:hover,
.download-btn-half:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.24);
    color: #ffffff;
    transform: none;
    box-shadow: none;
}
.download-btn:active,
.download-btn-half:active {
    background: rgba(255, 255, 255, 0.05);
    transform: none;
}
.download-btn:disabled,
.download-btn-half:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.card-personal .download-btn-half {
    border-color: rgba(0, 255, 136, 0.2);
    color: rgba(200, 240, 220, 0.85);
}
.card-personal .download-btn-half:hover {
    border-color: rgba(0, 255, 136, 0.38);
    color: #d0ffe8;
    background: rgba(0, 255, 136, 0.05);
}

.card-commercial .download-btn-half {
    border-color: rgba(100, 160, 255, 0.22);
    color: rgba(180, 210, 255, 0.85);
}
.card-commercial .download-btn-half:hover {
    border-color: rgba(100, 160, 255, 0.4);
    color: #c8deff;
    background: rgba(60, 120, 255, 0.06);
}

.card-godot .download-btn-half {
    border-color: rgba(71, 140, 191, 0.22);
    color: rgba(160, 210, 240, 0.85);
}
.card-godot .download-btn-half:hover {
    border-color: rgba(71, 140, 191, 0.4);
    color: #b8e0f5;
    background: rgba(71, 140, 191, 0.06);
}

/* ---- Notice card ---- */
.notice-card {
    max-width: 1160px;
    margin: 1.75rem auto 0;
    background: rgba(12, 14, 26, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 1.25rem 1.75rem;
}
.notice-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 0.75rem;
    color: rgba(180,185,200,0.7);
    text-transform: uppercase;
}
.notice-card-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem 2rem;
}
.notice-card-list li {
    font-size: 0.82rem;
    color: rgba(140, 145, 165, 0.75);
    line-height: 1.65;
    padding-left: 1rem;
    position: relative;
}
.notice-card-list li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: rgba(0, 204, 128, 0.4);
    font-size: 1.1em;
}
.notice-card-list li strong {
    color: rgba(210, 215, 230, 0.85);
    font-weight: 600;
}

/* ---- Responsive ---- */
@media (max-width: 960px) {
    .download-cards-grid {
        grid-template-columns: 1fr;
        max-width: 520px;
    }
    .notice-card-list {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 640px) {
    .download-cards-grid {
        max-width: 100%;
    }
}

/* Legacy selectors kept for compatibility */
.download-tabs { display: none; }
.download-tab-btn { display: none; }
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Hidden: old table-based download list (replaced by dl-items-list) */
.dl-list-table { display: none !important; }

/* ============================================================
   管理弹窗
   ============================================================ */
.dl-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 9000;
    padding: 2rem 1rem;
    overflow-y: auto;
}

.dl-modal-box {
    background: var(--card-bg, #0e1020);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    padding: 1.5rem;
    position: relative;
}

.dl-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    gap: 0.75rem;
}
.dl-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.dl-modal-close {
    background: none;
    border: none;
    color: rgba(150, 155, 175, 0.7);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
}
.dl-modal-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.dl-manager-table-wrap {
    overflow-x: auto;
}
.dl-manager-table td, .dl-manager-table th {
    white-space: nowrap;
}
.dl-manager-table td:nth-child(3),
.dl-manager-table td:nth-child(5) {
    white-space: normal;
    max-width: 200px;
}

/* ============================================================
   表单弹窗
   ============================================================ */
.dl-form-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    z-index: 10;
}
.dl-form-box {
    background: var(--card-bg, #0e1020);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    width: 100%;
    max-width: 520px;
    padding: 1.5rem;
}
.dl-form-body { padding-top: 0.5rem; }
.dl-form-group { margin-bottom: 1rem; }
.dl-form-label {
    display: block;
    font-size: 0.85rem;
    color: rgba(150, 155, 175, 0.8);
    margin-bottom: 0.4rem;
    font-weight: 500;
}
.dl-required { color: var(--danger-color, #ff4d4f); }
.dl-form-input {
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.dl-form-input:focus {
    border-color: rgba(0, 204, 128, 0.4);
}

/* ============================================================
   按钮
   ============================================================ */
.dl-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.2s, border-color 0.2s, opacity 0.2s;
    white-space: nowrap;
}
.dl-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.dl-btn-sm { padding: 0.3rem 0.65rem; font-size: 0.8rem; }

.dl-btn-primary {
    background: rgba(0, 204, 128, 0.15);
    border-color: rgba(0, 204, 128, 0.35);
    color: var(--primary-color, #00cc80);
}
.dl-btn-primary:hover {
    background: rgba(0, 204, 128, 0.25);
    border-color: rgba(0, 204, 128, 0.55);
}

.dl-btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(200, 205, 220, 0.85);
}
.dl-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
}

.dl-btn-danger {
    background: rgba(255, 77, 79, 0.1);
    border-color: rgba(255, 77, 79, 0.3);
    color: #ff6b6b;
}
.dl-btn-danger:hover {
    background: rgba(255, 77, 79, 0.2);
    border-color: rgba(255, 77, 79, 0.5);
}

/* ============================================================
   操作日志
   ============================================================ */
.dl-action-badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}
.dl-action-create {
    background: rgba(0, 204, 128, 0.1);
    color: var(--primary-color, #00cc80);
    border: 1px solid rgba(0, 204, 128, 0.25);
}
.dl-action-update {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.25);
}
.dl-action-delete {
    background: rgba(255, 77, 79, 0.1);
    color: #ff6b6b;
    border: 1px solid rgba(255, 77, 79, 0.25);
}

.dl-col-detail { max-width: 280px; }
.dl-detail-pre {
    font-size: 0.75rem;
    color: rgba(150, 155, 175, 0.8);
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
    max-height: 80px;
    overflow-y: auto;
    background: rgba(255,255,255,0.03);
    border-radius: 4px;
    padding: 0.3rem 0.5rem;
}

.dl-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
}
.dl-page-info {
    font-size: 0.85rem;
    color: rgba(150, 155, 175, 0.7);
}

/* Manager table (shown inside modal, not hidden) */
.dl-manager-table.dl-list-table { display: table !important; }

/* ============================================================
   Review 改进 — v4（以产品定位为核心的内容层级重构）
   • 统一移除推荐丝带 / card-featured 特殊加权
   • 新增 slogan 、特性信息条、分区小标题、交付提示、三按钮布局
   ============================================================ */

/* ---- Slogan（一句话定位） ---- */
.download-slogan {
    font-size: 0.95rem;
    line-height: 1.55;
    color: rgba(220, 225, 240, 0.92);
    margin: 0 0 1.1rem 0;
    padding: 0.7rem 0.9rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0.015) 100%);
    border-left: 2px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    letter-spacing: -0.005em;
}
.download-slogan strong {
    font-weight: 700;
}
.card-personal .download-slogan {
    border-left-color: rgba(0, 255, 136, 0.55);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05) 0%, rgba(0, 200, 255, 0.02) 100%);
}
.card-personal .download-slogan strong { color: #6fffbc; }

.card-commercial .download-slogan {
    border-left-color: rgba(100, 160, 255, 0.6);
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.06) 0%, rgba(100, 160, 255, 0.02) 100%);
}
.card-commercial .download-slogan strong { color: #9fc5ff; }

.card-godot .download-slogan {
    border-left-color: rgba(100, 200, 255, 0.55);
    background: linear-gradient(135deg, rgba(71, 140, 191, 0.08) 0%, rgba(100, 200, 255, 0.02) 100%);
}
.card-godot .download-slogan strong { color: #9fdfff; }

/* ---- 分区小标题 ---- */
.dl-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(160, 165, 185, 0.6);
    margin: 1.1rem 0 0.55rem 0;
}

/* ---- 特性信息条列表 ---- */
.dl-feature-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 0.25rem;
}
.dl-feature-row {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.55rem 0.2rem;
    transition: transform 0.2s ease;
}
.dl-feature-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}
.card-personal .dl-feature-icon {
    background: rgba(0, 204, 128, 0.08);
    color: #2de59a;
    border: 1px solid rgba(0, 204, 128, 0.18);
}
.card-commercial .dl-feature-icon {
    background: rgba(0, 102, 255, 0.08);
    color: #7ab8ff;
    border: 1px solid rgba(100, 160, 255, 0.22);
}
.card-godot .dl-feature-icon {
    background: rgba(71, 140, 191, 0.08);
    color: #6bb8e0;
    border: 1px solid rgba(71, 140, 191, 0.25);
}
.dl-feature-info {
    flex: 1;
    min-width: 0;
}
.dl-feature-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    /* 限制单行，超出截断，保证三卡对应位置严格等高 */
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.dl-feature-desc {
    font-size: 0.76rem;
    color: rgba(150, 155, 175, 0.78);
    line-height: 1.5;
    margin-top: 0.15rem;
    /* 关键：固定为 2 行高度，保证三卡 feature 行严格对齐。
       2 行 = 0.76rem * 1.5 * 2 ≈ 2.28rem ≈ 36.5px。
       文字若不足 2 行，底部留白；超过 2 行会省略号截断，避免再把卡片顶高。 */
    min-height: calc(0.76rem * 1.5 * 2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- UE 交付提示卡 ---- */
.ue-delivery-hint {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    background: rgba(0, 102, 255, 0.05);
    border: 1px dashed rgba(100, 160, 255, 0.25);
    color: rgba(200, 215, 240, 0.85);
    font-size: 0.82rem;
    line-height: 1.55;
    margin-bottom: 0;
    /* 与 Unity / Godot 卡的下载清单高度对齐 */
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 96px;
}

/* ---- 双按钮布局（Unity / UE / Godot 三卡统一） ---- */
.download-btn-group-dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
}

/* ---- 三按钮布局（已不再使用，保留样式向下兼容） ---- */
.download-btn-group-triple {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "primary primary"
        "source docs";
    gap: 0.5rem;
}
.download-btn-group-triple .download-btn-primary { grid-area: primary; }
.download-btn-group-triple .download-btn-accent  { grid-area: source; }
.download-btn-group-triple > :nth-child(3)        { grid-area: docs; }

.download-btn-half {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    text-decoration: none;
}

/* 次要但能看到引导的按钮：获取源码 */
.download-btn-half.download-btn-accent {
    border-color: rgba(100, 160, 255, 0.3);
    color: #b8d4ff;
    background: rgba(100, 160, 255, 0.04);
}
.download-btn-half.download-btn-accent:hover {
    border-color: rgba(140, 190, 255, 0.55);
    color: #ffffff;
    background: rgba(100, 160, 255, 0.12);
}

/* Primary 按钮加强 - UE 卡主按钮“技术支持” */
.download-btn-half.download-btn-primary {
    background: linear-gradient(90deg, rgba(0, 102, 255, 0.35) 0%, rgba(100, 160, 255, 0.28) 100%);
    border-color: rgba(120, 175, 255, 0.55);
    color: #eaf1ff;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0, 102, 255, 0.18);
}
.download-btn-half.download-btn-primary:hover {
    background: linear-gradient(90deg, rgba(0, 122, 255, 0.5) 0%, rgba(120, 180, 255, 0.42) 100%);
    border-color: rgba(160, 210, 255, 0.75);
    color: #ffffff;
    box-shadow: 0 6px 22px rgba(0, 102, 255, 0.3);
}

/* ---- 移除推荐丝带 / card-featured 加权（3卡平权） ---- */
.download-card.card-featured {
    border-color: rgba(255, 255, 255, 0.07);
    box-shadow: none;
}
.download-card.card-featured:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 56px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 255, 136, 0.06);
}
.download-recommended-ribbon {
    display: none !important;
}

/* ---- Logo 区高度稍减，留出更多内容空间 ---- */
.engine-logo-unity,
.engine-logo-unreal,
.engine-logo-godot {
    min-height: 96px;
}
.engine-logo-unity img,
.engine-logo-unreal img,
.engine-logo-godot img {
    width: 56px;
    height: 56px;
}

/* ---- 标题和徐章间距稍加 ---- */
.download-title {
    font-size: 1.12rem;
    line-height: 1.25;
}
.download-header {
    margin-bottom: 0.75rem;
}

/* ---- 保留原 spec-pill 样式兼容，但新布局中已移除按需集成 ---- */

/* ---- 响应式调整：小屏幕下按钮纵向堆叠 ---- */
@media (max-width: 480px) {
    .download-btn-group-dual {
        grid-template-columns: 1fr;
    }
    .download-btn-group-triple {
        grid-template-columns: 1fr;
        grid-template-areas:
            "primary"
            "source"
            "docs";
    }
}

/* ============================================================
   保留自 v3 的通用视觉细节（v4 覆盖后需补回）
   ============================================================ */

/* ---- 下载列表箭头颜色（hover 呼应卡片主色） ---- */
.dl-item-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(200, 210, 230, 0.55);
}
.card-personal .dl-item-row:hover .dl-item-arrow { color: #00e690; }
.card-commercial .dl-item-row:hover .dl-item-arrow { color: #7ab8ff; }
.card-godot .dl-item-row:hover .dl-item-arrow { color: #6bb8e0; }
.dl-item-row:hover .dl-item-arrow {
    opacity: 1;
    transform: translateY(1px);
}

/* ---- 下载须知：图标化 ---- */
.notice-card-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding-left: 0;
}
.notice-card-list li::before {
    content: none;
}
.notice-card-list .notice-icon {
    display: inline-flex;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(0, 204, 128, 0.08);
    color: var(--primary-color);
    border: 1px solid rgba(0, 204, 128, 0.18);
    margin-top: 0.05rem;
}
.notice-card-list li:nth-child(2) .notice-icon {
    background: rgba(0, 102, 255, 0.08);
    color: #7ab8ff;
    border-color: rgba(100, 160, 255, 0.22);
}
.notice-card-list li:nth-child(3) .notice-icon {
    background: rgba(212, 168, 78, 0.08);
    color: #e0bc6a;
    border-color: rgba(212, 168, 78, 0.22);
}
.notice-card-list li:nth-child(4) .notice-icon {
    background: rgba(180, 120, 220, 0.08);
    color: #c89bff;
    border-color: rgba(180, 120, 220, 0.22);
}
.notice-card-list li > div {
    flex: 1;
    padding-top: 0.15rem;
}
.notice-card-list li em {
    font-style: normal;
    font-family: 'DM Mono', monospace;
    color: rgba(160, 200, 255, 0.85);
    font-size: 0.85em;
    padding: 0.05rem 0.3rem;
    background: rgba(100, 160, 255, 0.08);
    border-radius: 4px;
    margin-left: 0.2rem;
}

/* ---- 管理按钮尺寸收敛（仅管理员可见） ---- */
#unity-download-admin-bar .download-btn-half,
#godot-download-admin-bar .download-btn-half {
    font-size: 0.78rem;
    padding: 0.4rem 0.6rem;
    opacity: 0.55;
    background: rgba(255,255,255,0.02);
    border-color: rgba(255,255,255,0.08);
}
#unity-download-admin-bar .download-btn-half:hover,
#godot-download-admin-bar .download-btn-half:hover {
    opacity: 1;
}

/* ══════════════════════════════════════════════════════════════
   三卡底部对齐（2026-04 重构）
   - 三张卡统一为单主按钮布局（移除"技术支持"半边按钮）
   - 管理员入口脱离主流布局（绝对定位），不再挤压按钮位置
   - Unity / UE / Godot 三卡底部按钮保持同一水平线
   ══════════════════════════════════════════════════════════════ */

/* 单按钮布局：等同于 dual 的 margin-top:auto，保证按钮贴底 */
.download-btn-group.download-btn-group-single {
    display: flex;
    margin-top: auto;
    padding-top: 1rem;
}
.download-btn-group.download-btn-group-single .download-btn-half {
    flex: 1;
    width: 100%;
}

/* 管理员入口：绝对定位到卡片底部外侧，不参与 body flex 计算 */
.download-card {
    position: relative;
    /* 预留底部空间给管理员入口（管理员可见时不突破卡片视觉节奏） */
    padding-bottom: 0;
}
.download-admin-bar {
    position: absolute;
    left: 1.5rem;
    right: 1.5rem;
    bottom: 0.6rem;
    margin-top: 0 !important;
}
/* 管理员可见时，给卡片底部留出按钮高度 */
.download-card:has(> .download-card-body #unity-download-admin-bar[style*="block"]),
.download-card:has(> .download-card-body #godot-download-admin-bar[style*="block"]) {
    padding-bottom: 2.5rem;
}

/* ══════════════════════════════════════════════════════════════
   下载统计 Dashboard（管理员视图）
   - KPI 指标卡（响应式 5/3/2/1 列自适应）
   - Canvas 图表卡（趋势折线 / Top10 柱状）
   ══════════════════════════════════════════════════════════════ */

.dl-kpi-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.8rem;
    margin: 0.8rem 0 1rem;
}
@media (max-width: 900px) { .dl-kpi-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .dl-kpi-row { grid-template-columns: repeat(2, 1fr); } }

.dl-kpi-card {
    background: linear-gradient(135deg, rgba(74,144,226,0.08), rgba(123,104,238,0.08));
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    min-height: 72px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: border-color 0.15s, transform 0.15s;
}
.dl-kpi-card:hover {
    border-color: rgba(123,104,238,0.35);
    transform: translateY(-1px);
}
.dl-kpi-label {
    font-size: 0.78rem;
    color: var(--text-secondary, rgba(255,255,255,0.55));
    letter-spacing: 0.02em;
    margin-bottom: 0.3rem;
}
.dl-kpi-value {
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--text-primary, #fff);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(90deg, #4a90e2, #7b68ee);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dl-charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 1rem;
}
@media (max-width: 900px) { .dl-charts-row { grid-template-columns: 1fr; } }

.dl-chart-card {
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    padding: 0.75rem 0.9rem 0.4rem;
    overflow: hidden;
}
.dl-chart-title {
    font-size: 0.85rem;
    color: var(--text-secondary, rgba(255,255,255,0.65));
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
}
.dl-chart-card canvas {
    display: block;
    width: 100%;
    max-width: 100%;
    /* 高度由 <canvas height> 属性提供初值，JS 中按 DPR 再校正 */
}
