* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none
}

:root {
    --gold: #e5af00;
    --gold-light: #f2e3a9;
    --gold-dark: #a68928;
    --red: #9b2335;
    --red-dark: #6b1621;
    --red-light: #c73e4a;
    --bg: #0a0506;
    --card-bg: #1a1012;
    --text: #f5ebe0;
    --text-muted: #cdcdcd;
    --wood-dark: #2d1f10;
    --wood-medium: #5c3d2e;
    --wood-light: #8b5a2b;
    --parchment: #f4e4bc;
    --parchment-dark: #d4c4a0;
    --ink: #2c1810;
    
    /* 新增字体变量 */
    --font-main: 'Noto Serif SC', 'Songti SC', serif;
    --font-art: 'Ma Shan Zheng', 'Kaiti', 'STKaiti', serif
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden
}

body {
    font-family: var(--font-main);
    color: var(--text);
    position: relative;
    background:
        linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.4)),
        var(--bg) url(mbbg.jpg) no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    -webkit-background-size: cover;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% 100%, rgba(139, 90, 43, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 20% 80%, rgba(155, 35, 53, 0.05) 0%, transparent 40%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(155, 35, 53, 0.05) 0%, transparent 40%),
        radial-gradient(ellipse 100% 20% at 50% 0%, rgba(212, 175, 55, 0.03) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0
}

body::after {
    content: "";
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(90deg, rgba(139, 35, 35, 0.3) 0%, rgba(139, 35, 35, 0.1) 50%, transparent 100%);
    pointer-events: none;
    z-index: 0
}

#particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2
}

.container {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding: 20px;
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(20px, env(safe-area-inset-bottom))
}

/* ==================== 头部样式 ==================== */
.header {
    text-align: center;
    padding: 15px 0;
    position: relative
}

.header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--gold-dark) 20%, var(--gold) 50%, var(--gold-dark) 80%, transparent 100%);
    border-radius: 2px
}

.header h1 {
    font-family: var(--font-art);
    font-size: 2.4rem;
    font-weight: 400;
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 30%, var(--gold) 70%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5));
    letter-spacing: 2px;
    position: relative
}

.header h1::after {
    content: "";
    position: absolute;
    inset: -10px -20px;
    background: radial-gradient(ellipse, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    z-index: -1
}

.title-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px
}

.title-deco {
    color: var(--gold);
    font-size: 1.2rem;
    opacity: .6;
    animation: twinkle 3s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5)
}

.title-deco.right {
    animation-delay: 1.5s
}

.subtitle {
    margin-top: 10px;
    font-size: .9rem;
    color: var(--text-muted);
    letter-spacing: 4px;
    position: relative;
    display: inline-block
}

.subtitle::before,
.subtitle::after {
    content: "◆";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.4rem;
    color: var(--gold);
    opacity: 0.4
}

.subtitle::before { left: -20px }
.subtitle::after { right: -20px }

/* ==================== 主舞台 ==================== */
.main-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative
}

.main-stage::after {
    content: "";
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 60px;
    background: radial-gradient(ellipse 100% 100% at 50% 0%, rgba(139, 90, 43, 0.15) 0%, transparent 70%);
    pointer-events: none
}

.stage-glow {
    position: absolute;
    width: 350px;
    height: 350px;
    background: 
        radial-gradient(circle, rgba(212, 175, 55, .12) 0%, transparent 40%),
        radial-gradient(circle, rgba(155, 35, 53, .08) 20%, transparent 60%);
    border-radius: 50%;
    animation: glowBreath 5s ease-in-out infinite
}

/* ==================== 签筒样式 ==================== */
.qian-tong {
    position: relative;
    width: 120px;
    height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    margin-top: 20px;
    transform-style: preserve-3d
}

.qian-tong:not(.shaking) {
    animation: float 6s ease-in-out infinite
}

.qian-tong.shaking {
    animation: shake-tong .15s cubic-bezier(.36, .07, .19, .97) infinite both
}

.tong-layer-back {
    position: absolute;
    bottom: 20px;
    width: 100px;
    z-index: 1
}

.tong-rim-back {
    width: 100%;
    height: 16px;
    background: #5a3a1f;
    border-radius: 50% 50% 0 0 / 10px 10px 0 0;
    box-shadow: inset 0 -5px 10px rgba(0, 0, 0, .8);
    position: absolute;
    top: -150px;
    left: 0
}

