/* ==========================================================================
   ☯️ 灵签阁 · 宝宝起名板块核心 CSS 样式系统
   ========================================================================== */

/* 1. CSS 变量与设计令牌 (Tokens) */
:root {
    --xuan-bg: #1A1410;
    /* 极深玄色背景 (与菩提苑一致) */
    --xuan-card: #2C2418;
    /* 卡片背景 */
    --xuan-surface: #3D3428;
    /* 面板背景 */
    --gold-primary: #C9A96E;
    /* 流金主色 */
    --gold-light: #FDE68A;
    /* 淡金 */
    --gold-dark: #8B6914;
    /* 暗金 */
    --vermillion: #C43D3D;
    /* 朱砂红 */
    --vermillion-light: #D95353;
    /* 朱砂红 悬停 */
    --vermillion-dark: #A62E2E;
    /* 朱砂红 点击 */
    --paper-warm: #EDE4D4;
    /* 宣纸米黄 */
    --text-ink: #2C2C2C;
    /* 墨香黑 */
    --text-light: #D4C5A9;
    /* 纸张白/金褐色 */
    --text-muted: #B0A898;
    /* 烟灰色 */
    --border-gold: rgba(201, 169, 110, 0.2);

    --font-title: 'ZhiMangXing', 'Zhi Mang Xing', 'STKaiti', 'KaiTi', '楷体', cursive;
    --font-display: 'STKaiti', 'KaiTi', '楷体', '华文楷体', 'Noto Serif CJK SC', 'Source Han Serif SC', serif;
    --font-body: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', 'Noto Sans CJK SC', 'Source Han Sans SC', sans-serif;
    --transition-base: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-fast: all 0.15s ease;
}

/* 朱砂红全局实用类与仪式感大按钮系统 */
.bg-vermillion, .btn-ritual {
    background-color: #C43D3D !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(196, 61, 61, 0.45) !important;
}
.bg-vermillion-light {
    background-color: #D95353 !important;
}
.bg-vermillion-dark {
    background-color: #A62E2E !important;
}
.text-vermillion {
    color: #C43D3D !important;
}
.text-vermillion-light {
    color: #D95353 !important;
}
.btn-ritual:hover {
    background-color: #D95353 !important;
    filter: brightness(1.08) !important;
}
.btn-ritual:active {
    background-color: #A62E2E !important;
    transform: scale(0.98) !important;
}

/* 2. 重置与基础布局 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--xuan-bg);
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    letter-spacing: 0.05em;
    line-height: 1.35;
}

/* 3. 背景与粒子特效 */
.fixed-bg {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, var(--xuan-bg) 0%, var(--xuan-card) 50%, var(--xuan-bg) 100%);
    z-index: -3;
}

.background-pattern {
    position: fixed;
    inset: 0;
    background-image: url('https://images.unsplash.com/photo-1608889174653-81f1b203c9b7?q=80&w=2000&auto=format&fit=crop');
    /* Placeholder water color */
    background-size: cover;
    background-position: center;
    opacity: 0.08;
    z-index: -2;
    filter: grayscale(1);
}

.radial-glow {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 40%, rgba(201, 160, 94, 0.12) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

/* 萤火上升动画 */
.glow-rise-container {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.glow-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: rgba(245, 230, 184, 0.45);
    border-radius: 50%;
    filter: blur(1px);
    box-shadow: 0 0 10px rgba(201, 160, 94, 0.8);
    animation: glow-rise 6s infinite linear;
}

@keyframes glow-rise {
    0% {
        transform: translateY(110vh) scale(0.5);
        opacity: 0;
    }

    10% {
        opacity: 0.7;
    }

    90% {
        opacity: 0.7;
    }

    100% {
        transform: translateY(-10vh) scale(1.2);
        opacity: 0;
    }
}

/* 4. 页头 Logo 与操作栏 */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 56px;
    z-index: 50;
    background-color: rgba(26, 20, 16, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(201, 169, 110, 0.15);
    padding-top: env(safe-area-inset-top);
}

.header-container {
    max-width: 1152px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--gold-primary);
}

