/* ================= 基础变量与全局样式 ================= */
:root {
    --primary: #4f6ef7;
    --primary-soft: #eef3ff;
    --bg: #f7f9fc;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e9edf5;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(31, 41, 55, 0.07);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ================= 顶部导航 ================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 68px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-weight: 700;
    font-size: 18px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    background: linear-gradient(135deg, #4f6ef7, #7c5cf0);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.site-nav a {
    padding: 7px 11px;
    border-radius: 8px;
    font-size: 14px;
    color: #4b5563;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
    background: var(--primary-soft);
    color: var(--primary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    padding: 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
}

/* ================= 轮播图 ================= */
.hero {
    padding-top: 26px;
}

.carousel {
    position: relative;
    height: 380px;
    border-radius: 20px;
    overflow: hidden;
    background: #dbe4f7;
    box-shadow: var(--shadow);
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
}

.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.42) 0%, rgba(15, 23, 42, 0.05) 75%);
}

.slide-content {
    position: absolute;
    z-index: 2;
    left: 7%;
    top: 50%;
    transform: translateY(-50%);
    max-width: 560px;
    color: #fff;
}

.slide-content h1 {
    margin: 0 0 14px;
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.25;
}

.slide-content p {
    margin: 0 0 26px;
    font-size: 16px;
    opacity: 0.92;
}

.slide-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s;
}

.slide-btn:hover {
    transform: translateY(-2px);
}

.carousel-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    color: #1f2937;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.carousel-arrow:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.08);
}

.carousel-arrow.prev { left: 16px; }
.carousel-arrow.next { right: 16px; }

.carousel-dots {
    position: absolute;
    z-index: 3;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: width 0.3s, background 0.3s;
}

.dot.active {
    width: 24px;
    background: #fff;
}

.carousel-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--muted);
    background: var(--card);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

.carousel-empty code {
    color: var(--primary);
}

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

.section-head {
    text-align: center;
    margin-bottom: 36px;
}

.section-head h2 {
    margin: 0 0 8px;
    font-size: 30px;
    font-weight: 700;
}

.section-head p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

/* ================= 「游戏列表」标题下的双行匀速上滚公告 ================= */
.notice-list {
    max-width: 660px;
    margin: 0 auto;
}

.notice-viewport {
    position: relative;
    height: 58px; /* 2 行 × 29px，JS 会按实际条数校准 */
    overflow: hidden;
}

.notice-fade {
    position: absolute;
    left: 0;
    right: 0;
    height: 14px;
    z-index: 2;
    pointer-events: none;
}

.notice-fade.top {
    top: 0;
    background: linear-gradient(var(--bg), rgba(247, 249, 252, 0));
}

.notice-fade.bottom {
    bottom: 0;
    background: linear-gradient(rgba(247, 249, 252, 0), var(--bg));
}

.notice-track {
    will-change: transform;
}

/* 整组内容复制一份，-50% 正好是一组高度，实现匀速无缝循环 */
.notice-track.is-scrolling {
    animation-name: notice-scroll-up;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes notice-scroll-up {
    from { transform: translateY(0); }
    to   { transform: translateY(-50%); }
}

.notice-viewport:hover .notice-track.is-scrolling {
    animation-play-state: paused;
}

.notice-item {
    display: flex;
    align-items: center;
    height: 29px;
    font-size: 13px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
}

.notice-item > span,
.notice-item > a {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notice-item em {
    flex: 0 0 auto;
    font-style: normal;
    color: var(--primary);
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 5px;
    background: var(--primary-soft);
    margin-right: 8px;
}

.notice-item a {
    color: var(--primary);
    font-weight: 600;
}

.notice-item a:hover {
    text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
    .notice-track.is-scrolling { animation: none; }
}

/* ================= 快捷入口卡片 ================= */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.feature-card {
    display: block;
    padding: 28px 22px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: #cfd9ff;
    box-shadow: var(--shadow);
}

.feature-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 16px;
    border-radius: 14px;
    background: var(--primary-soft);
    font-size: 26px;
}

.feature-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
}

.feature-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.feature-card p {
    margin: 0 0 16px;
    min-height: 44px;
    color: var(--muted);
    font-size: 14px;
}

.feature-more {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
}

