
:root {
  --primary-pink: #e8a0b0;
  --deep-pink: #c97a8e;
  --light-pink: #fce4ec;
  --paper-white: #faf7f2;
  --ink-black: #2b2b2b;
  --soft-gray: #6b6b6b;
  --border-pink: #f0c0cc;
  --accent-gold: #c9a961;
  --shadow-soft: rgba(200, 150, 160, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Serif SC", "PingFang SC", "Microsoft YaHei", serif;
  background-color: var(--paper-white);
  color: var(--ink-black);
  line-height: 1.8;
  overflow-x: hidden;
}

/* 水墨背景纹理 */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(232,160,176,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(201,169,97,0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* 卷轴装饰 */
.scroll-edge {
  background: linear-gradient(to right, 
    transparent 0%, 
    rgba(200,150,160,0.1) 5%, 
    rgba(200,150,160,0.1) 95%, 
    transparent 100%);
  border-left: 2px solid var(--border-pink);
  border-right: 2px solid var(--border-pink);
}

/* 导航栏 */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250,247,242,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-pink);
  padding: 0.6rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.nav-brand {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--deep-pink);
  letter-spacing: 0.1em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--soft-gray);
  font-size: 0.9rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--deep-pink);
  background: var(--light-pink);
}

/* 页面转场动画 */
.page-transition-enter {
  animation: inkReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes inkReveal {
  0% {
    opacity: 0;
    transform: scale(0.98) translateY(10px);
    filter: blur(4px);
  }
  50% {
    filter: blur(0px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* 水墨晕染转场 */
.ink-transition {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle, var(--ink-black) 0%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.6s ease;
}

.ink-transition.active {
  opacity: 1;
  pointer-events: all;
}

/* 容器 */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* 标题样式 */
h1 {
  font-size: 2rem;
  color: var(--deep-pink);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-pink);
  position: relative;
}

h1::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 120px;
  height: 2px;
  background: var(--deep-pink);
}

h2 {
  font-size: 1.5rem;
  color: var(--ink-black);
  margin: 2rem 0 1rem;
  padding-left: 1rem;
  border-left: 4px solid var(--primary-pink);
}

h3 {
  font-size: 1.2rem;
  color: var(--soft-gray);
  margin: 1.5rem 0 0.8rem;
}

/* 卡片 */
.card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 12px var(--shadow-soft);
  border: 1px solid var(--border-pink);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(200, 150, 160, 0.25);
}

/* 按钮 */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: linear-gradient(135deg, var(--primary-pink), var(--deep-pink));
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(200, 120, 140, 0.3);
  font-family: inherit;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(200, 120, 140, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--deep-pink);
  border: 2px solid var(--deep-pink);
  box-shadow: none;
}

.btn-outline:hover {
  background: var(--light-pink);
}

/* 标签 */
.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--light-pink);
  color: var(--deep-pink);
  border-radius: 4px;
  font-size: 0.8rem;
  margin: 0.2rem;
}

.tag-gold {
  background: rgba(201,169,97,0.15);
  color: #a08040;
}

/* 表格 */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}

th, td {
  padding: 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--border-pink);
}

th {
  background: var(--light-pink);
  color: var(--deep-pink);
  font-weight: 600;
}

tr:hover {
  background: rgba(252,228,236,0.3);
}

/* 干员卡片网格 */
.operator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.operator-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-pink);
  box-shadow: 0 2px 8px var(--shadow-soft);
  transition: all 0.3s ease;
}

.operator-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(200, 150, 160, 0.2);
}

.operator-header {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: linear-gradient(135deg, var(--light-pink), white);
  gap: 1rem;
}

.operator-avatar {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: var(--border-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--soft-gray);
  flex-shrink: 0;
  overflow: hidden;
}

.operator-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.operator-info h4 {
  color: var(--ink-black);
  margin-bottom: 0.3rem;
}

.operator-body {
  padding: 1rem;
}

.operator-icons {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--light-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--deep-pink);
  border: 1px solid var(--border-pink);
}

/* 分队卡片 */
.squad-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border-pink);
  box-shadow: 0 2px 12px var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.squad-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-pink), var(--accent-gold));
}

.squad-summary {
  background: var(--light-pink);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--deep-pink);
  font-size: 0.95rem;
  line-height: 1.8;
}

/* 视频嵌入 */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  background: var(--ink-black);
  margin: 1rem 0;
}

.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.85rem;
  color: var(--soft-gray);
}

