@charset "UTF-8";

:root {
    --theme-start: #6478e8;
    --theme-end: #7d4eb3;
    --primary: #665fd8;
    --primary-dark: #554bbb;
    --page-bg: #f4f4f5;
    --card-bg: #ffffff;
    --text: #202128;
    --muted: #73747d;
    --line: #e8e8ec;
    --soft: #f2f2f4;
    --shadow: 0 10px 25px rgba(28, 31, 55, .07);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--page-bg);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background: var(--page-bg);
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
}

.site-hero {
    height: 98px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    color: #fff;
    background: linear-gradient(110deg, var(--theme-start), var(--theme-end));
}

.hero-content {
    text-align: center;
}

.site-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.site-title h1 {
    margin: 0;
    font-size: 27px;
    line-height: 1.2;
    letter-spacing: .4px;
}

.site-game-icon {
    font-size: 28px;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .18));
}

.hero-content p {
    margin: 8px 0 0;
    font-size: 14px;
    opacity: .9;
}

.search-section {
    height: 61px;
    display: flex;
    align-items: center;
    padding: 9px 15px;
    background: #fff;
    border-bottom: 1px solid #ececf0;
}

.search-form {
    width: 100%;
    display: flex;
    gap: 10px;
    margin: 0 auto;
}

.search-form input {
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 0 16px;
    border: 1px solid #dedee3;
    border-radius: 999px;
    color: var(--text);
    background: #fff;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.search-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 95, 216, .11);
}

.search-form button {
    width: 67px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(110deg, var(--primary), var(--primary-dark));
    font-weight: 700;
    cursor: pointer;
}

.category-nav {
    min-height: 60px;
    display: flex;
    align-items: center;
    background: #fff;
    box-shadow: 0 5px 17px rgba(30, 31, 48, .04);
}

.category-list {
    width: 100%;
    display: flex;
    gap: 10px;
    padding: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.category-list::-webkit-scrollbar {
    display: none;
}

.category-button {
    flex: 0 0 auto;
    min-width: 89px;
    padding: 10px 18px;
    border-radius: 999px;
    color: #303139;
    background: #f1f1f3;
    text-align: center;
    font-size: 14px;
    transition: transform .2s, background .2s, color .2s;
}

.category-button:hover {
    transform: translateY(-1px);
    background: #e8e8ed;
}

.category-button.active {
    color: #fff;
    background: linear-gradient(110deg, var(--primary), var(--primary-dark));
}

.resource-section {
    width: min(1128px, calc(100% - 30px));
    margin: 14px auto 50px;
}

.filter-summary {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--muted);
    background: #fff;
    box-shadow: var(--shadow);
    font-size: 13px;
}

.filter-summary a {
    margin-left: 10px;
    color: var(--primary);
    font-weight: 700;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.resource-card {
    min-width: 0;
    overflow: hidden;
    border-radius: 13px;
    background: #fff;
    box-shadow: var(--shadow);
    transition: transform .22s, box-shadow .22s;
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(28, 31, 55, .12);
}

.resource-cover-link {
    display: block;
    overflow: hidden;
    background: #e8e9ee;
}

.resource-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .32s;
}

.resource-card:hover .resource-cover {
    transform: scale(1.035);
}

.resource-card-body {
    min-height: 98px;
    padding: 15px 14px 14px;
}

