:root {
  --bg: #080b0c;
  --panel: rgba(15, 19, 23, 0.94);
  --panel-2: rgba(52, 34, 16, 0.93);
  --line: rgba(228, 181, 83, 0.32);
  --text: #f8efd8;
  --muted: #cabd9c;
  --accent: #f0bc57;
  --accent-2: #78d4c6;
  --danger: #ff8d6c;
  --frame: #8a632d;
  --rune: #9e7435;
  --ember: #f17a3a;
  --ink: #05070a;
  --scroll-progress: 0;
  --scroll-offset: 0px;
  --scroll-tilt: 0deg;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Cinzel", Georgia, "Times New Roman", serif;
  line-height: 1.5;
  color: var(--text);
  position: relative;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(255, 229, 170, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, #2b1b0b 0%, #12171a 42%, #06090d 100%);
  background-size: 72px 72px, auto;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: -12vmax;
  pointer-events: none;
  z-index: -3;
  transition: transform 180ms linear;
}

body::before {
  background:
    repeating-linear-gradient(90deg, transparent 0 88px, rgba(240, 188, 87, 0.055) 88px 89px),
    linear-gradient(120deg, transparent 0 22%, rgba(240, 188, 87, 0.08) 22% 22.3%, transparent 22.3%),
    linear-gradient(240deg, transparent 0 34%, rgba(120, 212, 198, 0.055) 34% 34.3%, transparent 34.3%);
  opacity: 0.9;
  transform:
    translate3d(0, calc(var(--scroll-offset) * -0.22), 0)
    scale(calc(1 + (var(--scroll-progress) * 0.08)));
}

body::after {
  background:
    repeating-linear-gradient(0deg, rgba(255, 248, 216, 0.025) 0 1px, transparent 1px 9px),
    linear-gradient(180deg, rgba(5, 7, 10, 0.05), rgba(5, 7, 10, 0.72));
  transform:
    translate3d(0, calc(var(--scroll-offset) * -0.1), 0)
    rotate(var(--scroll-tilt));
}

.background-orbit {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -2;
}

.background-layer {
  position: absolute;
  border-radius: 0;
  filter: none;
  opacity: 0.78;
  transition: transform 180ms linear, opacity 180ms linear;
}

.background-layer-one {
  width: 100vw;
  height: 16rem;
  top: 0;
  left: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 5rem, rgba(240, 188, 87, 0.08) 5rem 5.08rem),
    linear-gradient(180deg, rgba(240, 188, 87, 0.18), transparent 86%);
  transform:
    translate3d(0, calc(var(--scroll-offset) * -0.13), 0)
    scaleY(calc(1 + (var(--scroll-progress) * 0.1)));
}

.background-layer-two {
  width: 70vw;
  height: 120vh;
  top: -10vh;
  right: -34vw;
  background:
    linear-gradient(90deg, transparent, rgba(120, 212, 198, 0.12), transparent);
  border-left: 1px solid rgba(120, 212, 198, 0.14);
  border-right: 1px solid rgba(240, 188, 87, 0.1);
  transform:
    translate3d(calc(var(--scroll-offset) * -0.08), calc(var(--scroll-offset) * -0.2), 0)
    rotate(calc(-12deg + (var(--scroll-progress) * 8deg)));
}

.background-layer-three {
  width: 100%;
  height: 24rem;
  bottom: -8rem;
  left: 0;
  background:
    repeating-linear-gradient(135deg, transparent 0 22px, rgba(240, 188, 87, 0.055) 22px 23px),
    linear-gradient(0deg, rgba(28, 16, 7, 0.82), transparent);
  opacity: 0.48;
  transform:
    translate3d(0, calc(var(--scroll-offset) * -0.12), 0);
}

.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.hero {
  position: relative;
  padding: 20px 0 24px;
  text-align: center;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  top: 48%;
  width: min(26vw, 240px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 188, 87, 0.65), transparent);
}

.hero::before {
  left: 0;
}

