/* ==========================================================================
   变量定义
   ========================================================================== */

/* --- 通用变量定义 --- */
:root {
    /* 颜色方案 */
    --primary-color: #333333;
    --primary-rgb: 51, 51, 51;
    --secondary-color: #555555;
    --accent-color: #777777;
    
    /* 背景和容器 */
    --bg-color: #0d1117;
    --text-color: #c9d1d9;
    --container-bg: rgba(22, 27, 34, 0.7);
    --border-color: rgba(51, 51, 51, 0.2);
    
    /* 阴影和高亮 */
    --shadow-color: rgba(51, 51, 51, 0.15);
    --highlight-bg: rgba(255, 255, 255, 0.15);
    --h1-after-shadow: rgba(51, 51, 51, 0.4);
    
    /* 导航和页脚 */
    --navbar-text-color: #333333;
    --footer-text-color: #fff;
    
    /* 链接样式 */
    --link-color: #888888;
    --link-hover-color: #aaaaaa;
    --link-glow: rgba(85, 85, 85, 0.5);
    --link-hover-shadow: rgba(51, 51, 51, 0.5);
    --link-hover-text-shadow: rgba(255, 255, 255, 0.7);
    
    /* 图片效果 */
    --img-shadow: rgba(51, 51, 51, 0.2);
    --img-hover-shadow: rgba(51, 51, 51, 0.3);
    --img-border-color: rgba(51, 51, 51, 0.2);
    
    /* 背景渐变 */
    --body-gradient-color: rgba(51, 51, 51, 0.1);
    --body-before-gradient-color: rgba(85, 85, 85, 0.08);
    --h3-gradient-end-color: rgba(51, 51, 51, 0.3);
    
    /* 应用图标 */
    --app-icon-blend-mode: normal;
    --app-icon-filter: none;
}

/* --- 亮色主题变量覆盖 --- */
@media (prefers-color-scheme: light) {
    :root {
        --bg-color: #ffffff;
        --text-color: #24292f;
        --accent-color: #333333;
        --container-bg: rgba(255, 255, 255, 0.9);
        --link-hover-shadow: rgba(51, 51, 51, 0.7);
        --link-hover-text-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
        --h1-after-shadow: rgba(51, 51, 51, 0.2);
        --img-shadow: rgba(51, 51, 51, 0.15);
        --img-hover-shadow: rgba(51, 51, 51, 0.25);
        --img-border-color: rgba(51, 51, 51, 0.15);
        --body-gradient-color: rgba(51, 51, 51, 0.08);
        --body-before-gradient-color: rgba(85, 85, 85, 0.06);
        --h3-gradient-end-color: #555555;
        --link-color: #333333;
        --link-hover-color: #555555;
        --link-glow: rgba(51, 51, 51, 0.2);
        --app-icon-blend-mode: multiply;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --app-icon-blend-mode: screen;
        --app-icon-filter: drop-shadow(0 0 8px rgba(var(--primary-rgb), 0.3));
    }
}

/* ==========================================================================
   基础样式
   ========================================================================== */

body {
    font-family: 'Roboto', 'Arial', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    background-image: radial-gradient(circle at 50% 50%, var(--body-gradient-color), transparent 50%);
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, var(--body-before-gradient-color), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

@media (prefers-color-scheme: dark) {
    body, html { 
        background-color: var(--bg-color) !important; 
    }
}

/* ==========================================================================
   动画定义
   ========================================================================== */

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(var(--primary-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0); }
}

@keyframes safariThemeRefresh {
    0% { opacity: 0.01; }
    50% { opacity: 0.012; }
    100% { opacity: 0.01; }
}

/* ==========================================================================
   导航栏
   ========================================================================== */

#navbar-container {
    background: transparent;
    color: var(--navbar-text-color);
    padding: 8px 20px;
    box-shadow: none;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

#navbar-container nav ul {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
    max-width: 800px;
}

#navbar-container nav ul li {
    margin: 0;
    padding-left: 0;
}

#navbar-container nav ul li::before {
    content: none;
    display: none;
}

#navbar-container nav ul li a {
    color: var(--navbar-text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 25px;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    text-shadow: none;
    background: transparent;
    display: block;
}

#navbar-container nav ul li a::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--highlight-bg);
    border-radius: 25px;
    transition: all 0.3s ease;
    opacity: 0;
    z-index: -1;
}