.resource-card-body h2 {
    margin: 0;
    overflow: hidden;
    color: #24252b;
    font-size: 16px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resource-card-body h2 a:hover {
    color: var(--primary);
}

.resource-summary {
    margin: 7px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.resource-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 11px;
}

.resource-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 3px 7px;
    border-radius: 5px;
    color: #70717a;
    background: #f3f3f5;
    font-size: 11px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination a {
    min-width: 37px;
    height: 37px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: 9px;
    color: #555762;
    background: #fff;
    box-shadow: var(--shadow);
    font-size: 13px;
}

.pagination a.active {
    color: #fff;
    background: linear-gradient(110deg, var(--primary), var(--primary-dark));
}

.empty-card {
    padding: 85px 20px;
    border-radius: 16px;
    text-align: center;
    background: #fff;
    box-shadow: var(--shadow);
}

.empty-card > div {
    font-size: 50px;
}

.empty-card h2 {
    margin: 17px 0 8px;
}

.empty-card p {
    margin: 0;
    color: var(--muted);
}

.site-footer {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 20px;
    color: #90919a;
    background: #fff;
    border-top: 1px solid var(--line);
    font-size: 13px;
}

.site-footer a:hover {
    color: var(--primary);
}

/* ========== 详情页 ========== */
.detail-page {
    background: #f3f4f7;
}

.detail-header {
    color: #fff;
    background: linear-gradient(110deg, var(--theme-start), var(--theme-end));
}

.detail-header-inner {
    width: min(1128px, calc(100% - 30px));
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0 auto;
}

.detail-logo {
    font-size: 20px;
    font-weight: 800;
}

.return-button {
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    font-size: 13px;
}

.detail-main {
    width: min(1000px, calc(100% - 30px));
    margin: 30px auto 55px;
}

.detail-card {
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
}

.detail-cover {
    width: 100%;
    max-height: 560px;
    object-fit: cover;
    background: #e8e9ee;
}

.detail-body {
    padding: 30px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-tags .category-tag {
    color: var(--primary-dark);
    background: #eeeefe;
}

.detail-body h1 {
    margin: 16px 0 10px;
    font-size: clamp(26px, 4vw, 39px);
    line-height: 1.28;
}

.detail-summary {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.8;
}

.detail-description {
    margin-top: 27px;
    padding-top: 23px;
    border-top: 1px solid var(--line);
}

.detail-description h2 {
    margin: 0 0 14px;
    font-size: 20px;
}

.detail-description div {
    color: #4d4e57;
    line-height: 1.9;
    word-break: break-word;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 29px;
}

.primary-button,
.secondary-button {
    min-height: 43px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 23px;
    border-radius: 999px;
    font-weight: 700;
}

.primary-button {
    border: 0;
    color: #fff;
    background: linear-gradient(110deg, var(--primary), var(--primary-dark));
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    font-size: 14px;
}

.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(82, 72, 188, .23);
}

.secondary-button {
    border: 1px solid #dcdde3;
    color: #3d3e47;
    background: #fff;
}

.primary-button.disabled {
    cursor: not-allowed;
    opacity: .48;
    transform: none;
    box-shadow: none;
}

.danger-button {
    min-height: 43px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 23px;
    border-radius: 999px;
    font-weight: 700;
    border: 0;
    color: #fff;
    background: #e05555;
    cursor: pointer;
}

.danger-button:hover {
    background: #c94444;
}

.not-found {
    padding: 80px 25px;
    border-radius: 18px;
    text-align: center;
    background: #fff;
    box-shadow: var(--shadow);
}

.not-found > div {
    font-size: 55px;
}

.not-found h1 {
    margin: 18px 0 25px;
}

/* ========== 管理后台 ========== */
.admin-body {
    background: #f2f3f7;
}

.login-layout {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background:
        radial-gradient(circle at 15% 8%, rgba(100, 120, 232, .35), transparent 32%),
        radial-gradient(circle at 88% 82%, rgba(125, 78, 179, .27), transparent 36%),
        #f2f3f7;
}

.login-card {
    width: min(420px, 100%);
    padding: 34px;
    border-radius: 21px;
    background: #fff;
    box-shadow: 0 24px 68px rgba(37, 40, 75, .16);
}

.login-icon {
    font-size: 43px;
}

.login-card h1 {
    margin: 13px 0 6px;
}

.login-card > p {
    margin: 0 0 23px;
    color: var(--muted);
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field > span {
    font-size: 14px;
    font-weight: 700;
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    border: 1px solid #dfe0e6;
    border-radius: 10px;
    color: var(--text);
    background: #fff;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.form-field input {
    height: 43px;
    padding: 0 13px;
}

.form-field select {
    height: 43px;
    padding: 0 13px;
}

.form-field input[type="color"] {
    padding: 4px;
}

.form-field textarea {
    min-height: 180px;
    padding: 13px;
    resize: vertical;
    line-height: 1.7;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 95, 216, .1);
}

.form-field small {
    color: var(--muted);
    font-size: 12px;
}

.full-button {
    width: 100%;
    margin-top: 20px;
}

.login-back {
    display: block;
    margin-top: 17px;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

.alert {
    margin-bottom: 18px;
    padding: 13px 15px;
    border-radius: 10px;
    font-size: 13px;
}

.alert.error {
    color: #a42626;
    background: #fff0f0;
    border: 1px solid #ffd2d2;
}

.alert.success {
    color: #176a43;
    background: #edf9f3;
    border: 1px solid #c9eddc;
}

.admin-header {
    color: #fff;
    background: linear-gradient(110deg, var(--theme-start), var(--theme-end));
}

.admin-header-inner {
    width: min(1128px, calc(100% - 30px));
    min-height: 89px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0 auto;
}

.admin-header h1 {
    margin: 0;
    font-size: 24px;
}

.admin-header p {
    margin: 4px 0 0;
    opacity: .82;
    font-size: 13px;
}

.admin-header-actions {
    display: flex;
    gap: 10px;
}

.admin-header-actions a {
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    font-size: 13px;
}

.admin-main {
    width: min(1128px, calc(100% - 30px));
    margin: 24px auto 55px;
}

.admin-nav {
    display: flex;
    gap: 6px;
    margin-bottom: 21px;
    flex-wrap: wrap;
}

.admin-nav a {
    padding: 9px 18px;
    border-radius: 999px;
    color: #51525c;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(28, 31, 55, .05);
    transition: color .2s, background .2s;
}

.admin-nav a.active,
.admin-nav a:hover {
    color: #fff;
    background: linear-gradient(110deg, var(--primary), var(--primary-dark));
}

.admin-panel {
    margin-bottom: 21px;
    padding: 23px;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow);
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.panel-heading h2 {
    margin: 0;
    font-size: 20px;
}

.panel-heading a,
.panel-heading span {
    color: var(--primary);
    font-size: 13px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px;
    margin-bottom: 20px;
}

.full-field {
    grid-column: 1 / -1;
}

.publish-field {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 700;
}

.publish-field input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.admin-preview {
    width: 225px;
    aspect-ratio: 1.535 / 1;
    margin-top: 5px;
    border-radius: 9px;
    object-fit: cover;
}

.admin-icon-preview {
    width: 86px;
    height: 86px;
    margin-top: 5px;
    border-radius: 18px;
    object-fit: cover;
}

.admin-resource-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-resource-item {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fcfcfd;
}

.admin-resource-item > img {
    width: 148px;
    aspect-ratio: 1.535 / 1;
    border-radius: 9px;
    object-fit: cover;
}

.admin-resource-content {
    min-width: 0;
}

.admin-resource-content h3 {
    margin: 0;
    overflow: hidden;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-resource-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 7px 0;
    color: var(--muted);
    font-size: 12px;
}

.admin-resource-content p {
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-resource-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-resource-actions > a,
.admin-resource-actions button {
    min-width: 62px;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
    cursor: pointer;
}

.admin-resource-actions > a {
    color: var(--primary-dark);
    background: #eeeefe;
}

.admin-resource-actions button {
    color: #d14141;
    background: #fff0f0;
}

/* ========== 统计面板 ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 21px;
}

.stat-card {
    padding: 22px;
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow);
}

.stat-card .stat-label {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
}

.stat-card .stat-unit {
    font-size: 14px;
    font-weight: 400;
    color: var(--muted);
    margin-left: 4px;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.stats-table th {
    padding: 12px 14px;
    text-align: left;
    color: var(--muted);
    font-weight: 700;
    border-bottom: 2px solid var(--line);
    font-size: 12px;
    text-transform: uppercase;
}

.stats-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
}

.stats-table tr:hover td {
    background: #fafafc;
}

/* ========== 子域名卡片 ========== */
.subdomain-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.subdomain-card {
    padding: 20px;
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow);
}

.subdomain-card h3 {
    margin: 0 0 6px;
    font-size: 17px;
}

.subdomain-card .subdomain-url {
    color: var(--primary);
    font-size: 13px;
    margin-bottom: 8px;
}

.subdomain-card .subdomain-meta {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 12px;
}

.subdomain-card .subdomain-actions {
    display: flex;
    gap: 8px;
}

.subdomain-card .subdomain-actions a,
.subdomain-card .subdomain-actions button {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.subdomain-card .subdomain-actions a {
    color: var(--primary-dark);
    background: #eeeefe;
}

.subdomain-card .subdomain-actions .btn-edit {
    color: #fff;
    background: var(--primary);
}

.subdomain-card .subdomain-actions button {
    border: 0;
    color: #d14141;
    background: #fff0f0;
}

/* ========== 响应式 ========== */
@media (max-width: 980px) {
    .resource-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .subdomain-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .resource-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .admin-resource-item {
        grid-template-columns: 110px minmax(0, 1fr);
    }
    .admin-resource-item > img {
        width: 110px;
    }
    .admin-resource-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
    .admin-form-grid {
        grid-template-columns: 1fr;
    }
    .full-field {
        grid-column: auto;
    }
}

@media (max-width: 560px) {
    .site-hero {
        height: 89px;
    }
    .site-title h1 {
        font-size: 23px;
    }
    .site-game-icon {
        font-size: 24px;
    }
    .search-section {
        padding-left: 10px;
        padding-right: 10px;
    }
    .search-form {
        gap: 8px;
    }
    .search-form button {
        width: 65px;
    }
    .category-list {
        padding-left: 10px;
        padding-right: 10px;
    }
    .resource-section,
    .detail-main,
    .detail-header-inner,
    .admin-header-inner,
    .admin-main {
        width: calc(100% - 20px);
    }
    .resource-grid {
        grid-template-columns: 1fr;
    }
    .resource-card-body {
        min-height: auto;
    }
    .site-footer {
        flex-direction: column;
        gap: 8px;
    }
    .detail-header-inner,
    .admin-header-inner {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding: 14px 0;
    }
    .detail-body {
        padding: 20px;
    }
    .admin-panel {
        padding: 17px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .subdomain-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   全新资源详情页样式 - v2
   ================================================================ */

/* ---- 导航条 ---- */
.dt-nav {
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #ececf0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}
.dt-nav-inner {
    width: min(1128px, calc(100% - 30px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.dt-nav-logo {
    font-weight: 800;
    font-size: 17px;
    color: var(--primary-dark);
    flex-shrink: 0;
}
.dt-nav-trail {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
    overflow: hidden;
}
.dt-nav-trail a { color: var(--muted); white-space: nowrap; }
.dt-nav-trail a:hover { color: var(--primary); }
.dt-nav-trail span { white-space: nowrap; }
.dt-nav-current {
    color: var(--text);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Hero Banner ---- */
.dt-hero {
    position: relative;
    min-height: 340px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.dt-hero--nopic {
    background: linear-gradient(135deg, #3b3f6b 0%, #5b4a8a 50%, #3e5879 100%);
}
.dt-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(18px) brightness(.42);
    transform: scale(1.08);
}
.dt-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(18,19,30,.72) 100%);
}
.dt-hero-inner {
    position: relative;
    z-index: 2;
    width: min(1128px, calc(100% - 30px));
    margin: 0 auto;
    padding: 60px 0 34px;
}
.dt-hero-body { max-width: 700px; }
.dt-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 14px;
}
.dt-hero-tags span {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}
.dt-tag-cat {
    color: #fff;
    background: rgba(255,255,255,.22);
}
.dt-tag {
    color: rgba(255,255,255,.85);
    background: rgba(255,255,255,.12);
}
.dt-hero-title {
    margin: 0 0 12px;
    color: #fff;
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -0.3px;
    text-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.dt-hero-sub {
    margin: 0 0 16px;
    color: rgba(255,255,255,.78);
    font-size: 16px;
    line-height: 1.65;
}
.dt-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.dt-meta-item {
    color: rgba(255,255,255,.7);
    font-size: 13px;
    font-weight: 500;
}

/* ---- 主布局 ---- */
.dt-main {
    width: min(1128px, calc(100% - 30px));
    margin: -18px auto 50px;
    position: relative;
    z-index: 3;
}
.dt-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    align-items: start;
}

/* ---- 卡片 ---- */
.dt-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 5px 24px rgba(28,31,55,.065);
    overflow: hidden;
    margin-bottom: 20px;
}
.dt-card-heading {
    margin: 0;
    padding: 22px 24px 0;
    font-size: 19px;
    font-weight: 700;
}

/* ---- 下载卡片 ---- */
.dt-download-card {
    background: linear-gradient(135deg, #fafbff 0%, #f4f2ff 100%);
    border: 1px solid #e8e6f5;
}
.dt-download-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 24px 0;
}
.dt-download-icon { font-size: 36px; }
.dt-download-header h2 {
    margin: 0;
    font-size: 20px;
    color: var(--primary-dark);
}
.dt-download-header p {
    margin: 3px 0 0;
    font-size: 13px;
    color: var(--muted);
}
.dt-download-body {
    padding: 18px 24px 24px;
}
.dt-code-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px dashed #d4d0e8;
    border-radius: 12px;
}
.dt-code-label {
    font-size: 13px;
    color: var(--muted);
    flex-shrink: 0;
}
.dt-code-value {
    flex: 1;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 4px;
    color: var(--primary-dark);
    background: transparent;
    user-select: all;
}
.dt-btn-copy {
    padding: 7px 15px;
    border: 0;
    border-radius: 999px;
    background: #eeecfb;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s;
}
.dt-btn-copy:hover { background: #dfdcf5; }
.dt-download-note {
    margin: 0 0 16px;
    padding: 10px 14px;
    background: #fff;
    border-radius: 10px;
    font-size: 13px;
    color: #777;
    line-height: 1.6;
}
.dt-btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 999px;
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(110deg, var(--theme-start), var(--theme-end));
    box-shadow: 0 8px 24px rgba(99,91,210,.26);
    transition: transform .2s, box-shadow .2s;
}
.dt-btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(99,91,210,.36);
}
.dt-btn-full { width: 100%; justify-content: center; }
.dt-btn-arrow { font-size: 20px; transition: transform .2s; }
.dt-btn-download:hover .dt-btn-arrow { transform: translateX(4px); }
.dt-download-empty {
    color: var(--muted);
    text-align: center;
    padding: 10px 0;
    margin: 0;
}

/* ---- 描述卡片 ---- */
.dt-desc-body {
    padding: 6px 24px 24px;
    color: #4d4e57;
    font-size: 15px;
    line-height: 2;
    word-break: break-word;
}

/* ---- 侧边栏 ---- */
.dt-sidebar { position: sticky; top: 76px; }
.dt-info-card h3,
.dt-tags-card h3 {
    margin: 0;
    padding: 18px 20px 0;
    font-size: 15px;
}
.dt-info-list {
    list-style: none;
    margin: 0;
    padding: 14px 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.dt-info-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}
.dt-info-label { color: var(--muted); }
.dt-tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 12px 20px 18px;
}
.dt-tag-pill {
    padding: 5px 12px;
    border-radius: 999px;
    background: #f3f3f6;
    color: #5f606b;
    font-size: 12px;
    transition: background .2s, color .2s;
}
.dt-tag-pill:hover { background: #e8e7f2; color: var(--primary-dark); }
.dt-back-link {
    display: block;
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}
.dt-back-link:hover { color: var(--primary); }

/* ---- 相关推荐 ---- */
.dt-related { margin-top: 28px; }
.dt-related-heading {
    margin: 0 0 14px;
    font-size: 19px;
    font-weight: 700;
}
.dt-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 12px;
}
.dt-related-item {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 3px 12px rgba(28,31,55,.05);
    transition: transform .2s;
}
.dt-related-item:hover { transform: translateY(-3px); }
.dt-related-img {
    aspect-ratio: 1.6 / 1;
    overflow: hidden;
    background: #e8e9ee;
}
.dt-related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.dt-related-item:hover .dt-related-img img { transform: scale(1.04); }
.dt-related-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}
.dt-related-title {
    padding: 10px 12px 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dt-related-cat {
    padding: 0 12px 10px;
    font-size: 11px;
    color: var(--muted);
}

/* ---- Toast ---- */
.copy-toast {
    position: fixed;
    z-index: 10050;
    left: 50%;
    bottom: 54px;
    padding: 10px 20px;
    border-radius: 999px;
    color: #fff;
    background: rgba(34,35,44,.92);
    box-shadow: 0 8px 28px rgba(0,0,0,.2);
    font-size: 14px;
    font-weight: 600;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, 12px);
    transition: opacity .25s, transform .25s;
}
.copy-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- 响应式 ---- */
@media (max-width: 860px) {
    .dt-layout {
        grid-template-columns: 1fr;
    }
    .dt-sidebar {
        position: static;
    }
    .dt-card {
        border-radius: 12px;
    }
    .dt-hero {
        min-height: 260px;
    }
    .dt-hero-inner {
        padding: 44px 0 24px;
    }
    .dt-hero-title {
        font-size: clamp(22px, 6vw, 30px);
    }
    .dt-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .dt-nav-trail { display: none; }
    .dt-main {
        width: calc(100% - 20px);
        margin-top: -12px;
    }
    .dt-hero {
        min-height: 200px;
    }
    .dt-hero-inner {
        padding: 36px 0 20px;
    }
    .dt-hero-sub {
        font-size: 14px;
    }
    .dt-download-body {
        padding: 12px 16px 18px;
    }
    .dt-related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .dt-card-heading {
        padding: 16px 16px 0;
    }
    .dt-desc-body {
        padding: 4px 16px 18px;
    }
    .dt-code-value {
        font-size: 16px;
        letter-spacing: 2px;
    }
}

/* ================================================================
   参考站匹配样式 - 资源详情页 v3
   ================================================================ */

.reference-detail-page {
    min-height: 100vh;
    color: #22232a;
    background: #f4f5f7;
}

/* 返回导航 */
.reference-detail-nav {
    height: 58px;
    background: #ffffff;
    border-bottom: 1px solid #ececf0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.reference-detail-nav-inner {
    width: min(920px, calc(100% - 28px));
    height: 100%;
    display: flex;
    align-items: center;
    margin: 0 auto;
}
.reference-back {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #5f6069;
    font-size: 15px;
    font-weight: 600;
}
.reference-back span {
    margin-top: -2px;
    font-family: Arial, sans-serif;
    font-size: 30px;
    font-weight: 300;
    line-height: 1;
}
.reference-back:hover { color: var(--primary); }

/* 主区域 */
.reference-detail-main {
    width: min(920px, calc(100% - 28px));
    margin: 22px auto 42px;
}
.reference-product-card,
.reference-group-card,
.reference-description-card {
    overflow: hidden;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 5px 18px rgba(31,34,59,.055);
}

/* 封面 */
.reference-cover-wrap {
    width: 100%;
    aspect-ratio: 2 / 1;
    overflow: hidden;
    background: #e8e9ee;
}
.reference-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 产品信息卡片 */
.reference-product-info {
    display: grid;
    grid-template-columns: 78px minmax(0,1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 20px 22px 22px;
}
.reference-app-icon {
    width: 78px;
    height: 78px;
    border: 1px solid #ececf0;
    border-radius: 17px;
    object-fit: cover;
    background: #f0f1f4;
    box-shadow: 0 5px 13px rgba(28,31,55,.08);
}
.reference-product-text { min-width: 0; }
.reference-product-text h1 {
    margin: 0;
    overflow: hidden;
    color: #202128;
    font-size: 25px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.reference-product-summary {
    margin: 8px 0 0;
    color: #72737d;
    font-size: 14px;
    line-height: 1.55;
}
.reference-update-time {
    margin: 7px 0 0;
    color: #a0a1aa;
    font-size: 12px;
}
.reference-download-button {
    min-width: 112px;
    height: 43px;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(110deg, var(--theme-start), var(--theme-end));
    box-shadow: 0 8px 18px rgba(99,91,210,.21);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, opacity .2s;
}
.reference-download-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 23px rgba(99,91,210,.28);
}
.reference-download-button:disabled {
    cursor: not-allowed;
    opacity: .45;
    transform: none;
    box-shadow: none;
}

/* 进群卡片 */
.reference-group-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 15px;
    padding: 24px 21px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}
.reference-group-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255,255,255,.25);
    font-size: 25px;
}
.reference-group-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.reference-group-content h2 {
    margin: 0;
    font-size: 17px;
    color: #fff;
}
.reference-group-content p {
    margin: 5px 0 0;
    font-size: 13px;
    opacity: .85;
}
.reference-group-number {
    padding: 8px 18px;
    border: 0;
    border-radius: 8px;
    color: #e8556b;
    background: #fff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform .15s;
}
.reference-group-number:hover { transform: scale(1.04); }

/* 介绍卡片 */
.reference-description-card {
    margin-top: 15px;
    padding: 22px;
}
.reference-description-card h2 {
    position: relative;
    margin: 0 0 18px;
    padding-left: 13px;
    color: #25262d;
    font-size: 19px;
}
.reference-description-card h2::before {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 0;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--theme-start), var(--theme-end));
    content: "";
}
.reference-description-content {
    color: #55565f;
    font-size: 15px;
    line-height: 1.95;
    word-break: break-word;
}
.reference-detail-footer {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #9697a0;
    background: #fff;
    border-top: 1px solid #ececf0;
    text-align: center;
    font-size: 13px;
}

/* 弹窗图标 */
.modal-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}
.modal-body {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: left;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
}

/* 响应式 */
@media (max-width: 680px) {
    .reference-detail-nav { height: 52px; }
    .reference-detail-main { width: 100%; margin-top: 10px; }
    .reference-cover-wrap { aspect-ratio: 1.72/1; max-height: 200px; }
    .reference-product-info {
        grid-template-columns: 66px minmax(0,1fr);
        gap: 13px;
        padding: 16px;
    }
    .reference-app-icon { width: 66px; height: 66px; border-radius: 15px; }
    .reference-product-text h1 { font-size: 20px; }
    .reference-download-button {
        grid-column: 1/-1;
        width: 100%;
        height: 42px;
    }
    .reference-group-card { padding: 18px 16px; }
    .reference-group-icon { width: 45px; height: 45px; border-radius: 12px; font-size: 22px; }
    .reference-group-number { width: 100%; text-align: center; }
    .reference-description-card { padding: 18px 16px; }
    .reference-description-content { font-size: 14px; line-height: 1.9; }
}
