/* === 全局重置 === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* === 主样式 === */
body, html {
  height: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, #0c1220, #161d32);
  color: #e6f7ff;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* === 导航栏控制面板样式 - 霓虹光感方案 === */
.control-panel {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(12, 15, 25, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  padding: 0.75rem 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 20, 100, 0.4);
  border: 1px solid rgba(80, 120, 240, 0.3);
  display: flex;
  gap: 0.75rem;
  max-width: max-content;
  z-index: 1000;
  overflow: hidden;
}

.control-panel::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  z-index: -1;
  background: linear-gradient(45deg, 
      rgba(100, 140, 255, 0.15), 
      rgba(80, 120, 240, 0.1),
      rgba(100, 140, 255, 0.15));
  border-radius: 18px;
}

.control-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1.6rem;
  font-weight: 600;
  font-size: 1rem;
  color: #e0f7ff;
  background: rgba(36, 42, 70, 0.25);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  overflow: hidden;
  border: none;
  outline: none;
  min-width: 140px;
}

.control-btn::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(100, 180, 255, 0), #5a9cff, rgba(100, 180, 255, 0));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s ease;
}

.control-btn::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 0;
  right: 0;
  height: 20px;
  background: radial-gradient(circle at center, rgba(100, 180, 255, 0.6), transparent 70%);
  transform: translateY(-20px);
  transition: transform 0.4s ease;
}

.control-btn:hover {
  background: rgba(50, 65, 110, 0.45);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(60, 130, 255, 0.4);
  color: #ffffff;
}

.control-btn:hover::after {
  transform: scaleX(1);
}

.control-btn:hover::before {
  transform: translateY(10px);
}

.control-btn.active {
  background: rgba(70, 100, 180, 0.5);
  box-shadow: 0 0 15px rgba(80, 150, 255, 0.7);
  color: #fff;
  transform: translateY(-4px);
}

.control-btn.active::after {
  transform: scaleX(1);
  background: linear-gradient(90deg, rgba(100, 180, 255, 0), #7dbdff, rgba(100, 180, 255, 0));
}

.control-btn.active::before {
  transform: translateY(0);
}

.control-btn .icon {
  font-size: 1.25rem;
  transition: all 0.4s ease;
}

.control-btn:hover .icon {
  transform: rotate(-5deg) scale(1.2);
}

.control-btn.active .icon {
  color: #a8dfff;
  text-shadow: 0 0 8px rgba(130, 190, 255, 0.8);
}

/* === 画布样式 === */
canvas.webgl {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  outline: none;
  z-index: 1;
}

/* === 全屏视频模态框 === */
#videoModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.3s, opacity 0.3s ease;
}

#videoModal.active {
  visibility: visible;
  opacity: 1;
}

.modal-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3001;
}

.modal-content video {
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
}

.close-modal {
  position: absolute;
  top: 25px;
  right: 25px;
  color: white;
  font-size: 36px;
  cursor: pointer;
  background: rgba(231, 76, 60, 0.7);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  z-index: 3002;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.close-modal:hover {
  transform: scale(1.15);
  background: rgba(231, 76, 60, 0.9);
}

/* === 信息面板 === */
#info {
  position: fixed;
  top: 30px;
  left: 30px;
  z-index: 10;
  max-width: 500px;
  background: rgba(18, 30, 61, 0.7);
  padding: 20px;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(64, 120, 240, 0.3);
  box-shadow: 0 10px 30px rgba(0, 20, 60, 0.5);
}

h1 {
  font-size: 2.4rem;
  margin-bottom: 10px;
  background: linear-gradient(to right, #ff4081, #ff6e7f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#info p {
  font-size: 1.1rem;
  color: #ffa7b5;
  line-height: 1.6;
  margin-bottom: 20px;
}

#stats {
  display: flex;
  gap: 20px;
  margin-top: 15px;
}

.stat {
  padding: 12px 18px;
  background: rgba(70, 20, 40, 0.5);
  border-radius: 10px;
  border: 1px solid rgba(255, 100, 150, 0.2);
}

.label {
  color: #ff9eb1;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 5px;
}

/* === 心脏数据流特效 === */
.heart-flow-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(70, 15, 30, 0.6);
  padding: 10px 15px;
  border-radius: 10px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 80, 120, 0.3);
  box-shadow: 0 0 20px rgba(255, 80, 120, 0.3);
  z-index: 100;
  font-size: 0.9rem;
  color: #ffb3c1;
}

.heart-flow-container span {
  color: #ff6b8b;
  font-weight: bold;
}

/* === 响应式设计 === */
@media (max-width: 992px) {
  .control-panel {
    top: 15px;
    right: 15px;
    left: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .control-btn {
    min-width: 130px;
    padding: 0.7rem 1.3rem;
    font-size: 0.9rem;
  }
  
  #info {
    position: static;
    margin: 15px;
    width: calc(100% - 30px);
  }
  
  #stats {
    flex-wrap: wrap;
  }
  
  .heart-flow-container {
    left: 15px;
    right: 15px;
    bottom: 80px;
  }
}

@media (max-width: 576px) {
  .control-btn {
    min-width: 100px;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }
  
  .close-modal {
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    font-size: 28px;
  }
  
  h1 {
    font-size: 1.8rem;
  }
}