:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --primary: #1a1a1a;
    --primary-soft: #f0f0f0;
    --topbar-from: #ffffff;
    --topbar-to: #ffffff;
    --text: #1a1a1a;
    --muted: #555555;
    --border: #dddddd;
    --radius: 0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.10), 0 6px 16px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

/* ---- 页面加载遮罩 ---- */
#page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}
#page-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.page-loader__logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    animation: loaderPulse 1.4s ease-in-out infinite;
}
.page-loader__spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #dddddd;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: loaderSpin 0.7s linear infinite;
}
.page-loader__text {
    font-size: 0.9rem;
    color: #888888;
    letter-spacing: 1px;
}
@keyframes loaderSpin {
    to { transform: rotate(360deg); }
}
@keyframes loaderPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.7; }
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* 顶栏 */
.topbar {
    position: fixed;
    inset: 0 0 auto 0;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    background: #ffffff;
    color: #1a1a1a;
    z-index: 100;
    border-bottom: 1px solid #dddddd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.topbar__logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}
.topbar__brand {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.topbar__home {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #1a1a1a;
    flex-shrink: 0;
}
.topbar__nav {
    margin-left: 24px;
    display: flex;
    gap: 18px;
    align-items: center;
}
.topbar__nav a {
    color: #555555;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 4px 2px;
    border-bottom: 2px solid transparent;
    transition: color 0.18s ease, border-color 0.18s ease;
    white-space: nowrap;
}
.topbar__nav a:hover,
.topbar__nav a[aria-current="page"] {
    color: #1a1a1a;
    border-bottom-color: #1a1a1a;
    font-weight: 600;
}
.topbar__actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}
.topbar__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid #dddddd;
    border-radius: 0;
    color: #1a1a1a;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}
.topbar__btn:hover {
    background: #f0f0f0;
}
.topbar__btn:active {
    transform: scale(0.9);
}

/* 整体布局 */
.layout {
    display: flex;
    padding-top: 60px;
    min-height: 100vh;
}

/* 主内容 */
.content {
    margin-left: 0;
    padding: 76px 24px 40px;
    flex: 1;
    text-align: center;
    transition: margin-left 0.25s ease;
}
.content__inner {
    max-width: 780px;
    margin: 0 auto;
}
.content h1 {
    font-size: 2.2rem;
    letter-spacing: 1px;
    margin-bottom: 6px;
    color: #1a1a1a;
}
.content h2 {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--muted);
    margin-bottom: 18px;
    text-align: left;
}
/* h1 的副标题保持居中 */
.content h1 + h2 {
    text-align: center;
}
.content .intro {
    max-width: 640px;
    margin: 0 auto 36px;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 2;
    letter-spacing: 1px;
}
.content section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
    scroll-margin-top: 76px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.content section:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}
.content section h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--text);
    text-align: left;
}
.content section h3::after {
    content: "";
    display: block;
    width: 40px;
    height: 3px;
    background: #a8d8ea;
    border-radius: 0;
    margin: 8px 0 0;
}
.about-text {
    text-align: left;
    color: var(--muted);
    line-height: 1.9;
    margin-top: 4px;
}
.about-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    justify-content: center;
}
.about-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 28px;
    font-size: 0.95rem;
    text-decoration: none;
    border: 1px solid #1a1a1a;
    transition: background 0.2s ease, color 0.2s ease;
}
.about-btn__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    vertical-align: middle;
}
.about-btn--bili {
    background: #fb7299;
    color: #ffffff;
    border-color: #fb7299;
}
.about-btn--bili:hover {
    background: #ffffff;
    color: #fb7299;
    border-color: #fb7299;
}
.about-btn--douyin {
    background: #1a1a1a;
    color: #ffffff;
}
.about-btn--douyin:hover {
    background: #ffffff;
    color: #1a1a1a;
}
.placeholder-block {
    padding: 14px 16px;
    border: 1px dashed #bbbbbb;
    color: #666666;
    font-size: 0.88rem;
    background: #fafafa;
    text-align: left;
}
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 16px;
    text-align: left;
}
.card {
    display: block;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.18s ease, transform 0.18s ease;
}
.card:hover {
    border-color: #1a1a1a;
    transform: translateY(-2px);
}
.card h4 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--text);
}
.card .placeholder-block {
    padding: 10px 12px;
}
.member__avatar {
    position: relative;
    overflow: hidden;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 12px;
    background: #f0f0f0;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 600;
}
.member__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.member__role {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 4px 0 6px;
}
.member__intro {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.5;
    margin: 0;
    text-align: left;
}

