:root {
  --bg: #fbfdfc;
  --surface: #ffffff;
  --soft: #f4faf8;
  --soft-2: #eaf3f0;
  --text: #15201d;
  --muted: #65736f;
  --line: #dfe8e5;
  --line-dark: #c8d6d1;
  --black: #101817;
  --brand: #1c7c70;
  --brand-soft: #e7f6f2;
  --aqua: #4fb7c5;
  --blue: #6f8df7;
  --violet: #9b7ee7;
  --rose: #f28482;
  --mint: #9df2be;
  --amber: #f2c66d;
  --green: #1f9d63;
  --red: #d45b5b;
  --shadow: 0 14px 34px rgba(36, 75, 66, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 6%, rgba(79, 183, 197, 0.12), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(242, 198, 109, 0.16), transparent 26%),
    linear-gradient(180deg, #f7fcfa 0, #ffffff 300px),
    var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

body.calm-theme {
  --bg: #f5fbf8;
  --soft: #edf8f3;
  --brand: #287d68;
  --brand-soft: #dff4ed;
}

body.dark-theme {
  --bg: #0f1417;
  --surface: #171f23;
  --soft: #1e282d;
  --soft-2: #263339;
  --text: #edf3f1;
  --muted: #a8b7b3;
  --line: #2b373d;
  --line-dark: #3a4a51;
  --black: #ffffff;
  --brand: #58c7b7;
  --brand-soft: #163430;
  --aqua: #5fc5d2;
  --blue: #8ea2ff;
  --amber: #eec978;
  --green: #55c98b;
  --red: #ef7b7b;
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  background:
    radial-gradient(circle at 10% 4%, rgba(88, 199, 183, 0.14), transparent 26%),
    radial-gradient(circle at 88% 10%, rgba(142, 162, 255, 0.1), transparent 24%),
    linear-gradient(180deg, #111a1e 0, #0f1417 340px),
    var(--bg);
}

body.dark-theme .site-header,
body.dark-theme .table-shell,
body.dark-theme .feature-card,
body.dark-theme .news-item,
body.dark-theme .auth-panel,
body.dark-theme .account-dropdown,
body.dark-theme .tool-card,
body.dark-theme .stat-card,
body.dark-theme .summary-card,
body.dark-theme .chart-card,
body.dark-theme .add-card,
body.dark-theme .feature-card,
body.dark-theme .content-block {
  color: var(--text);
  border-color: var(--line);
  background: rgba(23, 31, 35, 0.96);
}

body.dark-theme input,
body.dark-theme select {
  color: var(--text);
  background: #11191d;
  border-color: var(--line-dark);
}

body.dark-theme .header-portfolio-value {
  background: #173732;
  border-color: #2c5b52;
  color: #83e2d2;
}

body.dark-theme .alert-form-card input,
body.dark-theme .alert-form-card select {
  color: #10231f;
  background: #f7fffc;
  border-color: #7fb9ad;
}

body.dark-theme .current-price-note {
  color: #d8fff6;
  background: #17342f;
  border-color: #2b5b52;
}

body.dark-theme .hero-brand,
body.dark-theme .hero-news,
body.dark-theme .home-dashboard article,
body.dark-theme .risk-panel {
  border-color: var(--line);
  background: linear-gradient(135deg, rgba(23, 31, 35, 0.98), rgba(30, 40, 45, 0.94));
}

body.dark-theme .chart-card canvas,
body.dark-theme .chart-canvas-shell,
body.dark-theme .chart-metrics > span,
body.dark-theme .alert-item,
body.dark-theme .beginner-note,
body.dark-theme .range-tabs,
body.dark-theme .search-row,
body.dark-theme .live-strip {
  color: var(--text);
  border-color: var(--line);
  background: #121b1f;
}

body.dark-theme .main-nav a,
body.dark-theme .outline-button,
body.dark-theme .text-button,
body.dark-theme .details-button {
  color: var(--text);
}

body.dark-theme th {
  color: var(--text);
  background: #1b272c;
}

body.dark-theme td,
body.dark-theme tr,
body.dark-theme .table-shell table {
  border-color: var(--line);
}

body.dark-theme .coin-dot,
body.dark-theme .profile-button,
body.dark-theme .avatar-button {
  background: #26353b;
  color: var(--text);
}

body.dark-theme .avatar-button.has-photo {
  background-color: transparent;
  background-size: cover;
  background-position: center;
}

body.dark-theme .icon-button,
body.dark-theme .outline-button,
body.dark-theme .details-button,
body.dark-theme .theme-switch span {
  color: var(--text);
  background: #141e22;
  border-color: var(--line-dark);
}

body.dark-theme .header-search.open,
body.dark-theme .header-search:focus-within,
body.dark-theme .sort-control,
body.dark-theme .sort-control select {
  color: var(--text);
  background: #11191d;
  border-color: var(--line-dark);
}

body.dark-theme .sort-control span {
  color: var(--muted);
}

body.dark-theme .header-search .header-search-button {
  background: transparent;
  border-color: transparent;
  color: var(--brand);
}

body.dark-theme .logo img,
body.dark-theme .hero-brand img {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

body.dark-theme .primary-button {
  color: #071311;
  background: var(--brand);
  border-color: var(--brand);
}

body.dark-theme .price-cell,
body.dark-theme .summary-card strong,
body.dark-theme .stat-card strong,
body.dark-theme .home-dashboard strong {
  color: var(--text);
}

body.dark-theme .news-content,
body.dark-theme .account-card,
body.dark-theme .risk-breakdown span,
body.dark-theme .learning-choice,
body.dark-theme .nft-collection-card,
body.dark-theme .nft-collection-stats > span,
body.dark-theme .nft-gift-card,
body.dark-theme .nft-last-sale,
body.dark-theme .nft-sale-row,
body.dark-theme .term-popup {
  color: var(--text);
  background: rgba(18, 27, 31, 0.62);
  border-color: var(--line);
}

body.dark-theme .learning-choice.active {
  background: rgba(88, 199, 183, 0.14);
}

body.dark-theme .coin-name small,
body.dark-theme .feature-card p,
body.dark-theme .page-title-row p,
body.dark-theme .portfolio-head p,
body.dark-theme .news-item p,
body.dark-theme .glossary-list dd {
  color: var(--muted);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  max-width: 1180px;
  height: 74px;
  margin: 0 auto;
  padding: 0 22px 0 10px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}

.logo strong {
  font-size: 17px;
  letter-spacing: 0;
  margin-left: -65px;
}

.logo img {
  display: block;
  width: 150px;
  height: 75px;
  object-fit: contain;
  border-radius: 6px;
}

.main-nav {
  display: flex;
  align-self: end;
  gap: 34px;
  height: 38px;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  border-bottom: 3px solid transparent;
  color: #404650;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.main-nav a.active {
  border-color: var(--brand);
  color: var(--brand);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  position: relative;
}

.header-search {
  display: grid;
  grid-template-columns: 36px 0fr;
  align-items: center;
  min-width: 36px;
  border: 1px solid transparent;
  background: transparent;
  transition: grid-template-columns 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.header-search.open,
.header-search:focus-within {
  grid-template-columns: 36px minmax(150px, 210px);
  border-color: var(--line-dark);
  background: var(--surface);
}

.header-search input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0;
  border: 0;
  outline: 0;
  opacity: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  transition: opacity 0.16s ease, padding 0.16s ease;
}

.header-search.open input,
.header-search:focus-within input {
  padding: 0 10px 0 2px;
  opacity: 1;
}

.header-search-button {
  border: 0;
  background: transparent;
}

.header-portfolio-value {
  min-height: 32px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.theme-switch {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 28px;
  cursor: pointer;
}

.theme-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-switch span {
  width: 48px;
  height: 28px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: linear-gradient(90deg, #ffffff, #eef5f2);
  box-shadow: inset 0 1px 2px rgba(21, 32, 29, 0.08);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.theme-switch span::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f2c66d;
  box-shadow: 0 2px 8px rgba(21, 32, 29, 0.18);
  transition: transform 0.2s ease, background 0.2s ease;
}

.theme-switch input:checked + span {
  border-color: #44565d;
  background: linear-gradient(90deg, #151f23, #26353b);
}

.theme-switch input:checked + span::before {
  transform: translateX(20px);
  background: #8ea2ff;
}

.icon-button,
.outline-button,
.profile-button,
.primary-button,
.text-button {
  border-radius: 0;
  font-weight: 800;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-dark);
  background: #fff;
  color: #6b7280;
  font-size: 20px;
}

.header-search .header-search-button {
  width: 36px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 18px;
}

.profile-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--soft-2);
  color: #606773;
}

.outline-button {
  min-height: 34px;
  padding: 0 18px;
  border: 1px solid var(--line-dark);
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

.outline-button.large {
  min-width: 190px;
  min-height: 42px;
}

.primary-button {
  min-height: 40px;
  padding: 0 22px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  font-size: 13px;
}

.primary-button:hover {
  background: #15675d;
}

.guest-actions {
  display: flex;
  gap: 9px;
}

.account-menu {
  display: none;
  position: relative;
}

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

.avatar-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #d1e4de;
  border-radius: 50%;
  background: linear-gradient(135deg, #1c7c70, #78c6a3);
  color: #fff;
  font-weight: 900;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.avatar-button.has-photo span {
  opacity: 0;
}

.account-dropdown {
  display: none;
  position: absolute;
  top: 48px;
  right: 0;
  width: 230px;
  padding: 10px;
  border: 1px solid var(--line-dark);
  background: #fff;
  box-shadow: var(--shadow);
}

.account-menu.open .account-dropdown {
  display: grid;
  gap: 4px;
}

.account-card {
  display: grid;
  gap: 2px;
  padding: 10px;
  margin-bottom: 4px;
  background: var(--brand-soft);
}

.account-card span {
  color: var(--muted);
  font-size: 12px;
}

.account-dropdown button {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-weight: 700;
}

.account-dropdown button:hover {
  background: var(--soft);
}

.primary-button.full {
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
}

.text-button {
  border: 0;
  background: transparent;
  color: #4f5764;
  padding: 0;
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px 56px;
}

.view {
  display: none;
  padding-top: 44px;
}

.view.active {
  display: block;
}

.view.narrow {
  max-width: 460px;
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(260px, 0.82fr);
  align-items: center;
  gap: 28px;
  padding: 42px 0 52px;
  text-align: left;
  background:
    radial-gradient(circle at 28% 10%, rgba(111, 141, 247, 0.13), transparent 28%),
    radial-gradient(circle at 72% 8%, rgba(157, 242, 190, 0.18), transparent 32%),
    radial-gradient(circle at 50% 0%, rgba(28, 124, 112, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(231, 246, 242, 0.5), transparent 70%);
}

.hero-brand,
.hero-news {
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.hero-brand {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 28px;
}

.hero-brand img {
  width: min(300px, 82%);
  height: 170px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 18px;
}

.hero-news {
  display: grid;
  align-content: center;
  min-height: 300px;
  padding: 28px;
  overflow: hidden;
}

.hero-news-image {
  width: calc(100% + 56px);
  height: 190px;
  object-fit: cover;
  margin: -28px -28px 20px;
  border-bottom: 1px solid var(--line);
}

.hero-news span,
.home-auth-prompt span {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}

.hero-news h2 {
  margin: 10px 0;
  font-size: 26px;
  line-height: 1.12;
}

.hero h1 {
  max-width: 680px;
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: 0;
}

.hero p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.home-auth-prompt {
  display: grid;
  gap: 12px;
  justify-items: center;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.home-auth-prompt div {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.feature-grid,
.learning-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

.learning-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.learning-choice {
  display: grid;
  gap: 8px;
  min-height: 96px;
  padding: 18px;
  text-align: left;
  border: 1px solid var(--line-dark);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.learning-choice.active {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.learning-choice strong {
  font-size: 17px;
}

.learning-choice span {
  color: var(--muted);
}

.home-dashboard {
  display: grid;
  grid-template-columns: minmax(220px, 360px);
  justify-content: start;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto 42px;
}

.home-dashboard article {
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(232, 247, 242, 0.88));
  box-shadow: var(--shadow);
}

.home-dashboard article:nth-child(2) {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(238, 242, 255, 0.92));
}

.home-dashboard article:nth-child(3) {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 246, 224, 0.92));
}

.home-dashboard span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
}

.home-dashboard strong {
  color: var(--black);
  font-size: 24px;
}

.feature-card {
  min-height: 92px;
  padding: 22px 24px;
  border: 1px solid var(--line-dark);
  background: #fff;
  box-shadow: var(--shadow);
}

.feature-card:nth-child(1) {
  border-top: 4px solid var(--brand);
}

.feature-card:nth-child(2) {
  border-top: 4px solid var(--amber);
}

.feature-card:nth-child(3) {
  border-top: 4px solid #86b7fe;
}

.feature-card:nth-child(4n) {
  border-top-color: var(--violet);
}

.feature-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.feature-card p,
.page-title-row p,
.portfolio-head p {
  margin: 0;
  color: var(--muted);
}

.content-block h2,
.page-title-row h1,
.portfolio-head h1,
.asset-heading h1,
.auth-panel h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.content-block h2 {
  margin-bottom: 18px;
}

.table-shell {
  overflow-x: auto;
  border: 1px solid var(--line-dark);
  background: #fff;
  box-shadow: var(--shadow);
}

.nft-gift-grid {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.nft-gift-grid.active {
  display: grid;
}

.nft-source-note {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: rgba(79, 183, 197, 0.08);
  color: var(--muted);
  font-size: 13px;
}

.nft-collection-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 18px;
  align-items: center;
  width: 100%;
  padding: 18px;
  border: 1px solid rgba(55, 123, 112, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(79, 183, 197, 0.14), rgba(156, 211, 122, 0.1)),
    var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
}

.nft-collection-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.nft-collection-preview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-2);
}

.nft-collection-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.nft-collection-info {
  display: grid;
  gap: 7px;
}

.nft-collection-info strong {
  font-size: 26px;
  letter-spacing: 0;
}

.nft-collection-info small,
.nft-list-title span {
  color: var(--muted);
}

.nft-collection-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.nft-collection-stats > span {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.nft-collection-stats b {
  color: var(--text);
  font-size: 14px;
}

.nft-collection-action {
  align-self: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--text);
  color: var(--surface);
  font-size: 13px;
  font-weight: 900;
}

.nft-list-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  padding: 4px 2px;
}

.nft-list-title strong {
  font-size: 18px;
}

.nft-gift-card {
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.nft-gift-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--soft-2);
}

.nft-image-missing {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  aspect-ratio: 1;
  background:
    linear-gradient(135deg, rgba(79, 183, 197, 0.1), rgba(242, 169, 59, 0.08));
  color: var(--muted);
  text-align: center;
  padding: 12px;
}

.nft-image-missing span {
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
}

.nft-image-missing small {
  font-size: 11px;
  line-height: 1.35;
}

.nft-gift-card div {
  display: grid;
  gap: 5px;
  padding: 10px;
}

.nft-gift-card strong {
  font-size: 13px;
}

.nft-gift-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.nft-gift-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.nft-price-main {
  color: var(--text);
  font-weight: 900;
}

.nft-price-usd {
  color: var(--muted);
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.nft-sales-panel {
  display: grid;
  gap: 14px;
}

.nft-last-sale {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(31, 157, 99, 0.24);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: rgba(79, 183, 197, 0.08);
}

.nft-last-sale > span,
.nft-sale-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.nft-last-sale strong {
  font-size: 22px;
}

.nft-sales-history {
  display: grid;
  gap: 8px;
}

.nft-sales-history h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.nft-sale-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.nft-sale-row > div {
  display: grid;
  gap: 4px;
}

.nft-sale-row > div:last-child {
  text-align: right;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  height: 48px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--text);
  background: #f6faf8;
  font-size: 13px;
  font-weight: 800;
}

td {
  color: #4a515d;
  font-weight: 600;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr {
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

tbody tr:hover {
  background: #f1faf6;
}

tbody tr:hover .coin-name {
  color: var(--brand);
}

.coin-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.coin-dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
}

.coin-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--brand-soft);
  border: 1px solid var(--line);
  flex: 0 0 28px;
}

.coin-name {
  display: grid;
  gap: 3px;
}

.coin-name small {
  color: var(--muted);
  font-size: 11px;
}

.positive {
  color: var(--green);
}

.negative {
  color: var(--red);
}

.price-cell {
  font-variant-numeric: tabular-nums;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.price-up {
  color: var(--green);
  background: rgba(31, 157, 99, 0.08);
}

.price-down {
  color: var(--red);
  background: rgba(212, 91, 91, 0.08);
}

.details-button {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #b9ddd3;
  background: #ecf8f4;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}

.details-button:hover {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.flash-up {
  animation: flashUp 1.2s ease;
}

.flash-down {
  animation: flashDown 1.2s ease;
}

@keyframes flashUp {
  0% { background: rgba(31, 157, 99, 0.16); }
  100% { background: transparent; }
}

@keyframes flashDown {
  0% { background: rgba(212, 91, 91, 0.16); }
  100% { background: transparent; }
}

.result-pill {
  display: inline-flex;
  min-width: 112px;
  min-height: 13px;
  gap: 4px;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(157, 242, 190, 0.7);
  color: #0a6734;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.result-pill.negative {
  background: rgba(255, 188, 188, 0.72);
  color: #a3262d;
}

.result-pill.positive {
  background: rgba(157, 242, 190, 0.7);
  color: #0a6734;
}

.page-title-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 18px;
}

.category-tabs {
  display: flex;
  gap: 22px;
  margin-top: 16px;
}

.category-tabs button {
  padding: 0 0 8px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #4d5562;
  font-weight: 700;
}

.category-tabs button.active {
  border-color: var(--brand);
  color: var(--brand);
}

.sort-control {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
}

.sort-control span {
  padding-left: 12px;
  color: #4b5563;
  font-size: 12px;
  font-weight: 700;
}

.sort-control select {
  min-height: 32px;
  border: 0;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.search-row {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  width: min(360px, 100%);
  height: 42px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: #9aa0aa;
}

.live-strip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  margin: 0 0 18px 7px;
  padding: 0 6px 0 2px;
  border: 0;
  background: transparent;
  color: #385a51;
  font-size: 13px;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #21b573;
  box-shadow: 0 0 0 5px rgba(33, 181, 115, 0.13);
}

.live-strip .text-button {
  color: var(--brand);
  font-weight: 900;
}

.live-strip.updating .live-dot {
  animation: liveBlink 0.75s ease-in-out infinite;
}

@keyframes liveBlink {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.72);
  }
}

.search-row span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 100%;
  border-right: 1px solid var(--line);
  color: var(--brand);
  font-size: 20px;
}

.search-row input {
  width: 100%;
  height: 100%;
  padding: 0 14px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}

.market-table td {
  height: 54px;
}

.auth-panel {
  padding-top: 22px;
  text-align: center;
}

.auth-panel h1 {
  margin-bottom: 12px;
  font-size: 28px;
}

.auth-panel > p {
  margin: 0 auto 28px;
  max-width: 330px;
  color: var(--muted);
}

.auth-panel form {
  display: grid;
  gap: 20px;
  text-align: left;
}

label {
  display: grid;
  gap: 8px;
  color: #333945;
  font-size: 13px;
  font-weight: 800;
}

input,
select {
  min-height: 44px;
  border: 1px solid var(--line-dark);
  background: #fff;
  color: var(--text);
  padding: 0 12px;
}

.auth-link {
  margin-top: 24px !important;
  font-size: 13px;
}

.auth-link button {
  border: 0;
  background: transparent;
  font-weight: 800;
}

.form-message {
  min-height: 20px;
  margin-top: 14px !important;
}

.asset-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.asset-heading h1 {
  margin-top: 14px;
}

.asset-heading-text {
  min-width: 0;
}

.asset-preview {
  width: clamp(128px, 18vw, 210px);
  aspect-ratio: 1;
  border: 1px solid var(--line-dark);
  background: linear-gradient(135deg, rgba(232, 250, 245, 0.95), rgba(255, 255, 255, 0.96));
  box-shadow: var(--shadow);
  overflow: hidden;
  flex: 0 0 auto;
}

.asset-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.stats-grid,
.portfolio-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.stats-grid {
  grid-template-columns: repeat(3, 1fr);
}

.stat-card,
.summary-card,
.chart-card,
.add-card {
  border: 1px solid var(--line-dark);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 252, 250, 0.94));
  box-shadow: var(--shadow);
}

