
/* 底部仪表盘容器 */
#bottom-dashboard {
    position: fixed; bottom: 0; left: 0; width: 100%; z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 10px);
    display: flex; flex-direction: column; align-items: center;
}

/* 罗盘区域 */
#compass-area {
    --compass-size: clamp(240px, 70vw, 320px);
    --compass-image-offset-y: 0px;
    --needle-core-offset: calc(var(--compass-size) * 0.1392);
    width: 100%;
    height: var(--compass-size);
    display: flex;
    align-items: center;
    justify-content: center;
    /*overflow: hidden;*/
    position: relative;
	top: 100px
}

.compass-stack {
    position: relative;
    width: var(--compass-size);
    height: var(--compass-size);
}

.compass-center-group {
    position: absolute;
    inset: 0;
    width: var(--compass-size);
    height: var(--compass-size);
    pointer-events: none;
}

#compass-plate-2d {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--compass-size);
    height: var(--compass-size);
    background-position: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    transform: translate(-50%, -50%) translateY(var(--compass-image-offset-y)) rotate(var(--compass-rotation, 0deg));
    transition: transform 0.1s linear;
}
#fixed-needle {
    position: absolute;
    left: 50%;
    top: calc(50% - var(--needle-core-offset));
    transform: translateX(-50%);
    width: 14px;
    height: 80px; /* 40px + 40px */
    z-index: 0;
    pointer-events: none;
}

/* 上指针（红色） */
#fixed-needle::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 40px solid #ff3b30;
    filter: drop-shadow(0 0 6px rgba(255, 59, 48, 0.6));
    z-index: 1;
}

/* 下指针（蓝色） */
#fixed-needle::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 40px; /* 上指针底部 */
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 40px solid rgba(64, 156, 255, 0.9);
    filter: drop-shadow(0 0 6px rgba(64, 156, 255, 0.5));
    z-index: 1;
}

/* 中心圆点 - 完美居中 */
#fixed-needle .needle-core {
    position: absolute;
    left: 50%;
    top: 40px; /* 放在两个指针的连接线上 */
    transform: translate(-50%, -50%); /* 向上偏移自身高度的一半，实现完美居中 */
    width: 16px; /* 稍微大一点覆盖连接点 */
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff8d6, #d2a84a 60%, #7b5a1a 100%);
    border: 1px solid rgba(255, 215, 0, 0.6);
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.6);
    z-index: 2;
}

/* 摇晃动画 */
#fixed-needle.wobble {
    animation: needleWobble 0.6s ease;
}

@keyframes needleWobble {
    0% { transform: translateX(-50%) rotate(0deg); }
    30% { transform: translateX(-50%) rotate(-2deg); }
    60% { transform: translateX(-50%) rotate(2deg); }
    100% { transform: translateX(-50%) rotate(0deg); }
}

#compass-center-calibrate {
    position: absolute;
    left: 50%;
    top: calc(50% - var(--needle-core-offset) + 40px); /* 修正：与needle-core对齐 */
    transform: translate(-50%, -50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 215, 0, 0.5);
    background: radial-gradient(circle, rgba(255, 215, 0, 0.25), rgba(0, 0, 0, 0));
    z-index: 102;
    cursor: pointer;
    pointer-events: auto;
}

#compass-center-calibrate::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 215, 0, 0.8);
    transform: translate(-50%, -50%);
}

#compass-calibrate-tip {
    position: absolute;
    left: 50%;
    top: 62px;
    transform: translateX(-50%);
    padding: 6px 10px;
    border-radius: 999px;
    z-index: 102;
    color: var(--gold);
    font-size: 12px;
    border: 1px solid rgba(255, 215, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 103;
}

#compass-calibrate-tip.show {
    opacity: 1;
}

#compass-center-calibrate.is-holding {
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.7);
}

#compass-center-calibrate.pulse::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid rgba(255, 215, 0, 0.5);
    transform: translate(-50%, -50%);
    animation: compassPulse 1.6s ease-out infinite;
}

@keyframes compassPulse {
    0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0.9; }
    100% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; }
}

#compass-center-calibrate.flash {
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.9), 0 0 30px rgba(255, 215, 0, 0.6);
    transition: box-shadow 0.2s ease;
}

/* 主控制面板 */
#main-panel {
    background: var(--glass); backdrop-filter: blur(25px);
    width: 92%; margin-bottom: 8px; border-radius: var(--radius-xl);
    border: 1px solid var(--border); padding: 16px;
    display: flex; align-items: center; justify-content: space-between;
    pointer-events: auto; box-shadow: var(--shadow-lg);
    min-height: 90px; position: relative;
}

#center-content { flex: 1; text-align: center; padding: 0 20px; }
#direction { color: var(--gold); font-size: 18px; font-weight: bold; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 10px; }
#analysis { font-size: 14px; color: var(--success); margin-bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 8px; }
#bagua-tag { font-size: 12px; color: var(--gold); opacity: 0.9; margin-bottom: 12px; display: flex; align-items: center; justify-content: center; gap: 6px; }

/* 大师解析按钮 */
#ask-ai-btn {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #000; border: none; padding: 12px 24px; border-radius: var(--radius-md);
    font-size: 14px; font-weight: bold; cursor: pointer; transition: all 0.3s ease;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin: auto; min-width: 160px; box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}
#ask-ai-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5); }
#ask-ai-btn:active { transform: translateY(0); box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3); }

/* 侧边功能键 */
.dash-btn {
    width: 52px; height: 52px; background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md); display: flex; justify-content: center;
    align-items: center; color: var(--gold); font-size: 22px;
    border: 1px solid var(--border); cursor: pointer; transition: all 0.3s ease; flex-shrink: 0;
	animation: glow 2s infinite alternate;
}
.dash-btn:hover { background: rgba(255, 255, 255, 0.2); transform: scale(1.05); box-shadow: 0 0 15px rgba(255, 215, 0, 0.3); }

#particle-toggle.active { box-shadow: 0 0 20px var(--gold); animation: glow 2s infinite alternate; }
@keyframes glow {
    from { box-shadow: 0 0 15px var(--gold); }
    to { box-shadow: 0 0 25px var(--gold), 0 0 35px var(--gold-light); }
}

/* 顶部控制栏报告按钮 */
#report-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: var(--gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 0 10px rgba(255, 215, 0, 0.1);
    font-size: 20px;
    position: relative;
    overflow: hidden;
    z-index: 1001;
}

#report-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.15), transparent);
    transition: left 0.6s ease;
}

#report-btn:hover {
    background: rgba(255, 215, 0, 0.25);
    border-color: rgba(255, 215, 0, 0.5);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 215, 0, 0.3);
}

#report-btn:hover::before {
    left: 100%;
}

#report-btn i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

#report-btn:hover i {
    transform: scale(1.1) rotate(5deg);
}

#report-btn span {
    display: none;
}
