:root {
    --c-primary: #0066cc;
    --c-primary-hover: #0044aa;
    --c-primary-soft: #e8f0fe;
    --c-text-1: #222222;
    --c-text-2: #444444;
    --c-text-3: #666666;
    --c-text-4: #888888;
    --c-bg: #e8ecf0;
    --c-surface: #ffffff;
    --c-surface-1: #f7f8fa;
    --c-surface-2: #f2f4f8;
    --c-border: #d0d0d0;
    --c-border-strong: #b8b8b8;
    --r-sm: 4px;
    --r-md: 6px;
    --r-lg: 8px;
    --r-full: 9999px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* UI 2 主题 */
html.theme-ui2 {
    --c-primary: #0071e3;
    --c-primary-hover: #0056b3;
    --c-primary-soft: #e8f0fe;
    --c-text-1: #1d1d1f;
    --c-text-2: #424245;
    --c-text-3: #6e6e73;
    --c-text-4: #86868b;
    --c-bg: #fbfbfd;
    --c-surface: #ffffff;
    --c-surface-2: #f5f5f7;
    --c-border: #e5e5e7;
    --c-border-strong: #d2d2d7;
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
}
body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    color: var(--c-text-1);
    background: var(--c-bg);
    min-height: 100vh;
    overflow-x: hidden;
    word-break: break-word;
    overflow-wrap: break-word;
}
/* 去除浏览器默认 focus 蓝色轮廓（保留键盘 :focus-visible） */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: none;
}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
}
a { color: var(--c-primary); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--c-primary-hover); }
img { max-width: 100%; }

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

.page-wrapper {
    min-height: 100vh;
}

/* Header */
.site-header {
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
html.theme-ui2 .site-header {
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.site-header .container {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 60px;
}
.brand {
    font-size: 17px;
    font-weight: 700;
    color: var(--c-text-1);
    letter-spacing: -0.01em;
    white-space: nowrap;
    flex-shrink: 0;
}
.brand:hover { color: var(--c-text-1); }

.site-nav {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.nav-link {
    padding: 8px 16px;
    color: var(--c-text-2);
    font-size: 15px;
    border-radius: var(--r-md);
    transition: background 0.15s var(--ease-out), color 0.15s var(--ease-out), border-color 0.15s var(--ease-out);
    white-space: nowrap;
}
.nav-link:hover {
    background: var(--c-surface-2);
    color: var(--c-text-1);
}
.nav-link.active {
    background: var(--c-primary-soft);
    color: var(--c-primary);
    font-weight: 500;
}

/* Search */
.search-box {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--c-surface-2);
    border-radius: var(--r-md);
    padding: 0 14px;
    height: 40px;
    border: 1px solid transparent;
    transition: border-color 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
    flex: 0 1 300px;
    min-width: 0;
}
.search-box:focus-within {
    background: var(--c-surface);
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}
.search-icon {
    color: var(--c-text-4);
    flex-shrink: 0;
    transition: color 0.15s;
}
.search-box:focus-within .search-icon { color: var(--c-primary); }
.search-box input {
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
    font-size: 15px;
    color: var(--c-text-1);
    width: 100%;
    min-width: 0;
    font-family: inherit;
    line-height: 1;
}
.search-box input::placeholder { color: var(--c-text-4); }

/* Main Content */
.main-content {
    padding: 32px 0 64px;
}

.page-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--c-text-1);
    margin-bottom: 8px;
    letter-spacing: -0.015em;
}
.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--c-text-1);
    margin: 32px 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-desc {
    color: var(--c-text-3);
    font-size: 15px;
    margin-bottom: 24px;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--c-border);
}
.cat-btn {
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--c-text-2);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-full);
    transition: background 0.15s var(--ease-out), color 0.15s var(--ease-out), border-color 0.15s var(--ease-out);
    text-decoration: none;
    display: inline-block;
}
.cat-btn:hover {
    color: var(--c-primary);
    border-color: var(--c-primary);
    background: var(--c-primary-soft);
    text-decoration: none;
}
.cat-btn.active {
    color: #fff;
    background: var(--c-primary);
    border-color: var(--c-primary);
    font-weight: 600;
}

/* Resource Grid */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.category-section { margin-bottom: 16px; }

.resource-card {
    display: block;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: 16px;
    transition: box-shadow 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
html.theme-ui2 .resource-card {
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.resource-card:hover {
    border-color: var(--c-border-strong);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
}
.card-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}
.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.04);
}

