/* 海洋风格主样式文件 - 优化版 */
:root {
  /* 海洋主题色彩方案 */
  --ocean-blue: #1a73e8;
  --sea-blue: #4285f4;
  --light-blue: #8ab4f8;
  --sky-blue: #bbdefb;
  --wave-blue: #e3f2fd;
  --deep-blue: #0d47a1;
  --coral: #ff8a65;
  --seafoam: #80cbc4;
  --sand: #ffecb3;
  --white: #ffffff;
  --text-dark: #1a237e;
  --text-light: #5c6bc0;
  --shadow-light: rgba(26, 115, 232, 0.1);
  --shadow-medium: rgba(26, 115, 232, 0.2);
  --shadow-deep: rgba(13, 71, 161, 0.3);
}

/* 基础样式 */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background: linear-gradient(135deg, var(--wave-blue) 0%, var(--sky-blue) 50%, #c6dbff 100%);
  margin: 0;
  padding: 0;
  width: 100vw;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* 海洋波浪背景效果 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, var(--light-blue) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, var(--sea-blue) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, var(--sky-blue) 0%, transparent 50%);
  opacity: 0.1;
  z-index: -1;
  animation: waveMove 20s ease-in-out infinite;
}

@keyframes waveMove {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.02); }
}

/* 海洋气泡动画效果 */
.bubble {
  position: fixed;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: bubbleRise 6s ease-in-out infinite;
  z-index: 1;
}

@keyframes bubbleRise {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% { opacity: 0.8; }
  90% { opacity: 0.6; }
  100% {
    transform: translateY(-100px) scale(1.5);
    opacity: 0;
  }
}

/* 气泡位置配置 */
.bubble:nth-child(1) { left: 10%; width: 20px; height: 20px; animation-delay: 0s; }
.bubble:nth-child(2) { left: 30%; width: 15px; height: 15px; animation-delay: 2s; }
.bubble:nth-child(3) { left: 60%; width: 25px; height: 25px; animation-delay: 4s; }
.bubble:nth-child(4) { left: 80%; width: 18px; height: 18px; animation-delay: 1s; }
.bubble:nth-child(5) { left: 45%; width: 22px; height: 22px; animation-delay: 3s; }

/* 页面布局容器 */
.page-container {
  min-height: 100vh;
  position: relative;
  padding-bottom: 80px;
}

/* 图库容器 */
.gallery-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 15px;
  margin-top: 35px;
}

/* 卡片样式 */
.gallery-card {
  width: calc(50% - 6px);
  min-width: 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 
    0 4px 15px var(--shadow-medium),
    0 2px 8px var(--shadow-light),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  box-sizing: border-box;
  cursor: pointer;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.6s ease;
}

.gallery-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 
    0 8px 25px var(--shadow-deep),
    0 4px 12px var(--shadow-medium),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.gallery-card:hover::before {
  left: 100%;
}

/* 卡片内部元素 */
.card-image-container {
  width: 100%;
  height: 140px;
  overflow: hidden;
  position: relative;
  border-radius: 10px 10px 0 0;
}

.card-image-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30px;
  background: linear-gradient(transparent, rgba(26, 115, 232, 0.1));
}

.card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-card:hover .card-image img {
  transform: scale(1.05);
}

.card-footer {
  padding: 16px;
  background: var(--white);
  border-radius: 0 0 16px 16px;
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, transparent 60%, rgba(26, 115, 232, 0.3) 100%);
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 12px;
}

.card-badge {
  background: linear-gradient(135deg, var(--coral) 0%, var(--seafoam) 100%);
  color: var(--white);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  min-width: 24px;
  text-align: center;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
  line-height: 1.2;
  display: -webkit-box;
  display: box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  box-orient: vertical;
  overflow: hidden;
}

.card-subtitle {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 500;
  opacity: 0.8;
}

/* 头部栏样式 */
.header-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(135deg, var(--sea-blue) 0%, var(--sea-blue) 100%);
  box-shadow: 0 4px 20px var(--shadow-deep);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

/* 搜索区域 */
.search-container {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 99;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#search-input {
  width: 100%;
  padding: 12px 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-dark);
  font-weight: 500;
  box-shadow: 
    0 4px 15px var(--shadow-medium),
    inset 0 1px 3px rgba(255, 255, 255, 0.6);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#search-input::placeholder {
  color: var(--text-light);
  opacity: 0.7;
}

