/*
 * 冰泉韵 · 低氘水
 * 清新自然 · 健康饮水品牌
 * 设计风格：现代简约、清新自然、专业可信
 */

/* ==================== 变量定义 ==================== */
:root {
    /* 主色调 - 冰川蓝与湖水绿 */
    --primary: #0284c7;
    --primary-light: #38bdf8;
    --primary-dark: #0369a1;
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    
    /* 辅色调 - 自然绿 */
    --accent: #059669;
    --accent-light: #34d399;
    --accent-dark: #047857;
    
    /* 中性色 */
    --dark: #0c4a6e;
    --dark-2: #164e63;
    --text: #475569;
    --text-light: #64748b;
    --text-dark: #1e293b;
    
    /* 背景色 */
    --white: #ffffff;
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --bg-gradient: linear-gradient(135deg, var(--primary-50) 0%, #ecfdf5 100%);
    
    /* 阴影 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 20px rgba(2, 132, 199, 0.08);
    --shadow-md: 0 8px 30px rgba(2, 132, 199, 0.12);
    --shadow-lg: 0 20px 50px rgba(2, 132, 199, 0.15);
    
    /* 圆角 */
    --radius-sm: 8px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    /* 过渡 */
    --transition: all 0.3s ease;
    --transition-slow: all 0.5s ease;

    /* --glass-bg: rgba(255, 255, 255, 0.75); */
    --glass-border: rgba(255, 255, 255, 0.1); 
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    
}

/* ==================== 基础样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
}

/* ==================== 导航栏 ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.logo i {
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 36px;
}

.nav-links a {
    position: relative;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dark);
    padding: 8px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
}

/* ==================== Hero Banner ==================== */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        url('https://img10.360buyimg.com/imgzone/jfs/t1/416657/16/13544/2064706/69dc520dFf2f3d66e/0083000cac8767dd.jpg') center/cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
     background: linear-gradient(135deg, rgba(0, 86, 179, 0.6) 0%, rgba(0, 30, 60, 0.5) 100%);
    /* background: linear-gradient(
        135deg,
        rgba(2, 132, 199, 0.85) 0%,
        rgba(5, 150, 105, 0.75) 50%,
        rgba(3, 105, 161, 0.8) 100%
    ); */
}

/* 毛玻璃卡片通用样式 */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.25);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 24px;
    animation: fadeInDown 0.8s ease;
}

.hero-badge i {
    color: var(--accent-light);
}

.hero h1 {
    font-size: 4rem;
    color: var(--white);
    margin-bottom: 20px;
    letter-spacing: 4px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero h1 .highlight {
    display: block;
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 8px;
    opacity: 0.9;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 16px;
    font-weight: 400;
    letter-spacing: 2px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero .quote {
    font-size: 1.1rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 0.5s both;
}

.hero .quote i {
    font-size: 0.8rem;
    opacity: 0.6;
    margin: 0 8px;
}

.hero-btn {
    animation: fadeInUp 0.8s ease 0.6s both;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px;
    background: var(--white);
    color: var(--primary);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-full);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--accent);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.btn-primary i {
    transition: transform 0.3s;
}

.btn-primary:hover i {
    transform: translateX(5px);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
    opacity: 0.7;
}

/* ==================== Section 通用样式 ==================== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-100);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 16px;
}

.section-header.light .section-tag {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.section-header.light .section-title {
    color: var(--white);
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-light);
}

.section-header.light .section-desc {
    color: rgba(255, 255, 255, 0.8);
}

/* ==================== 品牌故事 ==================== */
.story-section {
    background: var(--bg-gradient);
}

.story-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.story-card {
    position: relative;
    background: var(--white);
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
    text-align: center;
}

.story-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: var(--transition);
}

.story-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.story-card:hover::before {
    transform: scaleX(1);
}

.story-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-100), rgba(52, 211, 153, 0.1));
    border-radius: 50%;
    transition: var(--transition);
}

.story-icon i {
    font-size: 2rem;
    color: var(--primary);
    transition: var(--transition);
}

.story-card:hover .story-icon {
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.story-card:hover .story-icon i {
    color: var(--white);
}

.story-num {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-100);
    line-height: 1;
}

.story-card h3 {
    font-size: 1.35rem;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.story-card p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-light);
}

.story-line {
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    margin: 24px auto 0;
    border-radius: 2px;
}

/* ==================== 健康科普 ==================== */
.science-section {
    position: relative;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 50%, var(--primary-dark) 100%);
    overflow: hidden;
}

.science-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="80" cy="50" r="2" fill="rgba(255,255,255,0.03)"/><circle cx="40" cy="80" r="1.5" fill="rgba(255,255,255,0.04)"/></svg>');
    background-size: 200px 200px;
}

.science-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    position: relative;
    z-index: 1;
}

.science-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

/* 为不支持backdrop-filter的浏览器提供回退 */
@supports not (backdrop-filter: blur(20px)) {
    .science-card {
        background: rgba(255, 255, 255, 0.15);
    }
}

.science-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-5px);
}

.science-visual {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 28px;
}