.card-top-text h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--c-text-1);
    margin-bottom: 6px;
    line-height: 1.4;
}
.card-top-text p {
    font-size: 14px;
    color: var(--c-text-3);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0;
}
.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--c-border);
    gap: 8px;
    overflow: hidden;
}
.file-count { color: var(--c-text-4); font-size: 14px; }

/* Category Badge */
.cat-badge {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: var(--r-full);
    font-size: 13px;
    font-weight: 600;
    background: var(--c-surface-2);
    color: var(--c-text-3);
    white-space: nowrap;
}
.cat-badge.cat-mobile { background: #e0f2fe; color: #0369a1; }
.cat-badge.cat-software { background: #ede9fe; color: #6d28d9; }
.cat-badge.cat-sites { background: #d1fae5; color: #047857; }
.cat-badge.cat-other { background: var(--c-surface-2); color: var(--c-text-3); }

/* Detail */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--c-text-3);
    margin-bottom: 20px;
}
.breadcrumb a {
    color: var(--c-text-3);
    text-decoration: none;
}
.breadcrumb a:hover { color: var(--c-text-1); }
.breadcrumb span:not(:last-child) { color: var(--c-text-4); }
.breadcrumb > span:last-child { color: var(--c-text-1); }

.resource-detail { max-width: 760px; margin: 0 auto; }
.detail-head { margin-bottom: 32px; }
.detail-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 12px 0 16px;
}
.detail-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    flex-shrink: 0;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.04);
}
.detail-head h1 {
    font-size: 30px;
    font-weight: 700;
    color: var(--c-text-1);
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.detail-desc {
    color: var(--c-text-2);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 16px;
}
.detail-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: var(--c-text-3);
    padding-top: 16px;
    border-top: 1px solid var(--c-border);
    flex-wrap: wrap;
}
.btn-primary-sm {
    padding: 7px 16px;
    background: var(--c-primary);
    color: #fff;
    border-radius: var(--r-md);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
}
.btn-primary-sm:hover { background: var(--c-primary-hover); color: #fff; }

/* File List */
.file-list {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    overflow: hidden;
}
.file-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--c-border);
    transition: background 0.15s;
}
.file-item:last-child { border-bottom: none; }
.file-item:hover { background: var(--c-surface-2); }
.file-info { flex: 1; min-width: 0; }
.file-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--c-text-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.file-size {
    font-size: 13px;
    color: var(--c-text-4);
    margin-top: 2px;
}
/* Button actions group - ensures download + share stay side by side */
.file-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.file-actions .btn-download,
.file-actions .btn-share {
    flex-shrink: 0;
}
/* Table view button actions */
.table-actions {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    justify-content: center;
}
.table-actions .btn-down,
.table-actions .btn-share {
    flex-shrink: 0;
}
/* Download */
.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 38px;
    padding: 0;
    background: var(--c-primary);
    color: #fff;
    border: none;
    border-radius: var(--r-md);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    flex-shrink: 0;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, transform 0.1s;
}
.btn-download:hover {
    background: var(--c-primary-hover);
    color: #fff;
}
.btn-download:active {
    transform: scale(0.97);
}

.btn-download:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 3px;
}

/* Visit button variant */
.btn-download.btn-visit { width: auto; padding: 0 16px; }
@media (prefers-reduced-motion: reduce) {
    .btn-download {
        transition: background 0.15s ease !important;
    }
    .btn-download:active { transform: none !important; }
}

