/* 顶部统一控制栏 */
#top-control-bar {
    position: fixed;
    top: env(safe-area-inset-top, 10px);
    left: 0;
    right: 0;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: linear-gradient(135deg, rgba(15, 15, 15, 0.85), rgba(30, 30, 40, 0.75));
    backdrop-filter: blur(30px);
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 215, 0, 0.1);
    z-index: 1000;
}

.control-bar-left,
.control-bar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 模式选择器 */
#mode-dock {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
	width: 100%;
    max-width: 400px;
    margin: 0 20px;
}

#mode-selector {
    position: relative;
    display: inline-block;
    background: transparent;
    backdrop-filter: none;
    border-radius: var(--radius-xl);
    padding: 0;
    border: none;
    box-shadow: none;
}

/* 主模式下拉按钮 */
.mode-dropdown-btn {
    padding: 14px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 215, 0, 0.2);
    background: rgba(15, 15, 15, 0.6);
    color: var(--gold);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) ease;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    min-width: 180px;
    justify-content: space-between;
}

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

.mode-dropdown-btn:hover {
    background: rgba(255, 215, 0, 0.15);
    color: var(--gold);
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
    transform: translateY(-2px);
}

.mode-dropdown-btn:hover::before {
    left: 100%;
}

.mode-dropdown-btn.active {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #000;
    border-color: var(--gold);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.mode-dropdown-btn i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.mode-dropdown-btn:hover i {
    transform: scale(1.1) rotate(5deg);
}

.mode-dropdown-btn.active i {
    transform: scale(1.1);
}

.mode-dropdown-btn .fa-chevron-down {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.mode-dropdown-btn:hover .fa-chevron-down {
    transform: scale(1.1) rotate(180deg);
}

/* 模式下拉菜单 */
.mode-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: linear-gradient(135deg, rgba(15, 15, 15, 0.95), rgba(30, 30, 40, 0.85));
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: var(--radius-lg);
    padding: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 215, 0, 0.1);
    display: none;
    flex-direction: column;
    gap: 8px;
    min-width: 100%;
    z-index: 999;
    transition: all 0.3s ease;
}

.mode-dropdown-menu.show {
    display: flex;
    animation: dropdownFadeIn 0.3s ease forwards;
}

@keyframes dropdownFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 模式下拉菜单项 */
.mode-dropdown-item {
    padding: 12px 20px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 215, 0, 0.2);
    background: rgba(15, 15, 15, 0.6);
    color: #888;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    text-align: left;
}

.mode-dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    transition: left 0.6s ease;
}

.mode-dropdown-item:hover {
    background: rgba(255, 215, 0, 0.15);
    color: var(--gold);
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
    transform: translateX(5px);
}

.mode-dropdown-item:hover::before {
    left: 100%;
}

.mode-dropdown-item.active {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #000;
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.mode-dropdown-item i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.mode-dropdown-item:hover i {
    transform: scale(1.1) rotate(5deg);
}

.mode-dropdown-item.active i {
    transform: scale(1.1);
}

/* 右侧摆件触发按钮 */
#master-bj-trigger {
    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: 22px;
    position: relative;
    overflow: hidden;
    z-index: 1001;
}

#master-bj-trigger::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;
}

#master-bj-trigger: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);
}

#master-bj-trigger:hover::before {
    left: 100%;
}

#master-bj-trigger i {
    font-size: 20px;
    transition: transform 0.3s ease;
}

#master-bj-trigger:hover i {
    transform: scale(1.1) rotate(5deg);
}

/* 摆件下拉菜单 */
.bj-list-container {
    position: absolute;
    top: 85%;
    right: 10px;
    margin-top: 10px;
    background: linear-gradient(135deg, rgba(15, 15, 15, 0.95), rgba(30, 30, 40, 0.85));
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: var(--radius-lg);
    padding: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 215, 0, 0.1);
    display: none;
    flex-direction: column;
    gap: 10px;
    min-width: 75px;
    z-index: 999;
    transition: all 0.3s ease;
}

.bj-list-container.bj-expanded {
    display: flex;
    animation: dropdownFadeIn 0.3s ease forwards;
}

@keyframes dropdownFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ornament-icon-btn {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 215, 0, 0.2);
    background: rgba(15, 15, 15, 0.6);
    color: #888;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.ornament-icon-btn:hover {
    background: rgba(255, 215, 0, 0.15);
    color: var(--gold);
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
    transform: translateX(5px);
}

.ornament-icon-btn i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.ornament-icon-btn:hover i {
    transform: scale(1.1) rotate(5deg);
}

