/* 字体 */
@font-face {
  font-family: 'SpaceGrotesk';
  src: url('./SpaceGrotesk[wght].woff2') format('woff2');
  font-weight: 100 700;
  font-display: swap;
}

/* 全局背景与字体 */
body {
  margin: 0;
  font-family: 'SpaceGrotesk', sans-serif;
  color: white;
  background: #000000;
  
  font-size: 16px;
}

/* ===== 顶部导航 ===== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 44px;
}

.logo {
  font-weight: 700;
  font-size: 22px;
}

nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

nav a {
  position: relative;
  padding: 6px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.55); /* 普通状态浅灰色 */
  text-decoration: none;
  font-weight: 500;
  transition: all 0.25s ease;

}
nav a:hover，
nav a.active {
  background: linear-gradient(to right, #c084fc, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #c084fc, #60a5fa);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s ease;
}
nav a:hover::after,
nav a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.new-badge {
  background: #facc15;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  color: black;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
}





.turbo { color: #38bdf8; }



/* ===== 内容区域 ===== */
.content {
  max-width: 1180px;
  margin: 56px auto;
  padding: 0 20px;
}

/* Staking 标题渐变更贴近目标站 */
.title {
  font-size: 44px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #b06ff9, #60a5fa, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: rgba(255,255,255,0.55);
  margin-bottom: 40px;
  font-size: 16px;
  line-height: 1.5;
}

/* ===== 卡片列表 ===== */
.card-list {
  background: transparent;
  border-radius: 16px;
}

/* 单个卡片 */
.card {
  background: rgba(20,26,39,0.92);
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr) 30px 1.5fr; /* 调整箭头列宽 */
  align-items: center;
  padding: 24px 28px;
  margin-bottom: 14px;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transition: background 0.25s ease;
}
.card:hover {
  background: rgba(31,41,55,0.75);
}

.token {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
}
.token img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.cell {
  text-align: center;
}
.label {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}
.value {
  font-size: 14px;
  margin-top: 5px;
}
.green {
  color: #4ade80;
  font-weight: 600;
}

.action {
  text-align: right;
}
.stake-btn {
  background: linear-gradient(to right, #9333ea, #c084fc);
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: white;
}
.stake-btn:hover {
  filter: brightness(1.15);
}

/* ===== 箭头样式 ===== */

.arrow {
  width: 12px;
  height: 12px;
  border: solid rgba(255,255,255,0.7);
  border-width: 0 2px 2px 0;
  display: inline-block;
  transform: rotate(45deg);
  cursor: pointer;
  margin: auto;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.arrow:hover {
  border-color: #c084fc;
}
.card.open .arrow {
  transform: rotate(-135deg);
}

/* 卡片详情：默认收起 */
.card-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

/* 展开状态 */
.card.open + .card-details {
  max-height: 300px; /* 足够容纳内部内容 */
}

/* ===== 详情卡片视觉修正 ===== */

/* 外层背景浅灰偏白 */
.card-details-content {
  background: rgba(28, 34, 48, 0.95); /* 比主卡片稍浅 */
  border-radius: 0 0 14px 14px;
  padding: 20px 28px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

/* 内层详情块深色，增加高度 */
.detail-box {
  flex: 1;
  background: rgba(12, 16, 26, 0.98);
  border-radius: 10px;
  padding: 20px 24px; /* 高度增加 */
  display: flex;
}


/* 标题和按钮横向布局 */
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center; /* 按钮垂直居中数值 */
  width: 100%;
}

/* 左边文字块 */
.detail-title {
  color: rgba(255,255,255,0.55);
  font-size: 13px;
  margin-bottom: 2px;
}
.detail-value {
  font-weight: 700;
  font-size: 16px;
  color: white;
  margin-bottom: 2px;
}
.detail-subvalue {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}



/* Rewards 渐变修正版 */
/* Rewards 渐变文字 + 悬停卡片 */
.rewards {
  position: relative;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.25s ease;
}

/* 渐变文字 */
.rewards::before {
  content: "Rewards";
  background: linear-gradient(100deg, #fde047 10%, #facc15 20%, #f59e0b 35%, #f472b6 55%, #e879f9 75%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  z-index: 1;
}

/* 悬停卡片效果（浅灰背景） */
.rewards:hover {
  background-color: rgba(240, 240, 240, 0.08); /* 浅灰卡片 */
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transform: translateY(-1px);
}





/* Priority 卡片悬停效果 */
.nav-right .priority {
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.25s ease;
}
.nav-right .priority:hover {
  background: rgba(255,255,255,0.08);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transform: translateY(-1px);
}

/* 齿轮卡片悬停效果 */
.gear-icon {
  padding: 6px;
  border-radius: 8px;
  transition: all 0.25s ease;
}
.gear-icon:hover {
  background: rgba(255,255,255,0.08);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transform: translateY(-1px);
}



/* 齿轮按钮 hover 卡片效果 */
.gear-icon {
  padding: 6px;
  border-radius: 8px;
  transition: all 0.25s ease;
}
.gear-icon:hover {
  background: rgba(255,255,255,0.08);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transform: translateY(-1px);
}

.gradient-text {
  background: linear-gradient(90deg, #b06ff9, #60a5fa, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

nav a:nth-child(6) { /* Staking 渐变文字 */
  background: linear-gradient(100deg, #fde047 10%, #facc15 20%, #f59e0b 35%, #f472b6 55%, #e879f9 75%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}

nav a:nth-child(6) .new-badge {
  background: linear-gradient(100deg, #fde047 10%, #facc15 20%, #f59e0b 35%, #f472b6 55%, #e879f9 75%, #c084fc 100%);
  -webkit-background-clip: border-box;
  -webkit-text-fill-color: black;
  color: black;
  font-weight: 700;
  font-size: 9px;       /* 调小字号 */
  transform: skewX(-12deg);
  padding: 1px 4px;     /* 缩小内边距 */
  border-radius: 3px;   /* 更贴近目标站圆角 */
  display: inline-block;
}


/* === 弹窗通用样式：右侧滑入 + 阴影亮度调整 === */
.modal {
  position: fixed;
  right: 20px;
  top: 80px;
  width: 320px;
  background: rgba(28, 34, 48, 0.96); /* 背景比之前亮一些，更灰白 */
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3); /* 初始阴影稍淡 */
  z-index: 1000;
  padding: 16px;
  color: white;
  opacity: 0; /* 初始透明 */
  transform: translateX(30px); /* 初始在右边 */
  pointer-events: none;
  transition:
    opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.25s ease,
    box-shadow 0.25s ease;
}

/* 弹出时背景亮度和阴影加强 */
.modal.show {
  opacity: 1;
  transform: translateX(0); /* 滑入到正常位置 */
  pointer-events: auto;
  background: rgba(36, 42, 58, 0.98); /* 弹出后稍亮 */
  box-shadow: 0 8px 24px rgba(0,0,0,0.45); /* 阴影加深 */
}

.modal.hidden {
  display: none !important;
}



/* 弹窗头部 */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h2 {
  font-size: 18px;
  font-weight: 600;
}
.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: white;
}

/* Rewards 弹窗内容块 */
.reward-box {
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 10px;
  margin: 10px 0;
}
.reward-box.trader {
  border-color: #60a5fa;
}
.reward-box.creator {
  border-color: #f87171;
}
.got-it-btn {
  width: 100%;
  margin-top: 12px;
  padding: 8px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, #fde047, #f472b6, #c084fc);
  color: black;
  font-weight: bold;
  cursor: pointer;
}
.got-it-btn:hover {
  filter: brightness(1.1);
}

/* Priority Modal 调整大小贴近目标站 */
.priority-modal {
  position: fixed;
  right: 20px;
  top: 80px;
  width: 340px;
  background: rgba(28, 34, 48, 0.98);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 12px 30px rgba(0,0,0,0.55);
  color: white;
  z-index: 1000;
  padding: 16px;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
}
.priority-modal.show {
  transform: translateX(0);
  opacity: 1;
}

/* Header */
.priority-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.priority-modal .modal-header h2 {
  font-size: 15px;
  font-weight: 600;
}
.priority-modal .modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
}

/* 描述和提示文字 */
.priority-desc, .priority-tip {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  margin: 10px 0;
  line-height: 1.4;
}

/* Priority Group */
.priority-group {
  margin-top: 10px;
}
.group-title {
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
  color: rgba(255,255,255,0.7);
}
.btn-group {
  display: flex;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  overflow: hidden;
}
.btn-group button {
  flex: 1;
  padding: 6px 0;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn-group button.active {
  background: rgba(56,189,248,0.9);
  color: #0f172a;
}
.btn-group button:hover {
  background: rgba(255,255,255,0.1);
}

/* 滑块 */
.priority-slider {
  margin: 14px 0;
}
.priority-slider label {
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
  color: rgba(255,255,255,0.7);
}
.priority-slider input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 9999px;
  background: linear-gradient(
    to right,
    #38bdf8 0%,
    #38bdf8 0%,
    rgba(255,255,255,0.2) 0%,
    rgba(255,255,255,0.2) 100%
  );
  outline: none;
  transition: background 0.15s ease;
}
.priority-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 4px rgba(56,189,248,0.8);
  cursor: pointer;
}

#priority-value {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}

/* Save 按钮 */
.save-btn {
  width: 100%;
  padding: 8px;
  border-radius: 9999px;
  background: linear-gradient(90deg, #22d3ee, #06b6d4);
  border: none;
  color: #0f172a;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: filter 0.25s ease;
}
.save-btn:hover {
  filter: brightness(1.1);
}

/* 基础：所有常用按钮都使用 inline-flex，居中显示 */
.connect-btn, .wallet-btn, .stake-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 6px 12px !important;
  font-size: 14px !important;
  font-weight: 500;
  line-height: 1;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  min-width: auto; /* 允许根据内容自然撑开 */
}

/* .wallet-btn：卡片内的操作按钮（保留你原来的视觉风格） */
.wallet-btn {
  background: #00c2ff !important;
  color: #000 !important;
  padding: 6px 12px !important;
}

/* .connect-btn（header）基础样式恢复/保留PC样式 - 但不要覆盖所有页面上的connect-btn */
.connect-btn {
  background: linear-gradient(to right, #22d3ee, #06b6d4); /* 若你有更原始的样式，可替换 */
  color: black;
  padding: 9px 20px;
  border-radius: 8px;
}

/* svg 图标抗压缩 */
.connect-btn .wallet-icon,
.wallet-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: block;
}

/* 限定 header 的 connect 按钮（不会影响卡片内按钮） */
.nav-right .connect-btn {
  /* 最小宽度，让 header 按钮在移动端也不会塌陷 */
  min-width: 88px;
}


/* 代币全称样式 */
.token-fullname {
  font-size: 12px;       /* 比简称小一号 */
  color: #9ca3af;        /* 灰色（和副标题一样） */
  margin-left: 6px;      /* 与简称保持间距 */
  font-weight: 400;      /* 不要太粗 */
}

.pagination {
  display: flex;
  justify-content: center;
  margin: 20px 0;
  gap: 6px;
  flex-wrap: wrap;
}

.page-btn {
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  background: rgba(36, 42, 58, 0.9);
  color: #fff;
  cursor: pointer;
  transition: all 0.25s ease;
}

.page-btn:hover:not(:disabled) {
  background: linear-gradient(90deg, #fde047, #f472b6, #c084fc);
  color: black;
  font-weight: bold;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-btn.active {
  background: linear-gradient(90deg, #f472b6, #c084fc);
  color: #000;
  font-weight: bold;
}

.ellipsis {
  color: rgba(255,255,255,0.5);
  padding: 6px 8px;
  user-select: none;
}

.mobile-nav {
  display: none;
}


/* 搜索框容器 */
.search-box {
  position: relative;
  width: 260px;         /* 固定宽度（PC） */
  max-width: 100%;      /* 移动端不超出 */
}

/* 输入框 */
.search-box input {
  width: 100%;
  padding: 8px 32px 8px 2px;  /* 右边留空间给图标 */
  border: 1px solid #374151;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-size: 14px;
  outline: none;
}

/* 图标 */
.search-box svg {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 16px;          /* 固定大小 */
  height: 16px;
  transform: translateY(-50%);
  color: #9ca3af;       /* 灰色 */
  pointer-events: none; /* 不遮挡点击 */
}


.social-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px; /* 图标间距 */
  margin-top: 40px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.4); /* 浅灰色 */
  font-size: 28px; /* 图标大小 */
}

/* 悬停时轻微亮起 */
.social-footer a {
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.2s ease;
}

.social-footer a:hover {
  color: rgba(255, 255, 255, 0.8);
}



/* ====== 移动端响应式 ====== */
@media screen and (max-width: 768px) {
    
    .social-footer {
    position: relative;
    margin-top: 16px;
    margin-bottom: 80px; /* 保证在底部菜单上方 */
    font-size: 24px; /* 稍小一点 */
    gap: 30px;
  }
    
    
    .pagination {
    margin-bottom: 60px; /* 预留空间，避免被底部导航挡住 */
  }

.flex {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .pagination button {
    min-width: 32px;
    height: 32px;
    font-size: 14px;
    padding: 0 6px;
  }
    
    .mobile-nav {
  display: flex;
  justify-content: space-between;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 52px;               /* 固定高度 */
  background: #111;           /* 或者你页面的背景色 */
  border-top: 1px solid #222; /* 顶部分隔线 */
  padding: 0 8px;             /* 左右留出安全间隔 */
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.3); /* 底部阴影 */
  z-index: 999;               /* 确保在最上层 */
}

.mobile-nav .nav-item {
  display: flex;
  flex-direction: column;   /* 图标在上，文字在下 */
  align-items: center;
  justify-content: center;
  padding: 4px 0;
  font-size: 11px;
}

.mobile-nav .icon {
  font-size: 18px;
  line-height: 1;
  margin-bottom: 2px;
}

  .mobile-nav .new-badge {
    background: #ff4081;
    color: #fff;
    font-size: 9px;
    padding: 2px 4px;
    border-radius: 6px;
    margin-left: 2px;
    vertical-align: top;
  }

  /* 卡片堆叠，单列显示 */
  .card {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 两列布局 */
    grid-template-areas: 
      "token token"
      "pending staked"
      "apr liquidity"
      "action action"
      "arrow arrow";
    gap: 12px;
    padding: 16px;
  }

  .token {
    grid-area: token;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
  }

  /* Pending Rewards */
  .cell.pending {
    grid-area: pending;
    text-align: center;
  }

  /* Staked */
  .cell.staked {
    grid-area: staked;
    text-align: center;
  }

  /* APR */
  .cell.apr {
    grid-area: apr;
    text-align: center;
  }

  /* Liquidity */
  .cell.liquidity {
    grid-area: liquidity;
    text-align: center;
  }

  .action {
    grid-area: action;
    text-align: right;
    margin-top: 8px;
  }
  
  .arrow {
    grid-area: action;
    text-align: left;
    margin-top: 8px;
    margin: 12px 0;
  }
  


  /* 内容区域缩小间距 */
  .content {
    max-width: 100%;
    margin: 24px auto;
    padding: 0 12px;
  }
  .title {
    font-size: 28px;
  }
  .subtitle {
    font-size: 14px;
    margin-bottom: 24px;
  }

  /* 使详情区竖排，两个 detail-box 垂直堆叠 */
  .card-details-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    padding: 12px;
    box-sizing: border-box;
  }

  /* 弹窗宽度调整为全屏宽度 - 边距，但仅在移动端生效 */
  .modal, .priority-modal {
    width: calc(100% - 32px);
    right: 16px;
    top: 40px;
  }



/* 隐藏 PC 的大导航菜单 */
  nav {
    display: none !important;
  }

.mobile-nav {
  display: flex !important;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: #0d111c;
  border-top: 1px solid rgba(255,255,255,0.08);
  justify-content: space-around;
  align-items: center;
  z-index: 9999;
}
  
/* 顶部导航精简横排 */
.navbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  flex-wrap: nowrap;
  width: 100%;
  box-sizing: border-box;
}

/* 左边只保留 LOGO + Staking */
.nav-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

/* Logo 后面加 "Staking" */
.logo {
  display: inline-flex;
  align-items: center;
}
.logo::after {
  content: "";
  font-size: 16px;
  font-weight: 600;
  margin-left: 6px;
  color: #fff;
  display: inline-block;
}

/* 右边：Rewards + Connect（隐藏 Priority） */
  .nav-right {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    max-width: 55%;
    flex-wrap: nowrap;
    overflow: hidden;
  }
  .nav-right .priority {
    display: none; /* 可选：小屏下隐藏 Priority */
  }
  
  .wallet-btn, .stake-btn {
    padding: 10px 12px !important;
    font-size: 13px !important;
  }

  /* header connect 的视觉：更紧凑 */
  .nav-right .connect-btn {
    padding: 6px 10px !important;
    font-size: 14px !important;
    border-radius: 6px;
    /* 使用 JS 设置顺序（见 JS)，这里确保默认 CSS 不破坏 order */
    min-width: 80px;
  }

  /* 保证没有任何伪元素或 visibility 操作残留会影响按钮布局 */
  .connect-btn .btn-text,
  .connect-btn span {
    /* 不强行隐藏或用伪元素替换文字 —— JS 会直接改文本 */
    visibility: visible !important;
    position: static !important;
    display: inline !important;
  }

.modal {
    left: 50% !important;        /* 居中 */
    top: 50% !important;         /* 居中 */
    right: auto !important;      /* 取消右对齐 */
    width: 90% !important;       /* 宽度缩小到屏幕的 90% */
    max-width: 360px;            /* 避免太宽 */
    transform: translate(-50%, -50%) !important; /* 居中显示 */
    border-radius: 12px;         /* 移动端圆角稍微小一点 */
  }

  .modal .modal-header h2 {
    font-size: 16px;
  }

  .modal .modal-section h3 {
    font-size: 15px;
  }

  .modal .modal-section p,
  .modal .modal-section li {
    font-size: 14px;
    line-height: 1.4;
  }

  .modal .got-it-btn {
    width: 100%;
    font-size: 14px;
    padding: 10px;
  }
  
}