/* 点击次数只在手机端列表样式中展示 */
.feature-count {
    display: none;
}

/* ================= 关于本站 ================= */
.about {
    background: #fff;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.about-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 48px;
    align-items: center;
}

.about-text h2 {
    margin: 0 0 16px;
    font-size: 30px;
}

.about-text p {
    margin: 0 0 18px;
    color: #4b5563;
    font-size: 16px;
}

.about-contact {
    font-size: 14px;
    color: var(--muted);
}

.about-contact a {
    color: var(--primary);
    font-weight: 600;
}

.about-card {
    padding: 28px 30px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #f0f5ff, #f7f9ff);
    border: 1px solid #e3ebff;
}

.about-card h3 {
    margin: 0 0 14px;
    font-size: 18px;
}

.about-card ul {
    margin: 0;
    padding-left: 20px;
    color: #4b5563;
    font-size: 15px;
}

.about-card li {
    padding: 3px 0;
}

/* ================= 页脚 ================= */
.site-footer {
    padding: 28px 0;
    color: var(--muted);
    font-size: 13px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.footer-inner p {
    margin: 0;
}

/* ================= 响应式适配 ================= */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .header-inner {
        min-height: 56px;
    }

    .brand {
        font-size: 16px;
    }

    .brand-mark {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .hero {
        padding-top: 12px;
    }

    /* 轮播图：手机上更矮，文字收紧；左右箭头隐藏，改用滑动或指示点 */
    .carousel {
        height: 220px;
        border-radius: 14px;
    }

    .slide-content {
        left: 18px;
        right: 18px;
        max-width: none;
    }

    .slide-content h1 {
        margin-bottom: 8px;
        font-size: 22px;
    }

    .slide-content p {
        font-size: 13px;
        margin-bottom: 14px;
    }

    .slide-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .carousel-arrow {
        display: none;
    }

    .carousel-dots {
        bottom: 10px;
        gap: 10px;
    }

    .dot {
        width: 10px;
        height: 10px;
    }

    .dot.active {
        width: 26px;
    }

    .section {
        padding: 40px 0;
    }

    .section-head {
        margin-bottom: 24px;
    }

    .notice-item {
        font-size: 12px;
    }

    .section-head h2,
    .about-text h2 {
        font-size: 24px;
    }

    /* 游戏链接：一行一个，左侧图标/名称/简介，右侧点击次数 */
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .feature-card {
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 78px;
        padding: 14px;
        border-radius: 14px;
        text-align: left;
    }

    .feature-card:hover {
        transform: none;
    }

    .feature-icon {
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
        margin: 0;
        border-radius: 12px;
        font-size: 22px;
    }

    .feature-info {
        flex: 1 1 auto;
        min-width: 0;
    }

    .feature-card h3 {
        margin-bottom: 3px;
        color: #000;
        font-size: 15px;
        line-height: 1.3;
    }

    .feature-card p {
        margin-bottom: 0;
        min-height: 0;
        font-size: 12px;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .feature-count {
        display: block;
        flex: 0 0 auto;
        text-align: right;
        white-space: nowrap;
    }

    .feature-count small {
        display: block;
        font-size: 11px;
        line-height: 1.4;
        color: var(--muted);
    }

    .feature-count strong {
        display: block;
        color: var(--muted);
        font-size: 14px;
        line-height: 1.25;
    }

    .about-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .about-card {
        padding: 20px;
    }

    .about-text p {
        font-size: 15px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }
}

/* ================= 教程页：视频卡片列表（A 方案） ================= */
.tutorial-wrap {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.tutorial-head { margin-bottom: 18px; }

.tutorial-head h1 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
}

.tutorial-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.tutorial-empty {
    padding: 40px 18px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.tut-card {
    margin-bottom: 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 5px 16px rgba(31, 41, 55, .05);
    cursor: pointer;
}

.tut-cover {
    position: relative;
    height: 170px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #4f6ef7, #7c5cf0);
}

.tut-cover.text-cover {
    background: linear-gradient(135deg, #10b981, #38a3c9);
}

.tut-cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tut-cover-mask {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, .18);
}

.tut-label {
    position: absolute;
    left: 10px;
    top: 10px;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .24);
    font-size: 11px;
    font-weight: 700;
}

.tut-play {
    position: relative;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .22);
    border: 1px solid rgba(255, 255, 255, .5);
    font-size: 18px;
}

.tut-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #111827;
    object-fit: contain;
}

