/**
 * C3-a: Index foundation styles migrated from main-legacy.css
 * Scope: reset, navbar shell, hero, cyber CTAs, container — index pages only
 */


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* 只允许body滚动 */
body {
    overflow-y: auto;
    overflow-x: hidden;
}

/* 隐藏所有内部元素的滚动条 */
* {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
}

*::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

/* 只为主页面body保留滚动条 */
body {
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #007bff #f1f1f1; /* Firefox */
}

body::-webkit-scrollbar {
    width: 8px; /* Chrome, Safari, Edge */
    display: block;
}

body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

body::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 4px;
}

body::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* 禁用所有内部元素的滚动 */
.container, 
.water-quality, 
.analysis-result, 
.result-content, 
.params-grid, 
.ai-content,
.charts-grid, 
.chart-container, 
.streaming-container,
.streaming-content,
.analysis-report,
.action-plan,
.reminder-section,
.patent-cards,
.service-cards,
.params-grid,
.analysis-content {
    overflow: hidden !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    max-height: none !important;
}

/* 导航菜单保留滚动（仅移动端弹出菜单） */
.nav-menu {
    /* 移动端菜单可以滚动 */
    overflow-y: auto;
}

:root {
    --primary: #1a73e8;
    --secondary: #34a853;
    --accent: #fbbc05;
    --dark: #202124;
    --light: #f8f9fa;
    --gray: #5f6368;
}

body {
    background-color: #f5f7fa;
    color: var(--dark);
    line-height: 1.6;
}


/* -------------------- 新导航栏样式 -------------------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    z-index: 1000;
    /* 背景：完全透明，无模糊效果 */
    background: transparent !important;
    backdrop-filter: none; /* 移除模糊效果 */
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 50px;
    box-shadow: none; /* 移除阴影 */
    /* 始终保持完全透明 */
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* -------------------- Logo 区域（右侧小鱼 + 文字） -------------------- */
.logo-container {
    position: absolute;
    left: 50px;
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-text {
    font-size: 28px;
    font-weight: 800;
    color: #1e6fa8;
    margin-left: 5px;
}

/* Logo图片样式 */
.logo-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

/* Logo hover 效果 */
.logo-image:hover {
    transform: scale(1.1) rotate(5deg);
}

/* -------------------- 导航菜单 -------------------- */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin-left: 30px;
}

.nav-link {
    color: #1e6fa8;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s;
}

/* 导航项 hover 时的渐变下划线 */
.nav-link::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #3a9ad9, #07d96c);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.nav-link:hover {
    color: #07d96c; /* 文字变荧光绿 */
}

.nav-link:hover::after {
    transform: scaleX(1);
}

.nav-link.active {
    color: #07d96c;
}

.nav-link.active::after {
    transform: scaleX(1);
}


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


/* 移动端汉堡菜单样式 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #3a9ad9;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: transparent !important;
    backdrop-filter: none; /* 移除模糊效果，完全透明 */
    box-shadow: none; /* 移除阴影，保持透明 */
    z-index: 999;
}

.mobile-menu.active {
    display: block;
}

