:root {
  --bg: #0d1b1e;
  --panel: rgba(18, 24, 33, 0.9);
  --panel-2: rgba(42, 30, 15, 0.92);
  --line: rgba(204, 171, 102, 0.22);
  --text: #f6f0df;
  --muted: #c3b694;
  --accent: #e0b24e;
  --accent-2: #8fd0c5;
  --danger: #ff8f7a;
  --frame: #6b4c24;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Cinzel", Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(224, 178, 78, 0.22), transparent 30%),
    linear-gradient(180deg, #24180c 0%, #10161f 38%, #080d13 100%);
}

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

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

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

.hero-frame {
  display: inline-block;
  padding: 20px 28px 18px;
  border: 1px solid rgba(224, 178, 78, 0.42);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(91, 55, 14, 0.88), rgba(30, 21, 12, 0.88)),
    radial-gradient(circle at top, rgba(255, 227, 156, 0.12), transparent 55%);
  box-shadow:
    inset 0 0 0 2px rgba(66, 42, 17, 0.8),
    0 16px 40px rgba(0, 0, 0, 0.28);
}

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.04em;
  text-shadow:
    0 1px 0 #fff0b7,
    0 2px 0 #a46d1d,
    0 6px 18px rgba(0, 0, 0, 0.42);
}

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

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

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.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-2);
  animation: spin 1s linear infinite;
}

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

.tab {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
}

.tab.active {
  background: var(--panel-2);
  color: var(--text);
  border-color: rgba(213, 178, 94, 0.3);
}

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

.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 {
  display: grid;
  gap: 8px;
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-size-field select {
  border: 1px solid rgba(224, 178, 78, 0.32);
  border-radius: 12px;
  background: rgba(8, 13, 19, 0.7);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}

.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(224, 178, 78, 0.32);
  border-radius: 12px;
  background: rgba(8, 13, 19, 0.7);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
}

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

.search-field input:focus {
  outline: 2px solid rgba(224, 178, 78, 0.28);
  border-color: rgba(224, 178, 78, 0.5);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--accent);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.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(224, 178, 78, 0.55);
  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: rgba(224, 178, 78, 0.06);
}

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

.page-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(42, 30, 15, 0.7);
  color: var(--text);
  padding: 8px 14px;
  font: inherit;
}

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

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

.fish-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
}

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

.history-card {
  min-width: 220px;
  border: 1px solid rgba(224, 178, 78, 0.24);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(17, 23, 32, 0.95), rgba(10, 14, 20, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 235, 187, 0.05);
}

.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: #78a8ff;
}

.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);
}

.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 var(--line);
  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: 16px;
  }

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

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

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

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