@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700;800&family=Sora:wght@600;700;800&display=swap");

:root {
  --bg-1: #fff8ef;
  --bg-2: #ffe5c7;
  --ink-strong: #1e2733;
  --ink-main: #2a3545;
  --ink-soft: #586a80;
  --line: #d9cdbf;
  --board: rgba(255, 250, 244, 0.76);
  --board-line: rgba(201, 178, 152, 0.55);
  --panel-1: #fff7ea;
  --panel-2: #eef8ff;
  --panel-3: #f7f8ea;
  --panel-4: #ffefed;
  --card: #ffffff;
  --card-hover: #fffbf6;
  --accent: #d75a1f;
  --accent-strong: #a63b0e;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-board: 0 18px 40px rgba(85, 53, 20, 0.12);
  --shadow-card: 0 8px 20px rgba(47, 35, 20, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  padding: clamp(14px, 2.2vw, 34px);
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.6;
  color: var(--ink-main);
  background:
    radial-gradient(900px 520px at 95% -10%, rgba(246, 146, 32, 0.2), transparent 62%),
    radial-gradient(700px 420px at 0% 0%, rgba(35, 164, 229, 0.16), transparent 58%),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.22) 0,
      rgba(255, 255, 255, 0.22) 8px,
      rgba(255, 255, 255, 0.05) 8px,
      rgba(255, 255, 255, 0.05) 16px
    ),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
}

.hero-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(10px, 1.5vw, 16px);
  align-items: center;
}

.hero-logo {
  width: clamp(64px, 6.2vw, 92px);
  height: clamp(64px, 6.2vw, 92px);
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(58, 35, 10, 0.22));
}

.hero-copy {
  min-width: 0;
}

#page-title {
  margin: 0;
  font-family: "Sora", "Noto Sans TC", sans-serif;
  font-size: clamp(1.9rem, 3.2vw, 3.3rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--ink-strong);
  text-wrap: balance;
  animation: title-rise 620ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-tagline {
  margin: 7px 0 0;
  font-family: "Sora", "Noto Sans TC", sans-serif;
  font-size: clamp(0.68rem, 1vw, 0.88rem);
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

#resource-list-container {
  display: grid;
  gap: clamp(14px, 1.8vw, 24px);
  margin-top: clamp(16px, 2.2vw, 28px);
}

.site-footer {
  margin-top: clamp(10px, 2vw, 22px);
  padding: 10px 6px 4px;
  text-align: center;
}

.site-footer__copyright {
  margin: 0;
  font-family: "Sora", "Noto Sans TC", sans-serif;
  font-size: clamp(0.68rem, 0.95vw, 0.8rem);
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  opacity: 0.9;
}

.resource-board-title {
  margin: 0 0 8px;
  padding-left: 4px;
  font-family: "Sora", "Noto Sans TC", sans-serif;
  font-size: clamp(1rem, 1.4vw, 1.28rem);
  color: var(--ink-strong);
}

.resource-list-container {
  position: relative;
  padding: clamp(12px, 1.6vw, 20px);
  border: 1px solid var(--board-line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-board);
  background: var(--board);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  column-count: 3;
  column-gap: clamp(12px, 1.4vw, 20px);
}

.resource-section {
  display: inline-block;
  width: 100%;
  margin: 0 0 clamp(12px, 1.4vw, 20px);
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(10px, 1.2vw, 14px);
  box-shadow: 0 2px 0 rgba(180, 139, 99, 0.35), 0 8px 14px rgba(57, 35, 11, 0.08);
  animation: section-drop 560ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.resource-section:nth-child(4n + 1) {
  background: var(--panel-1);
}

.resource-section:nth-child(4n + 2) {
  background: var(--panel-2);
}

.resource-section:nth-child(4n + 3) {
  background: var(--panel-3);
}

.resource-section:nth-child(4n + 4) {
  background: var(--panel-4);
}

.resource-section:nth-child(1) {
  animation-delay: 40ms;
}

.resource-section:nth-child(2) {
  animation-delay: 120ms;
}

.resource-section:nth-child(3) {
  animation-delay: 180ms;
}

.resource-section:nth-child(n + 4) {
  animation-delay: 240ms;
}

.resource-section__title {
  margin: 0 0 10px;
  padding: 6px 10px;
  border-radius: 10px;
  font-family: "Sora", "Noto Sans TC", sans-serif;
  font-size: clamp(0.96rem, 1.2vw, 1.16rem);
  line-height: 1.3;
  color: var(--ink-strong);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(214, 190, 164, 0.7);
}

.token-price-section {
  background: linear-gradient(155deg, rgba(255, 252, 245, 0.96) 0%, rgba(239, 248, 255, 0.95) 100%);
}

.token-mini-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.token-mini-item {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 7px;
  min-height: 52px;
  border-radius: var(--radius-md);
  border: 1px solid #e4dbd0;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 10px rgba(52, 37, 18, 0.08);
  padding: 7px 8px;
}

.token-mini-logo {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1px solid #d8dce5;
  background: #ffffff;
  object-fit: contain;
}

.token-mini-logo--placeholder {
  background: linear-gradient(145deg, #fffdf8, #f4f8ff);
  border-style: dashed;
}

.token-mini-main {
  min-width: 0;
}

.token-mini-symbol {
  display: block;
  margin: 0;
  font-family: "Sora", "Noto Sans TC", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink-strong);
}

.token-mini-price {
  display: block;
  margin: 2px 0 0;
  font-family: "Sora", "Noto Sans TC", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink-strong);
}