.logo-icon {
    font-size: 24px;
    filter: drop-shadow(0 0 5px rgba(201, 160, 94, 0.4));
    animation: pulse-glow 3s infinite ease-in-out;
}

.brand-name {
    font-family: var(--font-title);
    font-size: 26px;
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold-primary) 50%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.1em;
}

.circle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-gold);
    background: transparent;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.circle-btn:hover {
    color: var(--gold-primary);
    border-color: var(--gold-primary);
}

.circle-btn.playing {
    animation: rotate-music 4s infinite linear;
    color: var(--gold-primary);
    border-color: var(--gold-primary);
}

@keyframes rotate-music {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* 5. 主内容容器 */
.app-main {
    margin-top: 56px;
    min-height: calc(100vh - 112px);
    display: flex;
    justify-content: center;
    padding: 40px 16px 80px 16px;
}

.content-wrapper {
    width: 100%;
    max-width: 600px;
}

.app-section {
    width: 100%;
}

.app-section.hidden {
    display: none !important;
}

/* 6. 输入表单模块 */
.hero-header {
    text-align: center;
    margin-bottom: 30px;
}

.calligraphy-title {
    font-family: var(--font-title);
    font-size: 48px;
    font-weight: normal;
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold-primary) 60%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.section-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 460px;
    margin: 0 auto;
    line-height: 1.8;
}

.naming-form {
    background-color: rgba(32, 23, 18, 0.95);
    border: 1px solid var(--border-gold);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.form-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 15px;
    color: var(--gold-light);
    letter-spacing: 0.05em;
}

.required {
    color: var(--vermillion);
}

/* 姓氏输入框 (下划线风格) */
.border-bottom-vermillion input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(217, 56, 30, 0.3);
    color: var(--gold-light);
    font-size: 20px;
    font-family: var(--font-body);
    padding: 8px 0;
    text-align: center;
    outline: none;
    transition: var(--transition-base);
    letter-spacing: 0.1em;
}

.border-bottom-vermillion input:focus {
    border-bottom-color: var(--vermillion);
}

/* 日期输入框 */
.date-input {
    width: 100%;
    background-color: rgba(19, 14, 10, 0.6);
    border: 1px solid var(--border-gold);
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 15px;
    outline: none;
    transition: var(--transition-fast);
}

.date-input:focus {
    border-color: var(--gold-primary);
}

/* 单选框按钮组 (乾造 / 坤造) */
.radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.radio-label {
    position: relative;
    border: 1px solid var(--border-gold);
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
    background-color: rgba(19, 14, 10, 0.3);
}

.radio-label input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-label span {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.radio-label.active {
    border-color: var(--gold-primary);
    background-color: rgba(201, 160, 94, 0.1);
}

.radio-label.active span {
    color: var(--gold-light);
}

/* 五行复选框多选 */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.checkbox-label {
    position: relative;
    border: 1px solid var(--border-gold);
    border-radius: 6px;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
    background-color: rgba(19, 14, 10, 0.3);
}

.checkbox-label input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-label span {
    font-size: 13px;
    color: var(--text-muted);
}

.checkbox-label.active {
    border-color: var(--gold-primary);
    background-color: rgba(201, 160, 94, 0.1);
}

.checkbox-label.active span {
    color: var(--gold-light);
}

/* 核心行动按钮 */
.submit-btn {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--vermillion-light) 0%, var(--vermillion) 50%, var(--vermillion-dark) 100%);
    color: var(--text-light);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(217, 56, 30, 0.3);
    transition: var(--transition-base);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 56, 30, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.animate-spin-slow {
    animation: rotate-music 6s infinite linear;
}

/* 7. 排盘加载动效 */
.loading-container {
    text-align: center;
    padding: 80px 20px;
    background-color: rgba(32, 23, 18, 0.95);
    border: 1px solid var(--border-gold);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.taiji-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 30px auto;
}

