/**
 * C3-b migrated from main-legacy.css — electricity-analysis metrics UI
 */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    padding-top: calc(4rem + 70px); /* 为固定导航栏留出空间 */
    width: 100%;
    overflow-x: hidden;
}

/* 仅在不使用等比例缩放时应用 100vw（等比例缩小时由 body.mobile-scaled 控制，不覆盖） */
@media (max-width: 768px) {
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: calc(3rem + 70px) 15px 2rem !important;
        overflow-x: hidden !important;
        margin: 0 auto !important;
        box-sizing: border-box;
    }
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--gray);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

.water-quality {
    background-color: white;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}



.param-control {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 10px;
}

.param-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.param-name {
    font-weight: 600;
    color: var(--dark);
}

.param-value {
    font-weight: 700;
    color: var(--primary);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.slider {
    flex: 1;
    height: 10px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #ff6b6b 0%, #4ecdc4 50%, #ff6b6b 100%);
    border-radius: 5px;
    outline: none;
    position: relative;
}

/* 三色滑块：哑光鼠尾草绿 / 暖琥珀 / 陶土红（对齐石墨主题） */
/* 电压 180–260：中间好 — 绿 198–242 */
.slider.temp {
    background: linear-gradient(to right,
        rgba(168, 104, 98, 0.55) 0%,
        rgba(168, 104, 98, 0.4) 12%,
        rgba(196, 154, 108, 0.4) 18%,
        rgba(122, 148, 122, 0.4) 22.5%,
        rgba(122, 148, 122, 0.58) 50%,
        rgba(122, 148, 122, 0.4) 77.5%,
        rgba(196, 154, 108, 0.4) 82%,
        rgba(168, 104, 98, 0.4) 88%,
        rgba(168, 104, 98, 0.55) 100%);
}

/* 频率 49–51：中间好 — 绿 49.8–50.2 */
.slider.ammonia {
    background: linear-gradient(to right,
        rgba(168, 104, 98, 0.55) 0%,
        rgba(168, 104, 98, 0.4) 18%,
        rgba(196, 154, 108, 0.4) 25%,
        rgba(122, 148, 122, 0.4) 40%,
        rgba(122, 148, 122, 0.58) 50%,
        rgba(122, 148, 122, 0.4) 60%,
        rgba(196, 154, 108, 0.4) 75%,
        rgba(168, 104, 98, 0.4) 82%,
        rgba(168, 104, 98, 0.55) 100%);
}

/* 功率因数 0.84–1.00：越高越好 — 绿 ≥0.90 */
.slider.salinity {
    background: linear-gradient(to right,
        rgba(168, 104, 98, 0.55) 0%,
        rgba(168, 104, 98, 0.4) 6%,
        rgba(196, 154, 108, 0.45) 20%,
        rgba(196, 154, 108, 0.38) 37%,
        rgba(122, 148, 122, 0.4) 40%,
        rgba(122, 148, 122, 0.6) 100%);
}

/* THD 0–8%：越低越好 — 绿 ≤5，黄 5–6.5，红 ≥6.5 */
.slider.alkalinity {
    background: linear-gradient(to right,
        rgba(122, 148, 122, 0.6) 0%,
        rgba(122, 148, 122, 0.45) 55%,
        rgba(196, 154, 108, 0.4) 62.5%,
        rgba(196, 154, 108, 0.45) 78%,
        rgba(168, 104, 98, 0.4) 81%,
        rgba(168, 104, 98, 0.6) 100%);
}

/* 三相不平衡 0–3%：越低越好 — 绿 ≤2，黄 2–2.5，红 ≥2.5 */
.slider.oxygen {
    background: linear-gradient(to right,
        rgba(122, 148, 122, 0.6) 0%,
        rgba(122, 148, 122, 0.45) 58%,
        rgba(196, 154, 108, 0.4) 66.7%,
        rgba(196, 154, 108, 0.45) 80%,
        rgba(168, 104, 98, 0.4) 83%,
        rgba(168, 104, 98, 0.6) 100%);
}

/* 温度 25–75°C：越低越好 — 绿 ≤55，黄 55–70，红 >70 */
.slider.ph {
    background: linear-gradient(to right,
        rgba(122, 148, 122, 0.6) 0%,
        rgba(122, 148, 122, 0.45) 52%,
        rgba(196, 154, 108, 0.4) 60%,
        rgba(196, 154, 108, 0.45) 85%,
        rgba(168, 104, 98, 0.4) 90%,
        rgba(168, 104, 98, 0.6) 100%);
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: block;
    font-size: 20px;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    overflow: visible;
}

.slider::-moz-range-thumb {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    position: relative;
    overflow: visible;
}

.slider.temp::-webkit-slider-thumb::before {
    content: "🐟";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    z-index: 10;
    display: block !important;
    line-height: 1;
    pointer-events: none;
    width: 100%;
    height: 100%;
    text-align: center;
    overflow: visible;
}

.slider.ammonia::-webkit-slider-thumb::before {
    content: "🦐";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    z-index: 10;
    display: block !important;
    line-height: 1;
    pointer-events: none;
    width: 100%;
    height: 100%;
    text-align: center;
    overflow: visible;
}

.slider.salinity::-webkit-slider-thumb::before {
    content: "🦀";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    z-index: 10;
    display: block !important;
    line-height: 1;
    pointer-events: none;
    width: 100%;
    height: 100%;
    text-align: center;
    overflow: visible;
}

.slider.alkalinity::-webkit-slider-thumb::before {
    content: "🐚";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    z-index: 10;
    display: block !important;
    line-height: 1;
    pointer-events: none;
    width: 100%;
    height: 100%;
    text-align: center;
    overflow: visible;
}

.slider.oxygen::-webkit-slider-thumb::before {
    content: "🐠";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    z-index: 10;
    display: block !important;
    line-height: 1;
    pointer-events: none;
    width: 100%;
    height: 100%;
    text-align: center;
    overflow: visible;
}

.slider.ph::-webkit-slider-thumb::before {
    content: "🦑";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    z-index: 10;
    display: block !important;
    line-height: 1;
    pointer-events: none;
    width: 100%;
    height: 100%;
    text-align: center;
    overflow: visible;
}

.slider.temp::-moz-range-thumb::before {
    content: "🐟";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    z-index: 10;
    display: block !important;
    line-height: 1;
    pointer-events: none;
    width: 100%;
    height: 100%;
    text-align: center;
    overflow: visible;
}

.slider.ammonia::-moz-range-thumb::before {
    content: "🦐";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    z-index: 10;
    display: block !important;
    line-height: 1;
    pointer-events: none;
    width: 100%;
    height: 100%;
    text-align: center;
    overflow: visible;
}

.slider.salinity::-moz-range-thumb::before {
    content: "🦀";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    z-index: 10;
    display: block !important;
    line-height: 1;
    pointer-events: none;
    width: 100%;
    height: 100%;
    text-align: center;
    overflow: visible;
}

.slider.alkalinity::-moz-range-thumb::before {
    content: "🐚";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    z-index: 10;
    display: block !important;
    line-height: 1;
    pointer-events: none;
    width: 100%;
    height: 100%;
    text-align: center;
    overflow: visible;
}

.slider.oxygen::-moz-range-thumb::before {
    content: "🐠";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    z-index: 10;
    display: block !important;
    line-height: 1;
    pointer-events: none;
    width: 100%;
    height: 100%;
    text-align: center;
    overflow: visible;
}

.slider.ph::-moz-range-thumb::before {
    content: "🦑";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    z-index: 10;
    display: block !important;
    line-height: 1;
    pointer-events: none;
    width: 100%;
    height: 100%;
    text-align: center;
    overflow: visible;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #d1d5db;
    margin-top: 0.5rem;
}

.range-labels span:last-child {
    color: #f3f4f6;
    font-weight: 600;
}

.analysis-result {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #e8f0fe;
    border-radius: 10px;
    display: none;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.result-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark);
}

