/* ============================================================
   Hua Liang - Page-specific & Component Styles
   ============================================================ */

/* ---- Feature List ---- */
.feature-list { display: flex; flex-direction: column; gap: 1rem; }

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.feature-item:hover { border-color: rgba(0,212,255,0.35); }

.feature-item .fi-icon {
  width: 36px;
  height: 36px;
  background: rgba(0,212,255,0.08);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.feature-item h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.feature-item p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }

/* ---- Coin Launch Steps ---- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
  transition: all var(--transition);
}

.step-card:hover { border-color: rgba(0,212,255,0.4); transform: translateY(-4px); }

.step-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(0,212,255,0.15);
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  line-height: 1;
}

.step-card h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.step-card p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }

/* ---- Blockchain Nodes Visual ---- */
.blockchain-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  padding: 3rem 0;
}

.bc-node {
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--primary);
  letter-spacing: 1px;
  position: relative;
  transition: all var(--transition);
  cursor: default;
  user-select: none;
}

.bc-node:hover { border-color: var(--primary); box-shadow: 0 0 20px rgba(0,212,255,0.2); }

.bc-node.active {
  background: rgba(0,212,255,0.1);
  border-color: rgba(0,212,255,0.5);
}

.bc-arrow {
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), rgba(0,212,255,0.3));
  position: relative;
}

.bc-arrow::after {
  content: '';
  position: absolute;
  right: 0;
  top: -3px;
  width: 0;
  height: 0;
  border-left: 6px solid rgba(0,212,255,0.5);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

/* ---- Coin Cards ---- */
.coin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.coin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
}

.coin-card:hover {
  border-color: rgba(0,212,255,0.4);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.coin-symbol {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.coin-symbol.btc { background: rgba(247,147,26,0.15); color: #f7931a; border: 1px solid rgba(247,147,26,0.3); }
.coin-symbol.eth { background: rgba(98,126,234,0.15); color: #627eea; border: 1px solid rgba(98,126,234,0.3); }
.coin-symbol.hl { background: rgba(0,212,255,0.15); color: var(--primary); border: 1px solid rgba(0,212,255,0.3); }
.coin-symbol.stable { background: rgba(26,193,136,0.15); color: #1ac188; border: 1px solid rgba(26,193,136,0.3); }

.coin-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: 2px;
}

.coin-card .ticker {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  background: none;
  border: none;
  padding: 0;
  animation: none;
  white-space: normal;
}

.coin-card p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }

/* ---- FAQ ---- */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  gap: 1rem;
}

.faq-question .faq-toggle {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
  font-size: 1.2rem;
  transition: all var(--transition);
}

.faq-question.open .faq-toggle { transform: rotate(45deg); border-color: var(--primary); }

.faq-answer {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.8;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-answer.open {
  max-height: 300px;
  padding-top: 1rem;
}

/* ---- Filter Tabs ---- */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-tab {
  padding: 6px 16px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-tab:hover,
.filter-tab.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0,212,255,0.05);
}

/* ---- Map placeholder ---- */
.map-placeholder {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin-top: 2rem;
}

.map-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.04) 1px, transparent 1px);
  background-size: 30px 30px;
}

.map-pin {
  position: relative;
  z-index: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--primary);
  letter-spacing: 2px;
}

.map-pin::before {
  content: '📍';
  display: block;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* ---- Scroll top button ---- */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--primary);
  font-size: 1.2rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition);
  pointer-events: none;
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.scroll-top:hover {
  background: rgba(0,212,255,0.1);
  border-color: var(--primary);
}

/* ============================================================
   ANNOUNCEMENT MODAL
   ============================================================ */
@keyframes pulse-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.ann-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(3, 10, 18, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: overlayIn 0.3s ease;
}

.ann-modal-overlay.hidden {
  display: none;
}

.ann-modal {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid rgba(0, 212, 255, 0.35);
  border-radius: var(--radius-lg);
  overflow: hidden; /* 整盒不滚动，滚动在 body 内 */
  animation: modalIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow:
    0 0 60px rgba(0, 212, 255, 0.12),
    0 30px 80px rgba(0, 0, 0, 0.6);
}

.ann-modal-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.ann-glow-1 {
  width: 200px;
  height: 200px;
  top: -60px;
  right: -60px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.1), transparent 70%);
}

.ann-glow-2 {
  width: 150px;
  height: 150px;
  bottom: -40px;
  left: -40px;
  background: radial-gradient(circle, rgba(123, 47, 255, 0.1), transparent 70%);
}

.ann-modal-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 212, 255, 0.03);
}

.ann-latest-badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 1.5px;
  padding: 3px 9px;
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 4px;
  color: var(--primary);
  animation: pulse-glow 2s infinite;
}

.ann-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
}

.ann-modal-close:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0, 212, 255, 0.08);
  transform: rotate(90deg);
}

.ann-modal-body {
  position: relative;
  z-index: 1;
  padding: 1.75rem 1.5rem 1.25rem;
  overflow-y: auto;
  /* 减去 header(≈72px) + footer(≈72px) + 自身 padding，剩余空间 */
  max-height: calc(90vh - 72px - 72px - 3rem);
  overscroll-behavior: contain;
}

.ann-modal-title {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.ann-modal-divider {
  height: 1px;
  background: linear-gradient(90deg, var(--primary), rgba(123, 47, 255, 0.4), transparent);
  margin-bottom: 1.25rem;
  opacity: 0.5;
}

.ann-modal-text {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.85;
}

.ann-modal-text strong {
  color: #e0f0ff;
}

.ann-modal-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

/* Custom scrollbar — applied to body only */
.ann-modal-body::-webkit-scrollbar {
  width: 4px;
}
.ann-modal-body::-webkit-scrollbar-track {
  background: rgba(0, 212, 255, 0.04);
  border-radius: 2px;
}
.ann-modal-body::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.25);
  border-radius: 2px;
}
.ann-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.45);
}

@media (max-width: 480px) {
  .ann-modal-overlay {
    align-items: flex-start;
    padding: 1rem 0.75rem;
    padding-top: max(1rem, env(safe-area-inset-top));
  }
  .ann-modal {
    max-height: calc(100vh - 2rem);
  }
  .ann-modal-body {
    /* 移动端 header+footer 更紧凑 */
    max-height: calc(100vh - 2rem - 72px - 72px - 2rem);
  }
  .ann-modal-header { flex-wrap: wrap; }
  .ann-modal-footer { flex-direction: column; }
  .ann-modal-footer .btn { width: 100%; justify-content: center; }
}
