/* MATCHES, SPECTATE, ARENAS, STAFF, SETTINGS and the sign-in screens. */

/* Utility pages sit on the hexagon art with a soft scrim at the top for the big title. */
.page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 6, 22, 0.55), rgba(4, 6, 22, 0.15) 40%, rgba(4, 6, 22, 0.4));
}
.spinner { width: 3rem; height: 3rem; border-radius: 50%; border: 0.32rem solid rgba(255, 255, 255, 0.2); border-top-color: var(--yellow); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* MARK: Match tiles (MATCHES, SPECTATE) */

.match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 25rem), 1fr)); gap: 1.4rem; }
.match-grid > .empty-state { grid-column: 1 / -1; }
.match-tile {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  border: 0.2rem solid rgba(255, 255, 255, 0.3);
  border-radius: 1.2rem;
  background: #120c30;
  color: #fff;
  text-align: left;
  box-shadow: 0 1rem 2.4rem rgba(0, 0, 0, 0.45);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s, border-color 0.2s;
  animation: tile-in 0.4s var(--ease-out) both;
}
@keyframes tile-in { from { opacity: 0; transform: translateY(0.8rem); } }
.match-tile:hover, .match-tile:focus-visible {
  outline: none;
  border-color: #fff;
  transform: translateY(-0.35rem) scale(1.02);
  box-shadow: 0 0 0 0.3rem rgba(255, 210, 26, 0.7), 0 1.4rem 2.6rem rgba(0, 0, 0, 0.55);
}
.match-tile.is-paused { border-color: #ff8a93; box-shadow: 0 0 0 0.3rem rgba(255, 59, 74, 0.55), 0 1rem 2.4rem rgba(0, 0, 0, 0.45); }
.match-tile-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85) brightness(0.8); transition: transform 0.4s var(--ease-out); }
.match-tile:hover .match-tile-art, .match-tile:focus-visible .match-tile-art { transform: scale(1.05); filter: none; }
.match-tile-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5, 4, 22, 0.96) 0%, rgba(5, 4, 22, 0.6) 42%, rgba(5, 4, 22, 0.1) 75%), linear-gradient(180deg, rgba(5, 4, 22, 0.55), transparent 28%); }
.match-tile-top { position: absolute; top: 0.8rem; left: 0.8rem; right: 0.8rem; display: flex; justify-content: space-between; gap: 0.5rem; }
.match-tile-body { position: absolute; left: 1.1rem; right: 1.1rem; bottom: 0.9rem; display: grid; gap: 0.2rem; }
.match-tile-mode { font-family: var(--display); font-style: italic; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.82); font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-tile-code { font-size: 4.2rem; font-weight: 900; letter-spacing: 0.05em; line-height: 0.88; text-shadow: 0 0.2rem 0 rgba(0, 0, 0, 0.4); }
.match-tile-foot { display: flex; align-items: center; gap: 1rem; margin-top: 0.35rem; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.25rem; }
.match-tile-players { display: inline-flex; align-items: center; gap: 0.35rem; }
.match-tile-score { margin-left: auto; font-size: 2rem; display: inline-flex; gap: 0.3rem; align-items: center; }
.match-tile-watch { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--yellow); text-transform: uppercase; letter-spacing: 0.06em; }
.team-dots { display: inline-flex; align-items: center; gap: 0.2rem; }
.team-dots i { width: 0.65rem; height: 0.65rem; border-radius: 50%; }
.team-dots .dot-blue { background: var(--blue); box-shadow: 0 0 0.4rem var(--blue); }
.team-dots .dot-red { background: var(--red); box-shadow: 0 0 0.4rem var(--red); }
.team-dots .is-off { background: #555a70; box-shadow: none; }
.team-dots-sep { width: 0.6rem; }

/* MARK: Spectate (wall full-bleed) */

.spectate { position: absolute; inset: 0; }
.spectate-wall { position: absolute; inset: 0; }
.spectate-bar {
  position: absolute;
  left: 50%;
  bottom: 1.2rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem;
  border-radius: 1.2rem;
  background: rgba(4, 6, 22, 0.78);
  border: 0.12rem solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  transform: translateX(-50%);
  box-shadow: var(--shadow);
}
.spectate-title { padding: 0 0.8rem; font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; font-size: 1.3rem; white-space: nowrap; }

/* MARK: Arenas */

.arena-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 1.4rem; }
.arena-grid > .empty-state { grid-column: 1 / -1; }
.arena-tile {
  display: grid;
  grid-template-rows: auto auto;
  overflow: hidden;
  border-radius: 1.2rem;
  border: 0.2rem solid rgba(255, 255, 255, 0.22);
  background: var(--glass);
  backdrop-filter: blur(14px);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.2s var(--ease-out), border-color 0.2s, box-shadow 0.2s;
  animation: tile-in 0.4s var(--ease-out) both;
}
.arena-tile:hover, .arena-tile:focus-visible { outline: none; border-color: #fff; transform: translateY(-0.3rem); box-shadow: 0 0 0 0.3rem rgba(255, 210, 26, 0.6), var(--shadow); }
.arena-tile-map-wrap { position: relative; aspect-ratio: 16 / 10; background: radial-gradient(circle at 50% 40%, rgba(51, 230, 255, 0.12), rgba(4, 6, 20, 0.6)); }
.arena-tile-map { position: absolute; inset: 0.8rem; width: calc(100% - 1.6rem); height: calc(100% - 1.6rem); }
.arena-tile-body { display: grid; gap: 0.35rem; padding: 0.9rem 1.1rem 1.1rem; }
.arena-tile-badges { display: flex; gap: 0.4rem; }
.arena-tile-badges .chip { font-size: 0.85rem; }
.arena-tile-name { font-size: 2.3rem; }
.arena-tile-meta { color: var(--muted); }
.arena-detail { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(18rem, 1fr); gap: 1.4rem; align-items: start; }
.arena-detail-map-panel { padding: 1rem; display: grid; gap: 0.8rem; }
.arena-detail-map-wrap { position: relative; width: 100%; height: min(60vh, 46rem); border-radius: 0.9rem; background: radial-gradient(circle at 50% 40%, rgba(51, 230, 255, 0.1), rgba(0, 0, 0, 0.35)); }
.arena-detail-map { position: absolute; inset: 1rem; width: calc(100% - 2rem); height: calc(100% - 2rem); }
.arena-detail-side { display: grid; gap: 1.4rem; }
.arena-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 1rem 1.4rem; }
.fact { display: grid; gap: 0.15rem; }
.fact-label { display: block; font-family: var(--display); font-style: italic; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.92rem; color: var(--muted); }
.fact-value { font-family: var(--display); font-style: italic; font-weight: 900; font-size: 2rem; text-transform: uppercase; line-height: 1; }
.arena-markers { display: grid; gap: 0.6rem; }
.poster-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.9rem; padding: 0.7rem 0.9rem; border-radius: 0.9rem; border: 0.14rem solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.05); color: #fff; text-decoration: none; }
.poster-row:hover, .poster-row:focus-visible { outline: none; border-color: #fff; background: rgba(255, 255, 255, 0.1); }
.poster-text { display: grid; }
.poster-text b { font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 1.3rem; }
.poster-swatch { width: 2.6rem; height: 2.6rem; border-radius: 0.5rem; background: linear-gradient(135deg, #fff, #ffd21a); box-shadow: inset 0 0 0 0.35rem #111; }
.poster-arblast-blue-base { background: linear-gradient(135deg, #fff, var(--blue)); }
.poster-arblast-red-base { background: linear-gradient(135deg, #fff, var(--red)); }
.poster-help { font-size: 0.95rem; }

/* MARK: Staff */

.staff-list { display: grid; gap: 0.9rem; max-width: 70rem; }
.staff-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 1.2rem; padding: 1rem 1.3rem; }
.staff-card.is-removed { opacity: 0.55; }
.staff-name { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.staff-name .display { font-size: 2rem; }
.staff-meta { display: flex; gap: 1.6rem; color: #fff; font-weight: 600; }
.staff-meta > span { display: grid; gap: 0.1rem; }
.staff-action-spacer { width: 1px; }
.staff-removed-title { margin-top: 1rem; color: var(--muted); }
.sheet-invite { width: min(92vw, 44rem); }
.invite-help { margin: -0.4rem 0 0.8rem; font-size: 0.95rem; }
.invite-actions { display: flex; justify-content: flex-end; gap: 0.7rem; }
.copy-box { display: flex; gap: 0.6rem; margin: 0.5rem 0 0.7rem; }
.invite-link { font-size: 0.95rem; }

/* MARK: Settings */

.settings { display: grid; grid-template-columns: minmax(14rem, 19rem) minmax(0, 1fr); gap: 1.6rem; align-items: start; max-width: 92rem; }
.settings-nav { display: grid; gap: 0.5rem; }
.settings-tab {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border-radius: 0.9rem;
  border: 0.16rem solid rgba(255, 255, 255, 0.12);
  background: rgba(6, 8, 26, 0.6);
  backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1.4rem;
}
.settings-tab .icon:last-child { margin-left: auto; opacity: 0.4; }
.settings-tab:hover { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.settings-tab:focus-visible { outline: none; box-shadow: var(--focus); border-color: #fff; }
.settings-tab[aria-current="page"] { background: #fff; color: #0b1030; border-color: #fff; }
.settings-tab[aria-current="page"] .icon:last-child { opacity: 1; }
.settings-panel { padding: 1.6rem 1.8rem 1.8rem; min-height: 24rem; }
.settings-section { display: grid; gap: 1rem; animation: tile-in 0.3s var(--ease-out); }
.settings-help { max-width: 52rem; }
.account-card { display: flex; align-items: center; gap: 1.1rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.account-card .spacer { flex: 1; }
.account-name { font-size: 2.4rem; }
.settings-form { display: grid; max-width: 44rem; gap: 0; }
.settings-form .panel-title { margin-bottom: 1rem; }
.settings-form .btn { justify-self: start; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.defaults { display: grid; gap: 0.7rem; }
.default-row { display: grid; grid-template-columns: 7.5rem minmax(10rem, 1.2fr) repeat(3, minmax(8rem, 1fr)) auto; align-items: center; gap: 1rem; padding: 0.6rem; border-radius: 1rem; background: rgba(255, 255, 255, 0.04); border: 0.1rem solid var(--line); }
.default-art { width: 7.5rem; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 0.6rem; }
.default-name { display: grid; }
.default-name .display { font-size: 1.9rem; }
.default-field { display: grid; gap: 0.3rem; }
.default-field .input { min-height: 2.6rem; padding: 0.35rem 0.6rem; }

/* MARK: Sign-in */

.auth { position: fixed; inset: 0; display: grid; place-items: center; overflow: auto; background: #0b0a24 url("../art/bg_lobby.webp") center / cover no-repeat; }
.auth::before { content: ""; position: fixed; inset: 0; background: radial-gradient(60% 70% at 50% 50%, rgba(10, 6, 34, 0.25), rgba(10, 6, 34, 0.8)), linear-gradient(0deg, rgba(6, 4, 24, 0.7), transparent 50%); pointer-events: none; }
.auth-art { position: fixed; inset: 0; pointer-events: none; }
.auth-hero { position: absolute; bottom: -2vh; height: min(86vh, 58rem); width: auto; filter: drop-shadow(0 1.2rem 2rem rgba(0, 0, 0, 0.5)); animation: hero-float 6s ease-in-out infinite; }
.auth-hero-blue { left: max(2vw, calc(50% - 50rem)); }
.auth-hero-red { right: max(2vw, calc(50% - 50rem)); animation-delay: -3s; }
.auth-center { position: relative; display: grid; justify-items: center; gap: 1.2rem; width: min(92vw, 32rem); padding: 3rem 0; }
.auth-brand { display: grid; justify-items: center; }
.auth-brand .wordmark { font-size: 5.6rem; }
.auth-brand-sub { margin-top: 0.2rem; font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; letter-spacing: 0.32em; font-size: 1.15rem; color: #fff; text-shadow: 0 0.1rem 0.5rem rgba(0, 0, 0, 0.6); }
.auth-card { width: 100%; padding: 1.8rem 2rem 2rem; border-color: rgba(255, 255, 255, 0.3); }
.auth-title { font-size: 3.6rem; font-weight: 900; }
.auth-lead { margin: 0.4rem 0 1.4rem; color: rgba(255, 255, 255, 0.82); font-size: 1.1rem; }
.auth-foot { color: rgba(255, 255, 255, 0.7); font-size: 0.95rem; text-shadow: 0 1px 0.4rem rgba(0, 0, 0, 0.8); }
.auth-retry { display: flex; align-items: center; gap: 0.8rem; color: var(--muted); }
.auth-retry .spinner { width: 1.6rem; height: 1.6rem; border-width: 0.22rem; }
.auth .form-row { grid-template-columns: 1fr 1fr; }

@media (max-width: 1100px) {
  .auth-hero { opacity: 0.35; }
  .default-row { grid-template-columns: 6rem minmax(0, 1fr) repeat(3, minmax(6rem, 1fr)); }
  .default-row > .btn { grid-column: 2; justify-self: start; }
  .arena-detail { grid-template-columns: 1fr; }
  .staff-card { grid-template-columns: auto minmax(0, 1fr) auto; }
  .staff-meta { display: none; }
}