.stat-card,
.summary-card {
  display: grid;
  gap: 10px;
  min-height: 94px;
  padding: 20px;
}

.stat-card span,
.summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stat-card strong,
.summary-card strong {
  font-size: 18px;
}

.stat-card small {
  color: var(--muted);
}

.summary-card i {
  width: 76px;
  height: 12px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--brand-soft), #d9f4df);
}

.risk-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(220px, 0.9fr) minmax(260px, 1.2fr);
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  padding: 22px;
  margin-bottom: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(232, 247, 242, 0.88) 48%, rgba(255, 246, 224, 0.72));
  box-shadow: var(--shadow);
}

.section-kicker {
  display: block;
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.risk-panel h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.risk-panel p {
  margin: 0;
  color: var(--muted);
}

.risk-meter {
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(31, 157, 99, 0.16), rgba(242, 198, 109, 0.18), rgba(212, 91, 91, 0.16));
  border: 1px solid rgba(21, 32, 29, 0.08);
}

.risk-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--amber), var(--red));
  transition: width 0.4s ease;
}

.risk-breakdown {
  display: grid;
  gap: 8px;
}

.risk-breakdown span {
  display: block;
  border: 1px solid rgba(28, 124, 112, 0.12);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.chart-card,
.add-card {
  padding: 20px;
  margin-bottom: 22px;
}

.chart-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.chart-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.range-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  background: #f7fbfa;
}