.hero::after {
  right: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.hero-frame {
  position: relative;
  display: inline-block;
  padding: 20px 28px 18px;
  border: 1px solid rgba(240, 188, 87, 0.6);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(112, 68, 18, 0.9), rgba(38, 24, 11, 0.95)),
    linear-gradient(90deg, rgba(255, 236, 181, 0.1), transparent 20%, transparent 80%, rgba(255, 236, 181, 0.08));
  box-shadow:
    inset 0 0 0 2px rgba(38, 24, 10, 0.78),
    inset 0 0 26px rgba(240, 188, 87, 0.08),
    0 18px 44px rgba(0, 0, 0, 0.36);
}

.hero-frame::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 231, 164, 0.18);
  border-radius: 4px;
  pointer-events: none;
}

.hero-frame::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 9px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(240, 188, 87, 0.62), transparent);
  pointer-events: none;
}

h1,
h2 {
  margin: 0;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.98;
  max-width: 13ch;
  color: #f3d37e;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow:
    0 1px 0 #fff0b7,
    0 2px 0 #9b6118,
    0 4px 0 rgba(58, 31, 9, 0.92),
    0 10px 24px rgba(0, 0, 0, 0.52);
}

.hero-copy,
.hero-subtitle,
.muted {
  color: var(--muted);
}

.hero-subtitle {
  margin: 10px 0 0;
  font-size: clamp(0.92rem, 1.8vw, 1.1rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-intro {
  max-width: 680px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-copy {
  max-width: 680px;
  margin: 14px auto 0;
}

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

.hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(240, 188, 87, 0.42);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(110, 70, 23, 0.95), rgba(45, 28, 12, 0.96));
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 179, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.2);
}

.hero-link:hover {
  color: var(--text);
  border-color: rgba(240, 188, 87, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 236, 179, 0.08),
    0 12px 28px rgba(240, 188, 87, 0.1);
}

.panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(23, 28, 33, 0.96), rgba(11, 14, 18, 0.96)),
    repeating-linear-gradient(90deg, rgba(255, 235, 184, 0.035) 0 1px, transparent 1px 42px);
  border: 1px solid rgba(240, 188, 87, 0.36);
  border-radius: 8px;
  padding: 24px;
  backdrop-filter: blur(12px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 236, 179, 0.06),
    inset 0 24px 80px rgba(240, 188, 87, 0.035),
    0 28px 70px rgba(0, 0, 0, 0.4);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(240, 188, 87, 0.18);
  border-radius: 4px;
  pointer-events: none;
}

.panel > * {
  position: relative;
}

.loading-view {
  min-height: 320px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 6px;
}

.spinner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent);
  border-right-color: rgba(120, 212, 198, 0.85);
  animation: spin 1s linear infinite;
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.server-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}

.server-picker {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.pro-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}

.pro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.9fr);
  gap: 18px;
  margin-bottom: 18px;
}

.pro-section {
  min-width: 0;
}

.signal-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.text-button:hover {
  color: var(--accent);
}

.compact {
  padding: 6px 10px;
  min-height: 34px;
}

.tiny {
  font-size: 0.78rem;
}

.selected-row {
  background:
    linear-gradient(90deg, rgba(240, 188, 87, 0.15), rgba(120, 212, 198, 0.06));
}

.watchlist-list {
  display: grid;
  gap: 12px;
}

.watchlist-entry {
  border: 1px solid rgba(240, 188, 87, 0.22);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(17, 22, 27, 0.94), rgba(7, 10, 14, 0.96));
}

.watchlist-entry-head,
.watchlist-entry-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.watchlist-entry-meta {
  margin-top: 10px;
  flex-wrap: wrap;
}

.asset-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.asset-pill {
  border: 1px solid rgba(240, 188, 87, 0.2);
  border-radius: 8px;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(20, 26, 31, 0.92), rgba(9, 12, 15, 0.96));
  display: grid;
  gap: 6px;
}

.asset-pill strong {
  font-size: 1rem;
  color: var(--text);
}

.pro-chart {
  width: 100%;
}

.pro-history-wrap {
  margin-top: 14px;
}

.card {
  background: transparent;
  border: 0;
}

.tab {
  border: 1px solid rgba(240, 188, 87, 0.3);
  background:
    linear-gradient(180deg, rgba(19, 25, 30, 0.78), rgba(8, 11, 15, 0.82));
  color: var(--muted);
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 179, 0.06),
    0 8px 20px rgba(0, 0, 0, 0.18);
}

