/* 赢之初官网样式 */
:root {
    --primary-color: #c8102e;
    --primary-dark: #9c0c24;
    --text-color: #2b2b2b;
    --text-light: #6b6b6b;
    --bg-alt: #f7f5f2;
    --border-color: #ececec;
    --footer-bg: #1a1a2e;
    --header-height: 64px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

/* 头部导航 */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    z-index: 100;
}

.header-inner {
    max-width: 1140px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    white-space: nowrap;
}

.logo:hover {
    text-decoration: none;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    font-size: 19px;
    font-weight: 700;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-en {
    margin-left: 8px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 2px;
    color: var(--text-light);
}

.site-nav {
    margin-left: auto;
    display: flex;
    gap: 22px;
}

.site-nav a {
    color: var(--text-color);
    font-size: 15px;
    white-space: nowrap;
    transition: color 0.2s;
}

.site-nav a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* 语言切换 */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-label {
    font-size: 13px;
    color: var(--text-light);
}

#langSelect {
    height: 32px;
    padding: 0 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    font-size: 13px;
    color: var(--text-color);
    cursor: pointer;
}

#langSelect:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* 首屏横幅 */
.hero {
    min-height: 100vh;
    padding-top: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #4a1020 55%, var(--primary-dark) 100%);
    color: #fff;
}

.hero-content {
    max-width: 780px;
    padding: 0 24px;
}

.hero h1 {
    font-size: 46px;
    line-height: 1.25;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 36px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 4px;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.2s;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* 通用区块 */
.section {
    padding: 88px 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-title {
    font-size: 34px;
    text-align: center;
    margin-bottom: 12px;
}

.section-title::after {
    content: "";
    display: block;
    width: 48px;
    height: 3px;
    margin: 14px auto 0;
    background: var(--primary-color);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 16px;
    margin-bottom: 48px;
}

/* 关于我们 */
.about-body {
    max-width: 820px;
    margin: 0 auto 40px;
    text-align: center;
}

.about-body p {
    margin-bottom: 16px;
    color: var(--text-light);
}

.about-values {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 820px;
    margin: 0 auto 56px;
}

.value-card {
    padding: 24px;
    border-left: 3px solid var(--primary-color);
    background: #fff;
}

.value-card h3 {
    font-size: 17px;
    margin-bottom: 8px;
}

.value-card p {
    font-size: 14px;
    color: var(--text-light);
}

/* 卡片栅格 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 32px 24px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.card h3 {
    font-size: 19px;
    margin-bottom: 12px;
}

.card p {
    font-size: 14px;
    color: var(--text-light);
}

.section-alt .card,
.section-alt .value-card {
    border-color: transparent;
}

/* 公司信息 */
.facts-list {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.facts-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

.facts-row:last-child {
    border-bottom: none;
}

.facts-row dt {
    font-weight: 600;
    color: var(--text-color);
}

.facts-row dd {
    color: var(--text-light);
    word-break: break-word;
}

.facts-note {
    max-width: 900px;
    margin: 20px auto 0;
    font-size: 13px;
    color: var(--text-light);
    text-align: center;
}

/* 联系我们 */
.contact-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.contact-label {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.contact-value {
    font-size: 16px;
    font-weight: 600;
    word-break: break-word;
}

.contact-note {
    max-width: 820px;
    margin: 40px auto 0;
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
}

.contact-actions {
    margin-top: 24px;
    text-align: center;
}

/* 文档页（隐私政策、服务条款、支持） */
.doc-section {
    padding-top: calc(var(--header-height) + 48px);
}

.doc-container {
    max-width: 880px;
}

.breadcrumb {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--text-light);
}

.breadcrumb-sep {
    margin: 0 8px;
}

.doc-title {
    font-size: 34px;
    line-height: 1.3;
    margin-bottom: 8px;
}

.doc-updated {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 28px;
}

.doc-paragraph {
    margin-bottom: 16px;
    color: #3f3f3f;
}

.doc-toc {
    background: var(--bg-alt);
    border-radius: 8px;
    padding: 24px 28px;
    margin: 32px 0 40px;
}

.doc-toc-title {
    font-size: 18px;
    margin-bottom: 12px;
}

.doc-toc-list {
    padding-left: 22px;
    columns: 2;
    column-gap: 32px;
}

.doc-toc-list li {
    margin-bottom: 8px;
    font-size: 15px;
    break-inside: avoid;
}

.doc-block {
    margin-bottom: 36px;
}

.doc-block h2 {
    font-size: 21px;
    margin-bottom: 14px;
    padding-top: 8px;
}

.doc-footer-note {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    font-size: 15px;
    color: var(--text-light);
}

.doc-footer-note span {
    margin: 0 10px;
}

/* 法律文档索引表：按语言列出用户协议与隐私政策链接 */
.legal-table {
    width: 100%;
    margin-top: 28px;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--border-color);
    font-size: 15px;
}

.legal-table th,
.legal-table td {
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.legal-table thead th {
    background: var(--bg-alt);
    font-weight: 600;
}

.legal-table tbody tr:last-child td {
    border-bottom: none;
}

.legal-table-note {
    margin-top: 14px;
    font-size: 13px;
    color: var(--text-light);
}

/* 支持页 */
.support-heading {
    font-size: 22px;
    margin: 40px 0 20px;
}

.support-note {
    margin-top: 32px;
}

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

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px 20px;
    background: #fff;
}

.faq-item summary {
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
}

.faq-answer {
    margin-top: 12px;
    color: var(--text-light);
    font-size: 15px;
}

/* 错误页 */
.error-section {
    padding-top: calc(var(--header-height) + 80px);
    text-align: center;
}

.error-container {
    max-width: 620px;
}

.error-code {
    font-size: 96px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.error-title {
    font-size: 28px;
    margin: 16px 0 12px;
}

.error-message {
    color: var(--text-light);
}

.error-actions {
    margin-top: 28px;
}

/* 页脚 */
.site-footer {
    background: var(--footer-bg);
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

.footer-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 56px 24px 32px;
    display: grid;
    grid-template-columns: 1.4fr 1.4fr 0.8fr 0.8fr;
    gap: 32px;
}

.footer-col h3 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 16px;
}

.footer-logo {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-logo .logo-en {
    color: rgba(255, 255, 255, 0.6);
}

.footer-slogan {
    color: rgba(255, 255, 255, 0.72);
}

.footer-list {
    list-style: none;
}

.footer-list li {
    margin-bottom: 10px;
    line-height: 1.5;
}

.footer-list a,
.site-footer a {
    color: rgba(255, 255, 255, 0.72);
}

.footer-list a:hover,
.site-footer a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 20px 24px 28px;
    text-align: center;
}

.footer-bottom p {
    margin-bottom: 6px;
}

.footer-lang {
    margin-top: 10px;
}

.footer-lang-label {
    color: rgba(255, 255, 255, 0.5);
}

.footer-lang a {
    margin: 0 6px;
    white-space: nowrap;
}

.footer-lang a.active {
    color: #fff;
    font-weight: 600;
}

/* 首页横幅小标签 */
.hero-badge {
    display: inline-block;
    padding: 5px 16px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    font-size: 13px;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.85);
}

/* 应用卡片 */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 920px;
    margin: 0 auto;
}