.qian-sticks {
    position: absolute;
    bottom: 50px;
    width: 80px;
    height: 300px;
    z-index: 2;
    pointer-events: none
}

.qian-stick-svg {
    position: absolute;
    bottom: 0;
    transform-origin: bottom center;
    transition: transform .2s ease-out;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, .6))
}

.qian-stick-svg.jumping {
    animation: jump-stick .25s ease-in-out infinite alternate
}

.tong-layer-front {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, .6))
}

.tong-rim-front {
    width: 106px;
    height: 18px;
    background: linear-gradient(180deg, #b88a5c, #8b6914, #5c3d2e);
    border-radius: 12px;
    position: relative;
    z-index: 12;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .4)
}

.tong-body {
    position: relative;
    width: 100px;
    height: 150px;
    background: linear-gradient(95deg, #5c3d2e 0%, #8b5a2b 25%, #a67c52 50%, #6b4423 75%, #3d2519 100%);
    margin-top: -8px;
    border-radius: 0 0 4px 4px;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, .6);
    z-index: 11;
    overflow: hidden
}

.tong-pattern {
    position: absolute;
    top: 15%;
    left: 15%;
    right: 15%;
    bottom: 15%;
    border: 2px solid rgba(212, 175, 55, .3);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center
}

.tong-pattern::after {
    content: "靈籤";
    font-family: var(--font-art);
    font-size: 2.8rem;
    color: rgba(0, 0, 0, .6);
    font-weight: 400;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, .1);
    writing-mode: vertical-rl;
    margin-right: -5px
}

.tong-base {
    width: 110px;
    height: 20px;
    background: linear-gradient(180deg, #4a2f18, #2d1f10);
    border-radius: 6px 6px 12px 12px;
    margin-top: -2px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
    z-index: 12
}

/* ==================== 操作按钮区域 ==================== */
.action-wrap {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 280px
}

.btn-shake {
    position: relative;
    width: min(180px, 50vw);
    height: 58px;
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    border: 2px solid var(--gold);
    border-radius: 29px;
    cursor: pointer;
    overflow: hidden;
    touch-action: manipulation;
    box-shadow: 
        0 4px 15px rgba(155, 35, 53, .4),
        inset 0 1px 0 rgba(255, 255, 255, .1),
        0 0 0 1px rgba(212, 175, 55, 0.1);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease
}

.btn-shake:active:not(:disabled) {
    transform: scale(.95);
    background: linear-gradient(135deg, var(--red-dark) 0%, #4a1015 100%);
    box-shadow: 
        0 2px 8px rgba(155, 35, 53, .3),
        inset 0 2px 4px rgba(0, 0, 0, .2)
}

.btn-shake.shaking {
    animation: shake .12s linear infinite
}

.btn-shake:disabled {
    opacity: 1;
    pointer-events: none;
    cursor: not-allowed;
    filter: grayscale(0.5)
}

.btn-ripple {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .15), transparent);
    transform: translateX(-100%);
    transition: none
}

.btn-shake:active .btn-ripple {
    transform: translateX(100%);
    transition: transform .5s
}

.btn-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: min(10px, 2vw);
    font-family: var(--font-main);
    font-size: clamp(0.9rem, 3.5vw, 1.2rem);
    font-weight: 700;
    color: var(--gold);
    text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
    white-space: nowrap;
    padding: 0 15px;
    letter-spacing: 2px
}

.btn-content i {
    font-size: clamp(0.85rem, 3vw, 1.1rem);
    transition: transform .2s ease;
    flex-shrink: 0
}

.hint {
    font-size: .8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: .8
}

.hint i {
    font-size: .9rem;
    color: var(--gold);
    opacity: .6
}

/* ==================== 页脚 ==================== */
.footer {
    text-align: center;
    padding: 15px 0;
    position: relative
}

.footer::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.3) 50%, transparent 100%)
}

.footer p {
    font-size: .8rem;
    color: var(--text-muted);
    opacity: .6;
    letter-spacing: 3px
}

/* ==================== 结果弹窗 ==================== */
.result-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center
}

