/* Divisions — RVAL-based fighter groups */

/* theme */
:root {
  --bg1: #03020a;
  --bg2: #020008;
  --panel: rgba(8, 6, 22, 0.97);
  --border: rgba(255,255,255,0.10);
  --accent-cyan: #2de3ff;
  --accent-pink: #ff2da8;
  --accent-gold: #ffd86b;
  --accent-violet: #c866ff;
  --text-main: #e4e6ff;
  --text-muted: #9598c4;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 0% 0%, rgba(135,66,255,0.28), transparent 60%),
    radial-gradient(circle at 100% 10%, rgba(0,230,255,0.22), transparent 65%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
  background-attachment: fixed;
}

/* noise */
.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    url("assets/noise.png"),
    url("assets/scanline.png");
  opacity: 0.12;
  mix-blend-mode: soft-light;
}

/* layout */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 1150px;
  margin: 18px auto 40px;
  padding: 0 14px;
}

/* header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.logo {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.12em;
}

.logo .accent {
  color: var(--accent-cyan);
}

.logo .sub {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}

.nav a:hover {
  color: var(--accent-cyan);
}

/* panels */
.panel,
.hero-panel {
  background: var(--panel);
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0,0,0,0.9);
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.panel::before,
.hero-panel::before {
  content: "";
  position: absolute;
  inset: -40%;
  background-image: url("assets/gradient-bg.png");
  background-size: cover;
  background-position: center;
  opacity: 0.12;
  mix-blend-mode: soft-light;
  animation: drift 24s linear infinite;
  pointer-events: none;
}

@keyframes drift {
  0% { transform: translate3d(0,0,0); }
  50% { transform: translate3d(16px,-20px,0); }
  100% { transform: translate3d(0,0,0); }
}

/* hero */
.hero-panel {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 14px;
}

.hero-panel h1 {
  margin: 0 0 6px;
  font-size: 22px;
}

.muted {
  color: var(--text-muted);
}

.hero-tags {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(5,2,12,0.9);
}

/* meter */
.hero-right {
  display: flex;
  justify-content: flex-end;
}

.meter-shell {
  max-width: 270px;
  width: 100%;
  background: radial-gradient(circle at top, rgba(60,90,255,0.36), rgba(5,3,16,0.98));
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(143,162,255,0.7);
}

.meter-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.meter-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: auto auto;
  gap: 4px 12px;
  font-size: 11px;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  margin-right: 4px;
}

.dot.apex { background: var(--accent-gold); }
.dot.ech0 { background: var(--accent-cyan); }
.dot.mid7 { background: var(--accent-violet); }
.dot.ground { background: #ff8c5a; }

.meter-note {
  margin-top: 8px;
  font-size: 10px;
}

/* generic */
.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* panel headers */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.panel-header h2 {
  margin: 0;
  font-size: 17px;
}

.panel-sub {
  font-size: 12px;
}

/* portal grid */
.portal-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 10px;
}

.portal-card {
  position: relative;
  border-radius: 14px;
  padding: 10px 11px;
  border: 1px solid rgba(255,255,255,0.16);
  background: radial-gradient(circle at top, rgba(255,255,255,0.06), rgba(3,1,11,0.98));
  cursor: pointer;
  text-align: left;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.portal-card:hover {
  box-shadow: 0 18px 44px rgba(0,0,0,0.9);
  transform: translateY(-3px);
}

/* specific portal colors */
.apex-card { border-color: rgba(255,216,107,0.7); }
.echo-card { border-color: rgba(45,227,255,0.7); }
.mid-card  { border-color: rgba(200,102,255,0.7); }
.ground-card { border-color: rgba(255,140,90,0.7); }

.portal-emblem {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
}

.emblem-apex {
  background: radial-gradient(circle, var(--accent-gold), transparent 65%);
  box-shadow: 0 0 18px rgba(255,216,107,0.8);
}

.emblem-echo {
  background: radial-gradient(circle, var(--accent-cyan), transparent 65%);
  box-shadow: 0 0 18px rgba(45,227,255,0.8);
}

.emblem-mid {
  background: radial-gradient(circle, var(--accent-violet), transparent 65%);
  box-shadow: 0 0 18px rgba(200,102,255,0.8);
}

.emblem-ground {
  background: radial-gradient(circle, #ff8c5a, transparent 65%);
  box-shadow: 0 0 18px rgba(255,140,90,0.8);
}

.portal-title {
  font-size: 14px;
  font-weight: 700;
}

.portal-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* division panels */
.division-panel {
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
  opacity: 0;
  transform: translateY(6px);
}

.division-panel.active {
  opacity: 1;
  transform: translateY(0);
}

.division-body {
  margin-top: 8px;
}

.division-lore {
  font-size: 12px;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.division-stats {
  font-size: 11px;
  margin-bottom: 8px;
}

/* division color frames */
.division-apex {
  border-color: rgba(255,216,107,0.8);
  box-shadow: 0 0 30px rgba(255,216,107,0.28);
}

.division-echo {
  border-color: rgba(45,227,255,0.8);
  box-shadow: 0 0 30px rgba(45,227,255,0.28);
}

.division-mid {
  border-color: rgba(200,102,255,0.8);
  box-shadow: 0 0 30px rgba(200,102,255,0.28);
}

.division-ground {
  border-color: rgba(255,140,90,0.8);
  box-shadow: 0 0 30px rgba(255,140,90,0.28);
}

/* roster grid */
.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px,1fr));
  gap: 10px;
  margin-top: 8px;
}

.roster-card {
  border-radius: 12px;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,0.16);
  background: radial-gradient(circle at top, rgba(255,255,255,0.08), rgba(0,0,0,0.96));
  position: relative;
  overflow: hidden;
}

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

.roster-name {
  font-size: 13px;
  font-weight: 700;
}

.roster-rval {
  font-size: 11px;
  color: var(--accent-cyan);
}

.roster-meta {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.roster-meta span {
  display: inline-block;
  margin-right: 8px;
}

.roster-link {
  margin-top: 6px;
  font-size: 11px;
}

.roster-link a {
  color: var(--accent-pink);
  text-decoration: none;
}

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

/* badges */
.badge {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
}

.badge-apex {
  border-color: rgba(255,216,107,0.8);
  color: var(--accent-gold);
}

.badge-echo {
  border-color: rgba(45,227,255,0.8);
  color: var(--accent-cyan);
}

.badge-mid {
  border-color: rgba(200,102,255,0.8);
  color: var(--accent-violet);
}

.badge-ground {
  border-color: rgba(255,140,90,0.8);
  color: #ffb28c;
}

/* helpers */
.hidden {
  display: none;
}

/* footer */
.footer {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin: 16px 0 28px;
}

/* responsive */
@media (max-width: 900px) {
  .hero-panel {
    grid-template-columns: 1fr;
  }
  .hero-right {
    justify-content: flex-start;
  }
}

@media (max-width: 780px) {
  .site-header {
    flex-direction: column;
    gap: 6px;
  }
  .nav {
    margin-top: 4px;
  }
}