.atom-icon, .heart-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    z-index: 2;
}

.atom-icon i, .heart-icon i {
    font-size: 1.8rem;
    color: var(--white);
}

.atom-ring {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: pulse-ring 2s infinite;
}

.ring-1 {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation-delay: 0s;
}

.ring-2 {
    top: 15%;
    left: 15%;
    width: 70%;
    height: 70%;
    animation-delay: 0.5s;
}

@keyframes pulse-ring {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}

.science-card h3 {
    text-align: center;
    font-size: 1.35rem;
    color: var(--white);
    margin-bottom: 20px;
}

.science-card > p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    line-height: 1.8;
    text-align: center;
}

.advantage-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.advantage-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    transition: var(--transition);
}

.advantage-list li:hover {
    background: rgba(255, 255, 255, 0.1);
}

.check-icon {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    border-radius: 50%;
    color: var(--white);
    font-size: 0.75rem;
}

.advantage-list li span:last-child {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 对比表格 */
.comparison-card {
    margin-top: 50px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 40px;
    position: relative;
    z-index: 1;
}

.comparison-card h3 {
    text-align: center;
    font-size: 1.35rem;
    color: var(--white);
    margin-bottom: 30px;
}

.comparison-card h3 i {
    margin-right: 10px;
    color: var(--accent-light);
}

.table-responsive {
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    padding: 18px 24px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-table th {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
}

.comparison-table td {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
}

.highlight-col {
    background: rgba(5, 150, 105, 0.2) !important;
    color: var(--accent-light) !important;
    font-weight: 600;
}

.brand-tag {
    display: inline-block;
    padding: 2px 8px;
    background: var(--accent);
    border-radius: 4px;
    font-size: 0.75rem;
    margin-right: 6px;
}

/* ==================== 产品中心 ==================== */
.products-section {
    background: var(--white);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.product-card {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    z-index: 2;
}

.product-img {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: var(--bg-light);
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img img {
    transform: scale(1.1);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(2, 132, 199, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.view-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--white);
    font-weight: 500;
}

.view-btn i {
    font-size: 2rem;
}

.product-info {
    padding: 24px;
    text-align: center;
}

.product-info h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.product-info p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 16px;
}

.product-spec {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.product-spec span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--primary-50);
    color: var(--primary);
    font-size: 0.8rem;
    border-radius: var(--radius-full);
}

.product-spec i {
    font-size: 0.75rem;
}

/* ==================== 品牌实力 ==================== */
.strength-section {
    background: var(--bg-gradient);
}

.strength-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.strength-card {
    background: var(--white);
    padding: 36px 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.strength-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.strength-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.3);
}

.strength-icon i {
    font-size: 1.8rem;
    color: var(--white);
}

.strength-card h3 {
    font-size: 1.15rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.strength-detail {
    text-align: left;
}

.strength-detail p {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    font-size: 0.9rem;
    color: var(--text-light);
    border-bottom: 1px dashed var(--primary-100);
}

.strength-detail p:last-child {
    border-bottom: none;
}

.strength-detail i {
    color: var(--primary);
    width: 18px;
    text-align: center;
}

/* 数据统计 */
.stats-section {
    margin-top: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-lg);
    padding: 50px;
    box-shadow: var(--shadow-lg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
}

.stat-number .counter {
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}

.stat-number .unit {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85);
}

.stat-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ==================== 页脚 ==================== */
.footer {
    position: relative;
    background: linear-gradient(180deg, var(--dark) 0%, var(--dark-2) 100%);
    padding: 80px 0 0;
    color: rgba(255, 255, 255, 0.8);
}

.footer-wave {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transform: translateY(-99%);
}

.footer-wave svg {
    display: block;
    width: 100%;
    height: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 50px;
    padding-bottom: 50px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 20px;
}

.footer-logo i {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-slogan {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
}

.footer-company {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-contact h4,
.footer-links h4,
.footer-qr h4 {
    font-size: 1.1rem;
    color: var(--white);
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 12px;
}

.footer-contact h4::after,
.footer-links h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

.footer-contact ul li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 0.9rem;
}

.footer-contact ul li i {
    color: var(--accent-light);
    width: 18px;
}

.footer-links ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--accent-light);
    padding-left: 5px;
}

.footer-links ul li i {
    font-size: 0.7rem;
    color: var(--accent);
}

.qr-code {
    width: 130px;
    height: 130px;
    background: var(--white);
    border-radius: var(--radius);
    padding: 10px;
    margin-bottom: 16px;
}

.qr-code img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.footer-qr p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom {
    text-align: center;
    padding: 24px 0;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a:hover {
    color: var(--accent-light);
}

/* ==================== 回到顶部 ==================== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    font-size: 1.25rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(2, 132, 199, 0.4);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(2, 132, 199, 0.5);
}

/* ==================== 动画 ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-15px);
    }
    60% {
        transform: translateX(-50%) translateY(-8px);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

/* ==================== 图片弹出层 ==================== */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* 为不支持backdrop-filter的浏览器提供回退 */
@supports not (backdrop-filter: blur(10px)) {
    .image-modal {
        background: rgba(0, 0, 0, 0.96);
    }
}

.image-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 75vh;
}