.result-modal.show {
    display: flex
}

.result-overlay {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 50% 30%, rgba(212, 175, 55, 0.05) 0%, transparent 50%),
        rgba(0, 0, 0, .92);
    opacity: 0;
    transition: opacity .4s
}

.result-modal.show .result-overlay {
    opacity: 1
}

.result-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px
}

.flying-stick {
    position: absolute;
    opacity: 0;
    z-index: 100;
    filter: drop-shadow(0 5px 15px rgba(212, 175, 55, .5));
    pointer-events: none
}

.flying-stick.animate {
    animation: stickFly 1.5s cubic-bezier(.25, .46, .45, .94) forwards
}

.result-card {
    position: relative;
    width: 290px;
    opacity: 0;
    transform: scale(.8) translateY(30px)
}

.result-modal.show .result-card {
    animation: cardIn .6s 1s ease-out forwards
}

.card-glow {
    position: absolute;
    inset: -30px;
    background: radial-gradient(circle, rgba(212, 175, 55, .15) 0%, transparent 70%);
    border-radius: 20px;
    animation: glowPulse 2s ease-in-out infinite;
    pointer-events: none
}

.card-inner {
    position: relative;
    background: linear-gradient(180deg, rgba(30, 21, 24, 0.98) 0%, rgba(18, 12, 14, 0.98) 100%);
    border: 2px solid var(--gold);
    border-radius: 16px;
    padding: 28px 22px;
    text-align: center;
    box-shadow: 
        inset 0 0 30px rgba(212, 175, 55, 0.05),
        0 10px 40px rgba(0, 0, 0, 0.5)
}

.card-inner::before,
.card-inner::after {
    content: "❖";
    position: absolute;
    font-size: 0.8rem;
    color: var(--gold);
    opacity: 0.4
}

.card-inner::before { top: 8px; left: 10px }
.card-inner::after { bottom: 8px; right: 10px }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px
}

.card-number {
    font-size: .9rem;
    color: var(--gold);
    opacity: .8
}

.card-title {
    font-family: var(--font-art);
    font-size: 2rem;
    color: var(--gold);
    margin: 15px 0 25px;
    font-weight: 400;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3)
}

.card-footer {
    display: flex;
    gap: min(12px, 3vw);
    width: 100%
}

.card-footer button {
    flex: 1;
    min-width: 0;
    padding: 13px 8px;
    font-size: clamp(0.8rem, 3.2vw, 0.95rem);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    touch-action: manipulation;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: min(6px, 1.5vw);
    white-space: nowrap;
    overflow: hidden
}

.card-footer button i {
    font-size: clamp(0.75rem, 2.8vw, 0.9rem);
    flex-shrink: 0
}

.card-footer button span,
.card-footer button {
    text-overflow: ellipsis
}

.btn-view {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border: none;
    color: #1a1012;
    box-shadow: 0 3px 10px rgba(212, 175, 55, 0.3)
}

.btn-view:active {
    transform: scale(.95);
    box-shadow: 0 1px 5px rgba(212, 175, 55, 0.2)
}

.btn-again {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold)
}

.btn-again:active {
    transform: scale(.95);
    background: rgba(212, 175, 55, 0.1)
}

/* ==================== 签文等级样式（通用） ==================== */
.card-level,
.header-level {
    font-family: var(--font-art);
    font-size: 1rem;
    padding: 6px 18px;
    border-radius: 12px;
    font-weight: 400;
    letter-spacing: 1px
}

.card-level.daji,
.header-level.daji {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    box-shadow: 0 2px 10px rgba(231, 76, 60, 0.4)
}

.card-level.shangji,
.header-level.shangji {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: #fff;
    box-shadow: 0 2px 10px rgba(230, 126, 34, 0.4)
}

.card-level.zhongji,
.header-level.zhongji {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.4)
}