/* Official link */
.official-link {
    margin: 16px 0;
}
.official-link-a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: var(--c-surface-2);
    border-radius: var(--r-md);
    font-size: 13px;
    color: var(--c-text-2);
    text-decoration: none;
    transition: background 0.15s;
}
.official-link-a:hover {
    background: var(--c-primary-soft);
    color: var(--c-primary);
}
.official-link-text {
    font-family: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    color: var(--c-text-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 320px;
}
.official-link-hint {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    background: var(--c-primary);
    color: #fff;
    border-radius: 3px;
    flex-shrink: 0;
}
@media (max-width: 520px) {
    .official-link-text { max-width: 200px; }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--c-text-3);
}
.empty-state h3 {
    font-size: 18px;
    color: var(--c-text-2);
    font-weight: 600;
    margin-bottom: 8px;
}
.empty-state p {
    font-size: 15px;
    color: var(--c-text-3);
}
.btn-back {
    display: inline-block;
    padding: 9px 20px;
    background: var(--c-surface);
    color: var(--c-text-2);
    border: 1px solid var(--c-border-strong);
    border-radius: var(--r-md);
    font-size: 14px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.btn-back:hover {
    color: var(--c-primary);
    border-color: var(--c-primary);
    background: var(--c-primary-soft);
    text-decoration: none;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 28px 24px 24px;
    font-size: 14px;
    color: var(--c-text-4);
    border-top: 1px solid var(--c-border);
    background: var(--c-surface);
}

/* Copy button */
.btn-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--r-sm);
    background: var(--c-surface-2);
    color: var(--c-text-4);
    cursor: pointer;
    border: none;
    flex-shrink: 0;
    transition: opacity 0.15s ease;
    padding: 0;
}
.btn-copy:hover {
    background: var(--c-primary-soft);
    color: var(--c-primary);
}
.btn-copy:active { transform: scale(0.94); }
.btn-copy-inline {
    width: 26px;
    height: 26px;
    vertical-align: middle;
    margin-left: 6px;
    opacity: 0;
    transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.file-name:hover .btn-copy-inline { opacity: 1; }

/* Copy toast */
.copy-toast {
    position: fixed;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: #1d1d1f;
    color: #fff;
    padding: 10px 24px;
    border-radius: var(--r-full);
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s var(--ease-spring);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.copy-toast--show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 回到顶部 */
.btn-scroll-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--c-surface);
    border: 1px solid var(--c-border-strong);
    color: var(--c-text-3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s var(--ease-spring), box-shadow 0.2s ease;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 0;
}
.btn-scroll-top--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.btn-scroll-top:hover {
    background: var(--c-primary-soft);
    color: var(--c-primary);
    border-color: var(--c-primary);
    box-shadow: 0 4px 16px rgba(0,113,227,0.15);
}
.btn-scroll-top:active { transform: scale(0.92); }

/* Page progress */
.page-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background: var(--c-primary);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    transform-origin: left;
    animation: none;
}
.page-progress.active {
    opacity: 1;
    animation: progressScan 1.2s ease-in-out infinite;
}
@keyframes progressScan {
    0%   { transform: translateX(-100%); }
    50%  { transform: translateX(0%); }
    100% { transform: translateX(100%); }
}

/* Header settings button */
.btn-settings-header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    background: var(--c-surface-2);
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    color: var(--c-text-3);
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    flex-shrink: 0;
    transition: background 0.15s var(--ease-out), color 0.15s var(--ease-out);
    white-space: nowrap;
}
.btn-settings-header:hover {
    background: var(--c-primary-soft);
    color: var(--c-primary);
    border-color: transparent;
    text-decoration: none;
}
.btn-settings-header.active {
    background: var(--c-primary-soft);
    color: var(--c-primary);
    font-weight: 600;
}
.btn-settings-header span {
    line-height: 1;
}

/* Settings page */
.settings-page {
    max-width: 640px;
    margin: 0 auto;
}
.settings-page .page-title {
    margin-bottom: 4px;
}
.settings-page .page-desc {
    margin-bottom: 20px;
}

/* 标签页 */
.settings-page .settings-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--c-border);
    margin-bottom: 20px;
}
.settings-page .settings-tab {
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--c-text-3);
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s;
}
.settings-page .settings-tab:hover { color: var(--c-text-1); }
.settings-page .settings-tab.active {
    color: var(--c-text-1);
    border-bottom-color: var(--c-text-1);
}
.settings-page .settings-tab-content { display: none; }
.settings-page .settings-tab-content.active {
    display: block;
    animation: tabEnter 0.35s cubic-bezier(.4,0,.2,1) both;
}
.settings-page .settings-tab-content.exit {
    display: block;
    animation: tabExit 0.18s cubic-bezier(.4,0,.2,1) both;
}