#navbar-container nav ul li a:hover {
    color: var(--navbar-text-color);
    box-shadow: none;
    text-shadow: none;
}

#navbar-container nav ul li a:hover::before {
    left: 0;
    opacity: 0.7;
}

/* ==========================================================================
   标题样式
   ========================================================================== */

h1, h2, h3 {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    margin-top: 30px;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px var(--shadow-color);
    color: var(--primary-color); /* Safari 备用 */
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    position: relative;
    text-align: center;
}

h1::after {
    content: "";
    display: block;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 15px auto;
    border-radius: 2px;
    box-shadow: 0 2px 10px var(--h1-after-shadow);
}

h3 {
    margin-top: 35px;
    text-align: left;
    padding-left: 20px;
    border-left: 4px solid var(--primary-color);
    font-size: 1.3rem;
    background: linear-gradient(90deg, var(--primary-color), var(--h3-gradient-end-color));
    -webkit-background-clip: text;
    background-clip: text;
}

/* 下载部分标题样式 */
.container h1:has(+ p > a[href*="apps.apple.com"]),
.container h1:has(+ a[href*="apps.apple.com"]) {
    text-align: left;
    padding-left: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.container h1:has(+ p > a[href*="apps.apple.com"])::after,
.container h1:has(+ a[href*="apps.apple.com"])::after {
    margin-left: 0;
    margin-right: auto;
}

/* ==========================================================================
   容器样式
   ========================================================================== */

.container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
    background: var(--container-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 5px 20px var(--shadow-color);
}

/* ==========================================================================
   列表样式
   ========================================================================== */

ul {
    margin: 20px auto;
    padding: 0 20px;
    max-width: 800px;
    list-style-type: none;
}

ul li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 20px;
    line-height: 1.5;
}

ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-color);
    font-size: 1.2em;
    line-height: 1.5;
}

/* ==========================================================================
   图片样式
   ========================================================================== */

img {
    display: block;
    margin: 30px auto;
    max-width: 90%;
    height: auto;
    border-radius: 0;
    box-shadow: none;
    border: none;
    background-color: transparent;
    transition: transform 0.3s ease;
}

img:hover {
    transform: translateY(-5px);
    box-shadow: none;
}

a img {
    max-width: 200px;
    margin: 15px auto;
    border: none;
    box-shadow: none;
    background-color: transparent;
}

a img:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: none;
}

/* 应用图标通用样式 */
img[src$=".png"][alt*="app"],
img[src*="app_icon"],
img[alt*="应用"],
img[alt*="icon"] {
    display: block;
    margin: 30px auto;
    max-width: 256px;
    height: auto;
    border-radius: 22%;
    border: none;
    background-color: transparent;
    transition: all 0.3s ease;
    mix-blend-mode: var(--app-icon-blend-mode);
    filter: var(--app-icon-filter);
}

/* ==========================================================================
   页脚样式
   ========================================================================== */

footer {
    text-align: center;
    padding: 30px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: var(--footer-text-color);
    margin-top: 60px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 -2px 10px var(--shadow-color);
}

footer::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 0 20px var(--shadow-color);
}

/* ==========================================================================
   引用块样式
   ========================================================================== */

blockquote {
    margin: 30px auto;
    padding: 20px 30px;
    max-width: 800px;
    background: var(--container-bg);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    position: relative;
    font-style: italic;
    color: var(--text-color);
    box-shadow: 0 3px 15px var(--shadow-color);
    transition: all 0.3s ease;
}

blockquote::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 3em;
    font-family: Georgia, serif;
    color: var(--primary-color);
    opacity: 0.3;
    line-height: 1;
}

blockquote:hover {
    border-left-color: var(--secondary-color);
    box-shadow: 0 5px 20px var(--shadow-color);
    transform: translateY(-2px);
}

/* ==========================================================================
   链接样式
   ========================================================================== */

a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    padding: 0 2px;
}

a:hover {
    color: var(--link-hover-color);
    text-shadow: 0 0 8px var(--link-glow);
}

a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0.7;
    transition: width 0.3s ease;
    border-radius: 2px;
}

a:hover::after {
    width: 100%;
    box-shadow: 0 0 10px var(--link-hover-shadow);
}

#navbar-container nav ul li a::after,
a:has(> img)::after,
a[href*="apps.apple.com"]::after {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
}