#search-input:focus {
  outline: none;
  border-color: var(--light-blue);
  background: var(--white);
  transform: translateY(-1px);
  box-shadow: 
    0 6px 20px var(--shadow-deep),
    inset 0 1px 3px rgba(255, 255, 255, 0.8);
}

.search-results {
  position: absolute;
  top: calc(100% + 5px);
  left: 20px;
  right: 20px;
  max-height: 300px;
  overflow-y: auto;
  background: var(--white);
  border: 2px solid var(--light-blue);
  border-radius: 16px;
  box-shadow: 0 8px 25px var(--shadow-deep);
  backdrop-filter: blur(10px);
}

.search-results div {
  padding: 12px 20px;
  cursor: pointer;
  border-bottom: 1px solid rgba(138, 180, 248, 0.2);
  transition: all 0.2s ease;
  color: var(--text-dark);
  font-weight: 500;
}

.search-results div:hover {
  background: linear-gradient(135deg, var(--wave-blue) 0%, var(--sky-blue) 100%);
  color: var(--white);
  transform: translateX(5px);
}

.search-results div:last-child {
  border-bottom: none;
  border-radius: 0 0 14px 14px;
}

/* 图标按钮 */
.back-icon, .share-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transition: all 0.3s ease;
  color: var(--white);
}

.back-icon:hover, .share-icon:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.5px;
}
.video-container {
  width: 100%;
  height: 50vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.video-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
}
.video-controls {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 15px;
}
.control-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  background: transparent;
  cursor: pointer;
  z-index: 1;
  color: #fff;
}

.progress-bar {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.5);
  margin: 0 10px;
  border-radius: 1.5px;
  overflow: hidden;
}

.progress-fill {
  width: 30%;
  height: 100%;
  background: #4FC3F7;
  border-radius: 1.5px;
}

.info-card {
  width: 90%;
  height: 90px;
  background: #ffffff;
  border-radius: 10px;
  margin: -40px auto 0;
  position: relative;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.info-content {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0px 10px;
}

.icon-container {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 10%;
  margin-right: 8px;
}

.fish-icon {
  width:100%;
  height:100%;
  object-fit: cover;
}

.data-container {
  flex: 1;
}

.data-item {
  display: flex;
  margin-bottom: 5px;
}

.data-item:last-child {
  margin-bottom: 0;
}

.data-label {
  font-size: 12px;
  color: #333;
  margin-right: 2px;
  font-weight: 500;
}

.data-value {
  font-size: 11px;
  color: #333;
  font-weight: 400;
}

.details-section {
  width: 90%;
  margin: 20px auto 0;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tabs-container {
  display: flex;
  height: 40px;
  background: #f8f9fa;
}

.tab-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 2px solid transparent;
}

.tab-item.active {
  border-bottom: 2px solid #4FC3F7;
}

.tab-text {
  font-size: 14px;
  color: #666;
}

.tab-item.active .tab-text {
  color: #4FC3F7;
  font-weight: 500;
}

.content-area {
  padding: 15px 5%;
}

.content-wrapper {
  min-height: 150px;
}

.content-block {
  padding: 5px 0;
}

.content-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12.5px;
}

.content-item:last-child {
  margin-bottom: 0;
}

.bullet-icon {
  margin-top: 6px;
  margin-right: 7.5px;
  flex-shrink: 0;
  color: #4FC3F7;
  width: 8px;
  height: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.content-text {
  font-size: 13px;
  color: #333;
  line-height: 20px;
  flex: 1;
  margin-right: 8px;
}

.floating-window {
  position: fixed;
  width: 50px;
  height: 60px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.marine-book{
  top: 130px;
  left: 10px;
  z-index: 100;
}
.house-intro{
  top: 60px;
  left: 10px;
  z-index: 101;
}
.audio-guide{
  top: 200px;
  left: 10px;
  z-index: 102;
}
.floating-window {
  transition: all 0.2s ease; /* 过渡动画 */
  cursor: pointer; /* 鼠标悬停时显示手型 */
}
.floating-window:hover {
  transform: scale(1.05); /* 轻微放大 */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15); /* 加深阴影 */
}
.floating-icon {
  font-size: 20px;
  color: #4FC3F7;
  margin-bottom: 5px;
}

.floating-text {
  font-size: 10px;
  color: #333;
}

.search-container {
  position: relative;
  flex: 1;
  margin: 0 15px;
}

#search-input {
  width: 100%;
  padding: 8px 0px;
  border: 1px solid #ddd;
  border-radius: 20px;
  outline: none;
  font-size: 14px;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 101;
  display: none;
}