.app-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 24px;
}

.app-card h3 {
    font-size: 22px;
}

.app-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.app-tagline {
    font-size: 15px;
    margin-top: 6px;
}

.app-shot {
    margin-bottom: 20px;
}

/* 应用截图按手机竖屏比例展示，圆角加投影模拟真机 */
/* 手机截图统一外框：卡片与截图墙共用；展示比例由模板 width/height 属性推导，不再硬编码 */
.app-shot img,
.screen-item img {
    height: auto;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.app-shot img {
    width: 180px;
}

.app-shot img:hover,
.screen-item img:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.badge-in-review {
    display: inline-block;
    padding: 4px 12px;
    margin: 8px 0;
    border-radius: 999px;
    background: rgba(200, 16, 46, 0.08);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 600;
}

.badge-store {
    display: inline-block;
    padding: 4px 12px;
    margin: 8px 0;
    border-radius: 999px;
    background: rgba(15, 122, 74, 0.1);
    color: #0f7a4a;
    font-size: 12px;
    font-weight: 600;
}

.app-meta {
    width: 100%;
    margin: 14px 0 18px;
    text-align: left;
}

.app-meta-row {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: 13px;
}

.app-meta-row dt {
    font-weight: 600;
    color: var(--text-color);
}

.app-meta-row dd {
    color: var(--text-light);
    word-break: break-word;
}

.app-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: auto;
}

.apps-note {
    max-width: 760px;
    margin: 32px auto 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-light);
}

