:root {
  --bg: #f4f1e8;
  --paper: rgba(17, 22, 32, 0.82);
  --paper-soft: rgba(255, 255, 255, 0.05);
  --ink: #27211b;
  --muted: #6b6258;
  --accent: #a23a2e;
  --accent-dark: #78271f;
  --line: rgba(255, 255, 255, 0.16);
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  --page-bg: url("https://imgs.gamersky.com/upimg/new_preview/2026/03/10/origin_202603101600024738.jpg");
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  font-family: "Noto Serif SC", "PingFang SC", "Microsoft YaHei", serif;
  color: var(--ink);
  background: var(--bg);
  isolation: isolate;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -2;
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 255, 255, 0.18), transparent 28%),
    var(--page-bg) center top / cover no-repeat;
  transform: scale(1.03);
}

body::after {
  z-index: -1;
  background:
    linear-gradient(rgba(10, 14, 22, 0.46), rgba(7, 10, 16, 0.82)),
    linear-gradient(180deg, rgba(11, 16, 25, 0.08), rgba(11, 16, 25, 0.55));
}

.site-header,
.container,
.appHeader,
.gsApp-header {
  position: relative;
  z-index: 1;
}

.list-page,
.detail-page,
.atlas-home {
  min-height: 100vh;
  color: #f2f4f7;
}

.site-header {
  background: linear-gradient(180deg, rgba(21, 27, 38, 0.7), rgba(21, 27, 38, 0.28));
  color: #fff6ed;
  padding: 40px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(4px);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: 1px;
}

.header-inner p {
  margin: 10px 0 0;
  opacity: 0.9;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 50px;
}

.home-grid {
  display: grid;
  gap: 22px;
}

.hidden {
  display: none;
}

.module-head {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.list-page .module-head,
.detail-page .module-head {
  padding: 12px 14px 0;
}

.list-page .module-head h2,
.detail-page .module-head h2 {
  margin: 0;
  color: #eef2f8;
}

.list-page .desc,
.detail-page .desc {
  color: #cfd5df;
}

.btn {
  display: inline-block;
  width: fit-content;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff7ee;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: var(--accent-dark);
}

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

.btn.ghost {
  background: transparent;
  color: var(--accent-dark);
  border-color: var(--accent-dark);
}

.list-page .btn,
.detail-page .btn {
  background: rgba(255, 255, 255, 0.08);
  color: #f4f6fb;
  border-color: rgba(255, 255, 255, 0.2);
}

.list-page .btn:hover,
.detail-page .btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.desc {
  color: var(--muted);
  margin: 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.filters label {
  display: grid;
  gap: 4px;
  flex: 0 0 112px;
  font-size: 13px;
  color: var(--muted);
}

.search-field {
  flex-basis: 112px;
  min-width: min(280px, 100%);
}

.search-input {
  width: min(320px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: #fff;
  color: inherit;
}

.list-page .filters label,
.detail-page .filters label {
  color: #d9dfeb;
}

select {
  min-width: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  background: #fff;
}

.list-page select,
.detail-page select {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(16, 20, 31, 0.88);
  color: #f2f4f8;
}

.list-page .search-input,
.detail-page .search-input {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(16, 20, 31, 0.88);
  color: #f2f4f8;
}

.search-input::placeholder {
  color: #9ba6bb;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
  background: rgba(13, 18, 28, 0.84);
  box-shadow: var(--shadow);
}

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

.module-cards table,
.module-enemies table,
.module-relics table,
.module-potions table {
  table-layout: fixed;
}

th,
td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  padding: 11px;
  font-size: 14px;
}

.module-cards th,
.module-cards td,
.module-enemies th,
.module-enemies td,
.module-relics th,
.module-relics td,
.module-potions th,
.module-potions td {
  vertical-align: top;
}

.module-cards th:nth-child(1),
.module-cards td:nth-child(1),
.module-enemies th:nth-child(1),
.module-enemies td:nth-child(1),
.module-relics th:nth-child(1),
.module-relics td:nth-child(1),
.module-potions th:nth-child(1),
.module-potions td:nth-child(1) {
  width: 88px;
}

.module-cards th:nth-child(2),
.module-cards td:nth-child(2) {
  width: 118px;
}

.module-cards th:nth-child(3),
.module-cards td:nth-child(3) {
  width: 74px;
}

.module-cards th:nth-child(4),
.module-cards td:nth-child(4) {
  width: 92px;
}

.module-cards th:nth-child(5),
.module-cards td:nth-child(5) {
  width: 104px;
}

.module-cards th:nth-child(6),
.module-cards td:nth-child(6) {
  width: 92px;
}

.module-enemies th:nth-child(2),
.module-enemies td:nth-child(2) {
  width: 128px;
}

.module-enemies th:nth-child(3),
.module-enemies td:nth-child(3) {
  width: 92px;
}

.module-enemies th:nth-child(4),
.module-enemies td:nth-child(4) {
  width: 92px;
}

.module-enemies th:nth-child(5),
.module-enemies td:nth-child(5),
.module-relics th:nth-child(3),
.module-relics td:nth-child(3),
.module-potions th:nth-child(3),
.module-potions td:nth-child(3) {
  width: auto;
}

.module-relics th:nth-child(2),
.module-relics td:nth-child(2),
.module-potions th:nth-child(2),
.module-potions td:nth-child(2) {
  width: 148px;
}

.module-relics th:nth-child(4),
.module-relics td:nth-child(4),
.module-potions th:nth-child(4),
.module-potions td:nth-child(4) {
  width: 110px;
}

.module-cards td,
.module-enemies td,
.module-relics td,
.module-potions td {
  word-break: break-word;
}

th {
  color: #eef2f8;
  background: rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.image-cell {
  width: 88px;
}

.table-thumb {
  width: 56px;
  height: 56px;
  display: block;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
}

th.sortable {
  cursor: pointer;
}

th.sortable:hover {
  background: rgba(255, 255, 255, 0.14);
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.06);
}

.list-page td,
.detail-page td {
  color: #edf2f9;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.pagination span {
  font-size: 14px;
  color: #d4dae5;
}

.detail {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  padding: 20px;
  color: #edf2f9;
  box-shadow: var(--shadow);
  backdrop-filter: blur(5px);
}

.detail-toolbar {
  margin-bottom: 14px;
}

.detail h3 {
  margin: 0 0 16px;
  font-size: 28px;
}

.detail-hero {
  margin-bottom: 16px;
}

.detail-image {
  width: min(240px, 100%);
  max-height: 240px;
  display: block;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 10px;
}

.detail-rows {
  display: grid;
  gap: 10px;
}

.detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  min-height: 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: var(--paper-soft);
}

.detail-row strong,
.detail-pair-cell strong {
  flex: 0 0 72px;
  color: #bcc5d6;
  font-size: 13px;
  text-align: left;
}

.detail-row span,
.detail-pair-cell span {
  color: #f3f6fb;
  line-height: 1.75;
  text-align: right;
}

.detail-row span {
  max-width: 78%;
}

.detail-row-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
}