.taiji-svg {
    width: 100%;
    height: 100%;
    animation: rotate-music 3s infinite linear;
    filter: drop-shadow(0 0 10px rgba(201, 160, 94, 0.4));
}

.loading-title {
    font-family: var(--font-title);
    font-size: 32px;
    color: var(--gold-light);
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.loading-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 320px;
    margin: 0 auto 30px auto;
    line-height: 1.6;
}

.loading-progress-bar {
    width: 80%;
    height: 3px;
    background-color: rgba(201, 160, 94, 0.1);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
}

.progress-fill {
    width: 0;
    height: 100%;
    background-color: var(--gold-primary);
    animation: progress-fill-anim 3s infinite ease-in-out;
}

@keyframes progress-fill-anim {
    0% {
        width: 0;
    }

    50% {
        width: 85%;
    }

    100% {
        width: 100%;
    }
}

/* 8. 宣纸卷轴报告页 */
.naming-scroll {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.6));
}

.scroll-handle {
    height: 14px;
    background: linear-gradient(90deg, #5A3D28 0%, #C9A05C 10%, #E8D4A2 50%, #C9A05C 90%, #5A3D28 100%);
    border-radius: 7px;
    position: relative;
    z-index: 10;
}

.scroll-handle.top {
    margin-bottom: -4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.scroll-handle.bottom {
    margin-top: -4px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.4);
}

.scroll-body {
    background-color: var(--paper-warm);
    color: var(--text-ink);
    padding: 36px 24px;
    border-left: 2px solid #D8CBB5;
    border-right: 2px solid #D8CBB5;
    position: relative;
    z-index: 5;
    overflow: hidden;
}

/* 印章特效 */
.seal-container {
    position: absolute;
    top: 20px;
    right: 20px;
    pointer-events: none;
    transform: rotate(-10deg);
    opacity: 0.85;
}

.seal-stamp {
    font-family: var(--font-title);
    font-size: 16px;
    color: var(--vermillion);
    border: 2px solid var(--vermillion);
    padding: 4px 6px;
    border-radius: 4px;
    letter-spacing: 0.1em;
    font-weight: bold;
    display: inline-block;
    box-shadow: 0 0 2px rgba(217, 56, 30, 0.4);
    background-color: rgba(244, 239, 230, 0.6);
}

.scroll-title {
    text-align: center;
    font-size: 32px;
    color: #4C261A;
    margin-bottom: 24px;
    letter-spacing: 0.1em;
}

/* 八字命盘看板 */
.bazi-board {
    background-color: rgba(216, 203, 181, 0.4);
    border: 1px solid rgba(139, 105, 20, 0.15);
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 30px;
}

.board-title {
    font-size: 14px;
    color: #6C4235;
    font-weight: 600;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(139, 105, 20, 0.1);
    padding-bottom: 6px;
}

.board-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.grid-cell {
    font-size: 13px;
}

.grid-cell .lbl {
    color: #7E6857;
}

.grid-cell .val {
    font-weight: 600;
    color: var(--text-ink);
}

/* 名字卡片推荐列表 */
.names-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.name-card {
    border-bottom: 1px dashed rgba(139, 105, 20, 0.15);
    padding-bottom: 24px;
}

.name-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.name-header {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 12px;
}

.name-display {
    font-family: var(--font-title);
    font-size: 40px;
    color: #4C261A;
    line-height: 1;
    letter-spacing: 0.05em;
}

.name-props {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}

.prop-badge {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.prop-badge.wuxing {
    background-color: #E2D2B8;
    color: #6A4E2C;
}

.prop-badge.stroke {
    background-color: #D3E2E6;
    color: #3C6875;
}

.prop-badge.lucky {
    background-color: #EAC9C5;
    color: var(--vermillion);
}

/* 名字解析条目 */
.name-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-row {
    font-size: 14px;
    line-height: 1.6;
}

.detail-row .tag {
    font-weight: 600;
    color: #7E4F42;
    display: inline-block;
    min-width: 45px;
}

.poetry-quote {
    background-color: rgba(216, 203, 181, 0.1);
    border-left: 3px solid var(--gold-primary);
    padding: 8px 12px;
    font-style: italic;
    color: var(--text-light);
    margin-top: 4px;
    border-radius: 0 4px 4px 0;
}

/* 9. 付费结缘解锁卡 */
.unlock-card {
    background-color: var(--xuan-card);
    border: 1px solid var(--gold-primary);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    margin-bottom: 24px;
}

.unlock-title {
    font-family: var(--font-body);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.unlock-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.pay-btn {
    width: 100%;
    max-width: 280px;
    height: 46px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--vermillion-light) 0%, var(--vermillion) 50%, var(--vermillion-dark) 100%);
    color: var(--text-light);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(217, 56, 30, 0.25);
    transition: var(--transition-fast);
}

.pay-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(217, 56, 30, 0.35);
}