.tut-info {
    position: relative;
    padding: 12px 14px;
}

.tut-info strong {
    display: block;
    padding-right: 58px;
    font-size: 14px;
}

.tut-info > span:not(.tut-expand) {
    display: block;
    margin-top: 2px;
    padding-right: 58px;
    color: var(--muted);
    font-size: 12px;
}

.tut-expand {
    position: absolute;
    right: 14px;
    top: 14px;
    color: var(--primary);
    font-size: 11px;
}

.tut-detail {
    display: none;
    padding: 0 14px 14px;
    border-top: 1px dashed var(--border);
    font-size: 13px;
    color: #4b5563;
    line-height: 1.8;
    cursor: default;
}

.tut-card.open .tut-detail { display: block; padding-top: 10px; }

.tut-detail p { margin: 0 0 8px; }
.tut-detail ul { margin: 6px 0 0; padding-left: 20px; }
.tut-detail img { max-width: 100%; border-radius: 8px; }

.tut-card.text-card {
    display: block;
    color: inherit;
    text-decoration: none;
}

.tut-go {
    display: inline-block;
    margin-top: 7px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

/* ================= 图文教程详情页 ================= */
.tutorial-detail-wrap {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.detail-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
}

.detail-back:hover { color: var(--primary); }
.detail-back-bottom { margin: 16px 0 0; }

.detail-doc {
    padding: 16px 15px 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(31, 41, 55, .05);
}

.detail-head { margin-bottom: 14px; }

.detail-kind {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--soft);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
}

.detail-head h1 {
    margin: 10px 0 6px;
    font-size: 20px;
    line-height: 1.45;
}

.detail-meta {
    margin: 2px 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.detail-cover {
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #10b981, #38a3c9);
}

.detail-cover img {
    display: block;
    width: 100%;
    height: auto;
}

.detail-toc {
    margin: 0 0 16px;
    padding: 10px 11px;
    background: var(--primary-soft);
    border-radius: 10px;
    color: var(--primary);
    font-size: 11px;
    line-height: 1.9;
}

.detail-toc[hidden] { display: none; }

.detail-toc > strong {
    display: block;
    margin-bottom: 2px;
    color: var(--primary);
    font-size: 12px;
}

.detail-toc a {
    display: block;
    color: var(--primary);
    font-size: 11px;
    line-height: 1.9;
    text-decoration: none;
}

.detail-toc a:hover {
    text-decoration: underline;
}

.detail-content {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.9;
    word-break: break-word;
}

.detail-content h2,
.detail-content h3 {
    margin: 22px 0 8px;
    color: var(--text);
    line-height: 1.5;
    scroll-margin-top: 16px;
}

.detail-content h2 { font-size: 17px; }
.detail-content h3 { font-size: 15px; }
.detail-content p { margin: 0 0 12px; }
.detail-content ul,
.detail-content ol { margin: 8px 0 14px; padding-left: 22px; }
.detail-content li { margin-bottom: 4px; }
.detail-content img { max-width: 100%; height: auto; border-radius: 10px; }
.detail-content blockquote {
    margin: 14px 0;
    padding: 10px 12px;
    border-left: 3px solid var(--primary);
    background: var(--soft);
    color: #4b5563;
}
.detail-content a { color: var(--primary); }
.detail-content code {
    padding: 1px 5px;
    border-radius: 5px;
    background: #f3f4f6;
    font-size: 13px;
}

.detail-empty {
    padding: 30px 12px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    background: var(--bg);
    border-radius: 12px;
}

@media (max-width: 768px) {
    .tut-cover { height: 150px; }
}

/* ================= 底部标签栏（首页 / 教程 / 我的） ================= */
body {
    padding-bottom: 72px;
}

.bottom-nav {
    position: fixed;
    z-index: 200;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    display: flex;
    width: 100%;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--border);
    box-shadow: 0 -6px 20px rgba(31, 41, 55, 0.06);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 0 6px;
    color: var(--muted);
    font-size: 12px;
}

.bottom-nav a.active {
    color: var(--primary);
    font-weight: 600;
}