.card-level.zhongping,
.header-level.zhongping {
    background: linear-gradient(135deg, #1abc9c, #16a085);
    color: #fff;
    box-shadow: 0 2px 10px rgba(26, 188, 156, 0.4)
}

.card-level.xiaji,
.header-level.xiaji {
    background: linear-gradient(135deg, #7f8c8d, #6c7a7d);
    color: #fff
}

.card-level.xiong,
.header-level.xiong {
    background: linear-gradient(135deg, #2c3e50, #1a252f);
    color: #fff
}

.header-level {
    display: inline-block;
    padding: 6px 20px;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 400;
    border: 2px solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15)
}

.header-level.daji { border-color: #922b21; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) }
.header-level.shangji { border-color: #a04000; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) }
.header-level.zhongji { border-color: #1a5276; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) }
.header-level.zhongping { border-color: #196f3d; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) }
.header-level.xiaji { border-color: #515a5a; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) }
.header-level.xiong { border-color: #0b0c0d; color: #e74c3c; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); font-weight: 400 }

/* ==================== 详情弹窗 - 古风卷轴 ==================== */
.detail-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 15px
}

.detail-modal.show {
    display: flex
}

.detail-overlay {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 50% 20%, rgba(139, 90, 43, 0.08) 0%, transparent 50%),
        rgba(5, 3, 3, .96)
}

.detail-scroll {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: scaleY(.9)
}

.detail-modal.show .detail-scroll {
    animation: scrollUnroll .5s ease-out forwards
}

.scroll-handle {
    height: 22px;
    background: linear-gradient(180deg, #8b6914 0%, #a67c52 20%, #5c3d2e 50%, #3d2519 80%, #2d1f10 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5)
}

.scroll-handle.top { border-radius: 11px 11px 0 0 }
.scroll-handle.bottom { border-radius: 0 0 11px 11px }

.scroll-handle::before,
.scroll-handle::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: radial-gradient(circle at 30% 30%, var(--gold-light) 0%, var(--gold) 40%, var(--gold-dark) 100%);
    border-radius: 50%;
    box-shadow: 
        inset 0 -2px 4px rgba(0, 0, 0, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.4)
}

.scroll-handle::before { left: 8px }
.scroll-handle::after { right: 8px }

.handle-bar {
    width: 50%;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.4) 20%, rgba(212, 175, 55, 0.6) 50%, rgba(212, 175, 55, 0.4) 80%, transparent 100%);
    border-radius: 2px
}

.scroll-body {
    flex: 1;
    background: 
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='paper'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.04' numOctaves='5' stitchTiles='stitch'/%3E%3CfeDiffuseLighting in='noise' lighting-color='%23f4e4bc' surfaceScale='2'%3E%3CfeDistantLight azimuth='45' elevation='60'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paper)'/%3E%3C/svg%3E"),
        linear-gradient(180deg, #f4e4bc 0%, #eddcaa 10%, #e8d5a3 50%, #dcc896 90%, #d4c090 100%);
    background-blend-mode: overlay;
    border-left: 6px solid;
    border-right: 6px solid;
    border-image: linear-gradient(180deg, #5c3d2e 0%, #8b5a2b 10%, #6b4423 50%, #8b5a2b 90%, #5c3d2e 100%) 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    box-shadow: 
        inset 3px 0 10px rgba(0, 0, 0, 0.1),
        inset -3px 0 10px rgba(0, 0, 0, 0.1)
}

.scroll-body::before {
    content: "";
    position: sticky;
    top: 0;
    display: block;
    height: 25px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.06) 0%, transparent 100%);
    pointer-events: none;
    z-index: 5;
    margin-bottom: -25px
}

.scroll-body::after { display: none }

.btn-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    background: rgba(93, 64, 55, 0.2);
    border: 1px solid rgba(139, 90, 43, 0.5);
    border-radius: 50%;
    color: var(--wood-dark);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    z-index: 10;
    transition: transform .2s ease, background .2s ease
}

.btn-close:active {
    transform: scale(.9);
    background: rgba(93, 64, 55, 0.4)
}

.scroll-header {
    padding: 30px 25px 25px;
    text-align: center;
    border-bottom: 2px solid rgba(139, 90, 43, 0.3);
    position: relative
}

.scroll-header::after {
    content: "☯";
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    color: var(--wood-medium);
    background: var(--parchment);
    padding: 0 15px
}

.header-number {
    font-size: .9rem;
    color: var(--wood-medium);
    margin-bottom: 8px;
    letter-spacing: 2px
}

.header-title {
    font-family: var(--font-art);
    font-size: 1.8rem;
    color: var(--ink);
    margin-bottom: 15px;
    font-weight: 400;
    letter-spacing: 2px;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5)
}

.scroll-content {
    padding: 30px 20px 20px;
    color: var(--ink)
}

.content-section {
    margin-bottom: 28px;
    position: relative;
    padding-left: 45px
}

.section-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, rgba(139, 90, 43, 0.15) 0%, rgba(139, 90, 43, 0.05) 100%);
    border: 1px solid rgba(139, 90, 43, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wood-medium);
    font-size: .8rem
}