.tab.active {
  background:
    linear-gradient(180deg, rgba(110, 70, 23, 0.95), rgba(45, 28, 12, 0.96));
  color: var(--text);
  border-color: rgba(240, 188, 87, 0.66);
  box-shadow:
    inset 0 0 0 1px rgba(255, 236, 179, 0.1),
    0 10px 24px rgba(240, 188, 87, 0.08);
}

.tab:hover,
.toggle-button:hover,
.page-button:hover {
  border-color: rgba(240, 188, 87, 0.62);
  color: var(--text);
}

.section-header {
  margin-bottom: 16px;
}

.section-header h2 {
  display: inline-block;
  position: relative;
  padding-bottom: 8px;
  color: #f3d37e;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.34);
}

.section-header h2::after {
  content: "";
  position: absolute;
  left: 0;
  right: -42px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(240, 188, 87, 0.9), transparent);
}

.overview-controls {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 16px;
}

.view-controls {
  display: flex;
  align-items: end;
  gap: 16px;
}

.page-size-field,
.server-picker-group {
  display: grid;
  gap: 8px;
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-size-field select,
.server-picker-group select {
  border: 1px solid rgba(240, 188, 87, 0.36);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(16, 20, 25, 0.86), rgba(7, 10, 14, 0.9));
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}

.server-picker-group select {
  min-width: min(100%, 260px);
}

.toggle-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 44px;
  max-width: 100%;
}

.toggle-button {
  min-width: 84px;
  border: 1px solid rgba(240, 188, 87, 0.36);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(16, 20, 25, 0.82), rgba(7, 10, 14, 0.88));
  color: var(--muted);
  padding: 10px 14px;
  font: inherit;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 236, 179, 0.055);
}

.toggle-button.active {
  background:
    linear-gradient(180deg, rgba(93, 58, 18, 0.95), rgba(38, 24, 11, 0.96));
  color: var(--text);
  border-color: rgba(240, 188, 87, 0.68);
  box-shadow:
    inset 0 0 0 1px rgba(255, 232, 178, 0.1),
    0 0 18px rgba(240, 188, 87, 0.08);
}

.search-field {
  display: grid;
  gap: 8px;
  min-width: min(100%, 320px);
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-field input {
  border: 1px solid rgba(240, 188, 87, 0.36);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(16, 20, 25, 0.86), rgba(7, 10, 14, 0.9));
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  box-shadow: inset 0 1px 10px rgba(0, 0, 0, 0.22);
}

.search-field input::placeholder {
  color: rgba(195, 182, 148, 0.7);
}

.search-field input:focus {
  outline: 2px solid rgba(240, 188, 87, 0.28);
  border-color: rgba(240, 188, 87, 0.58);
}

button,
select,
input {
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    color 150ms ease,
    background-color 150ms ease;
}

button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(120, 212, 198, 0.55);
  outline-offset: 2px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(240, 188, 87, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(7, 10, 14, 0.54), rgba(7, 10, 14, 0.24));
  box-shadow: inset 0 1px 0 rgba(255, 236, 179, 0.045);
}

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

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(240, 188, 87, 0.18);
  text-align: left;
  vertical-align: middle;
}

th {
  background:
    linear-gradient(180deg, rgba(61, 39, 16, 0.78), rgba(24, 18, 13, 0.9));
  color: var(--accent);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 -1px 0 rgba(255, 236, 179, 0.08);
}

.sort-button {
  position: relative;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0 18px 0 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.sort-button::after {
  content: "↕";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(240, 188, 87, 0.6);
  font-size: 0.82rem;
}

.sort-button.active[data-direction="asc"]::after {
  content: "↑";
  color: var(--accent);
}

.sort-button.active[data-direction="desc"]::after {
  content: "↓";
  color: var(--accent);
}

tbody tr:hover {
  background:
    linear-gradient(90deg, rgba(240, 188, 87, 0.09), rgba(120, 212, 198, 0.035));
}

.pagination-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.page-button {
  border: 1px solid rgba(240, 188, 87, 0.34);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(63, 40, 17, 0.88), rgba(18, 14, 11, 0.92));
  color: var(--text);
  padding: 8px 14px;
  font: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 179, 0.06),
    0 8px 20px rgba(0, 0, 0, 0.18);
}