.token-mini-change {
  margin: 0;
  font-family: "Sora", "Noto Sans TC", sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.token-mini-change.is-up {
  color: #0f8d4a;
}

.token-mini-change.is-down {
  color: #c1372f;
}

.token-mini-change.is-flat {
  color: var(--ink-soft);
}

.network-fee-panel {
  margin-top: 10px;
  border-top: 1px dashed #d8ccbd;
  padding-top: 8px;
}

.network-fee-title {
  margin: 0 0 6px;
  font-family: "Sora", "Noto Sans TC", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.network-fee-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.network-fee-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  border-radius: 10px;
  border: 1px solid #e5d8c9;
  background: rgba(255, 255, 255, 0.88);
  padding: 6px 8px;
}

.network-fee-item__label {
  font-size: 0.72rem;
  color: var(--ink-main);
  font-weight: 700;
}

.network-fee-item__value {
  font-family: "Sora", "Noto Sans TC", sans-serif;
  font-size: 0.72rem;
  color: var(--ink-strong);
  font-weight: 700;
}

.network-fee-item__hint {
  grid-column: 1 / -1;
  font-size: 0.69rem;
  color: var(--ink-soft);
  line-height: 1.3;
}

.resource-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.resource-item {
  margin: 0;
}

.resource-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 9px 10px;
  border-radius: var(--radius-md);
  border: 1px solid #e2d9ce;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  box-shadow: var(--shadow-card);
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
  animation: card-rise 420ms ease both;
}

.resource-link:hover,
.resource-link:focus-visible {
  transform: translateY(-2px);
  border-color: #d0a47b;
  background: var(--card-hover);
  outline: none;
}

.resource-link.no-logo {
  grid-template-columns: 1fr auto;
}

.resource-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: contain;
  border: 1px solid #d8dce5;
  background: #ffffff;
  padding: 3px;
}

.resource-main {
  min-width: 0;
}

.resource-title {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.3;
  font-weight: 700;
  color: var(--ink-strong);
}

.resource-url {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  word-break: break-all;
  opacity: 0.9;
}

.resource-arrow {
  font-family: "Sora", "Noto Sans TC", sans-serif;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  padding-left: 2px;
  transform: translateX(0) translateY(0);
  transition: transform 150ms ease, color 150ms ease;
}

.resource-link:hover .resource-arrow,
.resource-link:focus-visible .resource-arrow {
  color: var(--accent-strong);
  transform: translateX(2px) translateY(-1px);
}

.resource-item:nth-child(1) .resource-link {
  animation-delay: 30ms;
}

.resource-item:nth-child(2) .resource-link {
  animation-delay: 65ms;
}

.resource-item:nth-child(3) .resource-link {
  animation-delay: 95ms;
}

.resource-item:nth-child(n + 4) .resource-link {
  animation-delay: 130ms;
}

@keyframes title-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes section-drop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes card-rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1120px) {
  .resource-list-container {
    column-count: 2;
  }
}

@media (max-width: 760px) {
  .token-mini-grid {
    grid-template-columns: 1fr;
  }

  body {
    padding: 12px;
  }

  .hero-tagline {
    margin-top: 6px;
    letter-spacing: 0.12em;
  }

  .hero-header {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .hero-logo {
    width: 68px;
    height: 68px;
  }

  .resource-list-container {
    column-count: 1;
    padding: 10px;
    column-gap: 10px;
  }

  .resource-link {
    min-height: 62px;
    padding: 8px 9px;
  }

  .resource-title {
    font-size: 0.9rem;
  }

  .resource-url {
    font-size: 0.76rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  #page-title,
  .resource-section,
  .resource-link {
    animation: none;
  }

  .resource-link {
    transition: none;
  }

  .resource-arrow {
    transition: none;
    transform: none;
  }
}