/* 手机 / 平板：汉堡菜单（覆盖 navbar.css 与 desktop 折叠导航） */
.navbar .mobile-menu-toggle span {
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.navbar .mobile-nav-link {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.navbar .mobile-menu {
    background: rgba(15, 40, 70, 0.92) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

@media (max-width: 1024px) {
    .navbar {
        padding-left: 16px;
        padding-right: 16px;
        padding-top: env(safe-area-inset-top, 0px);
        height: calc(70px + env(safe-area-inset-top, 0px));
        box-sizing: border-box;
        justify-content: flex-end !important;
    }

    .navbar .logo-container {
        position: absolute !important;
        left: max(16px, env(safe-area-inset-left, 0px)) !important;
        right: auto !important;
        top: env(safe-area-inset-top, 0px) !important;
        height: 70px;
        display: flex !important;
        align-items: center;
        margin: 0 !important;
        z-index: 1000;
    }

    .navbar .logo-text {
        font-size: 20px !important;
        color: #ffffff !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    }

    .navbar .navbar-right,
    .navbar .nav-menu {
        display: none !important;
    }

    .navbar .mobile-menu-toggle {
        display: flex !important;
        z-index: 1001;
        margin-left: auto;
        position: relative;
    }

    .navbar .mobile-menu.active {
        display: block !important;
    }
}

@media (min-width: 1025px) {
    .navbar .mobile-menu-toggle,
    .navbar .mobile-menu {
        display: none !important;
    }
}

.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-item:last-child {
    border-bottom: none;
}

.mobile-nav-link {
    display: block;
    color: #1e6fa8;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    padding: 15px 20px;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #07d96c;
}


/* -------------------- 滚动时导航栏透明度变化 -------------------- */
.navbar.scrolled {
    opacity: 1; /* 保持完全透明，不因滚动改变 */
}


.hero {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    padding: 0 2rem;
    padding-top: 70px; /* 让内容避开导航栏 */
    overflow: hidden;
    margin-top: 0; /* 改为0，让背景从顶部开始，覆盖导航栏下方 */
}

/* 背景图片层样式 */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* 确保背景图片在正确层级 */
    background-color: #000; /* 添加黑色背景作为备用 */
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(1.1) contrast(1.2) saturate(1.1);
    object-position: center 30%;
    display: block; /* 确保图片显示 */
    z-index: 1; /* 确保图片在正确层级 */
}

/* 仅当视频在 hero 内时全屏铺满；独立区块内用 .section-video-wrapper .hero-video-in-window 覆盖 */
.hero .hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2; /* 视频在背景图片之上 */
    filter: brightness(1.1) contrast(1.2) saturate(1.1);
    object-position: center 30%;
    /* 视频质量优化 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    /* 强制高质量渲染 */
    -webkit-filter: contrast(1.1) brightness(1.05) saturate(1.1);
    filter: contrast(1.1) brightness(1.05) saturate(1.1);
    /* 抗锯齿优化 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 英雄区内的视频（若仍使用） */
.hero-video-window .hero-video-in-window {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    height: auto;
    max-height: min(50vh, 420px);
    object-fit: contain;
    display: block;
    filter: none;
    -webkit-transform: none;
    transform: none;
}

/* 品牌视频独立区块 - 左视频、右文字（同比例放大） */
.section-video {
    padding: 4rem 2rem;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}
.section-video .container.section-video-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 3rem;
}
.section-video-col {
    flex: 0 0 auto;
}
.section-video-col-media {
    width: 54%;
    min-width: 340px;
}
.section-video-col-text {
    flex: 1;
    min-width: 0;
}
.section-video-title {
    font-size: 2.1rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 0.5rem 0;
    letter-spacing: 0.05em;
}
.section-video-tagline {
    font-size: 1.15rem;
    color: #94a3b8;
    margin: 0 0 1.5rem 0;
    font-weight: 500;
}
.section-video-desc {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #cbd5e1;
    margin: 0 0 1.5rem 0;
}
.section-video-points {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}
.section-video-points li {
    font-size: 1.05rem;
    color: #e2e8f0;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.section-video-point-icon {
    color: #38bdf8;
    font-size: 0.6rem;
}
.section-video-hint {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
}
@media (max-width: 768px) {
    .section-video .container.section-video-container {
        flex-direction: column;
        gap: 1.5rem;
    }
    .section-video-col-media {
        width: 100%;
    }
    .section-video-col-text {
        text-align: center;
    }
    .section-video-points li {
        justify-content: center;
    }
}
/* 品牌视频容器：支持视频放大而不裁切背景，16:9 用 padding 撑开 */
.section-video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    overflow: visible !important;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(26, 115, 232, 0.4);
    background: #000;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(26, 115, 232, 0.3);
    transition: box-shadow 0.4s;
}
/* 窗口模式视频：填满容器，播放时仅视频轻微放大，容器不变 */
.section-video-wrapper .hero-video-in-window {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: auto;
    display: block;
    object-fit: cover;
    border-radius: 24px;
    filter: none;
    transition: transform 0.6s ease;
}

.section-video-wrapper iframe.brand-bilibili-player,
.section-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 24px;
    z-index: 10;
    display: block;
    background: #000;
}

/* 全屏深色遮罩：让雾气背景不抢镜、文字更清晰（参考高端封面） */
.hero-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.35) 0%,
        rgba(0, 0, 0, 0.25) 40%,
        rgba(0, 0, 0, 0.4) 70%,
        rgba(0, 0, 0, 0.65) 100%
    );
    z-index: 2;
}

/* 播放图标样式 */
.hero-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-play-icon:hover {
    background: rgba(255, 255, 255, 1);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.hero-play-icon i {
    font-size: 28px;
    color: #1a73e8;
    margin-left: 3px; /* 视觉居中调整 */
}

.hero-play-icon.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.8);
}

/* 封面居中主标题区（高端层级：小字欢迎 + 大标题 + 副标题） */
.hero-headline {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 3;
    padding: 0 1.5rem;
    max-width: 90vw;
}
.hero-welcome {
    font-size: clamp(0.75rem, 2vw, 0.95rem);
    font-weight: 600;
    letter-spacing: 0.2em;
    color: #94a3b8;
    margin: 0 0 0.75rem;
    text-transform: uppercase;
}
.hero-main-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.5rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.05em;
}
.hero-tagline {
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 400;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}
/* 向下滚动提示 */
.hero-scroll-hint {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    z-index: 3;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: border-color 0.3s, color 0.3s;
}
.hero-scroll-hint::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
}
.hero-scroll-hint:hover {
    border-color: #fff;
    color: #fff;
}