/* 模态框 */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(4px);
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  border: 2px solid var(--border-pink);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.modal-close {
  float: right;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--soft-gray);
  line-height: 1;
}

/* 概率条 */
.prob-bar {
  display: flex;
  align-items: center;
  margin: 0.5rem 0;
}

.prob-label {
  width: 100px;
  font-size: 0.9rem;
  color: var(--soft-gray);
}

.prob-track {
  flex: 1;
  height: 24px;
  background: var(--light-pink);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.prob-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-pink), var(--deep-pink));
  border-radius: 12px;
  transition: width 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  color: white;
  font-size: 0.8rem;
}

/* 计算器 */
.calc-section {
  background: white;
  border-radius: 10px;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border-pink);
}

.calc-input-group {
  margin-bottom: 1.5rem;
}

.calc-input-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--soft-gray);
  font-size: 0.95rem;
}

.calc-input-group select,
.calc-input-group input {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border-pink);
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  background: white;
}

.calc-result {
  background: var(--light-pink);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 1rem;
  border-left: 4px solid var(--deep-pink);
}

/* 黑话页 */
.term-item {
  padding: 1.2rem;
  border-bottom: 1px dashed var(--border-pink);
}

.term-word {
  font-weight: 700;
  color: var(--deep-pink);
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.term-meaning {
  color: var(--soft-gray);
  font-size: 0.95rem;
}

/* 页脚 */
.footer {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--soft-gray);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-pink);
  margin-top: 3rem;
}

/* 响应式 */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav-links {
    justify-content: center;
    gap: 0.4rem;
  }

  .nav-links a {
    font-size: 0.8rem;
    padding: 0.2rem 0.4rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .container {
    padding: 1rem;
  }

  .operator-grid {
    grid-template-columns: 1fr;
  }

  .squad-card {
    padding: 1.2rem;
  }

  .btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* 分流页特殊样式 */
.gate-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
}

.gate-container::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: 
    radial-gradient(circle at 30% 40%, rgba(232,160,176,0.15) 0%, transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(201,169,97,0.1) 0%, transparent 40%);
  pointer-events: none;
}

.gate-title {
  font-size: 2.5rem;
  color: var(--deep-pink);
  margin-bottom: 0.5rem;
  letter-spacing: 0.2em;
  text-align: center;
}

.gate-subtitle {
  color: var(--soft-gray);
  margin-bottom: 3rem;
  font-size: 1.1rem;
  text-align: center;
}

.gate-options {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 800px;
}

.gate-card {
  flex: 1;
  min-width: 280px;
  max-width: 360px;
  background: white;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  border: 2px solid var(--border-pink);
  box-shadow: 0 4px 20px var(--shadow-soft);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
}

.gate-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 40px rgba(200, 150, 160, 0.25);
  border-color: var(--primary-pink);
}

.gate-card h3 {
  font-size: 1.3rem;
  color: var(--deep-pink);
  margin-bottom: 1rem;
}

.gate-card p {
  color: var(--soft-gray);
  font-size: 0.95rem;
  line-height: 1.8;
}

.gate-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.8;
}

/* 新手教程页 */
.tutorial-section {
  max-width: 800px;
  margin: 0 auto;
}

.tutorial-nav {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.tutorial-nav button {
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--border-pink);
  background: white;
  color: var(--soft-gray);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s ease;
}

.tutorial-nav button.active {
  background: var(--deep-pink);
  color: white;
  border-color: var(--deep-pink);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.resource-card {
  background: white;
  border: 1px solid var(--border-pink);
  border-radius: 8px;
  padding: 1.2rem;
  text-align: center;
}

.resource-card .icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.resource-card h4 {
  color: var(--deep-pink);
  margin-bottom: 0.3rem;
  font-size: 1rem;
}

.resource-card p {
  font-size: 0.85rem;
  color: var(--soft-gray);
}

/* 节点地图示意 */
.node-map {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  margin: 1.5rem 0;
}

.node-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.node-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--light-pink);
  border: 2px solid var(--primary-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.node-label {
  font-size: 0.8rem;
  color: var(--soft-gray);
}

/* 隐藏/显示 */
.hidden { display: none !important; }

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--paper-white);
}
::-webkit-scrollbar-thumb {
  background: var(--border-pink);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-pink);
}

/* 打印优化 */
@media print {
  .navbar, .btn, .video-wrapper { display: none; }
  .card { break-inside: avoid; }
}