.back-action {
    text-align: center;
}

.back-btn {
    background: transparent;
    border: 1px solid var(--border-gold);
    color: var(--text-muted);
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition-fast);
}

.back-btn:hover {
    color: var(--gold-primary);
    border-color: var(--gold-primary);
}

/* 10. 页脚与免责 */
.site-footer {
    text-align: center;
    padding: 40px 20px 60px 20px;
    border-top: 1px solid rgba(201, 160, 94, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.footer-blessing {
    color: var(--gold-primary);
    font-size: 14px;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.footer-disclaimer {
    color: var(--text-muted);
    font-size: 11px;
    max-width: 500px;
    margin: 0 auto 12px auto;
    line-height: 1.6;
}

.footer-copyright {
    color: rgba(142, 131, 119, 0.45);
    font-size: 10px;
}

/* Pulse animation for logos */
@keyframes pulse-glow {
    0% {
        filter: drop-shadow(0 0 5px rgba(201, 160, 94, 0.3));
    }

    50% {
        filter: drop-shadow(0 0 12px rgba(201, 160, 94, 0.65));
    }

    100% {
        filter: drop-shadow(0 0 5px rgba(201, 160, 94, 0.3));
    }
}

/* Responsive Overrides */
@media(max-width: 480px) {
    .calligraphy-title {
        font-size: 38px;
    }

    .naming-form {
        padding: 16px;
    }

    .scroll-body {
        padding: 24px 16px;
    }

    .name-display {
        font-size: 32px;
    }
}

/* ==========================================================================
   ☯️ AI Status Indicator Badge
   ========================================================================== */
.ai-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.8rem;
    padding: 5px 12px;
    border-radius: 20px;
    background: rgba(201, 160, 92, 0.08);
    border: 1px solid rgba(201, 160, 92, 0.25);
    color: #C9A05C;
    margin: 10px auto 20px auto;
    width: fit-content;
    font-family: 'Noto Serif SC', serif;
    letter-spacing: 1px;
}

.ai-status-badge.ai-active {
    background: rgba(46, 204, 113, 0.08);
    border-color: rgba(46, 204, 113, 0.35);
    color: #2ecc71;
}

.ai-status-badge .badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
}

.ai-status-badge.ai-active .badge-dot {
    box-shadow: 0 0 8px #2ecc71;
    animation: badge-pulse 1.5s infinite alternate;
}

@keyframes badge-pulse {
    from {
        opacity: 0.4;
    }

    to {
        opacity: 1;
    }
}

/* ==========================================================================
   ☯️ 灵签阁 · 首页大厅与多页面核心样式 (Hall & Portal UI)
   ========================================================================== */

.main-hall {
    max-width: 1152px;
    margin: 0 auto;
    padding-bottom: 120px;
}

/* 11. 首页 Hero 区域 */
.hero-section {
    padding: 60px 20px 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
}

.hero-logo-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-gold);
    background: rgba(201, 160, 94, 0.08);
    border-radius: 50%;
    margin-bottom: 20px;
    box-shadow: 0 0 15px rgba(201, 160, 94, 0.15);
}