/* 团队成员卡片统一居中排版 */
#members .card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
#members .card h4 {
    word-break: keep-all;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* 组长居中突出 */
.leader {
    display: flex;
    justify-content: center;
    margin: 8px 0 22px;
}
.leader .card {
    max-width: 300px;
}
/* 固定三列 */
.cards--3 {
    grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 640px) {
    .cards--3 {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 460px) {
    .cards--3 {
        grid-template-columns: 1fr;
    }
}

/* ---- 指令列表 ---- */
.cmd-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.cmd-cat__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 10px;
    padding-left: 0;
}
.cmd-cat__items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cmd-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    font-size: 0.88rem;
    text-align: left;
}
.cmd-line code {
    background: #eeeeee;
    color: #1a1a1a;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: "SF Mono", "Consolas", "Menlo", monospace;
}
.cmd-note {
    font-size: 0.8rem;
    color: var(--muted);
}
.cmd-label {
    font-size: 0.85rem;
    color: var(--muted);
}

/* 标签（组员等） */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 6px;
}
.tag {
    display: inline-block;
    padding: 4px 10px;
    background: #f0f0f0;
    color: #1a1a1a;
    font-size: 0.85rem;
    border-radius: 0;
    border: 1px solid #dddddd;
}

/* 活动列表 */
.api-list {
    list-style: none;
    text-align: left;
    margin-top: 4px;
}
.api-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.api-list li:last-child {
    border-bottom: none;
}
.api-name {
    font-weight: 600;
    color: var(--text);
}
.api-desc {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 2px;
}
.contact {
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.95rem;
}
.contact a {
    color: #1a1a1a;
    text-decoration: underline;
    border-bottom: 1px solid transparent;
    transition: border-color 0.18s ease;
}
.contact a:hover {
    border-bottom-color: #1a1a1a;
}
/* 友情链接 */
.link-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
}
.link-card {
    display: block;
    padding: 14px 16px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    text-align: left;
    transition: border-color 0.18s ease, transform 0.18s ease;
}
.link-card:hover {
    border-color: #1a1a1a;
    transform: translateY(-2px);
}
.link-card__name {
    display: block;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}
.link-card__desc {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
}
@media (max-width: 460px) {
    .link-cards {
        grid-template-columns: 1fr;
    }
}

/* 视频切换（封面流） */
.video-switch {
    position: relative;
    margin-top: 8px;
}
.video-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #f0f0f0;
    overflow: hidden;
}
.video-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    width: 52px;
    height: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    line-height: 1;
    color: #1a1a1a;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #dddddd;
    border-radius: 0;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease, transform 0.15s ease;
}
.video-arrow--prev {
    left: 10px;
}
.video-arrow--next {
    right: 10px;
}
.video-arrow:hover {
    background: #ffffff;
}
.video-arrow:active {
    transform: translateY(-50%) scale(0.9);
}
.video-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(0.92);
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.45s ease;
    will-change: transform, opacity;
    pointer-events: none;
}
.video-cover {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
    overflow: hidden;
}
.video-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.video-cover:hover img {
    transform: scale(1.04);
}
.video-cover::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 2;
}
.video-cover::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent #ffffff;
    margin-left: 4px;
    z-index: 3;
}
.video-cover:hover::before {
    background: rgba(26, 26, 26, 0.85);
    transform: translate(-50%, -50%) scale(1.08);
}
.video-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    padding: 22px 14px 10px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.4;
    text-align: left;
    pointer-events: none;
}
.video-item.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 3;
    pointer-events: auto;
}

