/* =============================================================================
   基础样式重置和全局设置
============================================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  font-family: 'Roboto', 'Microsoft YaHei', Arial, sans-serif;
  background: #f7f7f7;
  color: #222;
  line-height: 1.6;
}

/* em 和 i 斜体的文字不倾斜 */
em,
i {
  font-style: normal
}

/* 去掉li 的小圆点 */
li {
  list-style: none
}

img {
  /* border 0 照顾低版本浏览器 如果 图片外面包含了链接会有边框的问题 */
  border: 0;
  /* 取消图片底侧有空白缝隙的问题 */
  vertical-align: middle
}

button {
  /* 当我们鼠标经过button 按钮的时候，鼠标变成小手 */
  cursor: pointer
}

a {
  color: #666;
  text-decoration: none
}

/* 移除在移动端点击元素会出现高亮背景的效果 */
* {
  -webkit-tap-highlight-color: transparent;
}

/* =============================================================================
   头部导航区域
============================================================================= */
.header {
  width: 100%;
  background: #fff;
  box-shadow: 0 1px 0 #eee;
  display: flex;
  align-items: center;
  height: 64px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
}

.header-content {
  width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

/* Logo区域 */
.logo {
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.logo img {
  height: 40px;
  margin-right: 12px;
  position: relative;
  z-index: 1;
}

/* LOGO 扫光效果 */
.logo::after {
  content: '';
  position: absolute;
  left: -60%;
  top: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.0) 0%, rgba(255, 255, 255, 0.85) 50%, rgba(255, 255, 255, 0.0) 100%);
  transform: skewX(-20deg);
  pointer-events: none;
  z-index: 2;
  animation: logo-sweep 1.6s cubic-bezier(.4, .7, .4, 1) infinite;
}

@keyframes logo-sweep {
  0% {
    left: -60%;
  }

  60%,
  100% {
    left: 120%;
  }
}


/* .logo-text {
  font-size: 22px;
  font-weight: 700;
  color: #222;
  letter-spacing: 1px;
} */

/* 导航菜单 */
.nav {
  display: flex;
  align-items: center;
  margin-left: 40px;
}

.nav-link {
  font-size: 17px;
  color: #222;
  text-decoration: none;
  margin-right: 32px;
  position: relative;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  display: block;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -8px;
  width: 0;
  height: 3px;
  background: #1890ff;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: #1890ff;
}

.nav-link:hover::after {
  width: 32px;
}

.nav-link.active {
  color: #1890ff;
}

.nav-link.active::after {
  width: 32px;
}

/* =============================================================================
   导航栏特效元素
============================================================================= */

/* 第一个导航项 - BUY徽章气泡效果 */
.nav-link:nth-child(1) {
  position: relative;
}

.nav-link:nth-child(1)::before {
  background-image: linear-gradient(90deg, #ef977b 0, #ff5722 100%);
  border-radius: 10px;
  color: white;
  content: "BUY";
  font-size: 12px;
  height: 16px;
  line-height: 16px;
  padding: 0 3px;
  position: absolute;
  right: -10px;
  text-align: center;
  top: -15px;
  transform: scale(.75);
  width: 30px;
  z-index: 3;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(255, 87, 34, 0.3);
}

/* 气泡箭头 - 指向导航文字 */
.nav-link:nth-child(1) .bubble-arrow {
  position: absolute;
  right: 11px;
  top: -8px;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 8px solid #ff5722;
  transform: rotate(245deg);
  -webkit-transform: rotate(245deg);
  z-index: 2;
}

/* 第二个导航项 - 炫彩星形效果 */
.nav-link:nth-child(2) {
  position: relative;
}

/* 弥散光背景容器 */
.nav-link:nth-child(2) .sparkle-effect {
  position: absolute;
  right: -28px;
  top: -32px;
  width: 70px;
  height: 70px;
  pointer-events: none;
  z-index: 1;
}

/* 弥散光效果 - 静态，更大范围，稍亮 */
/* .nav-link:nth-child(2) .sparkle-effect::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: radial-gradient(
    circle,
    rgba(24, 144, 255, 0.25) 0%,
    rgba(64, 169, 255, 0.28) 25%,
    rgba(135, 208, 255, 0.20) 45%,
    rgba(186, 231, 255, 0.12) 65%,
    rgba(230, 247, 255, 0.06) 85%,
    transparent 100%
  );
  border-radius: 50%;
  filter: blur(20px);
  -webkit-filter: blur(20px);
} */

/* SVG 星形图标 - 炫彩星光，居中旋转 */
.nav-link:nth-child(2) .sparkle-effect::after {
  content: '';
  position: absolute;
  top: 42%;
  left: 66%;
  width: 16px;
  height: 16px;
  margin-left: -10px;
  margin-top: -10px;
  background-image: url('/assets/hare/images/sparkle-star.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(0 0 8px rgba(24, 144, 255, 0.7)) drop-shadow(0 0 16px rgba(64, 169, 255, 0.5)) drop-shadow(0 0 24px rgba(105, 192, 255, 0.3));
  animation: rotate-star 4s linear infinite;
  z-index: 2;
}

/* 弥散光脉动动画 */
@keyframes pulse-glow {
  0%, 100% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1);
    -webkit-transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1.2);
    -webkit-transform: translate(-50%, -50%) scale(1.2);
  }
}