.range-tabs button {
  min-width: 46px;
  min-height: 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.range-tabs button.active {
  background: var(--brand);
  color: #fff;
}

.chart-card h2,
.add-card h2 {
  margin: 0;
  font-size: 15px;
}

.chart-canvas-shell {
  position: relative;
  width: 100%;
  height: 330px;
  max-height: 330px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.chart-card canvas {
  display: block;
  width: 100%;
  height: 100% !important;
  max-height: 330px;
}

.chart-tooltip {
  position: absolute;
  z-index: 5;
  display: grid;
  gap: 3px;
  min-width: 118px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow);
  pointer-events: none;
  font-size: 12px;
}

.chart-tooltip[hidden] {
  display: none;
}

.chart-tooltip span {
  color: var(--brand);
  font-weight: 900;
}

.chart-head p,
.chart-metrics,
.beginner-note {
  display: none;
}

.transaction-block {
  margin-top: 24px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.section-title-row h2 {
  margin: 0 0 6px;
}

.section-title-row p,
.muted-symbol {
  color: var(--muted);
}

.alert-item small {
  color: var(--muted);
  font-size: 12px;
}

.chart-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.chart-metrics > span {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #f8fcfb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.chart-metrics strong {
  color: var(--text);
  font-size: 15px;
}

.beginner-note {
  margin-top: 12px;
  padding: 14px 16px;
  border-left: 4px solid var(--brand);
  background: var(--brand-soft);
  color: #35524c;
  font-weight: 700;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(150px, 1fr) auto;
  gap: 10px;
}

.scenario-result {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.current-price-note {
  margin: -2px 0 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  color: var(--brand);
  font-weight: 900;
}

.danger-button {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(212, 91, 91, 0.34);
  border-radius: 6px;
  background: rgba(212, 91, 91, 0.09);
  color: var(--red);
  font-weight: 900;
}

.danger-button:hover {
  background: rgba(212, 91, 91, 0.16);
}

.portfolio-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 26px;
}

.news-list {
  display: grid;
  gap: 14px;
}

.tool-panels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 18px;
}

.learning-tool {
  display: none;
  max-width: 680px;
}

.learning-tool.active {
  display: grid;
}

.alerts-layout {
  display: grid;
  grid-template-columns: minmax(360px, 440px) minmax(420px, 1fr);
  align-items: start;
  gap: 22px;
}

.tool-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line-dark);
  background:
    linear-gradient(145deg, #ffffff, #f8fcfb);
  box-shadow: var(--shadow);
}