.hero-logo-wrapper::after {
    content: '';
    position: absolute;
    inset: -3px;
    border: 1px solid rgba(201, 160, 94, 0.4);
    border-radius: 50%;
    animation: ring-expand-taiji 3s ease-out infinite;
}

@keyframes ring-expand-taiji {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.hero-logo-svg {
    width: 48px;
    height: 48px;
    color: var(--gold-primary);
    filter: drop-shadow(0 0 8px rgba(201, 169, 110, 0.45));
}

.logo-svg-icon {
    width: 36px;
    height: 36px;
    color: var(--gold-primary);
    filter: drop-shadow(0 0 6px rgba(201, 169, 110, 0.4));
    flex-shrink: 0;
}

.gold-gradient {
    font-family: var(--font-title);
    font-size: 56px;
    letter-spacing: 0.15em;
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold-primary) 50%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    margin-bottom: 15px;
}

.hero-tagline {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 6px;
    letter-spacing: 0.08em;
}

.hero-subtagline {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 30px;
    letter-spacing: 0.05em;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    width: 100%;
    max-width: 440px;
    justify-content: center;
    margin-bottom: 40px;
}

.btn-ritual {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    height: 48px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-base);
    letter-spacing: 0.08em;
}

.btn-ritual.bg-vermillion {
    background-color: var(--vermillion);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(217, 56, 30, 0.25);
}

.btn-ritual.bg-vermillion:hover {
    background-color: var(--vermillion-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 56, 30, 0.4);
}

.btn-ritual.border-gold {
    border: 1px solid var(--gold-primary);
    background: rgba(201, 160, 94, 0.05);
}

.btn-ritual.border-gold:hover {
    background: rgba(201, 160, 94, 0.12);
    border-color: var(--gold-light);
    transform: translateY(-2px);
}