@-webkit-keyframes pulse-glow {
  0%, 100% {
    opacity: 0.6;
    -webkit-transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.9;
    -webkit-transform: translate(-50%, -50%) scale(1.2);
  }
}

/* 星形旋转动画 - 围绕自身中心点旋转 */
@keyframes rotate-star {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@-webkit-keyframes rotate-star {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Header 右侧操作按钮 */
.header-actions {
  display: none;
  /* 桌面端默认隐藏 */
  align-items: center;
}



/* =============================================================================
   页脚区域
============================================================================= */
.footer {
  background: url('/assets/hare/images/footer-bg.jpg') center/cover, #222;
  color: #bbb;
  padding: 40px 0 20px;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(34, 34, 34, 0.55);
  z-index: 0;
}

.footer > * {
  position: relative;
  z-index: 1;
}

.footer-content {
  width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-main {
  text-align: center;
  margin-bottom: 30px;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.footer-logo i {
  font-size: 28px;
  color: #e67e7e;
  margin-right: 8px;
}

.footer-logo-text {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #999;
  margin-bottom: 20px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.footer-social {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.social-link {
  width: 40px;
  height: 40px;
  background: #333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: #e67e7e;
  color: #fff;
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid #202c3c;
  padding-top: 20px;
  text-align: center;
  color: #666;
  font-size: 14px;
}

.footer-bottom a {
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-bottom a:hover {
  color: #e67e7e;
}

/* =============================================================================
   通用卡片样式
============================================================================= */
.n-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 20px;
  overflow: hidden;
}

.n-card-header {
  padding: 18px 24px;
  font-weight: 600;
  font-size: 18px;
  border-bottom: 1px solid #f3f3f3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafbff;
  color: #222;
}

.n-card__content {
  padding: 24px;
}

/* 主要内容区域 */
.main {
  width: 100%;
  background: #f7f7f7;
  padding: 26px 0;
  margin-top: 64px; /* 为固定的header留出空间 */
}

.container {
  width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 32px;
  padding: 0 20px;
}

/* =============================================================================
   移动端底部TabBar
============================================================================= */
.mobile-tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  background: #FAFAFC;
  border-top: 1px solid #e5e5e5;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  z-index: 9999;
  display: none;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.tabbar-content {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 20px;
  /* height: 60px; */
  box-sizing: border-box;
}

.tabbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #666;
  font-size: 12px;
  gap: 4px;
  flex: 1;
  max-width: 80px;
  height: 100%;
  /* padding: 4px 2px; */
  transition: all 0.3s ease;
  position: relative;
  box-sizing: border-box;
}

.tabbar-item:hover {
  color: #1890ff;
}

.tabbar-item.active {
  color: #1890ff;
}

.tabbar-icon {
  font-size: 18px;
  margin-bottom: 2px;
  line-height: 1;
  position: relative;
  width: 24px;
  height: 24px;
}

.tabbar-icon .tab-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.3s ease;
}

.tabbar-icon .default-icon {
  opacity: 1;
}

.tabbar-icon .active-icon {
  opacity: 0;
}

.tabbar-item.active .tabbar-icon .default-icon {
  opacity: 0;
}

.tabbar-item.active .tabbar-icon .active-icon {
  opacity: 1;
}

.tabbar-text {
  font-weight: 500;
  line-height: 1;
  font-size: 10px;
}

/* 为移动端添加底部间距 */
.mobile-padding {
  padding-bottom: 70px;
}

/* =============================================================================
   响应式设计
============================================================================= */
@media (max-width: 1240px) {

  .header-content,
  .container,
  .footer-content {
    width: 100%;
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
    gap: 20px;
  }

  .nav {
    display: none;
  }

  .mobile-tabbar {
    display: block !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  body {
    padding-bottom: 75px;
  }

  .main {
    margin-top: 56px; /* 移动端header高度 */
    padding-top: 0;
    padding-bottom: 20px;
  }

  /* 确保容器不会导致水平滚动 */
  * {
    max-width: 100vw;
    box-sizing: border-box;
  }

  .footer-social {
    flex-wrap: wrap;
    gap: 12px;
  }

  /* 移动端优化header */
  .header {
    height: 56px;
    top: 0;
  }

  .header-content {
    padding: 0 16px;
  }

  .logo-text {
    font-size: 20px;
  }

  .logo i {
    font-size: 28px;
  }

  /* 移动端显示购前须知按钮 */
  .header-actions {
    display: flex !important;
  }

  .header-announcement-btn {
    background-color: #ffffff;
    border: 1px solid #d9d9d9;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.02);
    color: #333333;
    padding: 6px 16px;
    font-size: 13px;
    border-radius: 6px;
    font-weight: 400;
  }

  .header-announcement-btn:hover {
    border-color: #4096ff;
    color: #4096ff;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.02);
  }

  .header-announcement-btn .btn-text {
    display: inline;
    /* 移动端显示文本 */
  }

  .header-announcement-btn i {
    display: none;
    /* 移动端隐藏图标 */
  }

  /* 移动端隐藏footer */
  .footer {
    display: none !important;
  }
}

/* =============================================================================
   购前须知弹窗样式 - 全局通用
============================================================================= */

/* 弹窗遮罩样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* 弹窗主体 */
.modal {
  background: white;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 720px;
  width: 90vw;
  max-height: 85vh;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

/* 弹窗头部 */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
  flex-shrink: 0;
}

.modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  align-items: center;
  line-height: 1.4;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #6b7280;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
}

.modal-close:hover {
  background: #f3f4f6;
  color: #374151;
  transform: rotate(90deg);
}

/* 弹窗内容 */
.modal-content {
  padding: 0;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* 自定义滚动条样式 */
.modal-content::-webkit-scrollbar {
  width: 6px;
}

.modal-content::-webkit-scrollbar-track {
  background: #f8fafc;
  border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
  transition: background 0.3s ease;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

.modal-content::-webkit-scrollbar-thumb:active {
  background: #6b7280;
}

/* Firefox滚动条样式 */
.modal-content {
  scrollbar-width: thin;
  scrollbar-color: #d1d5db #f8fafc;
}

/* 公告详情样式 */
.announcement-detail {
  padding: 28px 24px;
  font-size: 15px;
  line-height: 1.8;
  color: #374151;
}

.announcement-detail p {
  margin: 0 0 16px 0;
}

.announcement-detail p:last-child {
  margin-bottom: 0;
}

.announcement-detail h1,
.announcement-detail h2,
.announcement-detail h3,
.announcement-detail h4 {
  margin: 24px 0 16px 0;
  color: #1f2937;
  font-weight: 600;
}

.announcement-detail h1:first-child,
.announcement-detail h2:first-child,
.announcement-detail h3:first-child,
.announcement-detail h4:first-child {
  margin-top: 0;
}

.announcement-detail ul,
.announcement-detail ol {
  margin: 16px 0;
  padding-left: 24px;
}

.announcement-detail li {
  margin-bottom: 12px;
  line-height: 1.8;
}

.announcement-detail a {
  color: #1890ff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.announcement-detail a:hover {
  color: #40a9ff;
  text-decoration: underline;
}

.announcement-detail strong,
.announcement-detail b {
  color: #1f2937;
  font-weight: 600;
}

.announcement-detail code {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
}

/* 优化 h3, h4 标题样式 */
.announcement-detail h3 {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  padding-bottom: 10px;
  border-bottom: 2px solid #e5e7eb;
}

.announcement-detail h3:not(:first-child) {
  margin-top: 24px;
}

.announcement-detail h4 {
  margin: 18px 0 10px 0;
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
}

.announcement-detail h4:first-of-type {
  margin-top: 16px;
}

/* 弹窗底部 */
.modal-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid #e5e7eb;
  background: linear-gradient(0deg, #ffffff 0%, #f9fafb 100%);
  flex-shrink: 0;
}

.modal-button {
  padding: 10px 28px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
}

.modal-button.secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.modal-button.secondary:hover {
  background: #e5e7eb;
  border-color: #d1d5db;
}

.modal-button.primary {
  background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

.modal-button.primary:hover {
  background: linear-gradient(135deg, #40a9ff 0%, #69b1ff 100%);
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
  transform: translateY(-1px);
}

/* 移动端弹窗优化 */
@media (max-width: 768px) {
  .modal {
    width: 95vw;
    max-height: 60vh;
    border-radius: 8px;
  }

  .modal-header {
    padding: 16px 20px;
  }

  .modal-title {
    font-size: 18px;
  }

  .modal-close {
    min-width: 32px;
    min-height: 32px;
    font-size: 18px;
  }

  .announcement-detail {
    padding: 20px 20px;
    font-size: 14px;
  }

  .announcement-detail p {
    margin: 0 0 14px 0;
  }

  .announcement-detail ul,
  .announcement-detail ol {
    margin: 14px 0;
    padding-left: 20px;
  }

  .announcement-detail li {
    margin-bottom: 10px;
  }

  /* 移动端优化 h3, h4 标题 */
  .announcement-detail h3 {
    font-size: 17px;
    margin-bottom: 12px;
    padding-bottom: 8px;
  }

  .announcement-detail h3:not(:first-child) {
    margin-top: 22px;
  }

  .announcement-detail h4 {
    font-size: 14px;
    margin: 16px 0 8px 0;
  }

  .modal-footer {
    padding: 16px 20px;
    position: sticky;
    bottom: 0;
    background: linear-gradient(0deg, #ffffff 0%, #f9fafb 100%);
    z-index: 10;
  }

  .modal-button {
    flex: 1;
    min-height: 42px;
    padding: 10px 18px;
    font-size: 14px;
    border-radius: 8px;
  }

  /* 移动端滚动条更细 */
  .modal-content::-webkit-scrollbar {
    width: 3px;
  }
}