/* ========================================
   黑料网区块链存证与数据浏览器 - 主样式表
   设计风格：深灰+青绿区块链科技风
   布局：移动端优先，flex/grid响应式
   ======================================== */

:root {
  --primary: #00BCD4;
  --secondary: #004D40;
  --bg: #1A2332;
  --card: #243447;
  --accent: #76FF03;
  --text: #B0BEC5;
  --text-light: #ECEFF1;
  --text-muted: #607D8B;
  --border: rgba(0, 188, 212, 0.2);
  --radius: 4px;
  --shadow: 0 2px 12px rgba(0, 188, 212, 0.15);
  --shadow-lg: 0 8px 32px rgba(0, 188, 212, 0.2);
  --font-mono: 'Courier New', 'SF Mono', 'Fira Code', monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --max-width: 1200px;
}

/* 基础重置 */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-light);
  font-weight: 700;
  line-height: 1.3;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

@media (min-width: 768px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.25rem; }
  h3 { font-size: 1.625rem; }
}

/* 容器 */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

/* 导航栏 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(26, 35, 50, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  transition: transform 0.3s var(--ease-out);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
}

.nav-brand svg {
  width: 28px;
  height: 28px;
}

.nav-links {
  display: none;
  list-style: none;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s var(--ease-out);
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-light);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out);
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
}

/* 移动端菜单 */
.mobile-menu {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background: rgba(26, 35, 50, 0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 1rem;
  z-index: 999;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text);
  border-radius: var(--radius);
}

.mobile-menu a:hover {
  background: var(--card);
  color: var(--primary);
}

/* 首屏英雄区 */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1rem 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26, 35, 50, 0.7) 0%, rgba(26, 35, 50, 0.95) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 3.5rem;
  }
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text);
  margin-bottom: 2rem;
  line-height: 1.8;
}

/* 搜索框 */
.search-box {
  display: flex;
  gap: 0;
  max-width: 600px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.search-box input {
  flex: 1;
  padding: 1rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-right: none;
  color: var(--text-light);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-box input:focus {
  border-color: var(--primary);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-box button {
  padding: 1rem 1.5rem;
  background: var(--primary);
  color: #fff;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s var(--ease-out), transform 0.16s var(--ease-out);
}

.search-box button:hover {
  background: #00ACC1;
}

.search-box button:active {
  transform: scale(0.97);
}

/* 区块 */
.section {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* 卡片网格 */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* 卡片 */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.card-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 188, 212, 0.1);
  border-radius: var(--radius);
  color: var(--primary);
}

.card-title {
  font-size: 1rem;
  color: var(--text-light);
}

.card-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* 区块列表 */
.block-list {
  list-style: none;
}

.block-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  transition: border-color 0.2s;
}

.block-item:hover {
  border-color: var(--primary);
}

.block-height {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--primary);
  font-weight: 700;
}

.block-hash {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.block-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* 验证状态 */
.verify-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

.verify-badge--success {
  background: rgba(118, 255, 3, 0.1);
  color: var(--accent);
  border: 1px solid rgba(118, 255, 3, 0.3);
}

.verify-badge--pending {
  background: rgba(0, 188, 212, 0.1);
  color: var(--primary);
  border: 1px solid rgba(0, 188, 212, 0.3);
}

/* 节点状态 */
.node-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.node-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* 哈希值动画 */
.hash-display {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--primary);
  word-break: break-all;
  padding: 0.75rem 1rem;
  background: rgba(0, 188, 212, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s var(--ease-out), transform 0.16s var(--ease-out);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: #00ACC1;
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-secondary:hover {
  background: rgba(0, 188, 212, 0.1);
  color: var(--primary);
}

.btn-accent {
  background: var(--accent);
  color: #1A2332;
}

.btn-accent:hover {
  background: #64DD17;
  color: #1A2332;
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb span {
  color: var(--text);
}

/* 页脚 */
.footer {
  background: #141C28;
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-brand {
  color: var(--primary);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.footer-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.footer-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* FAQ */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--card);
  border: none;
  text-align: left;
  color: var(--text-light);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s;
}

.faq-question:hover {
  background: rgba(0, 188, 212, 0.05);
}

.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--primary);
  transition: transform 0.3s var(--ease-out);
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 1.25rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease-out), padding 0.3s;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  padding: 1rem 1.25rem;
  max-height: 500px;
}

/* 统计数字 */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 768px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-item {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* 标签 */
.tag {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: rgba(0, 188, 212, 0.1);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.75rem;
  color: var(--primary);
}

/* 进度条 */
.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(0, 188, 212, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 3px;
  transition: width 1s var(--ease-in-out);
}

/* 表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.data-table th {
  padding: 0.75rem 1rem;
  background: var(--card);
  color: var(--text-muted);
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(0, 188, 212, 0.08);
  color: var(--text);
}

.data-table tr:hover td {
  background: rgba(0, 188, 212, 0.03);
}

.data-table .mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--primary);
}

/* 页面内容区 */
.page-content {
  padding-top: 5rem;
  min-height: 80vh;
}

.page-title {
  margin-bottom: 1rem;
}

.page-desc {
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 700px;
  line-height: 1.8;
}

/* 内容文章 */
.article-content {
  max-width: 800px;
  line-height: 1.9;
}

.article-content h2 {
  margin: 2rem 0 1rem;
  font-size: 1.5rem;
}

.article-content h3 {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.25rem;
}

.article-content p {
  margin-bottom: 1rem;
  color: var(--text);
}

.article-content ul, .article-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content code {
  font-family: var(--font-mono);
  background: rgba(0, 188, 212, 0.08);
  padding: 0.125rem 0.375rem;
  border-radius: 2px;
  font-size: 0.8125rem;
  color: var(--primary);
}

.article-content pre {
  background: #141C28;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.article-content pre code {
  background: none;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--text);
}

/* 相关链接 */
.related-links {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-links h3 {
  margin-bottom: 1rem;
}

.related-links ul {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.related-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  color: var(--text);
  font-size: 0.875rem;
}

.related-links a::before {
  content: '→';
  color: var(--primary);
}

.related-links a:hover {
  color: var(--primary);
}

/* 动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hashReveal {
  from {
    opacity: 0;
    letter-spacing: 4px;
  }
  to {
    opacity: 1;
    letter-spacing: normal;
  }
}

.animate-fade-in {
  animation: fadeInUp 0.6s var(--ease-out) forwards;
  opacity: 0;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* 区块链连接线 */
.chain-connector {
  width: 2px;
  height: 24px;
  background: linear-gradient(180deg, var(--primary), transparent);
  margin: 0 auto;
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--secondary);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* 打印样式 */
@media print {
  .navbar, .footer, .mobile-menu {
    display: none;
  }
  body {
    background: #fff;
    color: #333;
  }
}
