:root {
    --primary-blue: #0a2463;
    --secondary-blue: #1e88e5;
    --accent-teal: #00bcd4;
    --accent-coral: #ff6b6b;
    --light-bg: #f0f8ff;
    --dark-text: #2c3e50;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Microsoft YaHei UI', 'Segoe UI', sans-serif;
    background:url("pic/电脑背景.png");
    background-attachment: fixed;
    line-height: 1.8;
    min-height: 100vh;
}
a {
    text-decoration: none;
}
a p {
    text-align: center;
    color: #ffffff;
    font-size: 3rem;
}
.card, .stat-item, .marine-item {
    animation-play-state: paused;
}
.site-title {
    color: rgb(255,255,255);
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.menu-toggle {
    display: none; /* 关键：桌面端默认不显示 */
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
}
.nav {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    height: 60px;
    border-radius: 10px;
    background: #407cffcc;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}
.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.nav-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}
.main-container {
    max-width: 1200px;
    margin: 80px auto 0;
    padding: 2rem;
}
.hero-section {
    background: #407cff64;
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: fadeIn 1s ease-out;
}
.hero-title {
    font-size: 3.5rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}
.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary-blue);
    opacity: 0.8;
    margin-bottom: 2rem;
}
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}
.card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}
.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--accent-teal), var(--secondary-blue));
}
.card-title {
    color: var(--primary-blue);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.marine-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}
.marine-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    height: 200px;
}
.marine-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.marine-item:hover .marine-img {
    transform: scale(1.1);
}
.marine-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.marine-item:hover .marine-overlay {
    transform: translateY(0);
}
.comparison-wrapper {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  margin: 2rem 0;
  position: relative;
}
.comparison-slider {
  position: relative;
  width: 100%;
  height: 300px; /* 固定高度，根据需求调整 */
  border-radius: 10px;
  overflow: hidden;
}
/* 健康海洋：底层，占满容器，作为背景 */
.comparison-before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%; /* 始终占满容器 */
  height: 100%;
  background-image: url('pic/污染前cc0.jpg'); /* 替换为你的健康海洋图片 */
  background-size: cover;
  background-position: center;
  z-index: 1; /* 底层 */
}
/* 污染海洋：上层，宽度由滑块控制（0%-100%） */
.comparison-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 0%; /* 初始0%，随滑块增加 */
  height: 100%;
  background-image: url('pic/污染后cc0.jpg'); /* 替换为你的污染海洋图片 */
  background-size: cover;
  background-position: center;
  z-index: 2; /* 覆盖在健康层上 */
  border-right: 3px solid white; /* 分隔线 */
}
/* 滑块手柄 */
.slider-handle {
  position: absolute;
  top: 0;
  left: 0%; /* 初始0%，随滑块移动 */
  width: 4px;
  height: 100%;
  background: white;
  cursor: ew-resize;
  z-index: 3;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}
.slider-handle::before {
  content: '↔';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  color: var(--primary-blue);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}
/* 标签样式 */
.comparison-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  color: var(--dark-text);
}
#pollutionLevel {
  font-weight: bold;
}
.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: white;
    cursor: ew-resize;
    z-index: 3;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}
.slider-handle::before {
    content: '↔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    color: var(--primary-blue);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}
.stats-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 3rem 0;
    background: #4099ff31;
    border-radius: 20px;
}
.stat-item {
    text-align: center;
    flex: 1;
    min-width: 200px;
}
.stat-number {
    font-size: 3rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--accent-teal), var(--secondary-blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}
.stat-bar {
    height: 10px;
    background: linear-gradient(90deg, var(--accent-teal), var(--secondary-blue));
    border-radius: 5px;
    margin: 1rem 0;
    animation: growWidth 2s ease-out;
}
.pledge-container {
    background: #667DE980;
    border-radius: 20px;
    padding: 3rem;
    color: white;
    margin: 3rem 0;
}
#game_botton {
    transition: all 0.3s ease;
    cursor: pointer;

}
#game_botton:hover {
    transform: scale(1.05);
    box-shadow: #00000080 10px 10px 20px;
}

.pledge-inputs {
    display: grid;
    gap: 1rem;
    margin: 2rem 0;
}
.pledge-inputs input, .pledge-inputs textarea {
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
}
.pledge-inputs textarea {
    height: 120px;
    resize: vertical;
}
.phone { display: none; }
.computer { display: inline; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes growWidth {
    from { width: 0; }
    to { width: 100%; }
}
@media (max-width: 768px) {
    .phone { display: inline; }
    .computer { display: none; }
    .nav-links {
        display: none;
        position: fixed;
        top: 60px;
        left: 10px;
        right: 10px;
        background: #407cff;
        border-radius: 10px;
        padding: 20px;
        flex-direction: column;
        gap: 10px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
        z-index: 999;
    }
    .nav-links.active {
        display: flex;
    }
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 8px;
    }
}