:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --line: #e5e7eb;
  --line-strong: #d6dbe5;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --success-soft: #ecfdf3;
  --success-text: #047857;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Noto Sans SC", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 22%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.page-title {
  margin-bottom: 18px;
}

.page-title h1 {
  margin: 0;
  font-family: "Manrope", "Noto Sans SC", sans-serif;
  font-size: 30px;
  font-weight: 800;
}

.content-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.content-card {
  padding: 20px;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.table-controls {
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.section-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.table-summary {
  display: grid;
  gap: 4px;
}

.table-summary #result-summary {
  font-family: "Manrope", "Noto Sans SC", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: min(100%, 360px);
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.search-box svg {
  width: 18px;
  height: 18px;
  fill: #94a3b8;
  flex: 0 0 auto;
}

.search-box input {
  width: 100%;
  padding: 14px 10px;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--text);
  outline: none;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 780px;
}

thead th {
  padding: 15px 18px;
  text-align: left;
  font-size: 12px;
  color: #475569;
  background: #eef3f8;
  border-bottom: 1px solid var(--line-strong);
  box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.18);
}

thead th.price-header {
  text-align: right;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

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

.sort-button:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 4px;
  border-radius: 8px;
}

.sort-icon {
  display: inline-flex;
  margin-left: 4px;
  width: 12px;
  height: 12px;
  vertical-align: middle;
  opacity: 0.4;
  transition: opacity 0.2s, transform 0.2s;
}

.sort-button.sort-asc .sort-icon {
  opacity: 1;
  content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 8L18 14H6L12 8Z"/></svg>');
}

.sort-button.sort-desc .sort-icon {
  opacity: 1;
  content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 16L6 10H18L12 16Z"/></svg>');
}

.sort-button:not(.sort-asc):not(.sort-desc) .sort-icon::after {
  content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" opacity="0.3"><path d="M12 5L18 11H6L12 5ZM12 19L6 13H18L12 19Z"/></svg>');
}

tbody td {
  padding: 18px;
  border-bottom: 1px solid #edf2f7;
  font-size: 14px;
}

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

tbody tr:hover {
  background: #f8fbff;
}

.price {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-family: "Manrope", "Noto Sans SC", sans-serif;
  white-space: nowrap;
}

.price-value {
  display: inline-grid;
  grid-template-columns: auto auto;
  justify-content: end;
  min-width: 10ch;
}

.price-integer {
  text-align: right;
}

.price-decimal {
  min-width: 4.6ch;
  text-align: left;
  color: #334155;
}

.platform-label {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.link-cell a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.link-cell a:hover {
  text-decoration: underline;
}

.empty-state {
  padding: 28px 8px 4px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 900px) {
  .content-header,
  .table-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 20px;
  }

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