
/* 全局按钮重置（纯 HTML 无框架，去掉浏览器默认样式） */
button {
    -webkit-appearance: none;
    appearance: none;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    outline: none;
    box-sizing: border-box;
    cursor: pointer;
}
button:active { transform: scale(.97); }


/* 改进后的样式 */
.container {
    /* padding: calc(100vw * 80 / 750) calc(100vw * 20 / 750) calc(100vw * 60 / 750); */ 
    padding: calc(100vw * 20 / 750) calc(100vw * 20 / 750) calc(100vw * 60 / 750); /* 保留左右和底部内边距 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: transparent;
    box-sizing: border-box;
    position: relative;
    gap: calc(100vw * 25 / 750); /* 增加元素间距，从calc(100vw * 15 / 750)改为calc(100vw * 25 / 750) */
}

.tip-container {
    width: 90%;
    margin: calc(100vw * 20 / 750) auto;
    padding: calc(100vw * 20 / 750);
    background: transparent;
    border-radius: calc(100vw * 12 / 750);
    box-shadow: 0 calc(100vw * 2 / 750) calc(100vw * 8 / 750) rgba(0, 0, 0, 0.05);
    text-align: center;
}

.tip-text {
    font-size: calc(100vw * 28 / 750);
    color: var(--text);
    line-height: 1.5;
    text-align: center;
}

/* 进度区域 - 充能条（六爻节点）+ 整活文案 */
.progress-area {
    width: 100%;
    min-height: calc(100vw * 60 / 750);
    margin: calc(100vw * 4 / 750) 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 充能条：底槽 + 渐变填充（配色由皮肤 pifu.js 覆盖） */
.progress-bar {
    position: relative;
    box-sizing: border-box;
    width: calc(100vw * 400 / 750);
    max-width: 320px;
    height: 10px;
    border-radius: 999px;
    background: var(--help-btn-bg, rgba(0, 0, 0, .06));
    border: 1px solid var(--glass-border, rgba(0, 0, 0, .06));
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .05);
}

.progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light, var(--accent)));
    transition: width .12s linear;
}