.apps-intro {
    max-width: 820px;
    margin: 0 auto 40px;
    text-align: center;
}

/* 应用详情页 */
.page-section {
    padding-top: calc(var(--header-height) + 48px);
}

.product-container {
    max-width: 960px;
}

.product-hero {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 32px;
}

.product-name {
    font-size: 40px;
    line-height: 1.2;
}

.product-local-name {
    font-size: 15px;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-top: 4px;
}

.product-tagline {
    font-size: 18px;
    margin: 14px 0 10px;
}

.product-shot img {
    width: 210px;
}

.product-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.btn-ghost {
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-ghost:hover {
    background: rgba(200, 16, 46, 0.06);
}

.availability-note {
    background: rgba(200, 16, 46, 0.05);
    border-left: 3px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    padding: 16px 20px;
    font-size: 14px;
    color: var(--text-light);
}

.availability-note h2 {
    font-size: 15px;
    color: var(--text-color);
    margin-bottom: 6px;
}

.product-block {
    margin-top: 56px;
}

.product-block h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

/* 截图墙 */
.screens-wall {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
}

.screen-item img {
    width: min(216px, 40vw);
}

/* 桌面端横向截图：按窗口比例展示，与 product.go 的 desktopShotWidth/desktopShotHeight 保持一致 */
.app-shot.is-landscape img,
.screen-item.is-landscape img {
    aspect-ratio: 640 / 400;
    border-radius: 12px;
}

.app-shot.is-landscape img {
    width: min(320px, 82vw);
}

.product-shot.is-landscape img,
.screen-item.is-landscape img {
    width: min(430px, 88vw);
}

.screens-note {
    margin-top: 18px;
    text-align: center;
    font-size: 13px;
    color: var(--text-light);
}

/* 功能网格：详情页功能点较长，桌面按三列排布 */
.features-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* 响应式适配 */
@media (max-width: 1000px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-info {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-inner {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 34px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .doc-toc-list {
        columns: 1;
    }
}

@media (max-width: 900px) {
    /* 导航换行至独立一行，同步抬高横幅留白，避免内容被固定头部遮挡 */
    :root {
        --header-height: 108px;
    }

    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 24px;
        gap: 10px 24px;
    }

    .site-header {
        height: auto;
    }

    .site-nav {
        order: 3;
        width: 100%;
        margin-left: 0;
        gap: 18px;
        flex-wrap: wrap;
    }

    .lang-switcher {
        margin-left: auto;
    }

    .lang-label {
        display: none;
    }
}

@media (max-width: 640px) {
    .header-inner {
        gap: 12px;
        flex-wrap: wrap;
        height: auto;
        padding: 8px 16px;
    }

    .site-header {
        height: auto;
        position: static;
    }

    .site-nav {
        margin-left: 0;
        gap: 14px;
        flex-wrap: wrap;
        order: 3;
        width: 100%;
    }

    .lang-switcher {
        margin-left: auto;
    }

    .hero {
        min-height: 520px;
        padding-top: 40px;
    }

    .hero h1 {
        font-size: 27px;
    }

    .card-grid,
    .contact-info,
    .about-values,
    .apps-grid,
    .features-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .product-hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 24px;
    }

    .product-actions {
        justify-content: center;
    }

    .product-name {
        font-size: 30px;
    }

    .facts-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .section {
        padding: 56px 0;
    }

    .section-title {
        font-size: 26px;
    }

    .doc-title {
        font-size: 26px;
    }

    .doc-section {
        padding-top: 40px;
    }

    .page-section {
        padding-top: 24px;
    }

    .error-code {
        font-size: 72px;
    }
}

/* 截图放大浮层：点击详情页截图后查看大图，遮罩、关闭按钮与说明文字 */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.shot-link {
    display: block;
    line-height: 0;
    cursor: zoom-in;
}

.shot-link:focus-visible img {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

body.lightbox-open {
    overflow: hidden;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(16, 16, 18, 0.88);
}

.lightbox[hidden] {
    display: none;
}

.lightbox-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    max-width: min(1100px, 92vw);
    max-height: 92vh;
    margin: 0;
}

.lightbox-image {
    max-width: 100%;
    max-height: 76vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.lightbox-caption {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.65);
}

.lightbox-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .lightbox {
        padding: 16px;
    }

    .lightbox-image {
        max-height: 70vh;
    }

    .lightbox-caption {
        font-size: 12px;
    }
}