.ornament-icon-btn.remove-btn {
    border-color: rgba(255, 68, 68, 0.3);
    color: rgba(255, 68, 68, 0.8);
}

.ornament-icon-btn.remove-btn:hover {
    background: rgba(255, 68, 68, 0.15);
    border-color: rgba(255, 68, 68, 0.5);
    color: #ff4444;
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.2);
}

/* 摆件浮动交互按钮 */
.ornament-float-controls {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 5200;
    display: none;
    pointer-events: auto;
}

.ornament-float-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg, rgba(10, 12, 24, 0.8), rgba(15, 15, 30, 0.7));
    color: var(--gold);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), 0 0 15px rgba(255, 215, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) ease;
    position: relative;
    overflow: hidden;
}

.ornament-float-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;
}

.ornament-float-btn:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(15, 15, 30, 0.8));
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 215, 0, 0.25);
    transform: translateY(-3px);
}

.ornament-float-btn:hover::before {
    left: 100%;
}

.ornament-float-btn i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.ornament-float-btn:hover i {
    transform: scale(1.2) rotate(10deg);
}

.ornament-float-btn.active {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #000;
    border-color: var(--gold);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.3), 0 0 25px rgba(255, 215, 0, 0.4);
    transform: translateY(-2px);
}

.ornament-float-btn.active i {
    transform: scale(1.1);
}

.mode-btn.mode-attention {
    animation: modeBreath 1.8s ease-in-out infinite;
}

.mode-btn.mode-attention:hover {
    background: rgba(255, 215, 0, 0.14);
}

.mode-btn.active.mode-attention {
    animation: none;
}

@keyframes modeBreath {
    0% {
        box-shadow: 0 0 0 rgba(255, 215, 0, 0.0);
        background: rgba(255, 215, 0, 0.06);
    }
    50% {
        box-shadow: 0 0 14px rgba(255, 215, 0, 0.45);
        background: rgba(255, 215, 0, 0.16);
    }
    100% {
        box-shadow: 0 0 0 rgba(255, 215, 0, 0.0);
        background: rgba(255, 215, 0, 0.06);
    }
}

#perception-hud {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    max-width: 90%;
    background: rgba(10, 12, 24, 0.72);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 14px;
    padding: 15px;
    color: #f4f1e8;
    display: none;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
    z-index: 1200;
    backdrop-filter: blur(10px);
    width: 62%;
}

/* 信息行容器 */
.hud-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.hud-row:last-child {
    margin-bottom: 0;
}

/* 信息项 */
.hud-item {
    margin: 0 5px;
    min-width: 0;
}

.hud-item:first-child {
    margin-left: 0;
}

.hud-item:last-child {
    margin-right: 0;
}

/* 建议项特殊样式 */
.hud-advice-item {
    flex: 1.5;
}

/* 摆件项特殊样式 */
.hud-ornament-item {
    flex: 3;
}

/* 标签样式 */
.hud-label {
    font-size: 10px;
    color: rgba(244, 241, 232, 0.6);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 值样式 */
.hud-value {
    font-size: 12px;
    line-height: 1.4;
    word-break: break-word;
}

/* 状态样式 */
#perception-hud .hud-primary .hud-value {
    color: var(--gold);
    font-weight: 600;
}

#perception-hud .hud-muted .hud-value {
    color: rgba(244, 241, 232, 0.75);
}

#perception-hud.hud-idle { opacity: 0.45; }

#perception-hud.hud-collapsed .hud-line:not(:first-of-type) {
    display: none;
}

#perception-hud.hud-empty .hud-muted {
    position: relative;
    overflow: hidden;
    margin: 0 15px;
}

#perception-hud.hud-empty .hud-muted::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.35), transparent);
    transform: translateX(-100%);
    animation: hud-shimmer 1.6s ease-in-out infinite;
}

#hud-toggle {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(255, 215, 0, 0.35);
    background: rgba(10, 12, 24, 0.6);
    color: var(--gold);
    display: grid;
    place-items: center;
    cursor: pointer;
    padding: 0;
}

#hud-toggle i { font-size: 11px; }

@keyframes hud-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 摆件信息样式 */
#perception-hud .ornament-line {
    white-space: normal;
    overflow: visible;
    position: relative;
}


.modal-explain {
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
    text-align: left;
    font-size: 14px;
    line-height: 1.6;
}

.modal-explain i { color: var(--gold); margin-top: 2px; }
.modal-explain p { margin-bottom: 8px; display: flex; align-items: flex-start; gap: 8px; }