.bottom-icon {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    line-height: 1;
}

.bottom-icon svg {
    display: block;
    width: 26px;
    height: 26px;
}

/* ================= 前台登录 / 注册 / 个人中心 ================= */
.auth-page {
    min-height: 100vh;
    padding: 48px 16px 100px;
    background: var(--bg);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 28px 22px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.auth-card h1 {
    margin: 0 0 8px;
    font-size: 23px;
    text-align: center;
}

.auth-card > p {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.auth-error,
.auth-success {
    margin-bottom: 16px !important;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px !important;
    text-align: left !important;
}

.auth-error {
    background: #fff1f0;
    color: #cf1322;
}

.auth-success {
    background: #f6ffed;
    color: #389e0d;
}

.form-field {
    margin-bottom: 16px;
}

.form-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
}

.form-field input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #dfe5f0;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
}

.form-field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.12);
}

.btn {
    display: block;
    width: 100%;
    padding: 12px;
    border: 0;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-secondary {
    margin-top: 10px;
    background: var(--primary-soft);
    color: var(--primary);
}

.auth-links {
    margin-top: 18px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

.auth-links a {
    color: var(--primary);
    font-weight: 600;
}

.profile-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.profile-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f6ef7, #7c5cf0);
    color: #fff;
    font-size: 22px;
}

.profile-head strong {
    font-size: 17px;
}

.profile-head p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.profile-info {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    margin: 0 0 22px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.profile-info dt {
    color: var(--muted);
}

.profile-info dd {
    margin: 0;
    word-break: break-all;
}

.points-badge {
    margin-left: auto;
    text-align: center;
    color: var(--primary);
}

.points-badge strong {
    display: block;
    font-size: 24px;
    line-height: 1.1;
}

.points-badge span {
    font-size: 12px;
    color: var(--muted);
}

.me-section {
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg);
}

.me-section h2 {
    margin: 0 0 12px;
    font-size: 16px;
}

.form-hint {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 12px;
}

.signed-state {
    padding: 10px 12px;
    border-radius: 8px;
    background: #f6ffed;
    color: #389e0d;
    font-size: 14px;
}

.question-text {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
}

.checkin-row {
    display: flex;
    gap: 8px;
}

.checkin-row input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid #dfe5f0;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
}

.checkin-row input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.12);
}

.checkin-row .btn {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    padding: 11px 16px;
    font-size: 14px;
}

.exchange-row {
    display: flex;
    gap: 10px;
}

.exchange-row form {
    flex: 1;
}

.exchange-row .btn {
    margin: 0;
    padding: 10px 6px;
    font-size: 13px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.coupon-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.coupon-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.coupon-amount {
    flex: 0 0 auto;
    color: var(--primary);
}

.coupon-amount strong {
    font-size: 24px;
}

.coupon-amount span {
    font-size: 12px;
    margin-left: 2px;
}

.coupon-detail {
    min-width: 0;
}

.coupon-detail strong {
    font-size: 13px;
    word-break: break-all;
}

.coupon-detail p {
    margin: 2px 0 0;
    color: #389e0d;
    font-size: 12px;
}

.coupon-detail p.used {
    color: var(--muted);
}

/* ================= 我的：功能菜单与子页面 ================= */
.menu-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding: 18px 15px;
    border: 0;
    border-radius: 16px;
    text-align: left;
    transition: transform 0.2s, box-shadow 0.2s;
}

.menu-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(31, 41, 55, 0.12);
}

.menu-item.tile-green {
    background: #e8f7ef;
    color: #16a34a;
}

.menu-item.tile-orange {
    background: #fff4e5;
    color: #ea580c;
}

.menu-item.tile-blue {
    background: var(--primary-soft);
    color: var(--primary);
}

.menu-item.tile-purple {
    background: #f3edff;
    color: #7c5cf0;
}

.menu-icon {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.75);
    color: inherit;
}

.menu-icon svg {
    width: 24px;
    height: 24px;
}

.icon-sign,
.icon-points,
.icon-coupon,
.icon-gift {
    background: rgba(255, 255, 255, 0.75);
    color: inherit;
}

.menu-info {
    flex: 1 1 auto;
    min-width: 0;
}