/* 视频加载提示样式 */
.video-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    backdrop-filter: blur(4px);
}

.video-loading-content {
    text-align: center;
    color: white;
    padding: 20px;
}

.video-loading-spinner {
    font-size: 48px;
    margin-bottom: 20px;
    color: #1a73e8;
}

.video-loading-spinner i {
    animation: spin 1s linear infinite;
}

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

.video-loading-text {
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: 500;
}

.video-loading-hint {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 16px;
}

.video-loading-progress {
    width: 300px;
    max-width: 80%;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto;
}

.video-loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #1a73e8, #34a853);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(26, 115, 232, 0.5);
}

/* 移动端优化 */
@media (max-width: 768px) {
    .video-loading-content {
        padding: 15px;
    }

    .video-loading-spinner {
        font-size: 36px;
        margin-bottom: 15px;
    }

    .video-loading-text {
        font-size: 16px;
        margin-bottom: 6px;
    }

    .video-loading-hint {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .video-loading-progress {
        width: 250px;
    }
}

/* 微信浏览器特殊优化 */
.wechat-optimized {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 微信浏览器页脚特殊优化 */
.wechat-optimized .footer-content {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    -ms-flex-pack: justify;
    justify-content: space-between;
}

.wechat-optimized .footer-section {
    -webkit-box-flex: 0;
    -webkit-flex: 0 0 48%;
    -ms-flex: 0 0 48%;
    flex: 0 0 48%;
    margin-bottom: 1.5rem;
}

/* 微信浏览器页脚卡片优化 */
.wechat-optimized .footer-card {
    min-height: 120px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.wechat-optimized .qrcode-main {
    min-height: 120px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 微信浏览器页脚强制显示所有卡片 */
.wechat-optimized .footer-section:nth-child(1),
.wechat-optimized .footer-section:nth-child(2),
.wechat-optimized .footer-section:nth-child(3),
.wechat-optimized .footer-section:nth-child(4) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 微信浏览器页脚卡片内容强制显示 */
.wechat-optimized .footer-card,
.wechat-optimized .qrcode-main {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}


.wechat-optimized .hero {
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
}

.wechat-optimized .hero-bg-image,
.wechat-optimized .hero-video {
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
}

.wechat-optimized video {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 防止微信浏览器缩放问题 */
@supports (-webkit-touch-callout: none) {
    .wechat-optimized .hero {
        height: -webkit-fill-available;
    }
}

/* 移动端整体缩放设计 - 所有移动端（包括微信）都应用整体缩放 */
@media (max-width: 768px) {
    /* ===== 移动端整体缩放模式 ===== */
    /* 所有移动端（包括微信浏览器）都应用整体缩放，显示桌面版的缩小版本 */
    body.mobile-scaled {
        /* 缩放后的body，宽度由JS设置 */
        overflow-x: hidden;
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    /* 缩放模式下，保持桌面版布局（导航改由汉堡菜单，见上方 @media max-width: 1024px） */
    body.mobile-scaled .container {
        width: auto !important;
        max-width: 1200px !important;
        padding: 0 2rem !important;
        margin: 0 auto !important;
    }
    
    /* 缩放模式下，保持桌面版布局（导航改由汉堡菜单，见上方 @media max-width: 1024px） */
    body.mobile-scaled .nav-menu {
        display: none !important;
    }

    body.mobile-scaled .mobile-menu-toggle {
        display: flex !important;
    }

    body.mobile-scaled .mobile-menu.active {
        display: block !important;
    }

    /* 缩放模式下，保持桌面版服务卡片布局 */
    body.mobile-scaled .services {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 2rem !important;
        width: auto !important;
        max-width: 1200px !important;
    }
    
    /* 缩放模式下，保持桌面版英雄区域样式 */
    body.mobile-scaled .hero-text {
        flex-direction: row !important;
        gap: 2rem !important;
    }
    
    /* 缩放模式下，保持桌面版专利卡片布局 */
    body.mobile-scaled .patent-card {
        width: auto !important;
        max-width: none !important;
    }
    
    /* 缩放模式下，保持桌面版抖音/分析区域布局，与竖屏一致 */
    body.mobile-scaled .douyin-content {
        flex-direction: row !important;
        gap: 2rem !important;
        text-align: left !important;
    }
    body.mobile-scaled .douyin-text {
        text-align: left !important;
    }
    
    /* 必要的触摸优化（适用于所有移动端） */
    .patent-card {
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
}

/* 竖屏适配 - 针对手机竖屏和电脑竖屏 */
@media (max-height: 600px) and (orientation: portrait) {
    .hero {
        height: 100vh;
        min-height: 500px;
    }
    
    .hero-text {
        bottom: 1rem;
        gap: 1rem;
    }
    
    .hero-text-left,
    .hero-text-right {
        font-size: 1rem;
        animation: fontColorChange 6s ease-in-out infinite;
        font-family: 'Microsoft YaHei', '微软雅黑', 'SimHei', '黑体', 'Arial', sans-serif;
    }
    
}

/* 超小屏幕保持原布局，等比例缩小 */

/* 超小屏幕保持原布局，等比例缩小 */


.hero-text {
    position: absolute;
    bottom: 4rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    color: #333;
    z-index: 3;
}

/* 调整按钮之间的间距 */
.hero-text .btn {
    margin: 0 0.5rem;
}

/* 两个按钮组：仅作布局，扫光在各自按钮内部 */
.hero-buttons-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 绿色按钮和slogan的包装器 */
.hero-buttons-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.hero-buttons-wrapper .btn {
    margin: 0;
    align-self: center;
}

.hero-buttons-wrapper .hero-text-center {
    margin-top: 0.5rem;
    text-align: center;
    width: 100%;
}

.hero-text-left,
.hero-text-center,
.hero-text-right {
    font-size: 1.8rem;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    animation: fontColorChange 6s ease-in-out infinite;
    font-family: 'Microsoft YaHei', '微软雅黑', 'SimHei', '黑体', 'Arial', sans-serif;
}

@keyframes fontColorChange {
    0% { 
        color: #fff; 
        font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
        font-weight: 400;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    }
    20% { 
        color: #fff; 
        font-family: 'SimHei', '黑体', sans-serif;
        font-weight: 600;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    }
    40% { 
        color: #fff; 
        font-family: 'KaiTi', '楷体', serif;
        font-weight: 500;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    }
    60% { 
        color: #fff; 
        font-family: 'FangSong', '仿宋', serif;
        font-weight: 400;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    }
    80% { 
        color: #fff; 
        font-family: 'STSong', '华文宋体', serif;
        font-weight: 600;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    }
    100% { 
        color: #fff; 
        font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
        font-weight: 400;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    }
}

.hero-text-left {
    text-align: right;
}

.hero-text-center {
    text-align: center;
}

.hero-text-right {
    text-align: left;
}

.hero h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.5rem;
    max-width: 800px;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    background-color: var(--accent);
    color: var(--dark);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    width: 180px;
    height: auto;
    line-height: 1.5;
    text-align: center;
}

.btn-text {
    display: inline-block;
    width: 100%;
    text-align: center;
    white-space: nowrap;
}

/* 绿色赛博网格风格水质分析按钮 */
.btn-cyber-green {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    width: 180px;
    box-sizing: border-box;
    min-width: 180px;
    height: auto;
    line-height: 1.5;
    text-align: center;
    
    /* 绿色赛博网格风格 */
    background: transparent;
    color: #00ff00;
    border: 1px solid #00ff00;
    text-shadow: 0 0 5px #00ff00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.btn-cyber-green .btn-text {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    white-space: nowrap;
}

/* 按钮内部扫光：无色白高光，水质分析先扫、AI对话接续 */
.btn-cyber-green::before,
.btn-cyber-blue::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: shine 2.5s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}
.hero-buttons-group .btn-cyber-blue::before {
    animation-delay: 1.2s;
}

.btn-cyber-green:hover {
    background: transparent !important;
    box-shadow: 0 0 15px #00ff00, 0 0 30px rgba(0, 255, 0, 0.7);
    transform: translateY(-3px);
    border-color: #00ff00 !important;
    color: #00ff00 !important;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

#electricity-analysis-btn,
#ai-chat-btn {
    width: 180px;
}

#electricity-analysis-btn .btn-text,
#ai-chat-btn .btn-text {
    transition: opacity 0.3s ease;
}

/* AI对话 - 蓝色赛博风格（与水质分析统一造型，仅色系不同） */
.btn-cyber-blue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    width: 180px;
    box-sizing: border-box;
    min-width: 180px;
    background: transparent;
    color: #3a9ad9;
    border: 1px solid #3a9ad9;
    text-shadow: 0 0 5px #3a9ad9;
    box-shadow: 0 0 10px rgba(58, 154, 217, 0.5);
}
.btn-cyber-blue .btn-text {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    white-space: nowrap;
}
.btn-cyber-blue:hover {
    background: transparent !important;
    box-shadow: 0 0 15px #3a9ad9, 0 0 30px rgba(58, 154, 217, 0.7);
    transform: translateY(-3px);
    border-color: #3a9ad9 !important;
    color: #3a9ad9 !important;
}


.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) {
    body:not(.mobile-scaled) .container {
        width: 100vw !important;
        max-width: 100vw !important;
        padding: 0 15px !important;
        overflow-x: hidden !important;
        margin: 0 !important;
    }
}

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