/* ============================================
   HERVANA — Status page
============================================ */

.nav__links a.active {
  color: var(--text);
}
.nav__links a.active::after {
  width: 100%;
  background: var(--primary);
}

/* ============================================
   STATUS HERO
============================================ */
.status-hero {
  padding: 160px 40px 60px;
  position: relative;
  z-index: 2;
}
.status-hero__inner {
  max-width: var(--maxw);
  margin: 0 auto;
}

.status-hero__main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-top: 16px;
}

.status-hero__title {
  font-family: var(--display);
  font-size: clamp(72px, 11vw, 160px);
  line-height: 0.88;
  letter-spacing: -0.01em;
  font-weight: 400;
}
.status-hero__title em {
  font-style: normal;
  color: var(--primary);
  display: inline-block;
}

/* ===== STATUS CARD ===== */
.status-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  position: relative;
  overflow: hidden;
  transition: border-color .4s;
}
.status-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, currentColor 0%, transparent 60%);
  opacity: 0.08;
  pointer-events: none;
  color: var(--primary);
  transition: color .4s;
}
.status-card.online { border-color: rgba(74, 222, 128, 0.4); }
.status-card.online::before { color: #4ade80; }
.status-card.offline { border-color: rgba(248, 113, 113, 0.4); }
.status-card.offline::before { color: #f87171; }

.status-card__dot {
  position: relative;
  width: 64px; height: 64px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--text-mute);
  position: relative;
}
.dot::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0.4;
  animation: ring 2s infinite;
}
.dot--loading { background: var(--primary); color: var(--primary); }
.dot--online { background: #4ade80; color: #4ade80; box-shadow: 0 0 20px rgba(74, 222, 128, 0.6); }
.dot--offline { background: #f87171; color: #f87171; }

@keyframes ring {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.8); opacity: 0; }
}

.status-card__body { flex: 1; }
.status-card__label {
  font-family: var(--display);
  font-size: 32px;
  letter-spacing: 0.02em;
  line-height: 1;
  margin-bottom: 8px;
}
.status-card__sub {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.refresh {
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text-dim);
  display: grid; place-items: center;
  cursor: pointer;
  transition: all .25s;
}
.refresh:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: rotate(180deg);
}
.refresh.spinning svg { animation: spin 1s linear infinite; }
@keyframes spin {
  to { transform: rotate(360deg); }
}

.status-meta {
  margin-top: 32px;
  display: flex;
  gap: 24px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: 0.05em;
}
.status-meta strong {
  color: var(--text);
  font-weight: 500;
}

/* ============================================
   LIVE STATS GRID
============================================ */
.live-stats {
  padding: 60px 40px;
  position: relative;
  z-index: 2;
}
.live-stats__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(140px, auto);
  gap: 16px;
}

/* BIG CARD - 3 cols wide x 2 rows */
.big-card {
  grid-column: span 3;
  grid-row: span 2;
  padding: 36px;
  border: 1px solid var(--primary-line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--primary-soft) 0%, transparent 60%),
    var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.big-card::after {
  content: "";
  position: absolute;
  top: -50%; right: -20%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 60%);
  opacity: 0.18;
  filter: blur(60px);
  pointer-events: none;
}
.big-card__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  position: relative;
}
.big-card__value {
  font-family: var(--display);
  font-size: clamp(80px, 12vw, 160px);
  line-height: 0.85;
  color: var(--text);
  margin: 16px 0;
  letter-spacing: -0.02em;
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.big-card__sep {
  color: var(--primary);
  font-size: 0.5em;
  opacity: 0.6;
}
.big-card__max {
  color: var(--text-mute);
  font-size: 0.5em;
}
.progress {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 100px;
  overflow: hidden;
  position: relative;
}
.progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), #a597ff);
  border-radius: 100px;
  transition: width 1.5s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 0 16px var(--primary);
}
.big-card__foot {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  position: relative;
}
.big-card__foot span {
  color: var(--primary);
  font-weight: 600;
}

/* SMALL CARDS */
.small-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: all .3s;
}
.small-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.small-card__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--text-mute);
}
.small-card__value {
  font-family: var(--heading);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  word-break: break-word;
}
.small-card__value .unit {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 400;
  margin-left: 4px;
}