.tool-card h2 {
  margin: 0 0 4px;
  font-size: 17px;
}

.glossary-list {
  margin: 0;
}

.glossary-list dt {
  font-weight: 900;
}

.glossary-list dd {
  margin: 0 0 10px;
  color: var(--muted);
}

.term-tip {
  display: inline;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px dashed var(--brand);
  background: transparent;
  color: var(--brand);
  font-weight: inherit;
}

.term-popup {
  position: absolute;
  z-index: 100;
  width: min(280px, calc(100vw - 24px));
  padding: 12px 14px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.term-popup strong {
  display: block;
  margin-bottom: 5px;
}

.term-popup p {
  margin: 0;
  color: var(--muted);
}

.alert-list {
  display: grid;
  gap: 10px;
}

.alerts-panel {
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
  max-height: 680px;
  overflow: hidden;
}

.alert-form-card input,
.alert-form-card select {
  background: #ffffff;
  color: #10231f;
  border-color: #b8d2cc;
  font-size: 15px;
  font-weight: 800;
}

.alert-form-card input:focus,
.alert-form-card select:focus {
  outline: 2px solid rgba(20, 128, 111, 0.22);
  border-color: var(--brand);
}

.alert-form-card label {
  color: #31524b;
  font-weight: 900;
}

.current-price-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #f2fbf8;
  color: #31524b;
  font-size: 13px;
  font-weight: 800;
}