a[href*="apps.apple.com"] {
    display: inline-flex;
    align-items: center;
    text-align: left;
    margin: 3px 0;
    border-bottom: none !important;
}

a[href*="apps.apple.com"] img {
    margin: 0;
}

/* ==========================================================================
   媒体查询
   ========================================================================== */

/* --- 亮色主题样式 --- */
@media (prefers-color-scheme: light) {
    /* 页脚和引用块调整 */
    footer::before { 
        opacity: 0.5; 
    }
    
    blockquote {
        background: rgba(246, 248, 250, 0.9);
        box-shadow: 0 3px 15px rgba(51, 51, 51, 0.1);
    }
    
    blockquote:hover { 
        box-shadow: 0 5px 20px rgba(51, 51, 51, 0.15); 
    }
    
    /* 导航链接调整 */
    #navbar-container nav ul li a:hover {
        color: #fff;
        font-weight: 600;
    }
    
    #navbar-container nav ul li a:hover::before {
        background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
        opacity: 0.9;
    }
    
    /* 链接样式调整 */
    a {
        border-bottom: 1px dotted rgba(230, 92, 0, 0.3);
    }
    
    a:hover {
        border-bottom-color: transparent;
    }
    
    a::after {
        opacity: 0.8;
        height: 1.5px;
    }
    
    /* 特殊链接调整 */
    a[href*="apps.apple.com"],
    a:has(img) {
        border-bottom: none !important;
    }
}

/* --- 暗色主题样式 --- */
@media (prefers-color-scheme: dark) {
    /* 标题样式调整 */
    h1, h2, h3 {
        background: linear-gradient(90deg, #aaaaaa, #ffffff);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        text-shadow: 0 1px 3px rgba(255, 255, 255, 0.2);
    }
    
    h1::after {
        background: linear-gradient(90deg, #888888, #cccccc);
        box-shadow: 0 2px 10px rgba(255, 255, 255, 0.25);
    }
    
    h3 {
        border-left: 4px solid #888888;
        background: linear-gradient(90deg, #aaaaaa, #ffffff);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    /* 导航链接调整 */
    #navbar-container nav ul li a {
        color: #c9d1d9;
    }
    
    #navbar-container nav ul li a:hover {
        color: #ffffff;
    }
}

/* --- 响应式布局 --- */
@media (max-width: 768px) {
    #navbar-container nav ul {
        flex-direction: column;
        align-items: center;
    }

    #navbar-container nav ul li {
        margin-bottom: 10px;
    }

    h1 {
        font-size: 2rem;
    }

    .container {
        margin: 15px;
        padding: 15px;
    }
}

/* ==========================================================================
   浏览器兼容性
   ========================================================================== */

/* Safari 特定修复 */
@supports (-webkit-touch-callout: none) {
    body::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: -10;
        pointer-events: none;
        background: var(--bg-color);
        opacity: 0.01;
        animation: safariThemeRefresh 1s ease-in-out 0.1s;
    }
}

/* ==========================================================================
   主站专用样式
   ========================================================================== */

.site-index {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 20px;
}

.filter-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
}

.filter-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.filter-dropdown {
    position: relative;
}

.filter-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.32);
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    line-height: 1;
    min-height: 36px;
    transition: all 0.2s ease;
}

.filter-dropdown-toggle:hover {
    border-color: rgba(79, 195, 247, 0.5);
}

.filter-dropdown-toggle[aria-expanded="true"] {
    border-color: rgba(79, 195, 247, 0.65);
    box-shadow: 0 0 0 2px rgba(79, 195, 247, 0.12);
}

.filter-dropdown-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--secondary-color);
}

.filter-dropdown-summary {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-color);
}