.modal-image-container img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.image-modal.active .modal-image-container img {
    transform: scale(1);
}

.modal-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 55px;
    height: 55px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.modal-nav:hover {
    background: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

.modal-caption {
    margin-top: 20px;
    color: var(--white);
    font-size: 1.1rem;
    text-align: center;
    opacity: 0.9;
}

.modal-counter {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* ==================== 响应式 ==================== */
@media (max-width: 1024px) {
    .story-grid,
    .strength-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 24px;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links a {
        font-size: 1.2rem;
        color: var(--text-dark);
    }
    
    .menu-toggle {
        display: block;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero h1 .highlight {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .story-grid,
    .science-grid,
    .products-grid,
    .strength-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stats-section {
        padding: 30px 20px;
    }
    
    .stat-number .counter {
        font-size: 2.2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-contact h4::after,
    .footer-links h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-contact ul li,
    .footer-links ul li a {
        justify-content: center;
    }
    
    .qr-code {
        margin: 0 auto 16px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 16px 60px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero h1 .highlight {
        font-size: 1.2rem;
    }
    
    .hero .subtitle {
        font-size: 1rem;
    }
    
    .btn-primary {
        padding: 14px 30px;
        font-size: 0.9rem;
    }
    
    .section {
        padding: 70px 0;
    }
    
    .story-card,
    .science-card,
    .strength-card {
        padding: 30px 24px;
    }
    
    .comparison-card {
        padding: 24px;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 12px 10px;
        font-size: 0.8rem;
    }
}

/* ==================== 移动端和旧浏览器兼容性修复 ==================== */

/* 修复iOS Safari视口高度问题 */
@supports (-webkit-touch-callout: none) {
    .hero {
        min-height: -webkit-fill-available;
    }
}

/* 修复移动端100vh问题 */
@supports (height: 100dvh) {
    .hero {
        min-height: 100dvh;
    }
}

/* 修复旧版浏览器Grid布局 */
@supports not (display: grid) {
    .story-grid,
    .science-grid,
    .products-grid,
    .strength-grid,
    .stats-grid,
    .footer-content {
        display: -webkit-flex;
        display: flex;
        flex-wrap: wrap;
    }
    
    .story-card,
    .science-card,
    .product-card,
    .strength-card {
        width: 100%;
        margin-bottom: 20px;
    }
    
    @media (min-width: 768px) {
        .story-card,
        .science-card,
        .product-card,
        .strength-card {
            width: 48%;
        }
    }
    
    @media (min-width: 1024px) {
        .story-card,
        .product-card {
            width: 31%;
        }
        
        .strength-card {
            width: 23%;
        }
    }
}

/* 修复移动端触摸和高亮问题 */
* {
    -webkit-tap-highlight-color: transparent;
}

/* 修复移动端字体缩放 */
body {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* 修复移动端按钮点击延迟 */
button,
a,
.btn-primary,
.view-btn,
.modal-close,
.modal-nav,
.scroll-top {
    touch-action: manipulation;
}

/* 修复移动端输入框缩放 */
input,
textarea,
select {
    font-size: 16px;
}

/* 修复iOS Safari弹性滚动 */
body {
    overscroll-behavior-y: contain;
}

/* 修复Android浏览器文本选择 */
* {
    -webkit-user-select: text;
    user-select: text;
}

img,
.product-img,
.view-btn,
.btn-primary,
.scroll-top {
    -webkit-user-select: none;
    user-select: none;
}

/* 为不支持CSS变量的浏览器提供回退 */
@supports not (--css: variables) {
    .navbar {
        background: rgba(255, 255, 255, 0.95);
    }
    
    .glass-card {
        background: rgba(255, 255, 255, 0.75);
    }
    
    .btn-primary {
        background: #ffffff;
        color: #0284c7;
    }
    
    .btn-primary:hover {
        background: #059669;
        color: #ffffff;
    }
}

/* 修复IE11 Flexbox布局 */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    .nav-container,
    .hero-content,
    .story-grid,
    .science-grid,
    .products-grid,
    .strength-grid,
    .stats-grid,
    .footer-content {
        display: -ms-flexbox;
    }
    
    .nav-container {
        -ms-flex-pack: justify;
        -ms-flex-align: center;
    }
    
    .hero-content {
        -ms-flex-pack: center;
        -ms-flex-align: center;
    }
}

/* 移动端性能优化：减少动画 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* 修复移动端横屏问题 */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: 80px 24px 60px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero h1 .highlight {
        font-size: 1.5rem;
    }
}

/* 修复移动端安全区域（刘海屏） */
@supports (padding: max(0px)) {
    .navbar {
        padding-left: max(24px, env(safe-area-inset-left));
        padding-right: max(24px, env(safe-area-inset-right));
    }
    
    .footer {
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }
    
    .scroll-top {
        bottom: max(30px, calc(env(safe-area-inset-bottom) + 30px));
    }
}
