:root {
  --bg-0: #0b1221;
  --bg-1: #131f37;
  --panel: #0f1729cc;
  --line: #2c3c5f;
  --text: #ecf1ff;
  --muted: #adc0ea;
  --accent: #6ee7ff;
  --accent-2: #3aa5ff;
}
*, *::before, *::after {
  box-sizing: border-box;
  font-family: inherit;
}
body {
  margin: 0;
  color: var(--text);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 0% 0%, #1f2f53 0%, transparent 45%),
    radial-gradient(circle at 100% 100%, #123a67 0%, transparent 40%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1));
  min-height: 100vh;
}
.wrap {
  width: min(1200px, 94vw);
  margin: 28px auto 64px;
}
.hero {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(135deg, #122746ee, #1b3f70cc);
  box-shadow: 0 18px 45px #04081288;
}
.hero-content {
  padding: 22px 24px;
  text-align: center;
}
h1 {
  margin: 0 0 6px;
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  letter-spacing: 0.02em;
}
.meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}
.section-title {
  margin: 34px 0 16px;
  font-size: 1.45rem;
}
.star-legend {
  margin: -6px 0 12px;
  color: var(--muted);
  font-size: 0.84rem;
}
.view-controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 14px;
  border: 1px solid #2a3f63;
  border-radius: 12px;
  background: #13223dcc;
  padding: 10px;
}
.view-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.view-row.bottom {
  align-items: center;
  width: 100%;
}
.view-label {
  color: var(--muted);
  font-size: 0.92rem;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: 35px;
  text-align: right;
}
.filter-tools {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
}
.filter-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.filter-item label {
  color: var(--muted);
  font-size: 0.84rem;
}
.filter-item select,
.filter-item input,
.bulk-actions button {
  border: 1px solid #446291;
  background: #162746;
  color: #d0defe;
  border-radius: 9px;
  padding: 7px 10px;
  min-height: 35px;
  line-height: 1.2;
  font: inherit;
  font-size: 0.85rem;
}
.filter-item select,
.filter-item input {
  width: 100%;
}
.filter-item select {
  appearance: none;
}
.filter-item select:hover,
.filter-item input:hover,
.bulk-actions button:hover {
  background: #1e3357;
}
.filter-search {
  grid-column: span 2;
}
.bulk-actions {
  display: inline-flex;
  gap: 8px;
}
.bulk-actions button {
  cursor: pointer;
}
.tier-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  backdrop-filter: blur(4px);
  margin-bottom: 20px;
  overflow: hidden;
}
.tier-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: linear-gradient(90deg, #1b3257, #1b2c49);
  cursor: pointer;
  list-style: none;
}
.tier-head::-webkit-details-marker { display: none; }
.tier-head h2 {
  margin: 0;
  font-size: 1.1rem;
}
.tier-count {
  color: var(--muted);
  font-size: 0.9rem;
}
.tier-body {
  padding: 8px 10px 12px;
}
.type-block {
  border: 1px solid #2a3f63;
  border-radius: 12px;
  margin: 10px 4px;
  overflow: hidden;
}
.type-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #1a2b47;
  cursor: pointer;
  list-style: none;
}
.type-head::-webkit-details-marker { display: none; }
.type-count {
  color: var(--muted);
  font-size: 0.85rem;
}
.type-title {
  margin: 0;
  font-size: 0.95rem;
  color: #c5d6ff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.table-wrap {
  padding: 8px 10px 10px;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 12px;
  table-layout: fixed;
}
th, td {
  padding: 10px 9px;
  border-bottom: 1px solid #26385a;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
th {
  text-align: left;
  color: #c3d5ff;
  font-weight: 700;
  position: sticky;
  top: 0;
  background: #162746;
  z-index: 1;
}
tbody tr:hover { background: #253a5a66; }
.data-row { cursor: pointer; }
.row-detail { display: none; }
.row-detail td {
  white-space: normal;
  color: var(--muted);
  font-size: 0.86rem;
  padding-top: 12px;
  padding-bottom: 12px;
}
.data-row.expanded + .row-detail { display: table-row; }
.tank-name { color: #ecf1ff; font-weight: 700; }
.tank-stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
}
.tank-star {
  display: inline-block;
  font-size: 0.84em;
  line-height: 1;
  color: var(--muted);
}
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 99px;
  border: 1px solid #4d6796;
  color: #d7e7ff;
  font-size: 0.78rem;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.detail-card {
  border: 1px solid #2a3f63;
  border-radius: 10px;
  background: #13223dcc;
  padding: 10px;
}
.detail-title {
  margin: 0 0 8px;
  color: #dce8ff;
  font-size: 0.92rem;
}
.kv {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 6px 8px;
}
.kv div {
  border-bottom: 1px dotted #39507a;
  padding-bottom: 4px;
}
.kv dt { color: #9eb5df; font-size: 0.78rem; margin: 0; }
.kv dd { margin: 2px 0 0; color: #e4eeff; font-size: 0.84rem; }
.char-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.char-box {
  border: 1px solid #2a3f63;
  border-radius: 10px;
  background: #0f1c33cc;
  padding: 8px;
  display: flex;
  flex-direction: column;
  min-height: 260px;
}
.char-box .detail-title {
  margin-bottom: 6px;
}
.char-box .table-wrap {
  flex: 1;
  padding: 0;
}
.stats-table th, .stats-table td {
  padding: 7px;
  font-size: 0.84rem;
}
.stats-key { width: 60%; }
.empty {
  border: 1px solid #2a3f63;
  border-radius: 12px;
  padding: 16px;
  color: var(--muted);
}
@media (max-width: 860px) {
  .view-row { align-items: flex-start; }
  .filter-tools { grid-template-columns: 1fr; }
  .filter-search { grid-column: auto; }
  .filter-item input, .filter-item select { width: 100%; }
  .detail-grid { grid-template-columns: 1fr; }
  .char-grid { grid-template-columns: 1fr; }
}
