:root {
  --bg: #061126;
  --bg-soft: #0c1a33;
  --bg-card: #172744;
  --bg-card-2: #1b2d4d;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e6eefb;
  --muted: #99a8c3;
  --accent: #ffd91f;
  --accent-soft: #fff0a4;
  --blue: #1f4ea5;
  --green: #0d6b50;
  --danger: #ff8d57;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --container: 1220px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Barlow", Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top center, rgba(54, 98, 182, 0.2), transparent 26%), linear-gradient(180deg, #08142b 0%, #061126 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

code {
  color: var(--accent-soft);
}

.container {
  width: min(var(--container), 100% - 32px);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(90deg, rgba(21, 34, 56, 0.98), rgba(20, 33, 54, 0.94));
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.hero,
.stats,
.modules,
.banlist-section,
.footer-panels {
  padding: 32px 0;
}

.hero {
  padding-top: 64px;
  padding-bottom: 28px;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: center;
}

.summary-grid {
  margin-bottom: 20px;
}

.stats__grid,
.summary-grid,
.footer-panels__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

@media (max-width: 1050px) {
  .hero__inner,
  .module-grid,
  .stats__grid,
  .summary-grid,
  .footer-panels__grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 780px) {
  .header-inner {
    min-height: auto;
    padding: 14px 0;
    flex-wrap: wrap;
  }
  .main-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  .hero__inner,
  .module-grid,
  .stats__grid,
  .summary-grid,
  .footer-panels__grid {
    grid-template-columns: 1fr;
  }
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand__logo {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #17243f;
  background: linear-gradient(135deg, var(--accent), #fff0b3);
  box-shadow: 0 8px 22px rgba(255, 217, 31, 0.22);
}
.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand__eyebrow {
  font-size: 11px;
  letter-spacing: 1.6px;
  color: var(--muted);
  font-weight: 700;
}
.brand__title {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-weight: 700;
}
.main-nav a {
  color: rgba(255, 255, 255, 0.9);
}
.main-nav a:hover {
  color: var(--accent);
}
.main-nav a.is-active {
  color: var(--accent);
}

.header-button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.header-button:hover,
.button:hover {
  transform: translateY(-1px);
}

.header-button,
.button--primary {
  background: linear-gradient(180deg, #ff8c5b, #ef624b);
  color: white;
  box-shadow: 0 12px 28px rgba(239, 98, 75, 0.28);
}

.button--ghost {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.button--full {
  width: 100%;
}

.hero__eyebrow,
.section-heading__eyebrow {
  display: inline-block;
  color: var(--accent);
  letter-spacing: 1.8px;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 10px;
}

.hero__copy h1,
.section-heading h2 {
  margin: 0;
  font-weight: 800;
  line-height: 1;
}

.hero__copy h1 {
  font-size: clamp(38px, 5vw, 64px);
}

.hero__copy p,
.section-heading p {
  color: #c1cee2;
  font-size: 18px;
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.hero-panel,
.stat-card,
.module-card,
.summary-card,
.filter-bar,
.table-shell,
.footer-panel {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(29, 45, 73, 0.96), rgba(18, 31, 53, 0.98));
  box-shadow: var(--shadow);
}

.hero-panel,
.stat-card,
.module-card,
.summary-card,
.footer-panel {
  border-radius: var(--radius-lg);
  padding: 22px;
}

.hero-panel {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-panel__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 28px;
  margin-bottom: 14px;
  background: rgba(255, 217, 31, 0.1);
  color: var(--accent);
}
.hero-panel h2 {
  margin: 0 0 10px;
  font-size: 30px;
}
.hero-panel p {
  margin: 0;
  color: #c7d2e6;
  line-height: 1.6;
}

.stat-card,
.summary-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stat-card strong,
.summary-card strong {
  font-size: 30px;
  color: white;
}
.stat-card__label,
.summary-card__label {
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}

.section-heading {
  margin-bottom: 22px;
}
.section-heading--center {
  text-align: center;
}

.module-card {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.module-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
}
.module-card--active {
  outline: 1px solid rgba(255, 217, 31, 0.28);
}
.module-card__status {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 217, 31, 0.12);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  align-self: flex-start;
}
.module-card h3 {
  margin: 0 0 12px;
  font-size: 28px;
}
.module-card p {
  margin: 0;
  color: #c5d0e3;
  line-height: 1.6;
  flex-grow: 1;
}
.module-card .hero__actions {
  margin-top: auto;
  padding-top: 16px;
}

.filter-bar {
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 260px) minmax(220px, 280px);
  gap: 18px;
  margin-bottom: 20px;
  align-items: end;
}

.filter-bar--banlist {
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 260px) minmax(220px, 280px);
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.filter-field label, .filter-field__label {
  font-size: 14px;
  font-weight: 700;
  color: #d9e5f7;
}
.filter-field select,
.filter-field input {
  min-height: 50px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: white;
  outline: none;
}
.filter-field option {
  color: black;
}
.filter-field--grow {
  min-width: 0;
}
.filter-field--compact {
  justify-self: stretch;
  width: 100%;
  max-width: none;
}
.filter-field--actions {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.table-shell {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

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

.portal-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1040px;
}
.portal-table thead th {
  text-align: left;
  padding: 18px 16px;
  font-size: 14px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: rgba(9, 19, 38, 0.72);
  color: var(--accent);
}
.portal-table tbody td {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #d7e0ef;
}
.portal-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}
.portal-table th.align-center,
.portal-table td.align-center {
  text-align: center;
}
.portal-table th.align-right,
.portal-table td.align-right {
  text-align: right;
}

.rank-badge {
  display: inline-flex;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 217, 31, 0.1);
  color: var(--accent);
  font-weight: 800;
}

.cell-character {
  color: #93c4ff;
  font-weight: 800;
}

.cell-rank {
  width: 74px;
}

.cell-character-col {
  min-width: 180px;
}

.cell-number {
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 6px 12px;
  border-radius: 999px;
  color: white;
  font-weight: 800;
}
.pill--blue {
  background: var(--blue);
}
.pill--green {
  background: var(--green);
}

.table-message {
  text-align: center;
  color: #c9d4e6;
}
.table-message--empty {
  padding: 32px 20px;
}
.table-message--empty strong,
.table-message--empty span {
  display: block;
}
.table-message--empty strong {
  color: #fff;
  margin-bottom: 6px;
}
.table-message--empty span {
  color: var(--muted);
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.table-toolbar__results {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.table-toolbar__controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.table-toolbar__rows {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #d9e5f7;
  font-size: 14px;
  font-weight: 700;
}
.table-toolbar__rows select {
  min-width: 84px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: white;
}

.ign-link {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}
.ign-link:hover {
  text-decoration: underline;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}
.status-badge--success {
  background: #dcfce7;
  color: #166534;
}
.status-badge--danger {
  background: #fee2e2;
  color: #991b1b;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
}

.sync-status {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.page-numbers {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination-button--page.is-active {
  background: linear-gradient(180deg, #ff8c5b, #ef624b);
  color: white;
  box-shadow: 0 12px 28px rgba(239, 98, 75, 0.28);
}

.banlist-section {
  padding-top: 36px;
}

.banlist-page {
  padding-bottom: 56px;
}

.banlist-hero {
  padding: 42px 0 24px;
}

.banlist-title {
  margin: 0;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1;
  font-weight: 800;
}

.banlist-content {
  padding: 12px 0 32px;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 20px 22px;
  border-top: 1px solid var(--border);
}

.pagination-button {
  min-width: 92px;
  min-height: 42px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}
.pagination-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pagination-info {
  color: var(--muted);
  font-weight: 700;
}

.footer-panels {
  padding-bottom: 52px;
}

.footer-panel h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 24px;
}
.footer-panel p {
  margin: 0;
  color: #c7d3e4;
  line-height: 1.7;
}

.home-modules {
  padding-top: 10px;
}

.hero-home__grid {
  grid-template-columns: 1fr;
}

.hero-home__copy {
  max-width: 720px;
}

.market-grid {
  margin-top: 16px;
}

.market-panel,
.module-card {
  border-radius: var(--radius-lg);
}

.home-feature-section,
.market-section {
  padding-top: 16px;
  padding-bottom: 16px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-section {
  width: 100%;
  max-width: 460px;
}

.login-card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(29, 45, 73, 0.96), rgba(18, 31, 53, 0.98));
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.login-card h1 {
  margin: 0 0 12px;
  font-size: 36px;
}
.login-card p {
  margin: 0 0 18px;
  color: #c1cee2;
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-error {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 141, 87, 0.12);
  color: #ffd2bf;
  border: 1px solid rgba(255, 141, 87, 0.25);
}

@media (max-width: 900px) {
  .filter-bar,
  .filter-bar--banlist {
    grid-template-columns: 1fr;
  }
  .filter-field--compact {
    justify-self: stretch;
    max-width: none;
  }
  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .table-toolbar__controls {
    justify-content: flex-start;
  }
  .filter-actions {
    flex-direction: column;
  }
}