@keyframes tabEnter {
    from { opacity: 0; transform: translateX(12px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes tabExit {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(-12px); }
}

/* Settings panel */
.settings-panel {
    border: 1px solid var(--c-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
    background: var(--c-surface);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.settings-panel-head {
    padding: 10px 16px;
    background: #f7f8fa;
    border-bottom: 1px solid var(--c-border);
    font-size: 13px;
    font-weight: 700;
    color: var(--c-text-2);
}
.settings-panel-body { }
.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--c-border);
    gap: 14px;
    transition: background 0.12s;
}
.settings-row:last-child { border-bottom: none; }
.settings-row:hover { background: #fafbfc; }
.settings-row-label { flex: 1; min-width: 0; }
.settings-row-label .sr-title { font-size: 14px; font-weight: 600; color: var(--c-text-1); }
.settings-row-label .sr-desc { font-size: 12px; color: var(--c-text-4); margin-top: 2px; }

/* 开关 */
.toggle-switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.toggle-switch input { display: none; }
.toggle-switch label {
    display: block; width: 100%; height: 100%; border-radius: 24px;
    background: #ccc; cursor: pointer;
    transition: background 0.2s ease;
}
.toggle-switch label::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 20px; height: 20px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}
.toggle-switch input:checked + label { background: var(--c-primary); }
.toggle-switch input:checked + label::after { transform: translateX(18px); }

/* Disable 3D flip */
.no-3d-flip .btn-download {
    transition: background 0.15s ease !important;
}
.footer-words {
    max-width: 480px;
    margin: 0 auto 16px;
    padding: 0 16px;
}
.footer-words .fw-line {
    font-size: 15px;
    font-weight: 500;
    color: var(--c-text-2);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}
.footer-words .fw-sub {
    font-size: 13px;
    color: var(--c-text-4);
    line-height: 1.7;
}
.footer-copy {
    font-size: 13px;
    color: var(--c-text-4);
    opacity: 0.85;
}
@media (max-width: 520px) {
    .footer-words .fw-line { font-size: 14px; }
    .footer-words .fw-sub { font-size: 12.5px; line-height: 1.65; }
}

/* Tablet */
@media (max-width: 1024px) {
    .site-header .container { gap: 12px; }
    .search-box { flex-basis: 200px; }
    .resource-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

/* Mobile (<768px) */
@media (max-width: 767px) {
    .container { padding: 0 14px; }
    .site-header .container {
        gap: 8px;
        height: auto;
        padding: 10px 14px;
        flex-wrap: wrap;
    }
    .brand { font-size: 15px; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .site-nav {
        width: 100%;
        overflow-x: auto;
        margin-left: 0;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
    }
    .site-nav::-webkit-scrollbar { display: none; }
    .nav-link { padding: 7px 12px; font-size: 14px; flex-shrink: 0; }
    .search-box {
        flex: 1 1 auto;
        margin-left: 0;
        height: 38px;
        width: auto;
    }
    .btn-settings-header {
        flex-shrink: 0;
        padding: 0 12px;
        height: 38px;
    }
    .btn-settings-header { padding: 0 10px; }
    .main-content { padding: 20px 0 48px; }
    .page-title { font-size: 20px; }
    .section-title { font-size: 16px; margin: 24px 0 12px; }
    .detail-head h1 { font-size: 22px; }
    .detail-title-row { gap: 12px; }
    .detail-icon { width: 48px; height: 48px; border-radius: 12px; }
    .resource-grid { grid-template-columns: 1fr; gap: 12px; }
    .resource-card { padding: 16px; }
    .card-top { gap: 12px; }
    .card-top-text h3 { font-size: 16px; }
    .card-top-text p { font-size: 13.5px; }
    .card-meta { font-size: 13px; flex-wrap: wrap; }
    .file-item { padding: 12px 14px; gap: 10px; flex-wrap: wrap; }
    .file-name { font-size: 14px; max-width: 100%; }
    .btn-download { width: 88px; height: 36px; font-size: 14px; }
    .cat-btn { padding: 7px 14px; font-size: 14px; }
    .filter-bar { gap: 6px; margin: 16px 0 20px; }
    .cat-badge { font-size: 12px; }
    .breadcrumb { font-size: 13px; flex-wrap: wrap; }
    .detail-desc { font-size: 14px; }
    .detail-meta { font-size: 13px; gap: 10px; }
}

/* Small mobile */
@media (max-width: 399px) {
    .container { padding: 0 12px; }
    .site-header .container { padding: 8px 12px; gap: 6px; }
    .brand { font-size: 14px; }
    .nav-link { padding: 6px 10px; font-size: 13px; }
    .page-title { font-size: 18px; }
    .resource-card { padding: 14px; }
    .card-top-text h3 { font-size: 15px; }
    .card-top-text p { font-size: 13px; }
    .search-box input { font-size: 14px; }
    .file-item { padding: 10px 12px; }
    .btn-download { width: 84px; height: 34px; font-size: 13px; }
    .btn-scroll-top { bottom: 16px; right: 16px; width: 40px; height: 40px; }
}

/* Mobile: always show copy button */
@media (hover: none) and (pointer: coarse) {
    .btn-copy-inline {
        opacity: 0.45;
    }
    .btn-copy-inline:active {
        opacity: 1;
    }
}

/* 主题卡片 */
.theme-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--c-border);
    border-radius: 4px;
    overflow: hidden;
    background: var(--c-surface);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.theme-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--c-border);
    cursor: pointer;
    transition: background 0.12s;
    background: var(--c-surface);
    text-align: left;
}
.theme-card:last-child { border-bottom: none; }
.theme-card:hover { background: #fafbfc; }
.theme-card.selected {
    background: #f0f7ff;
}
.theme-card-icon {
    width: 32px; height: 32px; border-radius: 4px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.theme-card-icon.default-theme {
    background: #0066cc; color: #fff;
}
.theme-card-icon.ui2-theme {
    background: #0071e3; color: #fff;
}
.theme-card-info {
    flex: 1;
    min-width: 0;
}
.theme-card-name {
    font-size: 14px; font-weight: 600; color: var(--c-text-1);
    margin-bottom: 2px;
}
.theme-card-desc {
    font-size: 12px; color: var(--c-text-4); line-height: 1.4;
}
.theme-card-check {
    width: 16px; height: 16px;
    flex-shrink: 0;
    color: var(--c-primary);
    opacity: 0;
    transition: opacity 0.15s;
}
.theme-card.selected .theme-card-check { opacity: 1; }

@media (max-width: 480px) {
    .theme-card { padding: 10px 12px; gap: 10px; }
    .theme-card-icon { width: 28px; height: 28px; }
    .theme-card-name { font-size: 13px; }
    .theme-card-desc { font-size: 11px; }
}

/* MC百科 detail layout */
.detail-ui2 { display: none; }
html.theme-ui2 .detail-ui2 { display: block; }
html.theme-ui2 .detail-mc { display: none; }

.detail-mc {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* MC百科面包屑 - 适中大小 */
.detail-mc .breadcrumb {
    font-size: 16px;
    color: var(--c-text-3);
    padding: 8px 0;
    background: none;
    display: flex;
    align-items: center;
    gap: 0;
}
.detail-mc .breadcrumb a {
    color: var(--c-primary);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 0;
    display: inline-block;
}
.detail-mc .breadcrumb a:hover { text-decoration: underline; }
.detail-mc .breadcrumb .sep {
    margin: 0 10px;
    color: var(--c-text-4);
    font-weight: 700;
    font-size: 16px;
}
.detail-mc .breadcrumb .current {
    color: var(--c-text-2);
    font-weight: 700;
    font-size: 16px;
}
/* 首页图标（⌂）—— 点击区域稍大，图标本身不放大 */
.detail-mc .mc-back-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    padding: 6px 10px;
    margin: -6px -4px;
    border-radius: var(--r-sm);
    min-width: 36px;
    min-height: 36px;
    transition: background 0.15s;
}
.detail-mc .mc-back-home:hover {
    background: var(--c-primary-soft);
    text-decoration: none;
}

/* 手机端面包屑 - 适中 + 大点击区域 */
@media (max-width: 767px) {
    .detail-mc .breadcrumb {
        font-size: 16px;
        padding: 10px 0;
    }
    .detail-mc .breadcrumb a {
        padding: 14px 0;
        min-height: 48px;
        display: inline-flex;
        align-items: center;
    }
    .detail-mc .breadcrumb .sep {
        margin: 0 12px;
        font-size: 16px;
    }
    .detail-mc .breadcrumb .current {
        font-size: 16px;
    }
    .detail-mc .mc-back-home {
        font-size: 14px;
        padding: 10px 14px;
        margin: -10px -6px;
        min-width: 44px;
        min-height: 44px;
    }
}

/* MC百科白色卡片 */
.detail-mc .card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

/* MC百科标签列表 */
.detail-mc .mc-tags {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.detail-mc .mc-tags .tag-pill {
    display: inline-block;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--c-primary);
    background: var(--c-primary-soft);
    border: 1px solid var(--c-border);
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.15s;
}
.detail-mc .mc-tags .tag-pill:hover {
    background: var(--c-primary);
    color: #fff;
    text-decoration: none;
}

/* MC百科下载表格 */
.detail-mc .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.detail-mc .download-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.detail-mc .download-table colgroup .col-fname { width: auto; }
.detail-mc .download-table colgroup .col-size { width: 90px; }
.detail-mc .download-table colgroup .col-dl { width: 70px; }
.detail-mc .download-table colgroup .col-time { width: 100px; }
.detail-mc .download-table colgroup .col-op { width: 70px; }

.detail-mc .download-table thead th {
    background: var(--c-surface-2);
    border-bottom: 2px solid var(--c-border);
    padding: 10px 12px;
    font-weight: 700;
    font-size: 12px;
    color: var(--c-text-2);
    text-align: left;
    white-space: nowrap;
}
.detail-mc .download-table thead th.th-center {
    text-align: center;
}
.detail-mc .download-table tbody tr {
    transition: background 0.15s;
}
.detail-mc .download-table tbody tr:hover {
    background: var(--c-surface-2);
}
.detail-mc .download-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--c-border);
    color: var(--c-text-2);
    vertical-align: middle;
}
.detail-mc .download-table tbody td.fname {
    color: var(--c-text-1);
    font-weight: 600;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.detail-mc .download-table tbody td.td-center {
    text-align: center;
}
.detail-mc .download-table tbody td.fsize {
    font-variant-numeric: tabular-nums;
}

/* MC百科下载按钮 */
.detail-mc .btn-down {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    min-width: 48px;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    background: var(--c-primary);
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
    white-space: nowrap;
}
.detail-mc .btn-down:hover {
    background: var(--c-primary-hover);
    border-color: var(--c-primary-hover);
}
.detail-mc .btn-share {
    height: 28px;
    width: 28px;
    border-radius: 4px;
}
.detail-mc .btn-share svg {
    width: 12px;
    height: 12px;
}
.detail-mc .btn-down:active {
    transform: scale(0.97);
}

/* MC百科下载标题行图标 */
.detail-mc .detail-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--r-sm);
    object-fit: contain;
    background: rgba(0,0,0,0.02);
    flex-shrink: 0;
}