.scroll-tip {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* 12. 九大善门网格 */
.gates-section {
    padding: 60px 16px;
}

.section-title {
    font-size: 32px;
    letter-spacing: 0.1em;
    margin-bottom: 40px;
}

.gates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.gate-card {
    display: block;
    text-decoration: none;
    background-color: rgba(32, 23, 18, 0.95);
    border: 1px solid var(--border-gold);
    border-radius: 12px;
    padding: 24px;
    transition: var(--transition-base);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.gate-card:hover {
    border-color: var(--gold-primary);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 30px rgba(201, 160, 94, 0.25);
}

.gate-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.gate-header i {
    font-size: 28px;
}

.gate-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    border: 1px solid rgba(201, 160, 94, 0.2);
    color: var(--gold-primary);
}

.gate-name {
    font-family: var(--font-body);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.gate-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* 13. 在线上香与分销大横幅 */
.banner-section {
    padding: 20px 16px;
}

.ritual-banner {
    background-color: var(--paper-warm);
    border-left: 4px solid var(--gold-primary);
    border-right: 4px solid var(--gold-primary);
    padding: 40px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.ritual-banner .gold-divider {
    width: 60px;
    height: 1px;
    background: var(--gold-primary);
    margin: 10px 0;
    opacity: 0.5;
}

.banner-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.banner-sub {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.banner-title {
    font-size: 28px;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.banner-desc {
    font-size: 14px;
    max-width: 440px;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* 14. 全局悬浮“赚”按钮 */
.floating-earn-btn {
    position: fixed;
    right: 16px;
    bottom: calc(env(safe-area-inset-bottom) + 80px);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(201, 160, 94, 0.4), rgba(217, 56, 30, 0.3));
    border: 1px solid var(--gold-primary);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(201, 160, 94, 0.3);
    z-index: 49;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition-base);
}

.floating-earn-btn span {
    font-family: var(--font-title);
    font-size: 20px;
    color: var(--gold-light);
    text-shadow: 0 0 8px rgba(201, 160, 94, 0.8);
}

.floating-earn-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(201, 160, 94, 0.5);
}

/* 15. 移动端底部导航栏 */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(32, 23, 18, 0.96);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(201, 160, 94, 0.15);
    z-index: 50;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 8px 4px 4px 4px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 10px;
    transition: var(--transition-fast);
}

.nav-item i {
    font-size: 18px;
}

.nav-item:hover,
.nav-item.active {
    color: var(--gold-primary);
}

/* 16. 吉祥号识别角标 */
.auth-status-badge {
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(201, 160, 94, 0.2);
    color: var(--text-muted);
    background-color: rgba(32, 23, 18, 0.4);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 10px;
}

.auth-status-badge.verified {
    color: var(--gold-primary);
    border-color: rgba(201, 160, 94, 0.45);
    background-color: rgba(201, 160, 94, 0.08);
    box-shadow: 0 0 8px rgba(201, 160, 94, 0.15);
}

/* 桌面端隐藏底部 Tab，大厅栅格列数适配 */
@media(min-width: 768px) {
    .mobile-bottom-nav {
        display: none;
    }

    .floating-earn-btn {
        right: 24px;
        bottom: 24px;
        width: 52px;
        height: 52px;
    }

    .floating-earn-btn span {
        font-size: 24px;
    }

    .gates-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================================================
   ☯️ 灵签阁 · 今日黄历与静心禅修专用 CSS (Almanac & Meditation Specific)
   ========================================================================== */

/* 黄历纸张排版 */
.almanac-container {
    padding: 30px 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    background-color: var(--paper-warm);
    color: var(--text-ink);
    border-top: 5px solid var(--vermillion);
    border-bottom: 5px solid var(--vermillion);
}

.almanac-header-date {
    text-align: center;
    margin-bottom: 20px;
}

.gregorian-date {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-ink);
    border-bottom: 1px dashed rgba(142, 131, 119, 0.3);
    padding-bottom: 8px;
}

.lunar-year {
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.lunar-month-day {
    font-family: var(--font-title);
    font-size: 32px;
    color: var(--vermillion-dark);
    margin-top: 8px;
    letter-spacing: 0.1em;
}

.almanac-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201, 160, 94, 0.4), transparent);
    margin: 20px 0;
}

.almanac-pillars {
    display: flex;
    justify-content: space-around;
    padding: 0 10px;
}

.pillar-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.pillar-title {
    font-size: 12px;
    color: var(--text-muted);
}

.pillar-val {
    font-family: var(--font-title);
    font-size: 26px;
    font-weight: 700;
}

.yiji-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.yiji-box {
    flex: 1;
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.yiji-label {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-title);
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
}

.yiji-box.yi .yiji-label {
    box-shadow: 0 0 8px rgba(217, 56, 30, 0.35);
}

.yiji-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
}

.chong-sha-info {
    font-size: 13px;
    line-height: 2;
}

.lbl-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(201, 160, 94, 0.15);
    color: var(--gold-dark);
    font-size: 11px;
    margin-right: 6px;
}

.almanac-action {
    margin: 30px 0;
}

.almanac-action-tip {
    font-size: 11px;
    margin-top: 8px;
}