.content-section h3 {
    font-family: var(--font-art);
    font-size: 1.3rem;
    color: var(--red-dark);
    margin-bottom: 12px;
    letter-spacing: 1px;
    font-weight: 400;
    position: relative;
    display: inline-block
}

.content-section h3::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--red-dark), transparent)
}

.content-section p {
    font-size: .95rem;
    line-height: 2;
    color: var(--ink)
}

.poem-text {
    font-family: var(--font-art);
    font-size: 1.5rem;
    line-height: 1.8;
    padding: 20px 25px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-left: 3px solid var(--red-dark);
    border-radius: 0 8px 8px 0;
    box-shadow: 
        inset 0 1px 3px rgba(0, 0, 0, 0.05),
        0 2px 8px rgba(0, 0, 0, 0.05);
    letter-spacing: 1px;
    color: #3e2723
}

/* ==================== 解签网格及配色 ==================== */
.detail-grid {
    display: grid;
    gap: 10px
}

.detail-item {
    display: flex;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    border: 1px solid rgba(139, 90, 43, 0.15);
    transition: transform .2s ease, background .2s ease
}

.detail-label {
    min-width: 55px;
    font-size: .9rem;
    font-weight: 600
}

.detail-value {
    flex: 1;
    color: var(--ink);
    font-size: .9rem
}

/* 谋望 - 紫色 */
.detail-item[data-type="谋望"] .detail-label { color: #8e44ad }

/* 家宅 - 棕色 */
.detail-item[data-type="家宅"] .detail-label { color: #a0522d }

/* 财运 - 金色 */
.detail-item[data-type="财运"] .detail-label { color: #b8860b }

/* 姻缘 - 粉红 */
.detail-item[data-type="姻缘"] .detail-label { color: #c44569 }

/* 事业 - 深蓝 */
.detail-item[data-type="事业"] .detail-label { color: #2874a6 }

/* 疾病 - 青绿 */
.detail-item[data-type="疾病"] .detail-label { color: #16a085 }

/* ==================== 卷轴底部 ==================== */
.scroll-footer {
    padding: 20px 25px 25px;
    text-align: center;
    border-top: 1px solid rgba(139, 90, 43, 0.2)
}

.btn-close-bottom {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--wood-medium) 0%, var(--wood-dark) 100%);
    border: none;
    border-radius: 25px;
    color: var(--parchment);
    font-size: clamp(0.85rem, 3.5vw, 0.95rem);
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
    letter-spacing: clamp(1px, 0.8vw, 3px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: transform .2s ease, box-shadow .2s ease;
    white-space: nowrap
}

.btn-close-bottom:active {
    transform: scale(.97);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2)
}

/* ==================== 动画 ==================== */
@keyframes twinkle {
    0%, 100% { opacity: .3; transform: scale(.9) rotate(0deg) }
    50% { opacity: .9; transform: scale(1.1) rotate(180deg) }
}

@keyframes glowBreath {
    0%, 100% { transform: scale(1); opacity: .6 }
    50% { transform: scale(1.2); opacity: .9 }
}

@keyframes float {
    0%, 100% { transform: translateY(0) }
    50% { transform: translateY(-8px) }
}

@keyframes shake-tong {
    0%, 100% { transform: translate(0, 0) rotate(0) }
    25% { transform: translate(-2px, 2px) rotate(-3deg) }
    50% { transform: translate(0, -1px) rotate(0) }
    75% { transform: translate(2px, 2px) rotate(3deg) }
}

@keyframes jump-stick {
    0% { transform: translateX(-50%) translateY(0) rotate(var(--base-rotate)) }
    100% { transform: translateX(-50%) translateY(var(--jump-height)) rotate(calc(var(--base-rotate) + var(--shake-rotate))) }
}

@keyframes shake {
    0%, 100% { transform: rotate(-2deg) }
    50% { transform: rotate(2deg) }
}

@keyframes stickFly {
    0% { opacity: 1; transform: translateY(120px) rotate(-25deg) scale(.6) }
    30% { opacity: 1; transform: translateY(-20px) rotate(20deg) scale(1) }
    50% { transform: translateY(-40px) rotate(-10deg) scale(1.05) }
    70% { transform: translateY(-20px) rotate(5deg) scale(1) }
    100% { opacity: 0; transform: translateY(0) rotate(0) scale(1.2) }
}

@keyframes cardIn {
    to { opacity: 1; transform: scale(1) translateY(0) }
}

@keyframes glowPulse {
    0%, 100% { opacity: .5; transform: scale(1) }
    50% { opacity: 1; transform: scale(1.05) }
}

@keyframes scrollUnroll {
    0% { opacity: 0; transform: scaleY(0.1) }
    60% { transform: scaleY(1.02) }
    100% { opacity: 1; transform: scaleY(1) }
}

@keyframes prayHover {
    0%, 100% { transform: scale(1) }
    50% { transform: scale(1.1) }
}

/* ==================== 桌面端悬停效果 ==================== */
@media (hover: hover) {
    .btn-shake:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 
            0 6px 20px rgba(155, 35, 53, .5),
            inset 0 1px 0 rgba(255, 255, 255, .15),
            0 0 25px rgba(212, 175, 55, .3),
            0 0 0 1px rgba(212, 175, 55, 0.3)
    }

    .btn-shake:hover:not(:disabled) .btn-content i {
        animation: prayHover 1s ease-in-out infinite
    }

    .btn-view:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(212, 175, 55, 0.5)
    }

    .btn-again:hover {
        transform: translateY(-2px);
        background: rgba(212, 175, 55, 0.1);
        box-shadow: 0 3px 10px rgba(212, 175, 55, 0.2)
    }

    .btn-close:hover {
        background: rgba(93, 64, 55, 0.3);
        transform: rotate(90deg)
    }

    .btn-close-bottom:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3)
    }

    .detail-item:hover {
        background: rgba(255, 255, 255, 0.4);
        transform: translateX(3px)
    }
}