.button-group { display: flex; gap: var(--space-md); justify-content: center; margin-bottom: var(--space-xl); }


/* 命卦弹窗主体容器 */
#minggua-content {
    background: #1a1a1a; /* 深灰/黑色背景 */
    border: 2px solid #FFD700; /* 金色边框 */
    border-radius: 20px; /* 圆角 */
    padding: 30px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2); /* 金色发光阴影 */
    color: white;
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
}

/* 动画效果 */
@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* 弹窗内的标题 */
#minggua-content h3 {
    color: #FFD700;
    margin-bottom: 20px;
    font-size: 1.4rem;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 10px;
}

/* 说明文字样式 */
#minggua-explain {
    text-align: left;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #ccc;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
}

/* 命卦选择弹窗 */
#minggua-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: var(--space-md);
}

/* 命卦重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

.minggua-btn {
    flex: 1; max-width: 200px; padding: var(--space-md);
    background: transparent; border: 1px solid var(--gold); color: var(--gold);
    border-radius: var(--radius-md); cursor: pointer; transition: all 0.3s ease;
    font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.minggua-btn:hover { background: rgba(255, 215, 0, 0.1); transform: translateY(-2px); }

#confirm-minggua {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #000; border: none; padding: 12px 40px;
    border-radius: var(--radius-md); font-size: 16px; font-weight: bold;
    cursor: pointer; transition: all 0.3s ease; display: flex;
    align-items: center; justify-content: center; gap: 8px; margin: 0 auto;
}
#confirm-minggua:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(255, 215, 0, 0.4); }

/* 滑动面板通用样式 (Info Panel, AI Box, Report) */
.slide-panel {
    position: fixed;
    background: linear-gradient(135deg, rgba(15, 15, 15, 0.85), rgba(30, 30, 40, 0.75));
    backdrop-filter: blur(40px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(255, 215, 0, 0.1);
    z-index: 6000;
    display: none;
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    overflow: hidden;
    transform-origin: center bottom;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    border-left: 1px solid rgba(255, 215, 0, 0.15);
    border-right: 1px solid rgba(255, 215, 0, 0.15);
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

@keyframes slideUp {
    0% { transform: translateY(100%); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.panel-header {
    padding: var(--space-lg); border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255, 215, 0, 0.05);
}
.panel-header h3 { color: var(--gold); font-size: 18px; display: flex; align-items: center; gap: 8px; }
.panel-content { padding: var(--space-lg); overflow-y: auto; will-change: transform; }
.panel-footer { padding: var(--space-lg); border-top: 1px solid var(--border); text-align: center; background: rgba(255, 215, 0, 0.05); }

.close-btn {
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255, 215, 0, 0.1); color: var(--gold);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.3s ease; font-size: 20px; font-weight: bold;
}
.close-btn:hover { background: rgba(255, 215, 0, 0.2); transform: rotate(90deg); }

/* 特定面板定位 */
#info-panel { bottom: 115px; left: 5%; width: 90%; }
#info-panel section { margin-bottom: var(--space-lg); padding-bottom: var(--space-lg); border-bottom: 1px solid rgba(255, 215, 0, 0.1); }
#info-panel section:last-child { border-bottom: none; margin-bottom: 0; }
#info-panel h4 { color: var(--gold); margin-bottom: 8px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
#info-panel p { color: #ccc; font-size: 14px; line-height: 1.6; margin-left: 28px; }
#info-panel ul { margin-left: 28px; }
#info-panel li { color: #ccc; font-size: 14px; line-height: 1.6; margin-bottom: 5px; }
#info-panel strong { color: #ffffff; }

#ai-box {/* top: 50%; */left: 5%;width: 90%;border-left: 4px solid var(--gold);max-width: 600px;max-height: 80vh;}
#ai-content { line-height: 1.8; color: #fff; font-size: 14px; white-space: pre-wrap; max-height: 400px; overflow-y: auto; padding-right: 10px; }

/* 风水报告弹窗 */
/* 专用报告窗样式，确保不被隐藏逻辑波及 */
#fengshui-report {
    display: none;
    /* 默认隐藏 */
    position: fixed ;
    width: 90vw !important;
    height: 100vh ;
    background: rgba(0, 0, 0, 0.95) ;
    z-index: 999999 ;
    /* 必须是全页面最高 */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#fengshui-report.show { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); display: flex !important; }
#fengshui-report.hide { opacity: 0; visibility: hidden; transform: translate(-50%, -50%) scale(0.9); }
#fengshui-report .panel-content { flex: 1; max-height: calc(80vh - 140px); overflow-y: auto; }


#save-report-btn {
    width: 100%; padding: 14px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border: none; border-radius: var(--radius-md); color: #222;
    font-weight: bold; font-size: 16px; cursor: pointer;
    transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; gap: 8px;
}
#save-report-btn:hover { transform: scale(1.02); box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3); }

/* 通知和 Toast */
.notification {
    position: fixed; bottom: 50%; left: 50%; transform: translate(-50%, 50%);
    background: rgb(10 10 20 / 78%);
    border-radius: var(--radius-lg); padding: var(--space-lg); color: #fff;
    text-align: center; z-index: 7000; display: none;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
    animation: noticePopup 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    max-width: 350px; width: 85%;
}

@keyframes noticePopup {
    0% { transform: translate(-50%, 50%) scale(0.8); opacity: 0; }
    100% { transform: translate(-50%, 50%) scale(1); opacity: 1; }
}

.notification.success::before { content: "✓"; display: block; font-size: 40px; color: var(--success); margin-bottom: 12px; }
.notification.error::before { content: "✕"; display: block; font-size: 40px; color: var(--error); margin-bottom: 12px; }
.notification.warning::before { content: "⚠"; display: block; font-size: 40px; color: var(--warning); margin-bottom: 12px; }

.toast {
    position: fixed; bottom: 30%; left: 50%; transform: translateX(-50%);
    background: var(--glass-dark); border: 1px solid var(--border-light);
    border-radius: var(--radius-md); padding: 12px 20px; color: var(--gold);
    font-size: 14px; z-index: 6500; display: none;
    animation: toastSlide 0.3s ease forwards; max-width: 320px; width: 80%;
    text-align: center; box-shadow: 0 0 20px rgba(255, 215, 0, 0.15);
}

@keyframes toastSlide {
    0% { transform: translateX(-50%) translateY(20px); opacity: 0; }
    100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* --- 报告与通知系统样式抽离 --- */

/* --- 报告与通知系统样式抽离 --- */

/* AI分析提示弹窗 */
#ai-analysis-notice {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 30px;
    border-radius: 15px;
    z-index: 999999;
    text-align: center;
    border: 2px solid var(--gold);
    backdrop-filter: blur(10px);
    min-width: 300px;
    max-width: 90%;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.ai-notice-icon {
    font-size: 40px;
    color: var(--gold);
    margin-bottom: 15px;
}

.ai-notice-title {
    margin: 0 0 15px 0;
    color: var(--gold);
}

.ai-notice-text {
    margin: 0 0 20px 0;
    line-height: 1.5;
    font-size: 14px;
}

.ai-notice-btn-primary {
    background: linear-gradient(135deg, var(--gold), #FFA500);
    color: black;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
    margin-bottom: 10px;
}

.ai-notice-btn-secondary {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 8px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.ai-notice-btn-primary:hover, .ai-notice-btn-secondary:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

/* 报告弹窗容器 - 移除 display: flex !important 以允许 JS 控制显隐 */
.report-modal-beautified {
    position: fixed ;
    top: 50% ;
    left: 50% ;
    transform: translate(-50%, -50%) ;
    background: rgba(0, 0, 0, 0.95) ;
    color: white ;
    border: 2px solid var(--gold) ;
    border-radius: 15px ;
    z-index: 999999 ;
    backdrop-filter: blur(10px) ;
    width: 90% ;
    max-width: 600px ;
    max-height: 80vh ;
    overflow: hidden ;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3) ;
    /* 默认不设 display，由 JS 切换 flex 和 none */
    flex-direction: column ;
}

.report-panel-header {
    padding: 20px 20px 15px 20px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    background: rgba(255, 215, 0, 0.05);
    border-radius: 15px 15px 0 0;
}

.report-panel-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 215, 0, 0.3);
    background: rgba(255, 215, 0, 0.05);
    border-radius: 0 0 15px 15px;
}

.report-panel-content-scroll {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    max-height: calc(80vh - 140px);
    scrollbar-width: thin;
    scrollbar-color: var(--gold) rgba(255, 215, 0, 0.1);
}

.report-panel-content-scroll::-webkit-scrollbar { width: 6px; }
.report-panel-content-scroll::-webkit-scrollbar-track { background: rgba(255, 215, 0, 0.1); border-radius: 10px; margin: 10px 0; }
.report-panel-content-scroll::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 10px; }
.report-panel-content-scroll::-webkit-scrollbar-thumb:hover { background: #FFA500; }

.report-container-hd { padding: 0; background: transparent; color: white; width: 100%; box-sizing: border-box; word-wrap: break-word; }
.report-header-section { text-align: center; margin-bottom: 20px; }
.report-main-title { color: var(--gold); font-size: 22px; font-weight: bold; margin-bottom: 8px; }
.report-timestamp { color: #aaa; font-size: 13px; opacity: 0.8; }
.report-summary-box { background: rgba(255,215,0,0.05); border-left: 3px solid var(--gold); padding: 12px; margin-bottom: 15px; border-radius: 0 8px 8px 0; }
.report-section-title { color: var(--gold); font-weight: bold; margin-bottom: 8px; font-size: 15px; }
.report-text-muted { color: #ccc; font-size: 13px; line-height: 1.5; }
.report-section-container { margin-bottom: 20px; }
.report-h3-title { color: var(--gold); border-bottom: 1px solid rgba(255,215,0,0.2); padding-bottom: 6px; margin-bottom: 12px; font-size: 16px; }
.report-data-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.report-grid-item { background: rgba(255,255,255,0.03); padding: 10px; border-radius: 6px; border: 1px solid rgba(255,215,0,0.1); }
.report-label { color: #aaa; font-size: 11px; margin-bottom: 3px; }
.report-value { color: white; font-size: 13px; }
.report-status-card { padding: 12px; border-radius: 6px; border-width: 1px; border-style: solid; }
.report-status-card.good { background: rgba(0,255,0,0.08); border-left: 3px solid #0f0; border-color: rgba(0,255,0,0.2); }
.report-status-card.bad { background: rgba(255,68,68,0.08); border-left: 3px solid #f44; border-color: rgba(255,68,68,0.2); }
.report-status-text.good { color: #0f0; font-size: 15px; font-weight: bold; margin-bottom: 6px; }
.report-status-text.bad { color: #f44; font-size: 15px; font-weight: bold; margin-bottom: 6px; }
.report-object-box { background: rgba(255,255,255,0.03); padding: 12px; border-radius: 6px; border: 1px solid rgba(255,215,0,0.1); }
.report-object-name-tag { color: var(--gold); font-size: 16px; padding: 8px; background: rgba(255,215,0,0.08); border-radius: 5px; text-align: center; border: 1px solid rgba(255,215,0,0.2); margin-bottom: 8px; }
.report-ai-content { background: rgba(255,215,0,0.05); padding: 15px; border-radius: 6px; border: 1px solid rgba(255,215,0,0.15); color: #ccc; font-size: 13px; line-height: 1.6; white-space: pre-wrap; }
.report-suggestion-box { background: rgba(255,215,0,0.05); padding: 12px; border-radius: 6px; margin-top: 20px; border: 1px solid rgba(255,215,0,0.15); }
.report-footer-info { text-align: center; margin-top: 20px; padding-top: 15px; border-top: 1px solid rgba(255,215,0,0.15); color: #aaa; font-size: 11px; opacity: 0.7; }
.report-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 10px; }
.report-table td { padding: 6px; border-bottom: 1px solid rgba(255,215,0,0.1); }
.report-table tr.alt { background: rgba(255,255,255,0.03); }
.report-table td.label { color: #aaa; width: 70px; }
.report-table td.value { color: white; }

/* 命卦计算表单样式 */
.minggua-calculator {
    margin: 15px 0;
    padding: 15px;
    background: rgba(255,215,0,0.05);
    border: 1px dashed rgba(255,215,0,0.3);
    border-radius: 10px;
}

.minggua-calculator strong {
    color: #FFD700;
}

.calculator-form {
    margin-top: 10px;
    display: flex;
    gap: 5px;
    justify-content: center;
}

.calculator-form input[type="number"] {
    width: 100px;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #444;
    background: #000;
    color: #fff;
}

.calculator-form select {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #444;
    background: #000;
    color: #fff;
}

#calculate-minggua-btn {
    margin-top: 10px;
    padding: 8px 20px;
    background: #FFD700;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
}

#calculation-result {
    margin-top: 10px;
    color: #FFD700;
    font-weight: bold;
    display: none;
}

.calculation-result-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-top: 1px solid rgba(255,215,0,0.2);
}

.apply-minggua-btn {
    margin-top: 5px;
    width: 100%;
    padding: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
}

/* 命卦按钮容器 */
.minggua-buttons {
    margin: 20px 0;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 0 20px;
}

/* 命卦按钮 */
.minggua-btn {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid #555;
    background: none;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.minggua-btn:hover {
    border-color: #FFD700;
    color: #FFD700;
}

.minggua-btn.active {
    background: rgba(255,215,0,0.3);
    border-color: gold;
    color: #FFD700;
}