.alert-panel-head,
.alert-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ghost-danger-button {
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid rgba(199, 66, 66, 0.28);
  border-radius: 7px;
  background: #fff7f7;
  color: #b72f35;
  font-size: 12px;
  font-weight: 900;
}

.ghost-danger-button:hover {
  border-color: rgba(199, 66, 66, 0.55);
  background: #ffecec;
}

.alert-form-card {
  align-self: start;
  position: sticky;
  top: 92px;
  min-width: 0;
  overflow: visible;
}

.alert-form-grid {
  display: grid;
  grid-template-columns: minmax(128px, 1fr) minmax(124px, 0.9fr) minmax(122px, 0.85fr);
  gap: 10px;
}

.alert-form-grid label {
  min-width: 0;
}

.alert-form-grid select,
.alert-form-grid input {
  width: 100%;
  min-width: 0;
  padding-left: 10px;
  padding-right: 10px;
}

.alert-tab-panel {
  min-width: 0;
}

.alert-tab-panel[hidden] {
  display: none !important;
}

#alertActivePanel,
#alertHistoryPanel {
  display: grid;
  gap: 12px;
}

#alertHistoryPanel .alert-list {
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.alert-tabs {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.alert-tabs button {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.alert-tabs button.active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: 0 6px 16px rgba(22, 74, 65, 0.08);
}

.alert-asset-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.alert-asset-picker button {
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--soft);
  color: var(--text);
  text-align: left;
  min-width: 0;
}