/* ==================== 响应式适配 ==================== */
@media (max-height: 700px) {
    .qian-tong {
        transform: scale(.85);
        margin-top: 0
    }

    .action-wrap { margin-top: 25px }
    .header h1 { font-size: 2rem }
}

@media (max-width: 320px) {
    .btn-shake {
        width: 160px;
        height: 52px
    }
    
    .btn-content {
        font-size: 0.9rem;
        gap: 6px;
        padding: 0 12px
    }
    
    .btn-content i {
        font-size: 0.85rem
    }
    
    .card-footer {
        gap: 8px
    }
    
    .card-footer button {
        padding: 11px 6px;
        font-size: 0.75rem;
        gap: 4px
    }
    
    .card-footer button i {
        font-size: 0.7rem
    }
    
    .btn-close-bottom {
        font-size: 0.85rem;
        letter-spacing: 1px;
        padding: 12px 15px
    }
}

@media (max-width: 280px) {
    .btn-content span {
        font-size: 0.8rem
    }
    
    .card-footer button {
        font-size: 0.7rem
    }
    
    /* 极窄屏隐藏图标，只保留文字 */
    .card-footer button i {
        display: none
    }
}

@media (max-width: 350px) {
    .header h1 {
        font-size: 2rem;
        letter-spacing: 1px
    }

    .result-card { 
        width: calc(100vw - 40px);
        max-width: 260px 
    }
    
    .card-title { 
        font-size: clamp(1.4rem, 5vw, 1.6rem) 
    }

    .scroll-body {
        border-left-width: 4px;
        border-right-width: 4px
    }
}

@media (min-width: 768px) {
    .header h1 { font-size: 2.8rem }
    .subtitle { font-size: 1rem }

    .stage-glow {
        width: 400px;
        height: 400px
    }

    .btn-shake {
        width: 200px;
        height: 62px
    }

    .detail-scroll { max-width: 480px }

    body {
        background: 
            linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.4)),
            var(--bg) url(pcbg.jpg) no-repeat center center;
        background-size: cover
    }
}