.detail-pair-cell {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-height: 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: var(--paper-soft);
}

.detail-pair-cell span {
  max-width: 70%;
}

.multiline-text {
  white-space: pre-line;
}

.detail-card-top {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.detail-card-visuals {
  display: block;
  width: 100%;
}

.detail-card-visuals-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  justify-content: center;
  max-width: 620px;
  margin: 0 auto;
}

.detail-card-visuals-single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 310px;
}

.detail-card-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 8px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.detail-card-image {
  width: 100%;
  max-width: 290px;
  height: auto;
  display: block;
  object-fit: contain;
}

.detail-card-rows {
  gap: 12px;
}

.atlas-home .site-header,
.atlas-home .module-head {
  display: none;
}

.atlas-home .container {
  max-width: 1180px;
  padding-top: 18px;
  padding-bottom: 32px;
}

.atlas-section {
  display: grid;
  gap: 10px;
}

.atlas-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #d5dae2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

.atlas-divider::before,
.atlas-divider::after {
  content: "";
  width: min(170px, 22vw);
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
}

.atlas-divider span {
  letter-spacing: 4px;
  font-size: 24px;
}

.atlas-panel {
  display: grid;
  gap: 10px;
}

.atlas-panel-single {
  grid-template-columns: 1fr;
}

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

.atlas-tile {
  position: relative;
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  color: #fff;
  text-decoration: none;
  background:
    linear-gradient(90deg, rgba(16, 20, 31, 0.94), rgba(58, 63, 73, 0.82), rgba(16, 20, 31, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.72), 0 10px 18px rgba(0, 0, 0, 0.28);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.atlas-tile-featured {
  width: 100%;
}

.atlas-tile::before,
.atlas-tile::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.45);
  border-left: 1px solid rgba(255, 255, 255, 0.45);
}

.atlas-tile::before {
  top: 4px;
  left: 4px;
}

.atlas-tile::after {
  right: 4px;
  bottom: 4px;
  transform: rotate(180deg);
}

.atlas-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.42);
}

.atlas-tile span {
  font-size: 16px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.84);
}

@media (max-width: 720px) {
  body {
    font-size: 80%;
  }

  .container {
    padding: 18px 12px 40px;
  }

  .site-header {
    padding: 28px 12px;
  }

  h1 {
    font-size: 24px;
  }

  .filters {
    gap: 8px;
  }

  .filters label {
    font-size: 11px;
  }

  .search-input,
  select,
  th,
  td,
  .pagination span,
  .atlas-tile span {
    font-size: 11px;
  }

  .filters .search-field {
    flex: 0 0 100%;
    min-width: 100%;
  }

  .filters .search-field .search-input {
    width: 100%;
  }

  .filters label:not(.search-field) {
    flex: 1 1 0;
    min-width: 0;
  }

  .filters label select {
    min-width: 0;
    width: 100%;
  }

  .detail {
    padding: 16px 14px;
  }

  .detail h3 {
    font-size: 19px;
    margin-bottom: 12px;
  }

  .detail-card-top {
    display: flex;
    justify-content: center;
  }

  .detail-card-visuals-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .detail-card-image-wrap {
    min-height: 180px;
    padding: 6px;
  }

  .detail-row,
  .detail-pair-cell {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    column-gap: 14px;
    align-items: start;
    padding: 10px 12px;
  }

  .detail-row {
    gap: 0;
  }

  .detail-row-pair {
    display: contents;
  }

  .detail-row strong,
  .detail-pair-cell strong {
    flex: none;
    width: 68px;
    font-size: 11px;
  }

  .detail-row span,
  .detail-pair-cell span {
    max-width: none;
    width: 100%;
    font-size: 11px;
    text-align: right;
  }

  .detail-pair-cell {
    min-height: 48px;
  }

  .detail-row {
    min-height: 48px;
  }

  .atlas-home .atlas-panel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .atlas-divider span {
    font-size: 14px;
    letter-spacing: 2px;
  }
}