.alert-asset-picker button.active {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.alert-asset-picker span,
.alert-asset-picker p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.alert-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--soft);
  min-width: 0;
  overflow-wrap: anywhere;
}

.alert-item span {
  color: var(--muted);
  font-size: 13px;
}

.news-item {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  background: #fff;
  box-shadow: var(--shadow);
}

.news-image {
  width: 100%;
  height: 220px;
  min-height: 190px;
  object-fit: cover;
  background: var(--soft-2);
}

.news-content {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 18px 20px;
}

.news-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.news-meta strong {
  color: var(--brand);
  font-size: 12px;
}

.news-meta span::before {
  content: "•";
  margin-right: 8px;
  color: var(--line-dark);
}

.news-item h3 {
  margin: 0;
}

.news-item p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 860px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .main-nav {
    grid-column: 1 / -1;
    order: 3;
    overflow-x: auto;
  }

  .feature-grid,
  .hero,
  .home-dashboard,
  .learning-grid,
  .news-item,
  .tool-panels,
  .alerts-layout,
  .alert-form-grid,
  .stats-grid,
  .portfolio-summary,
  .risk-panel,
  .chart-metrics {
    grid-template-columns: 1fr;
  }

  .nft-collection-card {
    grid-template-columns: 1fr;
  }

  .nft-collection-preview {
    max-width: 180px;
  }

  .nft-collection-stats {
    grid-template-columns: 1fr;
  }

  .nft-collection-action {
    justify-self: start;
  }

  .page-title-row,
  .portfolio-head,
  .asset-heading,
  .chart-head {
    align-items: stretch;
    flex-direction: column;
  }

  .asset-preview {
    width: min(220px, 100%);
  }

  .inline-form {
    grid-template-columns: 1fr;
  }

  .alert-form-card {
    position: static;
  }

  .alerts-panel {
    max-height: none;
    overflow: visible;
  }

  .news-image {
    height: 210px;
  }
}

@media (min-width: 861px) and (max-width: 1120px) {
  .alerts-layout {
    grid-template-columns: minmax(390px, 460px) minmax(360px, 1fr);
  }

  .alert-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .alert-form-grid label:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .hero-buttons,
  .header-actions {
    flex-wrap: wrap;
  }

  .search-row {
    width: 100%;
  }
}

.chart-card .chart-head p,
.chart-card .chart-metrics,
.chart-card .beginner-note {
  display: none !important;
}