.search-results div {
  padding: 8px 12px;
  cursor: pointer;
}

.search-results div:hover {
  background-color: #f5f5f5;
}

/* 响应式设计 - 平板设备 (768px以下) */
@media (max-width: 768px) {
  .gallery-card { width: calc(50% - 6px); }
  .header-bar { padding: 0 15px; }
  .search-container { padding: 12px 15px; }
  #search-input { padding: 10px 16px; font-size: 14px; }
  .page-title { font-size: 18px; }
  .card-image-container { height: 120px; }
  .card-title { font-size: 13px; }
  .card-subtitle { font-size: 10px; }
}

/* 响应式设计 - 移动设备 (480px以下) */
@media (max-width: 480px) {
  .gallery-card { width: calc(50% - 4px); }
  .gallery-container { padding: 10px; gap: 8px; }
  .header-bar { height: 50px; padding: 0 10px; }
  .search-container { padding: 10px; top: 50px; }
  #search-input { padding: 8px 12px; font-size: 13px; }
  .page-title { font-size: 16px; }
  .card-image-container { height: 100px; }
  .card-footer { padding: 12px; }
  .card-title { font-size: 12px; }
  .card-subtitle { font-size: 9px; }
  .back-icon, .share-icon { width: 28px; height: 28px; }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(135deg, #0a192f 0%, #1e3a5f 50%, #2d4b7a 100%);
  }
  
  body::before {
    background: 
      radial-gradient(circle at 20% 80%, rgba(26, 115, 232, 0.3) 0%, transparent 50%),
      radial-gradient(circle at 80% 20%, rgba(66, 133, 244, 0.3) 0%, transparent 50%),
      radial-gradient(circle at 40% 40%, rgba(187, 222, 251, 0.2) 0%, transparent 50%);
    opacity: 0.2;
  }
  
  .header-bar {
    background: linear-gradient(135deg, #1a365d 0%, #2d4b7a 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .search-container {
    background: rgba(26, 32, 44, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  
  #search-input {
    background: rgba(45, 55, 72, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
    box-shadow: 
      0 4px 15px rgba(0, 0, 0, 0.3),
      inset 0 1px 3px rgba(255, 255, 255, 0.1);
  }
  
  #search-input::placeholder { color: #a0aec0; }
  
  #search-input:focus {
    border-color: #4299e1;
    background: rgba(45, 55, 72, 1);
    box-shadow: 
      0 6px 20px rgba(0, 0, 0, 0.4),
      inset 0 1px 3px rgba(255, 255, 255, 0.2);
  }
  
  .gallery-card {
    background: rgba(45, 55, 72, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 
      0 4px 15px rgba(0, 0, 0, 0.4),
      0 2px 8px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  
  .gallery-card:hover {
    box-shadow: 
      0 8px 25px rgba(0, 0, 0, 0.6),
      0 4px 12px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
  
  .card-footer { background: rgba(45, 55, 72, 0.8); }
  .card-title { color: #e2e8f0; }
  .card-subtitle { color: #a0aec0; }
  
  .search-results {
    background: rgba(45, 55, 72, 0.95);
    border-color: #4299e1;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  }
  
  .search-results div {
    color: #e2e8f0;
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
  
  .search-results div:hover {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    color: #ffffff;
  }
  
  .bubble { background: rgba(255, 255, 255, 0.3); }
}

/* 性能优化 */
.gallery-card, .card-image img {
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* 打印样式 */
@media print {
  .header-bar, .search-container, .bubble { display: none; }
  .gallery-container { margin-top: 0; padding: 0; }
  .gallery-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  .gallery-card {
    transition: transform 0.2s ease;
  }
  
  .gallery-card:active {
    transform: scale(0.98);
  }
  
  /* 增加触摸目标大小 */
  .back-icon, .share-icon {
    min-width: 44px;
    min-height: 44px;
  }
  
  #search-input {
    min-height: 15px;
  }
  
  /* 禁用hover效果，使用active状态 */
  .gallery-card:hover {
    transform: none;
  }
  
  .gallery-card:hover .card-overlay {
    opacity: 0;
  }
  
  .gallery-card:active .card-overlay {
    opacity: 0.3;
  }
}

/* 性能优化 */
.gallery-card {
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.card-image {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* 减少动画对性能的影响 */
@media (prefers-reduced-motion: reduce) {
  .gallery-card {
    transition: none;
  }
  
  .bubble {
    animation: none;
    opacity: 0.3;
  }
  
  .header-bar::before {
    animation: none;
  }
}