.filter-dropdown-caret {
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.filter-dropdown-toggle[aria-expanded="true"] .filter-dropdown-caret {
    transform: rotate(180deg);
}

.filter-dropdown-menu {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    min-width: 260px;
    max-width: 360px;
    max-height: min(320px, 60vh);
    overflow: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: rgba(10, 15, 24, 0.92);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    padding: 10px;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.filter-chip {
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-color);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.18s ease;
}

.filter-chip:hover {
    border-color: rgba(79, 195, 247, 0.55);
    transform: translateY(-1px);
}

.filter-chip.is-active {
    border-color: rgba(79, 195, 247, 0.85);
    background: rgba(79, 195, 247, 0.22);
    color: #f0f9ff;
}

.clear-filters-btn {
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-filters-btn:hover {
    border-color: rgba(79, 195, 247, 0.55);
    background: rgba(79, 195, 247, 0.1);
}

.featured-showcase {
    min-height: 230px;
    position: relative;
}

@keyframes showcaseEnter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.showcase-card {
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 16px;
    background:
        radial-gradient(1200px 420px at -10% -90%, rgba(56, 189, 248, 0.28), transparent 45%),
        radial-gradient(900px 420px at 110% 130%, rgba(59, 130, 246, 0.25), transparent 45%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.82));
    overflow: hidden;
    animation: showcaseEnter 0.28s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.showcase-main {
    display: grid;
    grid-template-columns: 1fr 156px;
    gap: 20px;
    padding: 20px;
    align-items: center;
    flex: 1;
}

.showcase-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.showcase-kicker {
    margin: 0;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    color: rgba(224, 242, 254, 0.78);
}

.showcase-title {
    margin: 0;
    font-size: 1.6rem;
    line-height: 1.2;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: currentColor;
    text-align: left;
    letter-spacing: 0;
    font-weight: 700;
    color: inherit;
    text-shadow: none;
}

.showcase-title a {
    color: #f0f9ff;
    text-shadow: 0 4px 18px rgba(15, 23, 42, 0.35);
    border-bottom: none !important;
    padding: 0;
}

.showcase-title a::after {
    display: none !important;
    content: none !important;
}

.showcase-description {
    margin: 0;
    color: rgba(226, 232, 240, 0.95);
    max-width: 64ch;
}

.showcase-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.showcase-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(186, 230, 253, 0.3);
    padding: 4px 9px;
    font-size: 0.74rem;
    color: rgba(224, 242, 254, 0.92);
    background: rgba(186, 230, 253, 0.12);
}

.showcase-type {
    border-color: rgba(125, 211, 252, 0.7);
    background: rgba(125, 211, 252, 0.22);
    color: #f8fdff;
}

.showcase-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.showcase-actions a {
    margin: 0;
}

.showcase-actions img {
    height: 34px;
    margin: 0;
}

.showcase-media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(186, 230, 253, 0.18);
}

.showcase-media img {
    width: 96px;
    max-width: 96px;
    margin: 0;
    border-radius: 22%;
}

.showcase-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid rgba(186, 230, 253, 0.22);
    background: rgba(15, 23, 42, 0.38);
}

.showcase-dots {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.showcase-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: rgba(186, 230, 253, 0.45);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.showcase-dot:hover {
    transform: scale(1.15);
}

.showcase-dot.is-active {
    background: #f0f9ff;
}

.showcase-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.showcase-control-btn {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(186, 230, 253, 0.38);
    background: rgba(186, 230, 253, 0.1);
    color: #f0f9ff;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1.06rem;
    line-height: 1;
    transition: all 0.2s ease;
}

.showcase-control-btn:hover {
    border-color: rgba(186, 230, 253, 0.75);
    background: rgba(186, 230, 253, 0.23);
}

.showcase-counter {
    margin-left: auto;
    margin-right: 6px;
    font-size: 0.8rem;
    color: rgba(226, 232, 240, 0.85);
}

.showcase-empty {
    border: 1px dashed var(--border-color);
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
}

.showcase-empty h2 {
    margin-top: 0;
}

.showcase-empty p {
    margin: 0;
    color: var(--secondary-color);
}

.app-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.site-index .app-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    list-style: none !important;
    padding: 16px !important;
    margin: 0 !important;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
}

.site-index .app-item::before {
    display: none !important;
    content: none !important;
}

.site-index .app-item .item-img {
    width: 88px;
    max-width: 88px;
    margin: 0;
}

.site-index .app-item .item-content {
    width: 100%;
    min-width: 0;
}

.site-index .app-item .title {
    font-size: 1.08rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.site-index .app-item .title a {
    color: #4fc3f7;
}

.site-index .app-item .description {
    margin-bottom: 10px;
    line-height: 1.5;
}

.site-index .app-item .image-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
}

.site-index .app-item .image-links a {
    display: block;
    margin: 0;
}

.site-index .app-item .image-links img {
    height: 34px;
    margin: 0;
}

.is-hidden {
    display: none !important;
}

.empty-state {
    text-align: center;
    padding: 18px 14px;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    color: var(--secondary-color);
}