/* 时辰表格 */
.shichen-card {
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.shichen-title {
    font-size: 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.shichen-table {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-gold);
    border-radius: 8px;
    overflow: hidden;
}

.shichen-row {
    display: grid;
    grid-template-columns: 1fr 1.2fr 0.8fr 1.5fr;
    padding: 12px 8px;
    border-bottom: 1px solid rgba(201, 160, 94, 0.12);
    font-size: 13px;
    text-align: center;
}

.shichen-row.header {
    background-color: rgba(201, 160, 94, 0.08);
    font-weight: bold;
    color: var(--gold-primary);
}

.shichen-row:last-child {
    border-bottom: none;
}

.shichen-row .txt-yi {
    color: #2ecc71;
    font-weight: bold;
}

.shichen-row .txt-ji {
    color: var(--vermillion);
    font-weight: bold;
}

/* 禅修木鱼区域 */
.muyu-container {
    padding: 50px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.muyu-fish-wrapper {
    cursor: pointer;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.08s ease;
}

.muyu-fish-wrapper:active {
    transform: scale(0.92);
}

.muyu-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 10px rgba(201, 160, 94, 0.25));
    transition: filter 0.3s ease;
}

.muyu-fish-wrapper:hover .muyu-svg {
    filter: drop-shadow(0 0 15px rgba(201, 160, 94, 0.45));
}

.muyu-click-tip {
    margin-top: 24px;
    font-size: 13px;
    letter-spacing: 0.05em;
}

.muyu-floating-area {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}

/* 功德飘浮文字 */
.merit-toast {
    position: absolute;
    font-family: var(--font-title);
    font-size: 24px;
    font-weight: bold;
    color: var(--gold-light);
    text-shadow: 0 0 8px rgba(201, 160, 94, 0.9);
    pointer-events: none;
    animation: glow-float-up 1s ease-out forwards;
}

@keyframes glow-float-up {
    0% {
        transform: translate(-50%, 0) scale(0.8);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -80px) scale(1.1);
        opacity: 0;
    }
}

.merit-indicator-card {
    padding: 24px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.merit-lbl {
    font-size: 13px;
    letter-spacing: 0.05em;
}

.merit-score {
    font-size: 40px;
    margin: 8px 0;
    letter-spacing: 0.05em;
}

.merit-desc {
    font-size: 11px;
    opacity: 0.85;
}

/* 禅音混音卡片 */
.zen-sounds-card,
.timer-card {
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.zen-sounds-title,
.timer-title {
    font-size: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sounds-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.sound-select-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 76px;
    border-radius: 8px;
    border: 1px solid var(--border-gold);
    background: rgba(32, 23, 18, 0.4);
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition-base);
}

.sound-select-btn i {
    font-size: 20px;
}

.sound-select-btn:hover {
    color: var(--text-light);
    border-color: rgba(201, 160, 94, 0.5);
}

.sound-select-btn.active {
    color: var(--gold-primary);
    border-color: var(--gold-primary);
    background: rgba(201, 160, 94, 0.08);
    box-shadow: 0 0 10px rgba(201, 160, 94, 0.15);
}

/* 计时器样式 */
.timer-display {
    font-family: var(--font-title);
    font-size: 48px;
    color: var(--gold-primary);
    margin-bottom: 20px;
    letter-spacing: 0.05em;
    text-shadow: 0 0 10px rgba(201, 160, 94, 0.2);
}

.timer-actions {
    display: flex;
    gap: 12px;
    max-width: 320px;
    margin: 0 auto;
}
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(201,162,39,0.2); border-radius: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(201,162,39,0.4); }

/* 优化五格数理评分胶囊样式 */
.score-capsule {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem; /* rounded-lg */
    border: 1px solid rgba(201, 169, 110, 0.35); /* 增强淡金边框对比度 */
    background: rgba(201, 169, 110, 0.08); /* 微微发亮的背景 */
    padding: 0.25rem 0.5rem;
    min-width: 56px;
    transition: var(--transition-fast);
}

/* 风格切换页签高亮样式 */
.style-tab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 1.05rem;
    padding: 0.5rem 1.25rem;
    cursor: pointer;
    transition: var(--transition-base);
}

.style-tab-btn:hover {
    color: var(--gold-light);
}

.style-tab-btn.active {
    color: var(--gold-primary);
    border-bottom: 2px solid var(--gold-primary);
    font-weight: bold;
    text-shadow: 0 0 10px rgba(201, 169, 110, 0.4);
}
