* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --text: rgba(255, 255, 255, 0.92);
    --text-muted: rgba(255, 255, 255, 0.7);
    --accent: #fff;
    --accent-rgb: 255, 255, 255;
    --accent-glow: rgba(255, 255, 255, 0.1);
    --accent-glow-strong: rgba(255, 255, 255, 0.2);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-bg-hover: rgba(255, 255, 255, 0.09);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-border-hover: rgba(255, 255, 255, 0.18);
    --glass-blur: 12px;
    --site-bg-start: #232526;
    --site-bg-end: #414345;
}

body {
    margin: 0;
    padding: 48px 20px;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--site-bg-start), var(--site-bg-end));
    color: var(--text);
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

.bg-blur {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: rgba(24, 28, 33, 0.3);
    pointer-events: none;
    /* 使用 background 替代 backdrop-filter 提升性能 */
    /* backdrop-filter 由 JS 动态设置（仅在自定义背景图时启用） */
}

.container {
    position: relative;
    z-index: 2;
    width: min(1200px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

/* ===== 毛玻璃卡片基础样式 ===== */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(120%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(120%);
    border-radius: 16px;
    border: 1px solid var(--card-border);
    padding: 24px;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    color: var(--text);
}

/* 顶部高光线 */
.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.4), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    background: var(--card-bg-hover);
    border-color: var(--card-border-hover);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(var(--accent-rgb), 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.card:hover::before {
    opacity: 1;
}

/* ===== 左侧栏 ===== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 20px;
    height: fit-content;
}

/* 头像卡片 */
.avatar-card,
.avatar-card:hover {
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(var(--accent-rgb), 0.25);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.avatar:hover {
    border-color: rgba(var(--accent-rgb), 0.5);
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.15);
}

.avatar-placeholder {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 500;
    z-index: 1;
    letter-spacing: 0.5px;
}

.avatar-img {
    display: block;
    min-width: 100%;
    min-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: inherit;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
}

/* 社交媒体滚动（使用 APP/aoo.css，适配侧边栏） */
.sidebar .content {
    width: 100%;
    height: 80px;
    border-radius: 12px;
}

.sidebar .content .benefits {
    min-width: 700px;
}

.sidebar .content .basic-marquee svg {
    width: 30px;
}

/* 联系方式图标（使用 icon.css） */

/* 导航列表（使用 lan.css） */
.radio-container {
    font-size: 14px;
    letter-spacing: 0.3px;
}

/* ===== 右侧主内容区 ===== */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* 内容加载前隐藏，防止默认内容闪烁 */
    opacity: 0;
    transition: opacity .3s ease;
}
.main-content.loaded {
    opacity: 1;
}

.announcement-bar {
    padding: 10px 14px;
    background: rgba(var(--accent-rgb), 0.12);
    border: 1px solid rgba(var(--accent-rgb), 0.28);
    border-radius: 12px;
    font-size: 14px;
}

.announcement-bar a {
    color: var(--text);
    text-decoration: none;
    display: block;
}

.announcement-bar a:hover {
    opacity: 0.9;
}

/* 滚动渐入动画 */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .5s ease, transform .5s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 标题卡片 */
.title-card,
.title-card:hover {
    padding: 40px 4px 16px;
    text-align: left;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.title-wrap {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-size: 48px;
    font-weight: 700;
    font-family: 'ZQKNNY', sans-serif;
}

.title-prefix {
    color: #fff;
    -webkit-text-fill-color: #fff;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.title {
    font-size: inherit;
    font-weight: inherit;
    background: linear-gradient(135deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff, #9b59b6, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientText 4s ease infinite;
}

@keyframes gradientText {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* 副标题卡片 */
.subtitle-card,
.subtitle-card:hover {
    padding: 0 4px 24px;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.subtitle-wrap {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: 1px;
    font-family: 'ZQKNNY', sans-serif;
}

.subtitle-prefix {
    color: var(--text-muted);
    font-size: inherit;
    font-weight: inherit;
    flex-shrink: 0;
}

.subtitle-name {
    font-size: inherit;
    font-weight: inherit;
    background: linear-gradient(135deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff, #9b59b6, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientText 4s ease infinite;
}

.subtitle {
    font-size: 20px;
    color: #fff;
    font-weight: 400;
    text-align: left;
    letter-spacing: 2px;
}

/* 像素文字横幅 */
.pixel-banner {
    display: flex;
    justify-content: flex-start;
    padding: 8px 0;
    overflow: hidden;
    max-width: 100%;
}

.pixel-grid {
    display: flex;
    line-height: 0;
    max-width: 100%;
    overflow: hidden;
}

/* 像素横幅 — 蛇形 SVG 模式：自适应宽度，限制最大高度，靠左显示 */
.pixel-banner--svg {
    justify-content: flex-start;
    padding: 0;
    margin: 0;
}
.pixel-grid--svg {
    display: block;
    width: 100%;
    max-width: 620px;
    margin-left: 0;
    padding-left: 0;
    line-height: 0;
    overflow: hidden;
}
.pixel-grid--svg svg {
    width: 100%;
    height: auto;
    max-height: 110px;
    display: block;
}
@media (max-width: 600px) {
    .pixel-grid--svg { max-width: 100%; }
    .pixel-grid--svg svg { max-height: 70px; }
}

/* ===== 授权伙伴展示 ===== */
.agents-card,
.agents-card:hover {
    padding: 28px 0 0;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.agent-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.agent-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.agent-item:hover {
    background: rgba(var(--accent-rgb), 0.08);
    border-color: rgba(var(--accent-rgb), 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(var(--accent-rgb), 0.05);
}

.agent-item:hover::before {
    opacity: 1;
}

a.agent-item {
    text-decoration: none;
    color: inherit;
    display: block;
}

.agent-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 14px;
    overflow: hidden;
    border: 1.5px solid rgba(var(--accent-rgb), 0.2);
    background: rgba(var(--accent-rgb), 0.06);
    position: relative;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
}

.agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-width: 100%;
    min-height: 100%;
    transform: translateZ(0);
}

.agent-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(var(--accent-rgb), 0.08);
}

.agent-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.agent-desc {
    font-size: 13px;
    color: var(--text-muted);
}

/* 帖子模块 */
.posts-card,
.posts-card:hover {
    max-width: 900px;
    padding: 28px 0 0;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.posts-scroll-wrap {
    position: relative;
    margin-top: 20px;
}

.posts-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 0 8px;
}
.posts-grid::-webkit-scrollbar { display: none; }

.posts-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(20, 22, 28, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: opacity 0.2s, background 0.2s, border-color 0.2s;
    opacity: 0;
    pointer-events: none;
}
.posts-scroll-wrap:hover .posts-nav.visible { opacity: 1; pointer-events: auto; }
.posts-nav.visible { opacity: 0.6; pointer-events: auto; }
.posts-nav:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.25); opacity: 1 !important; }
.posts-nav svg { width: 18px; height: 18px; }
.posts-nav-left { left: -18px; }
.posts-nav-right { right: -18px; }

@media (max-width: 768px) {
    .posts-nav-left { left: 4px; }
    .posts-nav-right { right: 4px; }
    .posts-nav.visible { opacity: 0.7; }
}

.post-item {
    min-width: calc((100% - 40px) / 3);
    max-width: calc((100% - 40px) / 3);
    flex-shrink: 0;
    scroll-snap-align: start;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    contain: layout style;
}

@media (max-width: 900px) {
    .post-item { min-width: calc((100% - 20px) / 2); max-width: calc((100% - 20px) / 2); }
}
@media (max-width: 600px) {
    .post-item { min-width: 85%; max-width: 85%; }
}

.post-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: translateY(-4px);
}

.post-cover {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    background: rgba(255, 255, 255, 0.04);
}

.post-cover-placeholder {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.post-cover-placeholder svg {
    width: 40px;
    height: 40px;
    opacity: 0.25;
}

.post-content {
    padding: 16px;
}

.post-title {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-excerpt {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.posts-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.5);
    gap: 12px;
}

.posts-spinner {
    width: 32px;
    height: 32px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.posts-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.4);
    gap: 12px;
}

.posts-empty svg {
    width: 48px;
    height: 48px;
    opacity: 0.3;
}

.email-card {
    max-width: 640px;
    padding: 0;
}

.section-title {
    font-size: 20px;
    color: var(--text);
    margin-bottom: 20px;
    font-weight: 600;
    padding-left: 4px;
    letter-spacing: 0.5px;
}

/* ===== 移动端头像 ===== */
.mobile-avatar-card {
    display: none; /* 桌面端隐藏 */
}

.mobile-avatar {
    width: 150px;
    height: 150px;
    min-width: 150px;
    min-height: 150px;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(var(--accent-rgb), 0.25);
    position: relative;
    overflow: hidden;
    margin: 0 auto;
}

.mobile-avatar .avatar-placeholder {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    z-index: 1;
}

.mobile-avatar .avatar-img,
.mobile-avatar img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 50% !important;
    transform: none !important;
    z-index: 2;
    pointer-events: none;
    position: absolute;
    inset: 0;
}

/* ===== 合作伙伴展示 ===== */
.ads-card,
.ads-card:hover {
    padding: 28px 0 0;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.ad-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 20px;
    text-align: left;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

a.ad-item {
    text-decoration: none;
    color: inherit;
    display: block;
}

.ad-item:hover {
    background: rgba(var(--accent-rgb), 0.08);
    border-color: rgba(var(--accent-rgb), 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.ad-image {
    width: 100%;
    height: 140px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    background: rgba(var(--accent-rgb), 0.06);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
}

.ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-width: 100%;
    min-height: 100%;
    transform: translateZ(0);
}

.ad-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.ad-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ===== 响应式设计 ===== */

/* 无侧边栏：单列自适应，所有尺寸交给浏览器 */
@media (max-width: 1024px) {
    body {
        padding: clamp(12px, 3vw, 48px) clamp(10px, 3vw, 20px);
    }

    .container {
        grid-template-columns: 1fr;
        gap: 0;
        max-width: 100%;
    }

    /* 隐藏侧边栏（桌面端专用） */
    .sidebar {
        display: none !important;
    }

    /* 显示移动端头像 */
    .mobile-avatar-card {
        display: flex;
        justify-content: center;
        padding: 10px 0 6px;
    }

    /* 标题自适应 */
    .title-card, .title-card:hover {
        padding: clamp(8px, 2vw, 40px) 0 clamp(4px, 1vw, 16px);
    }

    .title-wrap {
        font-size: clamp(22px, 6vw, 48px);
        flex-wrap: wrap;
        gap: 6px;
    }

    .title-prefix {
        flex-shrink: 1;
    }

    /* 副标题自适应 */
    .subtitle-card, .subtitle-card:hover {
        padding: 0 0 clamp(8px, 1.5vw, 24px);
    }

    .subtitle-wrap {
        font-size: clamp(13px, 3.5vw, 32px);
        flex-wrap: wrap;
        gap: 4px;
    }

    .subtitle-prefix {
        flex-shrink: 1;
    }

    /* 像素横幅 — 自适应，无需滚动 */
    .pixel-banner {
        justify-content: flex-start;
    }

    /* 内容间距自适应 */
    .main-content {
        gap: clamp(10px, 2vw, 20px);
        max-width: 100%;
    }

    .section-title {
        font-size: clamp(16px, 4vw, 20px);
    }

    /* 授权伙伴网格自适应 — 两列 */
    .agents-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .agent-item {
        padding: 16px 12px;
    }

    .agent-avatar {
        width: 64px;
        height: 64px;
    }

    .agent-name {
        font-size: 14px;
    }

    .agent-desc {
        font-size: 12px;
    }

    /* 合作伙伴网格自适应 — 单列 */
    .ads-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .ad-item {
        padding: 14px;
    }

    .ad-image {
        height: 120px;
    }

    .ad-title {
        font-size: 14px;
    }

    .ad-desc {
        font-size: 12px;
    }
}

/* ===== 焦点样式（键盘导航） ===== */
:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

input:focus-visible + label,
button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

/* ===== 减少动效偏好 ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