.result-status {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    background-color: var(--secondary);
    color: #333;
}

.result-status.warning {
    background-color: var(--accent);
    color: var(--dark);
}

.result-status.danger {
    background-color: #ea4335;
    color: #333;
}

.result-content {
    line-height: 1.8;
}

/* 抖音推荐区域样式 */
.douyin-recommendation {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.douyin-recommendation h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.douyin-recommendation h3 i {
    color: #ff0050;
    font-size: 1.3rem;
}

.douyin-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.douyin-text {
    flex: 1;
    color: #333;
}

.douyin-text p {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.douyin-id {
    color: #ff0050;
    font-weight: bold;
    font-size: 1.1rem;
}

.douyin-qr {
    text-align: center;
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.qr-code {
    width: 250px;
    height: 250px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.qr-code:hover {
    transform: scale(1.05);
}

/* 移动端抖音推荐区域保持原布局，等比例缩小 */

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.chart-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-height: 350px;  /* 改为 min-height，允许内容扩展 */
    display: flex;
    flex-direction: column;  /* 垂直布局 */
}

.chart-container h4 {
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
}

.chart-container h4 i {
    margin-right: 0.5rem;
    color: #007bff;
}

.chart-container canvas {
    max-height: 250px;  /* 稍微减小图表高度，为说明留出空间 */
    flex-shrink: 0;  /* 防止图表被压缩 */
}

/* 图表说明样式 */
.chart-explanation {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;  /* 防止说明被压缩 */
    min-height: fit-content;  /* 确保说明完整显示 */
}

.chart-explanation p {
    color: #333;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.level-ranges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.level-item {
    color: #ffffff;
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    white-space: nowrap;
}

/* 移动端图表说明保持原布局，等比例缩小 */

/* 电话号码彩色动画效果 */
.phone-animated {
    display: inline-block;
    animation: phoneColorPulse 4s ease-in-out infinite;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes phoneColorPulse {
    0% {
        color: #ff6b6b;
        transform: scale(1);
    }
    12.5% {
        color: #4ecdc4;
        transform: scale(1.05);
    }
    25% {
        color: #45b7d1;
        transform: scale(1.1);
    }
    37.5% {
        color: #96ceb4;
        transform: scale(1.05);
    }
    50% {
        color: #feca57;
        transform: scale(1);
    }
    62.5% {
        color: #ff9ff3;
        transform: scale(1.05);
    }
    75% {
        color: #54a0ff;
        transform: scale(1.1);
    }
    87.5% {
        color: #5f27cd;
        transform: scale(1.05);
    }
    100% {
        color: #ff6b6b;
        transform: scale(1);
    }
}

/* 移动端响应式 - 保持原布局等比例缩小 */
/* 移动端图表样式已合并到主移动端媒体查询中 */

.controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

footer {
    background-color: var(--dark);
    color: #fff;
    padding: 4rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    text-align: left;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--accent);
}

.contact-info {
    list-style: none;
}

.contact-info li {
    margin-bottom: 1.2rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.contact-info li i {
    margin-top: 2px;
    flex-shrink: 0;
}

/* 页脚长文本在手机端换行、不溢出 */
.footer-text {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* 卡片内段落间距调整 */
.footer-card p {
    margin-bottom: 0.8rem;
}

.footer-card p:last-child {
    margin-bottom: 0;
}


.copyright {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.copyright a {
    color: #888;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.copyright a:hover {
    color: var(--primary);
}

/* 页脚卡片通用样式 */
.footer-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1.5rem;
    height: auto; /* 自动高度，根据内容调整 */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-sizing: border-box;
}

.footer-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* 抖音二维码样式 - 简化版 */
.qrcode-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.qrcode-section h3 {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.5rem;
    text-align: center;
}

.qrcode-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    border-radius: 2px;
}

.qrcode-main {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0 1rem;
}

.qrcode-image-main {
    width: 180px; /* 从原来的150px稍微放大到180px */
    height: 180px; /* 从原来的150px稍微放大到180px */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    object-fit: cover;
}

.qrcode-image-main:hover {
    transform: scale(1.08);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}


/* AI 分析报告美化样式 */
.analysis-report {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 1rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.params-section, .ai-analysis-section {
    margin-bottom: 2rem;
}

.params-section:last-child, .ai-analysis-section:last-child {
    margin-bottom: 0;
}

.params-section h3, .ai-analysis-section h3 {
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
}

.params-section h3 i, .ai-analysis-section h3 i {
    color: var(--accent);
    font-size: 1.2rem;
}

/* 流式显示样式 */
.streaming-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 2rem;
    margin: 1rem 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.streaming-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    white-space: pre-wrap;
    word-wrap: break-word;
    /* 移除滚动条，使用页面滚动 */
    overflow: hidden !important;
    max-height: none !important;
}

/* 流式显示动画效果 */
.streaming-content::after {
    content: '|';
    animation: blink 1s infinite;
    color: var(--primary);
    font-weight: bold;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.params-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.param-item {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.param-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.param-label {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.param-value {
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0.2rem 0.5rem;
    border-radius: 15px;
    transition: all 0.3s ease;
}

/* 参数值状态颜色 - 石墨哑光版 */
.param-value.low {
    background: rgba(168, 104, 98, 0.22);
    color: #e8c4bf;
    border: 1px solid rgba(168, 104, 98, 0.45);
}

.param-value.normal {
    background: rgba(122, 148, 122, 0.22);
    color: #c5d4c5;
    border: 1px solid rgba(122, 148, 122, 0.45);
}

.param-value.high {
    background: rgba(168, 104, 98, 0.22);
    color: #e8c4bf;
    border: 1px solid rgba(168, 104, 98, 0.45);
}

.param-value.warning {
    background: rgba(196, 154, 108, 0.22);
    color: #e8d4b8;
    border: 1px solid rgba(196, 154, 108, 0.45);
}

.ai-content {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    white-space: pre-line;
    line-height: 1.8;
    font-size: 1rem;
    color: var(--dark);
    border-left: 4px solid var(--accent);
}

.ai-content h1, .ai-content h2, .ai-content h3, .ai-content h4 {
    color: var(--primary);
    margin: 1.5rem 0 1rem 0;
    font-weight: 600;
}

.ai-content h1 {
    font-size: 1.3rem;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
}

.ai-content h2 {
    font-size: 1.2rem;
}

.ai-content h3 {
    font-size: 1.1rem;
}

.ai-content strong {
    color: var(--primary);
    font-weight: 600;
}

.ai-content ul, .ai-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.ai-content li {
    margin: 0.5rem 0;
}

.ai-content p {
    margin: 1rem 0;
}

/* 颜色图例样式 */
/* 养殖动物选择样式 */
.animal-selection {
    margin: 2rem 0;
    text-align: center;
}

.animal-selection h3 {
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.animal-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem 1rem;
    max-width: 960px;
    margin: 0 auto;
    justify-content: center;
}

/* 窄屏才 2×2；宽屏一排四个 */
@media (max-width: 900px) {
    .animal-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 520px;
    }
}

.animal-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.75rem;
    background: white;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.animal-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.animal-option.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    transform: translateY(-3px);
}

.animal-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.animal-option span {
    font-weight: 600;
    color: var(--dark);
    font-size: 1rem;
}

.color-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* 商标加载动画样式 */
.loading-container {
    display: none;
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    margin: 1rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

.logo-loading {
    max-width: 500px;
    margin: 0 auto;
}

.logo-spinner {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rotating-logo {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    object-fit: cover;
    animation: logoRotate 30s linear infinite;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border: 6px solid rgba(255, 255, 255, 0.9);
    display: block;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.rotating-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
}

.countdown-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    border: 4px solid white;
    /* 轨道动画 - 围绕商标转圈 */
    animation: orbit 10s linear infinite;
}

@keyframes logoRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 轨道动画 - 小球围绕商标转圈，转一圈10秒 */
@keyframes orbit {
    0% {
        transform: rotate(0deg) translateX(100px) rotate(0deg);
    }
    100% {
        transform: rotate(360deg) translateX(100px) rotate(-360deg);
    }
}

/* 确保轨道动画优先级 */
.countdown-badge {
    animation: orbit 10s linear infinite !important;
}

/* 当倒计时停止时，停止轨道动画 */
.countdown-badge.stopped {
    animation-play-state: paused;
}

/* 商标旋转动画 */
.rotating-logo {
    animation: logoRotate 30s linear infinite;
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.loading-text {
    font-size: 1.2rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.loading-subtitle {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.loading-tips {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
}

.loading-tips p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--dark);
}

/* 加载进度条 */
.loading-progress {
    width: 100%;
    height: 4px;
    background: rgba(0, 123, 255, 0.2);
    border-radius: 2px;
    margin: 1rem 0;
    overflow: hidden;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #28a745);
    border-radius: 2px;
    animation: loadingProgress 3s ease-in-out infinite;
}

@keyframes loadingProgress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.progress-steps {
    margin-top: 1.5rem;
    text-align: left;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.progress-step {
    display: flex;
    align-items: center;
    margin: 0.8rem 0;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.progress-step.active {
    opacity: 1;
}

.progress-step.completed {
    opacity: 0.7;
}

.step-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-right: 10px;
    flex-shrink: 0;
}

.progress-step.completed .step-icon {
    background: var(--secondary);
}

.step-text {
    font-size: 0.9rem;
    color: var(--dark);
}

/* 移动端媒体查询已合并到上面 */

/* Markdown解析后的样式 */
.analysis-content h1, .analysis-content h2, .analysis-content h3, .analysis-content h4 {
    margin: 1.5rem 0 1rem 0;
    font-weight: 600;
}

.analysis-content h1 { 
    font-size: 1.8rem; 
    color: #1a73e8; /* 蓝色 - 主标题 */
}
.analysis-content h2 { 
    font-size: 1.6rem; 
    color: #1a73e8; /* 蓝色 - 二级标题（如：4. 风险量化评估） */
}
.analysis-content h3 { 
    font-size: 1.4rem; 
    color: #ff6b35; /* 橙色 - 三级标题 */
}
.analysis-content h4 { 
    font-size: 1.2rem; 
    color: #8e44ad; /* 紫色 - 四级标题 */
}

.analysis-content strong {
    color: #e74c3c; /* 红色 - 强调文字 */
    font-weight: 600;
}

/* 特殊文本颜色 */
.analysis-content .special-text {
    color: #34a853 !important; /* 绿色 - 结论、日期、研究员 */
    font-weight: 600;
}

.analysis-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.analysis-table td {
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    text-align: left;
}

.analysis-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.analysis-table tr:first-child {
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.7), rgba(52, 168, 83, 0.7));
    color: white;
    font-weight: 600;
}

.analysis-content ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.analysis-content li {
    margin: 0.5rem 0;
    line-height: 1.6;
    position: relative;
}

.analysis-content li::before {
    content: "•";
    color: #ff6b35; /* 橙色项目符号 */
    font-weight: bold;
    position: absolute;
    left: -1.5rem;
}

.analysis-content li:nth-child(odd)::before {
    color: #8e44ad; /* 紫色项目符号 */
}

.analysis-content li:nth-child(3n)::before {
    color: #e74c3c; /* 红色项目符号 */
}

/* =============================================
   滑块图标修复样式 - 动态创建图标支持
   ============================================= */

.slider-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.slider-icon {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    z-index: 10;
    pointer-events: none;
    user-select: none;
    transition: left 0.1s ease;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    line-height: 1;
}

@keyframes iconBounce {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.slider::-webkit-slider-thumb {
    width: 40px;
    height: 40px;
}

.slider::-moz-range-thumb {
    width: 40px;
    height: 40px;
}

@media (max-width: 768px) {
    .slider-icon {
        font-size: 16px;
    }

    .slider::-webkit-slider-thumb {
        width: 35px;
        height: 35px;
    }

    .slider::-moz-range-thumb {
        width: 35px;
        height: 35px;
    }
}

/* 在第2122行注释后添加 */
@media (max-width: 768px) {
    .douyin-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .douyin-qr {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .qr-code {
        width: 200px;
        height: auto; /* 保持宽高比 */
        max-width: 100%;
        object-fit: contain; /* 确保完整显示 */
    }
    
    .douyin-text {
        text-align: center;
    }
    
    .douyin-recommendation {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    /* 确保分析内容在移动端正确显示 */
    .analysis-content {
        font-size: 0.9rem;
        line-height: 1.6;
        overflow-wrap: break-word;
    }
}

/* 在 .chart-container 样式后添加 - 中间柱状图说明下移 */
/* 或者使用更兼容的方式 - 通过增加canvas高度来让说明下移 */
.chart-container:has(#bar-chart) canvas {
    max-height: 320px;  /* 从300px增加到320px，让图表更大，说明自然下移 */
}

.chart-container:has(#bar-chart) .chart-explanation {
    margin-top: 2rem;  /* 从1.5rem增加到2rem，进一步下移说明 */
}

/* 如果浏览器不支持 :has()，可以使用这个替代方案 */
.chart-container canvas#bar-chart {
    max-height: 320px;
}

.chart-container:has(canvas#bar-chart) .chart-explanation,
.chart-container canvas#bar-chart + .chart-explanation {
    margin-top: 2rem;
}

/* ==========================================
   3D 拟物化发光按键系统 - 湖银科技官网定制
   ========================================== */

.btn-group-3d {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
  width: 100%;
}

.btn-wrapper {
  position: relative;
  display: inline-block;
  flex: 1 1 0;
  min-width: 0;
  max-width: 260px;
  width: auto;
}

@media (max-width: 768px) {
  .btn-group-3d {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.5rem;
  }
  .btn-group-3d .btn-wrapper {
    flex: 1 1 0;
    max-width: none;
    width: auto;
  }
  .btn-group-3d .btn {
    width: 100%;
    display: flex;
    justify-content: center;
    font-size: 0.85rem;
    padding: 0.55em 0.5em;
  }
  .btn-group-3d .btn-svg {
    height: 16px;
    width: 16px;
    margin-right: 0.35rem;
  }
}

.btn-group-3d .btn {
  width: 100%;
  --border-radius: 24px;
  --padding: 4px;
  --transition: 0.4s;
  --button-color: #101010;
  --highlight-color-hue: 210deg;

  all: unset;
  box-sizing: border-box;

  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6em 1.2em;
  font-family: "Inter", "Segoe UI", "PingFang SC", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;

  background-color: var(--button-color);
  border: solid 1px rgba(255, 255, 255, 0.12);
  border-radius: var(--border-radius);
  cursor: pointer;
  position: relative;

  box-shadow:
    inset 0px 1px 1px rgba(255, 255, 255, 0.2),
    inset 0px 2px 2px rgba(255, 255, 255, 0.15),
    inset 0px 4px 4px rgba(255, 255, 255, 0.1),
    inset 0px 8px 8px rgba(255, 255, 255, 0.05),
    inset 0px 16px 16px rgba(255, 255, 255, 0.05),
    0px -1px 1px rgba(0, 0, 0, 0.02),
    0px -2px 2px rgba(0, 0, 0, 0.03),
    0px -4px 4px rgba(0, 0, 0, 0.05),
    0px -8px 8px rgba(0, 0, 0, 0.06),
    0px -16px 16px rgba(0, 0, 0, 0.08);

  transition:
    box-shadow var(--transition),
    border var(--transition),
    background-color var(--transition);
}

.btn-group-3d .btn:disabled {
  cursor: not-allowed;
  opacity: 0.85;
}

.btn-group-3d .btn::before {
  content: "";
  position: absolute;
  top: calc(0px - var(--padding));
  left: calc(0px - var(--padding));
  width: calc(100% + var(--padding) * 2);
  height: calc(100% + var(--padding) * 2);
  border-radius: calc(var(--border-radius) + var(--padding));
  pointer-events: none;
  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.6));
  z-index: -1;
  transition: box-shadow var(--transition), filter var(--transition);
  box-shadow:
    0 -8px 8px -6px rgba(0, 0, 0, 0) inset,
    0 -16px 16px -8px rgba(0, 0, 0, 0) inset,
    1px 1px 1px rgba(255, 255, 255, 0.1),
    2px 2px 2px rgba(255, 255, 255, 0.05),
    -1px -1px 1px rgba(0, 0, 0, 0.1),
    -2px -2px 2px rgba(0, 0, 0, 0.05);
}

.btn-group-3d .btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  pointer-events: none;
  background-image: linear-gradient(
    0deg,
    #fff,
    hsl(var(--highlight-color-hue), 100%, 70%),
    hsla(var(--highlight-color-hue), 100%, 70%, 50%) 8%,
    transparent
  );
  background-position: 0 0;
  opacity: 0;
  transition: opacity var(--transition), filter var(--transition);
}

.btn-letter {
  position: relative;
  display: inline-block;
  color: rgba(255, 255, 255, 0.7);
  animation: letter-anim 2.5s ease-in-out infinite;
  transition:
    color var(--transition),
    text-shadow var(--transition),
    opacity var(--transition);
}

@keyframes letter-anim {
  50% {
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.9);
    color: #fff;
  }
}

.btn-svg {
  height: 20px;
  width: 20px;
  margin-right: 0.6rem;
  fill: currentColor;
  flex-shrink: 0;
  animation: flicker 3s linear infinite;
  animation-delay: 0.5s;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.6));
  transition:
    fill var(--transition),
    filter var(--transition),
    opacity var(--transition);
}

@keyframes flicker {
  50% { opacity: 0.4; }
}

.txt-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 1.5em;
  flex: 1;
  min-width: 9em;
}

.txt-1, .txt-2 {
  position: absolute;
  left: 0;
  display: flex;
  justify-content: center;
  width: 100%;
  white-space: nowrap;
}

.txt-1 {
  opacity: 1;
  pointer-events: auto;
}

.txt-2 {
  opacity: 0;
  pointer-events: none;
}

/* 加载中：立即切换到进行中文字 */
.btn-group-3d .btn.is-loading .txt-1 {
  opacity: 0;
  pointer-events: none;
  animation: none;
}

.btn-group-3d .btn.is-loading .txt-2 {
  opacity: 1;
  pointer-events: auto;
  animation: none;
}

.btn-group-3d .btn.is-loading .txt-2 .btn-letter {
  animation:
    focused-letter-anim 1s ease-in-out forwards,
    letter-anim 1.2s ease-in-out infinite;
  animation-delay: 0s, 1s;
}

.btn-group-3d .btn.is-loading .txt-1,
.btn-group-3d .btn.is-loading .txt-2 {
  transition: opacity 0.2s ease;
}

@keyframes appear-anim {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.btn-group-3d .btn:not(.is-loading) .txt-1 {
  animation: appear-anim 1s ease-in-out forwards;
}

@keyframes opacity-anim {
  0% { opacity: 1; pointer-events: auto; }
  100% { opacity: 0; pointer-events: none; }
}

.btn-group-3d .btn:focus .btn-letter,
.btn-group-3d .btn.is-loading .btn-letter {
  animation: none;
}

@keyframes focused-letter-anim {
  0%, 100% { filter: blur(0px); }
  50% {
    transform: scale(1.15);
    filter: blur(4px) brightness(150%)
      drop-shadow(-10px 4px 6px hsl(var(--highlight-color-hue), 100%, 70%));
  }
}

.btn-group-3d .btn:focus .btn-svg,
.btn-group-3d .btn.is-loading .btn-svg {
  animation-duration: 1.2s;
  animation-delay: 0.2s;
}

.btn-group-3d .btn:focus::before,
.btn-group-3d .btn.is-loading::before {
  box-shadow:
    0 -8px 12px -6px rgba(255, 255, 255, 0.15) inset,
    0 -16px 16px -8px hsla(var(--highlight-color-hue), 100%, 70%, 20%) inset,
    1px 1px 1px rgba(255, 255, 255, 0.15),
    2px 2px 2px rgba(255, 255, 255, 0.08),
    -1px -1px 1px rgba(0, 0, 0, 0.1),
    -2px -2px 2px rgba(0, 0, 0, 0.05);
}

.btn-group-3d .btn:focus::after,
.btn-group-3d .btn.is-loading::after {
  opacity: 0.6;
  -webkit-mask-image: linear-gradient(0deg, #fff, transparent);
  mask-image: linear-gradient(0deg, #fff, transparent);
}

.btn-group-3d .btn.is-loading .txt-2 .btn-letter:nth-child(1) { animation-delay: 0s, 1s; }
.btn-group-3d .btn.is-loading .txt-2 .btn-letter:nth-child(2) { animation-delay: 0.1s, 1.1s; }
.btn-group-3d .btn.is-loading .txt-2 .btn-letter:nth-child(3) { animation-delay: 0.2s, 1.2s; }
.btn-group-3d .btn.is-loading .txt-2 .btn-letter:nth-child(4) { animation-delay: 0.3s, 1.3s; }
.btn-group-3d .btn.is-loading .txt-2 .btn-letter:nth-child(5) { animation-delay: 0.4s, 1.4s; }
.btn-group-3d .btn.is-loading .txt-2 .btn-letter:nth-child(6) { animation-delay: 0.5s, 1.5s; }
.btn-group-3d .btn.is-loading .txt-2 .btn-letter:nth-child(7) { animation-delay: 0.6s, 1.6s; }

.btn-letter:nth-child(1) { animation-delay: 0s; }
.btn-letter:nth-child(2) { animation-delay: 0.1s; }
.btn-letter:nth-child(3) { animation-delay: 0.2s; }
.btn-letter:nth-child(4) { animation-delay: 0.3s; }
.btn-letter:nth-child(5) { animation-delay: 0.4s; }
.btn-letter:nth-child(6) { animation-delay: 0.5s; }
.btn-letter:nth-child(7) { animation-delay: 0.6s; }

.btn-group-3d .btn:active {
  border: solid 1px hsla(var(--highlight-color-hue), 100%, 80%, 70%);
  background-color: hsla(var(--highlight-color-hue), 50%, 15%, 0.6);
  transform: translateY(1px);
}

.btn-group-3d .btn:active::before {
  box-shadow:
    0 -8px 12px -6px rgba(255, 255, 255, 0.6) inset,
    0 -16px 16px -8px hsla(var(--highlight-color-hue), 100%, 70%, 80%) inset,
    1px 1px 1px rgba(255, 255, 255, 0.25),
    2px 2px 2px rgba(255, 255, 255, 0.1),
    -1px -1px 1px rgba(0, 0, 0, 0.1),
    -2px -2px 2px rgba(0, 0, 0, 0.05);
}

.btn-group-3d .btn:active::after {
  opacity: 1;
  -webkit-mask-image: linear-gradient(0deg, #fff, transparent);
  mask-image: linear-gradient(0deg, #fff, transparent);
  filter: brightness(180%);
}

.btn-group-3d .btn:active .btn-letter {
  text-shadow: 0 0 3px hsla(var(--highlight-color-hue), 100%, 90%, 90%);
  animation: none;
}

.btn-group-3d .btn:hover:not(:disabled) {
  border: solid 1px hsla(var(--highlight-color-hue), 100%, 80%, 40%);
  box-shadow:
    0 0 15px hsla(var(--highlight-color-hue), 100%, 70%, 0.15),
    inset 0px 1px 1px rgba(255, 255, 255, 0.25);
}

.btn-group-3d .btn:hover:not(:disabled)::before {
  box-shadow:
    0 -8px 8px -6px rgba(255, 255, 255, 0.6) inset,
    0 -16px 16px -8px hsla(var(--highlight-color-hue), 100%, 70%, 30%) inset,
    1px 1px 1px rgba(255, 255, 255, 0.15),
    2px 2px 2px rgba(255, 255, 255, 0.08);
}

.btn-group-3d .btn:hover:not(:disabled)::after {
  opacity: 0.8;
  -webkit-mask-image: linear-gradient(0deg, #fff, transparent);
  mask-image: linear-gradient(0deg, #fff, transparent);
}

.btn-group-3d .btn:hover:not(:disabled) .btn-svg {
  fill: #fff;
  filter: drop-shadow(0 0 4px hsl(var(--highlight-color-hue), 100%, 70%));
  animation: none;
}

html[lang="en"] .btn-group-3d .btn {
  font-size: 0.88rem;
  letter-spacing: 0.01em;
}