/* 移动端适配 */
@media (max-width: 767px) {
    .detail-mc .download-table tbody td.fname {
        max-width: 160px;
    }
    .detail-mc .download-table colgroup .col-time { width: 80px; }
}
@media (max-width: 480px) {
    .detail-mc .download-table colgroup .col-size { width: 70px; }
    .detail-mc .download-table colgroup .col-dl { width: 50px; }
    .detail-mc .download-table colgroup .col-time { width: 70px; }
    .detail-mc .download-table colgroup .col-op { width: 56px; }
    .detail-mc .download-table tbody td { padding: 8px 8px; font-size: 12px; }
    .detail-mc .download-table thead th { padding: 8px 8px; font-size: 11px; }
}

/* 分类浏览页面 - 网格卡片浏览 */
.browse-section {
    margin-bottom: 28px;
}
.browse-section-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--c-border);
}
.browse-section-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--c-text-1);
    margin: 0;
}
.browse-section-count {
    font-size: 12px;
    font-weight: 500;
    color: var(--c-text-3);
    background: var(--c-surface-2);
    padding: 0 8px;
    border-radius: 10px;
    line-height: 20px;
}
.browse-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.browse-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--r-md);
    border: 1px solid var(--c-border);
    background: var(--c-surface-1);
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.browse-card:hover {
    border-color: var(--c-border-strong);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.browse-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    object-fit: contain;
    background: rgba(0,0,0,0.04);
    flex-shrink: 0;
    margin-top: 2px;
}
.browse-card-body {
    flex: 1;
    min-width: 0;
}
.browse-card-top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}
.browse-card-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--c-text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.browse-card-desc {
    font-size: 12px;
    color: var(--c-text-4);
    line-height: 1.5;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* 彩色标签 */
.browse-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 18px;
}
.tag-software { background: #e8f5e9; color: #2e7d32; }
.tag-mobile { background: #e3f2fd; color: #1565c0; }
.tag-sites { background: #fff3e0; color: #e65100; }
.tag-other { background: #f3e5f5; color: #7b1fa2; }

@media (max-width: 767px) {
    .browse-grid { grid-template-columns: 1fr; }
    .browse-card { padding: 10px 12px; }
    .browse-section { margin-bottom: 24px; }
}

/* 下载中心页面 - 表格面板 */
.dl-panel {
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    overflow: hidden;
}
.dl-panel-head {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: var(--c-surface-2);
    border-bottom: 1px solid var(--c-border);
    font-size: 12px;
    font-weight: 600;
    color: var(--c-text-3);
}
.dl-col-name { flex: 1; min-width: 0; display: inline-flex; align-items: center; }
.dl-col-info { width: 140px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.dl-col-action { width: 80px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: flex-end; }
.dl-panel-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--c-border);
    background: var(--c-surface);
    transition: background 0.12s;
    text-decoration: none;
}
.dl-panel-row:last-child { border-bottom: none; }
.dl-panel-row:hover { background: var(--c-surface-2); }
.dl-row-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
    background: rgba(0,0,0,0.04);
    flex-shrink: 0;
    margin-right: 10px;
    vertical-align: middle;
}
.dl-row-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.dl-row-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--c-text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dl-row-label {
    font-size: 11px;
    font-weight: 500;
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--c-surface-2);
    color: var(--c-text-3);
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 16px;
}
.dl-row-meta {
    font-size: 12px;
    color: var(--c-text-4);
}
.dl-row-meta.sep { margin: 0 4px; }
.dl-row-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 30px;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: var(--c-primary);
    border: none;
    border-radius: var(--r-sm);
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    transition: filter 0.15s, transform 0.15s;
}
.dl-row-btn:hover {
    background: var(--c-primary-hover);
}