.page-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.fish-grid {
  display: grid;
  gap: 16px;
}

.fish-card {
  border: 1px solid rgba(240, 188, 87, 0.28);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(24, 29, 34, 0.86), rgba(11, 14, 18, 0.92)),
    repeating-linear-gradient(90deg, rgba(255, 236, 179, 0.035) 0 1px, transparent 1px 36px);
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 179, 0.06),
    0 12px 30px rgba(0, 0, 0, 0.22);
}

.fish-card h3 {
  margin: 0 0 12px;
}

.history-card {
  min-width: 220px;
  border: 1px solid rgba(240, 188, 87, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(17, 22, 27, 0.96), rgba(7, 10, 14, 0.96)),
    linear-gradient(90deg, rgba(240, 188, 87, 0.05), transparent 22%, transparent 78%, rgba(120, 212, 198, 0.04));
  box-shadow:
    inset 0 1px 0 rgba(255, 235, 187, 0.06),
    inset 0 -18px 38px rgba(0, 0, 0, 0.16);
}

.history-card .card-body {
  padding: 0.85rem 0.95rem;
}

.history-card-compact {
  min-width: 190px;
}

.history-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.history-card-label {
  color: var(--accent);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.history-card-change {
  font-size: 0.78rem;
  font-weight: 700;
}

.trend-up {
  color: var(--danger);
}

.trend-down {
  color: var(--accent-2);
}

.trend-flat {
  color: #9bb8ff;
}

.trend-label {
  font-weight: 700;
  white-space: nowrap;
}

.signal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.signal-strong-buy {
  color: #0d2419;
  background: linear-gradient(180deg, #9ff0c6, #59c88a);
  border-color: rgba(159, 240, 198, 0.5);
}

.signal-buy-now {
  color: #24170b;
  background: linear-gradient(180deg, #f1d28c, #c8912e);
  border-color: rgba(241, 210, 140, 0.45);
}

.signal-watch {
  color: #1b2432;
  background: linear-gradient(180deg, #c8d8ff, #7ea2f0);
  border-color: rgba(200, 216, 255, 0.45);
}

.signal-hold {
  color: #f4efe3;
  background: linear-gradient(180deg, #6d7480, #4c525e);
  border-color: rgba(255, 255, 255, 0.08);
}

.signal-avoid {
  color: #2b1212;
  background: linear-gradient(180deg, #ffb1a7, #d66d5f);
  border-color: rgba(255, 177, 167, 0.45);
}

.history-card-price {
  margin-bottom: 8px;
}

.history-card-canvas {
  position: relative;
  height: 110px;
}

.history-card-compact .history-card-canvas {
  height: 72px;
}

.chart-card-empty {
  color: var(--muted);
  font-size: 0.85rem;
  padding: 12px 0;
}

.price {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.price-part {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.coin {
  display: inline-block;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 1px 4px rgba(0, 0, 0, 0.24);
}

.coin-gold {
  background: radial-gradient(circle at 30% 30%, #ffe7a1, #c78f1d 70%);
}

.coin-silver {
  background: radial-gradient(circle at 30% 30%, #f2f7fc, #8d9aa6 70%);
}

.coin-copper {
  background: radial-gradient(circle at 30% 30%, #ffb08d, #a95d35 70%);
}

.price-empty {
  color: var(--muted);
}

.fish-row {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid rgba(240, 188, 87, 0.18);
  font-size: 0.95rem;
}

.fish-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.hidden {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 18px 14px 40px;
  }

  .panel {
    padding: 16px;
    border-radius: 8px;
  }

  .hero::before,
  .hero::after {
    display: none;
  }

  .overview-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .server-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .server-picker {
    flex-direction: column;
    align-items: stretch;
  }

  .toggle-group {
    display: flex;
  }

  .view-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .pro-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

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

  .asset-summary {
    grid-template-columns: 1fr;
  }

  .fish-row {
    grid-template-columns: 1fr 1fr;
  }

  .history-card {
    min-width: 170px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after,
  .background-layer {
    transition: none;
    transform: none;
  }
}
