/* ------------------------------
   全局基础样式
------------------------------ */
:root {
    --primary-color: #3b82f6;    /* 主色-浅蓝 */
    --secondary-color: #60a5fa;  /* 辅助色-更浅蓝 */
    --accent-color: #93c5fd;     /* 强调色-非常浅的蓝 */
    --text-dark: #1e40af;        /* 深文本色-中蓝 */
    --text-light: #60a5fa;       /* 浅文本色-浅蓝 */
    --bg-light: #f8fafc;         /* 浅背景色-极淡的蓝 */
    --bg-gradient: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%); /* 浅蓝色渐变背景 */
    --divider: #dbeafe;          /* 分割线色-非常浅的蓝 */
    --transition: all 0.3s ease; /* 通用过渡 */
    --shadow-light: 0 4px 20px rgba(59, 130, 246, 0.08);
    --shadow-medium: 0 8px 30px rgba(59, 130, 246, 0.12);
    --shadow-heavy: 0 12px 40px rgba(59, 130, 246, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ------------------------------
   科普Banner样式 - 优化版
------------------------------ */
.science-banner {
    width: 100%;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
    padding: 100px 0 80px 0;
    margin: 0 0 60px 0;
    position: relative;
    overflow: hidden;
}

.science-banner::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"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.science-banner .banner-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.science-banner h1 {
    color: #ffffff;
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 4px 8px rgba(0,0,0,0.4);
    letter-spacing: -0.5px;
}

.science-banner p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.3rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* ------------------------------
   通用模块样式 - 优化版
------------------------------ */
.science-section {
    margin-bottom: 100px;
    position: relative;
}

.science-section h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    font-weight: 600;
}

.science-section h2::after {
    display: none;
}

/* ------------------------------
   核心概念模块 - 优化版
------------------------------ */
.explain-box {
    background: #f8fafc;
    padding: 50px;
    border-radius: 16px;
    box-shadow: var(--shadow-light);
    border: 1px solid #dbeafe;
    position: relative;
    overflow: hidden;
}

.explain-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--secondary-color), var(--accent-color));
}

.explain-box p {
    font-size: 1.2rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.explain-box p:last-child {
    margin-bottom: 0;
}

/* ------------------------------
   应用场景模块 - 优化版
------------------------------ */
.scenario-list {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.scenario-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    border: 1px solid #dbeafe;
    position: relative;
    overflow: hidden;
    background: #ffffff;
}

.scenario-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
}

.scenario-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

.scenario-item:nth-child(even) {
    direction: rtl;
}

.scenario-item:nth-child(even) .scenario-content {
    direction: ltr;
}

.scenario-media {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

.scenario-media img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: var(--transition);
    display: block;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scenario-media img.loaded {
    opacity: 1;
    transform: scale(1);
}

.scenario-media::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 67, 165, 0.1), rgba(0, 212, 255, 0.1));
    opacity: 0;
    transition: var(--transition);
}

.scenario-item:hover .scenario-media::after {
    opacity: 1;
}

.scenario-item:hover .scenario-media img {
    transform: scale(1.05);
}

.scenario-content {
    padding: 30px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    position: relative;
}

.scenario-content h3 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 25px;
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
}

.scenario-content h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.scenario-content p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-light);
    font-weight: 400;
}

/* ------------------------------
   技术原理模块 - 优化版
------------------------------ */
.tech-explain {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 50px;
    border-radius: 16px;
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(0, 43, 91, 0.05);
}

.tech-explain p {
    font-size: 1.2rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 30px;
    font-weight: 500;
}

.tech-explain ul {
    list-style: none;
    padding: 0;
}

.tech-explain li {
    background: #fff;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    border-left: 4px solid var(--secondary-color);
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.tech-explain li:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-medium);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.tech-explain li:last-child {
    margin-bottom: 0;
}

.tech-explain strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* ------------------------------
   响应式设计 - 优化版
------------------------------ */
@media (max-width: 768px) {
    .science-banner {
        padding: 80px 0 60px 0;
        margin-bottom: 40px;
    }

    .science-banner h1 {
        font-size: 2.2rem;
    }

    .science-banner p {
        font-size: 1.1rem;
    }

    .science-section {
        margin-bottom: 60px;
    }

    .science-section h2 {
        font-size: 2rem;
        margin-bottom: 40px;
    }

    .scenario-item {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 25px;
    }

    .scenario-item:nth-child(even) {
        direction: ltr;
    }

    .scenario-media img {
        height: 250px;
    }

    .scenario-content {
        padding: 20px;
    }

    .scenario-content h3 {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }

    .scenario-content p {
        font-size: 1rem;
    }

    .explain-box,
    .tech-explain {
        padding: 30px;
    }

    .tech-explain li {
        padding: 20px;
    }

    /* 优化移动端触摸体验 */
    .scenario-item {
        -webkit-tap-highlight-color: transparent;
    }
    
    .scenario-item:active {
        transform: scale(0.98);
    }

    /* 添加加载状态指示器 */
    .scenario-media::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 40px;
        height: 40px;
        margin: -20px 0 0 -20px;
        border: 3px solid #f3f3f3;
        border-top: 3px solid var(--secondary-color);
        border-radius: 50%;
        animation: spin 1s linear infinite;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .scenario-media.loading::before {
        opacity: 1;
    }

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

@media (max-width: 576px) {
    .container {
        padding: 0 16px;
    }

    .science-banner h1 {
        font-size: 1.8rem;
    }

    .science-banner p {
        font-size: 1rem;
    }

    .science-section h2 {
        font-size: 1.6rem;
    }

    .scenario-item {
        padding: 20px;
    }

    .scenario-media img {
        height: 200px;
    }

    .scenario-content h3 {
        font-size: 1.4rem;
    }

    .explain-box,
    .tech-explain {
        padding: 20px;
    }

    .tech-explain p {
        font-size: 1rem;
    }

    .tech-explain li {
        padding: 15px;
    }

    /* 优化返回顶部按钮的响应式设计 */
    .back-to-top {
        bottom: 20px !important;
        right: 20px !important;
        width: 45px !important;
        height: 45px !important;
        font-size: 18px !important;
    }
}

/* ------------------------------
   动画效果
------------------------------ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scenario-item {
    animation: fadeInUp 0.6s ease-out;
}

.scenario-item:nth-child(2) {
    animation-delay: 0.2s;
}

.scenario-item:nth-child(3) {
    animation-delay: 0.4s;
}

/* ------------------------------
   滚动条美化
------------------------------ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ------------------------------
   额外优化样式
------------------------------ */

/* 添加渐变边框效果 */
.scenario-item::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--secondary-color), var(--accent-color), var(--secondary-color));
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scenario-item:hover::after {
    opacity: 1;
}

/* 添加内容区域的焦点样式 */
.scenario-content:focus-within {
    box-shadow: 0 0 0 3px rgba(0, 67, 165, 0.1);
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .scenario-item {
        border: 2px solid var(--primary-color);
    }
    
    .scenario-content h3::after {
        height: 4px;
    }
    
    .tech-explain li {
        border-left-width: 6px;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scenario-item:hover {
        transform: none;
    }
    
    .scenario-media img:hover {
        transform: none;
    }
}

/* 添加打印样式优化 */
@media print {
    .science-banner {
        background: #f8f9fa !important;
        color: #000 !important;
    }
    
    .scenario-item {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .back-to-top {
        display: none !important;
    }
}