@media (max-width: 767px) {
    .dl-panel-head { display: none; }
    .dl-col-info { display: none; }
    .dl-col-action { width: auto; }
    .dl-panel-row {
        padding: 12px 12px;
        gap: 10px;
        flex-wrap: wrap;
    }
    .dl-col-name { flex: 1 1 100%; }
    .dl-row-name { font-size: 13px; }
    .dl-col-action { width: 100%; margin-top: 4px; }
    .dl-row-btn { width: 100%; justify-content: center; }
}

/* 下载详情 - 文件卡片 */
.dl-files {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dl-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-radius: var(--r-md);
    background: var(--c-surface-1);
    border: 1px solid var(--c-border);
    transition: border-color 0.15s;
}
.dl-file-item:hover { border-color: var(--c-border-strong); }
.dl-file-info { min-width: 0; flex: 1; }
.dl-file-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--c-text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}
.dl-file-meta {
    font-size: 12px;
    color: var(--c-text-4);
}
.dl-sep { margin: 0 6px; }
.dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: var(--c-primary);
    border-radius: var(--r-sm);
    text-decoration: none;
    transition: filter 0.15s, transform 0.15s;
    flex-shrink: 0;
    margin-left: 16px;
}
.dl-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}
.btn-back {
    font-size: 14px;
    color: var(--c-primary);
    text-decoration: none;
    font-weight: 600;
}
.btn-back:hover { text-decoration: underline; }