/* 亮色模式适配 */
@media (prefers-color-scheme: light) {
    .filter-toolbar {
        background: #f8fafc;
        border-color: rgba(15, 23, 42, 0.12);
    }

    .filter-dropdown-toggle {
        background: #ffffff;
        border-color: rgba(15, 23, 42, 0.18);
        color: #0f172a;
    }

    .filter-dropdown-toggle:hover {
        border-color: rgba(37, 99, 235, 0.45);
    }

    .filter-dropdown-toggle[aria-expanded="true"] {
        border-color: rgba(37, 99, 235, 0.75);
        box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14);
    }

    .filter-dropdown-label {
        color: #64748b;
    }

    .filter-dropdown-summary {
        color: #0f172a;
    }

    .filter-dropdown-menu {
        background: #ffffff;
        border-color: rgba(15, 23, 42, 0.15);
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    }

    .filter-chip {
        border-color: rgba(15, 23, 42, 0.16);
        background: #f1f5f9;
        color: #0f172a;
    }

    .filter-chip.is-active {
        border-color: rgba(37, 99, 235, 0.55);
        background: rgba(37, 99, 235, 0.12);
        color: #0f172a;
    }

    .clear-filters-btn {
        border-color: rgba(15, 23, 42, 0.18);
        background: #ffffff;
        color: #334155;
    }

    .clear-filters-btn:hover {
        border-color: rgba(37, 99, 235, 0.48);
        background: #eff6ff;
        color: #1d4ed8;
    }

    .showcase-card {
        border-color: rgba(37, 99, 235, 0.2);
        background:
            radial-gradient(1200px 420px at -10% -90%, rgba(147, 197, 253, 0.38), transparent 45%),
            radial-gradient(900px 420px at 110% 130%, rgba(191, 219, 254, 0.36), transparent 45%),
            linear-gradient(135deg, #f8fbff, #eef5ff);
    }

    .showcase-kicker {
        color: #64748b;
    }

    .site-index .app-item .title a {
        color: #0066cc;
    }

    .showcase-title a {
        color: #0f172a;
        text-shadow: none;
    }

    .showcase-description {
        color: #334155;
    }

    .showcase-badge {
        color: #0f172a;
        border-color: rgba(15, 23, 42, 0.2);
        background: rgba(15, 23, 42, 0.07);
    }

    .showcase-type {
        border-color: rgba(37, 99, 235, 0.42);
        background: rgba(37, 99, 235, 0.12);
        color: #0f172a;
    }

    .showcase-media {
        background: rgba(37, 99, 235, 0.08);
        border-color: rgba(37, 99, 235, 0.2);
    }

    .showcase-footer {
        border-top-color: rgba(37, 99, 235, 0.18);
        background: rgba(37, 99, 235, 0.06);
    }

    .showcase-control-btn {
        border-color: rgba(37, 99, 235, 0.38);
        background: rgba(37, 99, 235, 0.08);
        color: #1e3a8a;
    }

    .showcase-control-btn:hover {
        border-color: rgba(37, 99, 235, 0.62);
        background: rgba(37, 99, 235, 0.16);
    }

    .showcase-counter {
        color: #334155;
    }

    .showcase-dot {
        background: rgba(51, 65, 85, 0.36);
    }

    .showcase-dot.is-active {
        background: #0f172a;
    }
}

@media (max-width: 920px) {
    .showcase-main {
        grid-template-columns: 1fr;
    }

    .showcase-media {
        justify-content: center;
    }

    .showcase-media img {
        width: 84px;
        max-width: 84px;
    }
}

@media (max-width: 768px) {
    .site-index {
        padding: 14px;
        gap: 18px;
    }

    .filter-toolbar {
        align-items: stretch;
        flex-direction: column;
        padding: 10px;
    }

    .filter-toolbar-left {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .filter-dropdown {
        width: 100%;
    }

    .filter-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .showcase-main {
        padding: 14px;
        gap: 12px;
    }

    .showcase-title {
        font-size: 1.2rem;
    }

    .showcase-footer {
        flex-wrap: wrap;
    }

    .showcase-counter {
        margin-left: 0;
        margin-right: 0;
    }
}

/* 无 backdrop-filter 支持的浏览器处理 */
@supports not ((backdrop-filter: blur(5px)) or (-webkit-backdrop-filter: blur(5px))) {
    .showcase-card,
    .site-index .app-item,
    .filter-toolbar {
        background: transparent;
    }
}
