:root {
  --app-bg: #1e1b4b;
  --app-bg-dark: #0f0e24;
  --app-color: #818cf8;
  --app-accent: #fbbf24;
  --app-gradient: linear-gradient(135deg, #312e81, #f59e0b);
  --text: #f8fafc;
  --muted: #c7d2fe;
  --surface: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.14);
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--app-bg);
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

body {
  min-height: 100dvh;
}

/* —— Splash —— */
.ofni-wow-splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  background: var(--app-bg);
  color: var(--text);
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

.ofni-wow-splash.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.ofni-wow-splash__stage {
  grid-area: 1 / 1;
  position: relative;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ofni-wow-splash__mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 24%, rgba(129, 140, 248, 0.45), transparent 46%),
    radial-gradient(circle at 82% 78%, rgba(251, 191, 36, 0.32), transparent 42%),
    radial-gradient(circle at 52% 48%, rgba(99, 102, 241, 0.18), transparent 38%);
  animation: mesh 14s ease-in-out infinite alternate;
}

.ofni-wow-splash__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.45;
  animation: orb 11s ease-in-out infinite alternate;
}

.ofni-wow-splash__orb--1 {
  width: min(58vw, 460px);
  height: min(58vw, 460px);
  background: rgba(129, 140, 248, 0.7);
  top: -10%;
  left: -12%;
}

.ofni-wow-splash__orb--2 {
  width: min(46vw, 340px);
  height: min(46vw, 340px);
  background: rgba(251, 191, 36, 0.55);
  bottom: -8%;
  right: -10%;
  animation-delay: -3s;
}

.ofni-wow-splash__orb--3 {
  width: min(30vw, 240px);
  height: min(30vw, 240px);
  background: rgba(56, 189, 248, 0.4);
  top: 42%;
  left: 58%;
  animation-delay: -6s;
}

.ofni-wow-splash__hero {
  grid-area: 1 / 1;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  width: min(36rem, 100%);
}

.ofni-wow-splash__icon-wrap {
  width: 148px;
  height: 148px;
  display: grid;
  place-items: center;
}

.ofni-wow-splash__icon {
  width: 148px;
  height: 148px;
  border-radius: 36px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.ofni-wow-splash__wordmark {
  margin: 0;
  letter-spacing: 0.28em;
  text-transform: lowercase;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.ofni-wow-splash__app {
  margin: 0;
  font-size: clamp(1.4rem, 4vw, 1.85rem);
  font-weight: 800;
}

.ofni-wow-splash__pitch {
  min-height: 3.4em;
  width: min(34rem, 92vw);
  display: grid;
  place-items: center;
}

.ofni-wow-splash__pitch-line {
  margin: 0;
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.ofni-wow-splash__cursor {
  display: inline-block;
  width: 0.08em;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: -0.12em;
  background: var(--app-accent);
  animation: blink 0.85s step-end infinite;
}

.ofni-wow-splash__status {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.ofni-wow-splash__footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(28px, env(safe-area-inset-bottom));
  z-index: 3;
  display: flex;
  justify-content: center;
  padding: 0 24px;
  pointer-events: none;
}

.ofni-wow-splash__track {
  width: min(320px, 78vw);
  height: 4px;
  border-radius: 999px;
  background: rgba(129, 140, 248, 0.22);
  overflow: hidden;
}

.ofni-wow-splash__bar {
  height: 100%;
  width: 4%;
  border-radius: inherit;
  background: var(--app-gradient);
  transition: width 0.45s ease;
}

@keyframes mesh {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.08) translate(2%, -2%); }
}

@keyframes orb {
  from { transform: translate(0, 0); }
  to { transform: translate(4%, 6%); }
}

@keyframes blink {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ofni-wow-splash__mesh,
  .ofni-wow-splash__orb,
  .ofni-wow-splash__cursor {
    animation: none;
  }
}

/* —— App shell —— */
.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  padding-top: max(14px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--border);
  background: rgba(15, 14, 36, 0.55);
  backdrop-filter: blur(10px);
}

.app-topbar h1 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.app-topbar__version {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.9em;
}

.app-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.app-placeholder {
  max-width: 28rem;
  text-align: center;
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
}

.app-placeholder h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.app-placeholder p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.team-panel {
  width: min(28rem, 100%);
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
}

.team-panel__eyebrow {
  margin: 0 0 6px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--app-accent);
}

.team-panel h2 {
  margin: 0 0 8px;
  font-size: 1.55rem;
}

.team-panel__meta,
.team-panel__season,
.team-panel__note {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.45;
}

.player-list {
  list-style: none;
  margin: 16px 0 12px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.player-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
}

.player-list__name {
  font-weight: 600;
}

.player-list__status {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: capitalize;
}