.menu-info strong {
    display: block;
    margin-bottom: 3px;
    font-size: 15px;
}

.menu-info span {
    color: inherit;
    opacity: 0.75;
    font-size: 12px;
}

.chevron {
    color: #b7c0d0;
    font-size: 20px;
}

.sub-head {
    position: relative;
    margin-bottom: 20px;
}

.sub-head a {
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
}

.sub-head h1 {
    margin: 0;
}

.big-points {
    margin-bottom: 18px;
    padding: 12px 0 18px;
    text-align: center;
}

.big-points strong {
    display: block;
    color: var(--primary);
    font-size: 44px;
    line-height: 1.1;
}

.big-points span {
    color: var(--muted);
    font-size: 13px;
}

/* ================= 积分兑换：票券样式 ================= */
.exchange-wrap {
    position: relative;
    max-width: 420px;
    margin: 0 auto;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(49, 46, 129, 0.16);
}

.exchange-hero {
    position: relative;
    padding: 20px 20px 44px;
    color: #fff;
    background: linear-gradient(135deg, #4f6ef7 0%, #6d5cf0 60%, #8b5cf6 100%);
}

.exchange-hero::after {
    content: '';
    position: absolute;
    right: -40px;
    top: -50px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}

.exchange-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
}

.exchange-top a {
    font-size: 22px;
    font-weight: 400;
}

.exchange-points {
    margin-left: auto;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    font-size: 13px;
}

.exchange-hero p {
    position: relative;
    z-index: 1;
    margin: 18px 0 2px;
    font-size: 12px;
    opacity: 0.85;
}

.exchange-hero > strong {
    position: relative;
    z-index: 1;
    font-size: 30px;
}

.exchange-body {
    position: relative;
    min-height: 520px;
    margin-top: -26px;
    padding: 0 16px 28px;
    border-radius: 24px 24px 0 0;
    background: var(--bg);
}

.section-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 4px 12px;
}

.section-row h3 {
    margin: 0;
    font-size: 15px;
}

.mini-badge {
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 11px;
}

.ticket-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ticket {
    position: relative;
    display: flex;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(49, 46, 129, 0.08);
}

.ticket-stub {
    flex: 0 0 88px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(160deg, #4f6ef7, #7c5cf0);
}

.ticket-stub.orange {
    background: linear-gradient(160deg, #fb923c, #f97316);
}

.ticket-stub.dark {
    background: linear-gradient(160deg, #94a3b8, #64748b);
}

.ticket-stub strong {
    font-size: 28px;
    line-height: 1;
    font-weight: 800;
}

.ticket-stub span {
    margin-top: 3px;
    font-size: 11px;
}

.ticket-cut {
    position: absolute;
    left: 82px;
    top: 0;
    bottom: 0;
    border-left: 2px dashed #e6eaf5;
}

.ticket-cut::before,
.ticket-cut::after {
    content: '';
    position: absolute;
    left: -8px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg);
}

.ticket-cut::before { top: -7px; }
.ticket-cut::after { bottom: -7px; }

.ticket-info {
    flex: 1;
    min-width: 0;
    padding: 14px 14px 14px 20px;
}

.ticket-info h4 {
    margin: 0 0 5px;
    font-size: 14px;
}

.ticket-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    color: var(--muted);
}

.ticket-cost {
    color: var(--orange);
    font-weight: 700;
}

.ticket-bar {
    height: 5px;
    margin: 9px 0 10px;
    border-radius: 99px;
    background: #edf0f6;
    overflow: hidden;
}

.ticket-bar i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #4f6ef7, #7c5cf0);
}