@media (max-width: 767px) {
    .dl-file-item { padding: 12px 14px; flex-wrap: wrap; gap: 10px; }
    .dl-file-info { flex: 1 1 100%; }
    .dl-btn { margin-left: 0; }
}

/* Mobile: smaller card icons */
@media (max-width: 767px) {
    .card-icon { width: 28px; height: 28px; border-radius: 6px; }
}

/* Download confirm modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.modal-overlay.modal-open {
    opacity: 1;
    pointer-events: auto;
}
.modal-box {
    background: var(--c-surface);
    border-radius: 14px 14px 0 0;
    padding: 24px 20px 20px;
    max-width: 440px;
    width: 100%;
    text-align: left;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}
.modal-open .modal-box {
    transform: translateY(0);
}
.modal-icon {
    display: none;
}
.modal-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--c-text-1);
    margin-bottom: 6px;
}
.modal-desc {
    font-size: 14px;
    color: var(--c-text-3);
    margin-bottom: 18px;
    line-height: 1.5;
}
.modal-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--c-text-3);
    cursor: pointer;
    margin-bottom: 16px;
    user-select: none;
}
.modal-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--c-primary);
    cursor: pointer;
}
.modal-actions {
    display: flex;
    gap: 10px;
}
.modal-btn {
    flex: 1;
    height: 44px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease;
}
.modal-btn-cancel {
    background: var(--c-surface-2);
    color: var(--c-text-2);
}
.modal-btn-cancel:hover {
    background: var(--c-border);
}
.modal-btn-confirm {
    background: var(--c-primary);
    color: #fff;
}
.modal-btn-confirm:hover {
    background: var(--c-primary-hover);
}
.modal-btn:active {
    transform: scale(0.97);
}

/* UI2 theme modal */
html.theme-ui2 .modal-overlay {
    background: rgba(0, 0, 0, 0.4);
}
html.theme-ui2 .modal-box {
    background: #ffffff;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

/* UI2 file list */
html.theme-ui2 .file-item {
    padding: 14px 18px;
    gap: 14px;
}
html.theme-ui2 .file-name {
    font-size: 14px;
    font-weight: 500;
}
html.theme-ui2 .file-size {
    font-size: 12px;
    color: var(--c-text-4);
}
html.theme-ui2 .btn-download {
    width: 72px;
    height: 34px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
}
html.theme-ui2 .btn-share {
    width: 34px;
    height: 34px;
    border-radius: 8px;
}
html.theme-ui2 .btn-share svg {
    width: 14px;
    height: 14px;
}

/* UI2 detail head */
html.theme-ui2 .detail-head {
    margin-bottom: 24px;
}
html.theme-ui2 .detail-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
}
html.theme-ui2 .detail-title-row {
    gap: 14px;
}
html.theme-ui2 .detail-head h1 {
    font-size: 26px;
    font-weight: 600;
}
html.theme-ui2 .detail-desc {
    font-size: 14px;
    color: var(--c-text-3);
    line-height: 1.6;
}
html.theme-ui2 .detail-meta {
    font-size: 13px;
    padding-top: 14px;
    border-top: 1px solid var(--c-border);
}