/* span 3 cols each = 2 per row */
.small-card { grid-column: span 3; }

/* on plus large : 3 par ligne (span 2) */
@media (min-width: 1100px) {
  .small-card { grid-column: span 2; }
}

/* ============================================
   PLAYERS LIST
============================================ */
.players {
  padding: 80px 40px;
  position: relative;
  z-index: 2;
}
.players__inner {
  max-width: var(--maxw);
  margin: 0 auto;
}
.players__head {
  margin-bottom: 48px;
}
.players__title {
  font-family: var(--display);
  font-size: clamp(48px, 7vw, 100px);
  line-height: 0.9;
  margin: 16px 0 12px;
  letter-spacing: -0.01em;
}
.players__sub {
  color: var(--text-dim);
  font-size: 15px;
}

.players__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.player-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  transition: all .25s;
  animation: fadeUp .5s both;
}
.player-row:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.player-row__id {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-mute);
  flex-shrink: 0;
  min-width: 32px;
}
.player-row__name {
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-row__ping {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
}
.player-row__ping.high { color: #fbbf24; }
.player-row__ping.bad { color: #f87171; }

.players__empty {
  padding: 60px;
  text-align: center;
  color: var(--text-mute);
  font-family: var(--mono);
  font-size: 13px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  grid-column: 1 / -1;
}

/* ============================================
   TAGS SECTION
============================================ */
.tags-section {
  padding: 80px 40px;
  position: relative;
  z-index: 2;
}
.tags-section__inner {
  max-width: var(--maxw);
  margin: 0 auto;
}
.tags-section__title {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 80px);
  line-height: 0.9;
  margin: 16px 0 40px;
  letter-spacing: -0.01em;
}
.tags-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.tags-block h3 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-chip {
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}
.vars-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--mono);
  font-size: 12px;
}
.var-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  gap: 12px;
}
.var-row__key { color: var(--primary); }
.var-row__val {
  color: var(--text);
  word-break: break-all;
  text-align: right;
  max-width: 60%;
}

/* ============================================
   ERROR PANEL
============================================ */
.error-panel {
  padding: 80px 40px;
  position: relative;
  z-index: 2;
}
.error-panel__inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  padding: 60px 40px;
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 8px;
  background:
    radial-gradient(circle at center, rgba(248, 113, 113, 0.08) 0%, transparent 70%),
    var(--surface);
}
.error-panel__icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #f87171;
  color: #1a0a0a;
  font-family: var(--display);
  font-size: 36px;
  display: grid; place-items: center;
  margin: 0 auto 24px;
  box-shadow: 0 0 30px rgba(248, 113, 113, 0.4);
}
.error-panel h2 {
  font-family: var(--display);
  font-size: 44px;
  letter-spacing: 0;
  margin-bottom: 16px;
}
.error-panel p {
  color: var(--text-dim);
  margin-bottom: 24px;
  line-height: 1.6;
}
.error-panel__hint {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-mute);
  text-align: left;
  line-height: 1.7;
}
.error-panel__hint code {
  padding: 2px 6px;
  background: var(--bg-2);
  border-radius: 3px;
  color: var(--primary);
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 980px) {
  .status-hero { padding: 130px 24px 40px; }
  .status-hero__main { grid-template-columns: 1fr; gap: 40px; }
  .live-stats { padding: 40px 24px; }
  .live-stats__inner { grid-template-columns: repeat(2, 1fr); }
  .big-card {
    grid-column: span 2;
    grid-row: auto;
    padding: 28px;
  }
  .small-card { grid-column: span 1; }
  .players, .tags-section, .error-panel { padding: 60px 24px; }
  .tags-grid { grid-template-columns: 1fr; }
  .status-card { padding: 24px; flex-wrap: wrap; }
  .status-card__dot { width: 50px; height: 50px; }
}

@media (max-width: 520px) {
  .live-stats__inner { grid-template-columns: 1fr; }
  .big-card, .small-card { grid-column: span 1; }
  .players__list { grid-template-columns: 1fr; }
  .status-meta { flex-direction: column; gap: 8px; }
}