/* 六爻节点：均匀分布，已定的一爻点亮 */
.progress-nodes {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.yao-node {
    position: absolute;
    top: 50%;
    box-sizing: border-box;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 50%;
    background: var(--glass-card-bg, #fff);
    border: 1.5px solid var(--accent);
    opacity: .3;
    transition: opacity .25s var(--ease-apple), transform .25s var(--ease-apple), box-shadow .25s var(--ease-apple);
}

.yao-node.lit {
    opacity: 1;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow, rgba(10, 132, 255, .5));
    transform: scale(1.15);
}

.progress-message {
    font-size: 13px;
    color: var(--text-light);
    margin-top: calc(100vw * 14 / 750);
    text-align: center;
    min-height: 18px;
}

/* 八卦容器调整 */
.bagua-container {
    width: calc(100vw * 450 / 750);
    height: calc(100vw * 450 / 750);
    margin: calc(100vw * 25 / 750) auto; /* 增加外边距，从calc(100vw * 20 / 750)改为calc(100vw * 25 / 750) */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.2s ease;
    /* 添加以下CSS规则，阻止默认触摸行为 */
    touch-action: none;
    -ms-touch-action: none;
    overflow: hidden; /* 防止内容溢出 */
}

.bagua-container:active {
    transform: scale(0.95); /* 轻微缩小，提供更好的点击反馈 */
}

.bagua-image {
    width: 100%;
    height: 100%;
    transition: opacity 0.3s;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none; /* 防止iOS长按弹出菜单 */
    pointer-events: none; /* 使触摸事件穿透到父元素 */
}

.bagua-image.rotating {
    animation: rotate linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 动态文本区域调整 */
.dynamic-text-container {
    width: 90%;
    margin: calc(100vw * 15 / 750) auto; /* 增加边距，从calc(100vw * 10 / 750)改为calc(100vw * 15 / 750) */
    text-align: center;
    padding: calc(100vw * 20 / 750) calc(100vw * 30 / 750); /* 增加内边距，给文字更多呼吸空间 */
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: calc(100vw * 12 / 750);
    box-shadow: 0 calc(100vw * 2 / 750) calc(100vw * 8 / 750) rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.dynamic-text {
    font-size: calc(100vw * 32 / 750);
    color: var(--text);
    line-height: 1.6;
    font-weight: 500;
}

/* 长按提示样式调整 */
.press-tip {
    margin: calc(100vw * 15 / 750) 0 calc(100vw * 20 / 750) 0; /* 增加边距 */
    font-size: calc(100vw * 30 / 750);
    color: var(--text-light);
    text-align: center;
    font-weight: 500;
}

/* 占位区域调整 - 增加高度 */
.spacer {
    flex-grow: 0.3; /* 增加弹性比例，从0.2改为0.3，增加空间 */
    min-height: calc(100vw * 10 / 750); /* 增加最小高度，从calc(100vw * 5 / 750)改为calc(100vw * 10 / 750) */
}

/* 底部结果按钮容器调整 */
.bottom-result-container {
    width: 85%;
    max-width: calc(100vw * 550 / 750);
    margin: calc(100vw * 15 / 750) auto calc(100vw * 25 / 750); /* 增加边距，从calc(100vw * 5 / 750) auto calc(100vw * 15 / 750)改为calc(100vw * 15 / 750) auto calc(100vw * 25 / 750) */
    text-align: center;
}

.result-btn {
    background-color: var(--accent);
    color: white;
    padding: calc(100vw * 20 / 750) calc(100vw * 40 / 750);
    border-radius: calc(100vw * 40 / 750);
    font-size: calc(100vw * 32 / 750);
    font-weight: 500;
    box-shadow: 0 calc(100vw * 4 / 750) calc(100vw * 12 / 750) rgba(76, 175, 80, 0.3);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    width: 100%;
    height: calc(100vw * 90 / 750); /* 增加高度，使按钮更醒目 */
}

.result-btn:active {
    transform: scale(0.97);
    box-shadow: 0 calc(100vw * 2 / 750) calc(100vw * 6 / 750) rgba(76, 175, 80, 0.2);
}

.result-text {
    font-size: calc(100vw * 32 / 750);
}

/* 变爻提示调整 */
.changing-tip-container {
    width: 90%;
    padding: calc(100vw * 15 / 750); /* 减小内边距 */
    background: transparent;
    border-radius: calc(100vw * 12 / 750);
    border-left: calc(100vw * 8 / 750) solid #ffc107;
    margin: 0 auto calc(100vw * 10 / 750); /* 添加下边距 */
}

.changing-tip {
    font-size: calc(100vw * 26 / 750);
    color: var(--text-light);
    line-height: 1.5;
    text-align: center;
}

/* 添加主内容容器，使核心内容更加集中 */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: calc(100vw * 600 / 750);
    gap: calc(100vw * 25 / 750); /* 增加内部元素间距，从calc(100vw * 15 / 750)改为calc(100vw * 25 / 750) */
}

/* Styles for the new top tip container */
.top-tip-container {
    width: 90%;
    margin: calc(100vw * 10 / 750) auto; /* 增加边距，从calc(100vw * 5 / 750)改为calc(100vw * 10 / 750) */
    padding: calc(100vw * 15 / 750);
    background: transparent;
    border-radius: calc(100vw * 12 / 750);
    border-left: calc(100vw * 8 / 750) solid #ffc107;
    text-align: center;
    min-height: calc(100vw * 50 / 750);
    display: flex;
    justify-content: center;
    align-items: center;
}

.top-tip-text {
    font-size: calc(100vw * 28 / 750);
    color: var(--text-light);
    line-height: 1.5;
}

/* 用户中心按钮样式 */



/* 备案号样式 */
.icp-footer {
    width: 100%;
    padding: calc(100vw * 10 / 750) 0;
    text-align: center;
    font-size: calc(100vw * 24 / 750);
    color: var(--text-muted);
    margin-top: calc(100vw * 20 / 750);
}

.icp-link {
    color: var(--text-muted);
    text-decoration: none;
}

/* 长按起卦时阻止页面滚动（仅锁滚动，不用 position:fixed 避免页面漂移跳动） */
body.touching-bagua {
    overflow: hidden;
}
/* ========== 苹果玻璃拟态美化层（DESIGN.md v2.4）========== */
:root {
    --accent: #0a84ff;
    --text: #1c1c1e;
    --text-light: #4e4e56;
    --text-muted: #7a7a82;
    --success: #34c759;
    --warning: #ff9500;
    --danger: #ff3b30;
    --glass-border: rgba(255,255,255,.2);
    --glass-shadow: 0 4px 24px rgba(0,0,0,.12), 0 1px 4px rgba(0,0,0,.08);
    --glass-blur: blur(12px) saturate(180%) brightness(110%);
    --ease-apple: cubic-bezier(.25,.46,.45,.94);
}

/* 柔光背景（光斑渐变，禁止 background shorthand） */
html, body {
    background-color: var(--bg-color, #f2f5f9);
    background-image: var(--bg-image, none);
    background-attachment: fixed;
    background-repeat: no-repeat;
}
.container { background: transparent; }

/* 顶部提示语：玻璃卡 + accent 左边条 */
.top-tip-container {
    background: var(--glass-card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border, rgba(0,0,0,.06));
    box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
    border-left: 8px solid var(--accent);
    border-radius: 16px;
    min-height: 44px;
}
.top-tip-text { color: var(--text); font-size: 16px; }

/* 进度条尺寸/结构见上方 .progress-bar 定义，此处仅保留字号覆盖 */
.progress-message { color: var(--text-light); font-size: 14px; }

/* 八卦容器：透明（八卦 PNG 为透明背景，直接显示） */
.bagua-container {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* 长按提示 */
.press-tip { color: var(--text-light); font-size: 16px; }

/* 查看结果按钮：accent 实心胶囊 */
.result-btn {
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    box-shadow: 0 4px 16px var(--accent-glow);
    transition: transform .2s var(--ease-apple), box-shadow .2s var(--ease-apple);
}
.result-btn:active { transform: scale(.97); box-shadow: 0 2px 8px var(--accent-glow); }
.result-text { color: #fff; }

/* 备案 */
.icp-footer, .icp-link { color: var(--text-muted); }

/* 呼吸光晕（起卦时八卦背后的柔和渐变，随进度变亮） */
.bagua-aura {
    position: absolute;
    inset: -8%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow, rgba(10, 132, 255, .25)) 0%, transparent 65%);
    z-index: -1;
    opacity: .35;
    animation: aura-breathe 8s ease-in-out infinite;
    pointer-events: none;
    transition: opacity 1s var(--ease-apple);
}

.bagua-aura-strong { opacity: .75; }

@keyframes aura-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