/* UI2 breadcrumb */
html.theme-ui2 .breadcrumb {
    font-size: 13px;
    gap: 4px;
    margin-bottom: 16px;
}

/* UI2 section title */
html.theme-ui2 .section-title {
    font-size: 16px;
    font-weight: 500;
    margin: 24px 0 12px;
}

/* UI2 resource detail container */
html.theme-ui2 .resource-detail {
    max-width: 680px;
    margin: 0 auto;
}

/* Mobile modal */
@media (max-width: 480px) {
    .modal-box { padding: 20px 16px 16px; border-radius: 12px 12px 0 0; }
    .modal-title { font-size: 16px; }
    .modal-btn { height: 42px; font-size: 14px; }
}

/* Modal file list */
.modal-files {
    text-align: left;
    margin-bottom: 16px;
}
.modal-file-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    margin-bottom: 6px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    text-decoration: none;
    color: inherit;
    gap: 12px;
}
.modal-file-link:hover {
    border-color: var(--c-primary);
    background: var(--c-primary-soft);
}
.modal-file-link:last-child { margin-bottom: 0; }
.modal-file-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--c-text-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.modal-file-size {
    font-size: 12px;
    color: var(--c-text-4);
    flex-shrink: 0;
    white-space: nowrap;
}

/* Context menu */
.ctx-menu {
    position: fixed;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    z-index: 9999;
    padding: 6px 0;
    min-width: 160px;
    opacity: 0;
    transform: scale(0.95) translateY(-8px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
}
.ctx-menu.show {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}
.ctx-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--c-text-1);
    cursor: pointer;
    transition: background 0.1s;
}
.ctx-menu-item:hover {
    background: var(--c-surface-2);
}
.ctx-menu-item svg {
    width: 16px;
    height: 16px;
    color: var(--c-text-3);
}
.ctx-menu-sep {
    height: 1px;
    background: var(--c-border);
    margin: 6px 0;
}

/* Share button in file list */
.btn-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: transparent;
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    cursor: pointer;
    color: var(--c-text-3);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.btn-share:hover {
    background: var(--c-primary-soft);
    color: var(--c-primary);
    border-color: var(--c-primary);
}
.btn-share svg {
    width: 15px;
    height: 15px;
}

/* Share popup menu */
.share-popup {
    position: absolute;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 1000;
    padding: 6px 0;
    min-width: 120px;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
}
.share-popup.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.share-popup-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--c-text-1);
    cursor: pointer;
    white-space: nowrap;
}
.share-popup-item:hover {
    background: var(--c-surface-2);
}
.share-popup-item svg {
    width: 14px;
    height: 14px;
    color: var(--c-text-3);
}

/* Share page */
.share-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.share-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    max-width: 400px;
    width: 100%;
    padding: 24px;
}
.share-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}
.share-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    flex-shrink: 0;
    object-fit: contain;
    background: rgba(0,0,0,0.04);
}
.share-icon-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-surface-2);
}
.share-info {
    flex: 1;
    min-width: 0;
}
.share-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--c-text-1);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}
.share-filename {
    font-size: 13px;
    color: var(--c-text-3);
    margin-bottom: 2px;
    word-break: break-all;
}
.share-meta {
    font-size: 12px;
    color: var(--c-text-4);
}
.share-desc {
    font-size: 14px;
    color: var(--c-text-2);
    line-height: 1.6;
    padding: 12px 0;
    border-top: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
    margin-bottom: 18px;
}
.share-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    background: var(--c-primary);
    color: #fff;
    border-radius: var(--r-md);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s;
}
.share-download-btn:hover {
    background: var(--c-primary-hover);
    color: #fff;
}
.share-download-btn svg {
    width: 17px;
    height: 17px;
}
.share-footer {
    margin-top: 14px;
    font-size: 12px;
    color: var(--c-text-4);
}
.share-footer a {
    color: var(--c-text-3);
    text-decoration: none;
}
.share-footer a:hover {
    color: var(--c-primary);
}