.ticket-bar.full i { width: 100%; }
.ticket-bar.mid i { width: 45%; }
.ticket-bar.low i { width: 18%; background: linear-gradient(90deg, #fb923c, #f97316); }

.redeem {
    width: 100%;
    padding: 9px 0;
    border: 0;
    border-radius: 10px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: linear-gradient(90deg, #4f6ef7, #7c5cf0);
    box-shadow: 0 5px 14px rgba(79, 110, 247, 0.28);
    cursor: pointer;
}

.redeem.off {
    background: #e8ebf2;
    color: #9aa3b2;
    box-shadow: none;
    cursor: not-allowed;
}

.record-card {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.record-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--primary-soft);
    font-size: 16px;
}

.record-card strong {
    display: block;
    font-size: 13px;
}

.record-card small {
    font-size: 11px;
    color: var(--muted);
}

.record-arrow {
    margin-left: auto;
    color: #b7c0d0;
}

.exchange-mask {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: none;
    align-items: flex-end;
    background: rgba(15, 23, 42, 0.5);
}

.exchange-mask.show {
    display: flex;
}

.exchange-sheet {
    width: 100%;
    padding: 22px 20px 26px;
    background: #fff;
    border-radius: 22px 22px 0 0;
}

.exchange-sheet h3 {
    margin: 0 0 8px;
    font-size: 17px;
}

.exchange-sheet p {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted);
}

.exchange-cost {
    padding: 12px;
    margin-bottom: 18px;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

.exchange-actions {
    display: flex;
    gap: 10px;
}

.exchange-actions button {
    flex: 1;
    padding: 12px;
    border: 0;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 700;
}

.exchange-actions button:first-child {
    background: #eef0f4;
    color: #4b5563;
}

.exchange-actions button:last-child {
    background: linear-gradient(90deg, #4f6ef7, #7c5cf0);
    color: #fff;
}

/* ================= 签到 / 积分 / 优惠劵 子页面 ================= */
.sub-wrap {
    position: relative;
    max-width: 420px;
    margin: 0 auto;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 18px 44px rgba(49, 46, 129, 0.14);
}

.sub-hero {
    position: relative;
    padding: 20px 18px 46px;
    color: #fff;
    overflow: hidden;
}

.sub-hero::after {
    content: '';
    position: absolute;
    right: -48px;
    top: -60px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}

.g-sign {
    background: linear-gradient(135deg, #16a34a, #059669 60%, #10b981);
}

.g-points {
    background: linear-gradient(135deg, #fb923c, #f97316 60%, #ea580c);
}

.g-coupon {
    background: linear-gradient(135deg, #7c5cf0, #4f6ef7 100%);
}

.sub-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
}

.sub-top a {
    font-size: 21px;
    font-weight: 400;
}

.sub-hero h2 {
    position: relative;
    z-index: 1;
    margin: 20px 0 4px;
    font-size: 24px;
}

.sub-hero p {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 12px;
    opacity: 0.85;
}

.hero-badge {
    position: absolute;
    right: 18px;
    top: 58px;
    z-index: 1;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 12px;
    font-weight: 700;
}

.hero-deco {
    position: absolute;
    right: 20px;
    bottom: 14px;
    z-index: 1;
    font-size: 42px;
    opacity: 0.9;
}

.sub-body {
    position: relative;
    min-height: 540px;
    margin-top: -26px;
    padding: 0 14px 28px;
    border-radius: 22px 22px 0 0;
    background: var(--bg);
}

.card {
    margin-top: 14px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(31, 41, 55, 0.05);
}

.card h3 {
    margin: 0 0 10px;
    font-size: 15px;
}

.hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--muted);
}

.big-btn {
    width: 100%;
    margin-top: 14px;
    padding: 13px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.b-sign {
    background: linear-gradient(90deg, #16a34a, #10b981);
    box-shadow: 0 8px 18px rgba(16, 185, 129, 0.25);
}

.stats {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.stat {
    flex: 1;
    padding: 12px 6px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.stat strong {
    display: block;
    font-size: 20px;
    color: #16a34a;
}

.stat span {
    font-size: 11px;
    color: var(--muted);
}

.g-points .stat strong,
.g-points ~ .sub-body .stat strong {
    color: #f97316;
}

.points-hero {
    text-align: center;
    padding: 6px 0 14px;
}

.points-hero strong {
    display: block;
    color: #f97316;
    font-size: 48px;
    line-height: 1.1;
}

.points-hero span {
    color: var(--muted);
    font-size: 12px;
}

.ghost {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    border-radius: 12px;
    background: #fff7ed;
    color: #ea580c;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
}

.coupon-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(90deg, #eef3ff, #f3edff);
    color: #5b21b6;
    font-size: 12px;
    font-weight: 700;
}

.coupon-summary b {
    font-size: 18px;
}

.sub-body .ticket {
    margin-top: 12px;
}