/* 页脚 */
.site-footer {
    background: #f0f0f0;
    color: #555555;
    font-size: 0.9rem;
    border-top: 1px solid #dddddd;
}
.site-footer__inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
    padding: 40px 24px 28px;
    text-align: left;
}
.footer-col {
    flex: 1;
    min-width: 0;
}
.footer-col--brand {
    flex: 1.3;
}
.footer-col__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}
.footer-col__desc {
    color: #777777;
    font-size: 0.85rem;
    line-height: 1.8;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li {
    margin-bottom: 8px;
}
.footer-links a {
    color: #555555;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.18s ease;
}
.footer-links a:hover {
    color: #1a1a1a;
}
.footer-friends-card {
    padding: 12px 14px;
    border: 1px dashed #bbbbbb;
    font-size: 0.85rem;
    color: #777777;
    line-height: 1.8;
}
.footer-friends-card a {
    color: #1a1a1a;
    text-decoration: underline;
}
.footer-friends-card a:hover {
    text-decoration: none;
}

.site-footer__bottom {
    border-top: 1px solid #dddddd;
    padding: 14px 24px;
    text-align: center;
}
.site-footer__copy {
    color: #888888;
    font-size: 0.8rem;
}

/* 响应式 */
@media (max-width: 640px) {
    .topbar {
        padding: 0 12px;
        gap: 6px;
        height: 52px;
    }
    .topbar__brand {
        font-size: 0.95rem;
    }
    .topbar__home {
        gap: 8px;
    }
    .topbar__logo {
        width: 26px;
        height: 26px;
    }
    .topbar__nav {
        margin-left: 8px;
        gap: 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .topbar__nav a {
        font-size: 0.85rem;
    }
    .layout {
        padding-top: 52px;
    }
    .content {
        padding: 32px 14px 28px;
    }
    .content h1 {
        font-size: 1.6rem;
    }
    .content h2 {
        font-size: 1rem;
        margin-bottom: 14px;
    }
    .content .intro {
        font-size: 0.9rem;
        padding: 0 4px;
    }
    .content section {
        padding: 16px;
        margin-bottom: 14px;
    }
    .content section h3 {
        font-size: 1.1rem;
    }
    .about-text {
        font-size: 0.92rem;
        line-height: 1.8;
    }
    .about-actions {
        flex-direction: column;
        gap: 10px;
    }
    .about-btn {
        justify-content: center;
        padding: 10px 24px;
        width: 100%;
    }
    .cards {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .contact {
        font-size: 0.9rem;
    }
    .video-arrow {
        width: 36px;
        height: 56px;
        font-size: 30px;
    }
    .video-arrow--prev {
        left: 4px;
    }
    .video-arrow--next {
        right: 4px;
    }
    .site-footer__inner {
        flex-direction: column;
        gap: 24px;
        padding: 28px 18px 20px;
        text-align: center;
    }
    .footer-col__desc {
        text-align: center;
    }
    .footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    .footer-links li {
        margin-bottom: 0;
    }
}
@media (max-width: 380px) {
    .topbar__brand {
        font-size: 0.85rem;
    }
    .topbar__nav {
        gap: 6px;
    }
    .topbar__nav a {
        font-size: 0.8rem;
    }
    .content h1 {
        font-size: 1.4rem;
    }
    .content {
        padding: 24px 10px 20px;
    }
}

/* 跳转主内容（无障碍） */
.skip-link {
    position: fixed;
    top: -100px;
    left: 12px;
    background: #1a1a1a;
    color: #ffffff;
    padding: 8px 14px;
    z-index: 200;
    text-decoration: none;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 70px;
}

/* 回到顶部 */
.to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    color: #ffffff;
    border: 1px solid #1a1a1a;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.25s ease, visibility 0.25s ease,
                transform 0.25s ease, background 0.2s ease;
    z-index: 95;
}
.to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.to-top:hover {
    background: #333333;
}

/* 降低动效偏好 */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}
