/* =========================================================
   FANTA FACTOR
   LIQUID GLASS UI
   ========================================================= */


/* =========================================================
   ROOT
   ========================================================= */

:root {
  --bg: #07080c;
  --bg-secondary: #0c0d13;

  --glass: rgba(255, 255, 255, 0.075);
  --glass-strong: rgba(255, 255, 255, 0.105);
  --glass-soft: rgba(255, 255, 255, 0.045);

  --border: rgba(255, 255, 255, 0.11);
  --border-light: rgba(255, 255, 255, 0.16);

  --text: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.72);
  --text-muted: rgba(255, 255, 255, 0.46);

  --accent: #9b7cff;
  --accent-light: #b9a5ff;
  --accent-dark: #7455e8;

  --green: #5ee7a1;
  --red: #ff667d;
  --orange: #ffb45e;
  --blue: #65b7ff;

  --shadow:
    0 20px 60px rgba(0, 0, 0, 0.38);

  --glass-blur: blur(28px) saturate(180%);

  --radius-small: 14px;
  --radius: 22px;
  --radius-large: 30px;

  --bottom-nav-height: 76px;
  --bottom-nav-bottom: 14px;

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "SF Pro Text",
    Inter,
    Helvetica,
    Arial,
    sans-serif;
}


/* =========================================================
   RESET
   ========================================================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
  background: var(--bg);
  color-scheme: dark;
}

body {
  min-height: 100vh;
  min-height: 100dvh;

  background:
    radial-gradient(
      circle at 15% 0%,
      rgba(125, 92, 255, 0.20),
      transparent 32%
    ),
    radial-gradient(
      circle at 90% 15%,
      rgba(66, 148, 255, 0.12),
      transparent 30%
    ),
    radial-gradient(
      circle at 50% 100%,
      rgba(155, 124, 255, 0.08),
      transparent 35%
    ),
    var(--bg);

  color: var(--text);

  overflow-x: hidden;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:active {
  transform: scale(0.97);
}

img {
  max-width: 100%;
}


/* =========================================================
   GENERIC
   ========================================================= */

.hidden {
  display: none !important;
}

.page {
  min-height: 100vh;
  min-height: 100dvh;
}

#authPage,
#dashboardPage,
#leaguePage {
  width: 100%;
}

.glass-card {
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.105),
      rgba(255, 255, 255, 0.045)
    );

  border: 1px solid var(--border);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 18px 45px rgba(0, 0, 0, 0.20);

  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}


/* =========================================================
   AUTH
   ========================================================= */

#authPage {
  display: flex;
  align-items: center;
  justify-content: center;

  padding:
    max(24px, env(safe-area-inset-top))
    20px
    max(24px, env(safe-area-inset-bottom));

  position: relative;
  overflow: hidden;
}

#authPage::before,
#authPage::after {
  content: "";

  position: fixed;

  width: 280px;
  height: 280px;

  border-radius: 50%;

  filter: blur(90px);

  pointer-events: none;
}

#authPage::before {
  top: -120px;
  left: -100px;

  background: rgba(135, 91, 255, 0.24);
}

#authPage::after {
  right: -100px;
  bottom: -120px;

  background: rgba(70, 130, 255, 0.14);
}

.auth-card {
  width: min(100%, 430px);

  padding: 34px 28px 30px;

  border-radius: 32px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.115),
      rgba(255, 255, 255, 0.045)
    );

  border: 1px solid rgba(255, 255, 255, 0.13);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 30px 80px rgba(0, 0, 0, 0.45);

  backdrop-filter: blur(35px) saturate(170%);
  -webkit-backdrop-filter: blur(35px) saturate(170%);

  position: relative;
  z-index: 1;
}

.logo {
  width: 72px;
  height: 72px;

  margin: 0 auto 18px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 23px;

  background:
    linear-gradient(
      145deg,
      rgba(170, 140, 255, 0.28),
      rgba(100, 70, 220, 0.10)
    );

  border: 1px solid rgba(255, 255, 255, 0.16);

  box-shadow:
    0 15px 40px rgba(110, 75, 255, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);

  font-size: 32px;
}

.auth-card h1 {
  text-align: center;

  font-size: 32px;
  line-height: 1.1;

  letter-spacing: -1.2px;

  margin-bottom: 8px;
}

.subtitle {
  text-align: center;

  color: var(--text-secondary);

  font-size: 15px;

  margin-bottom: 28px;
}


/* =========================================================
   TABS
   ========================================================= */

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;

  padding: 4px;

  margin-bottom: 22px;

  border-radius: 16px;

  background: rgba(0, 0, 0, 0.25);

  border: 1px solid rgba(255, 255, 255, 0.07);
}

.tab {
  min-height: 42px;

  border-radius: 12px;

  color: var(--text-muted);

  background: transparent;

  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.tab.active {
  color: #fff;

  background:
    rgba(255, 255, 255, 0.10);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}


/* =========================================================
   INPUTS
   ========================================================= */

input,
textarea,
select {
  width: 100%;

  border: 1px solid rgba(255, 255, 255, 0.10);

  border-radius: 16px;

  padding: 14px 16px;

  outline: none;

  color: #fff;

  background:
    rgba(0, 0, 0, 0.24);

  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.20);

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.36);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(155, 124, 255, 0.65);

  background:
    rgba(0, 0, 0, 0.30);

  box-shadow:
    0 0 0 4px rgba(155, 124, 255, 0.10);
}

textarea {
  min-height: 110px;

  resize: vertical;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.primary-button {
  width: 100%;

  min-height: 52px;

  margin-top: 14px;

  border-radius: 17px;

  color: #fff;

  font-weight: 700;

  cursor: pointer;

  background:
    linear-gradient(
      135deg,
      #a78bfa,
      #7354e8
    );

  box-shadow:
    0 12px 28px rgba(111, 78, 230, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);

  transition:
    transform 0.18s ease,
    filter 0.18s ease,
    box-shadow 0.18s ease;
}

.primary-button:hover {
  filter: brightness(1.08);

  box-shadow:
    0 15px 35px rgba(111, 78, 230, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.secondary-button,
.danger-button {
  min-height: 48px;

  padding: 0 18px;

  border-radius: 15px;

  cursor: pointer;

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.secondary-button {
  color: #fff;

  background: rgba(255, 255, 255, 0.08);

  border: 1px solid var(--border);
}

.danger-button {
  color: #ff8799;

  background: rgba(255, 85, 110, 0.08);

  border: 1px solid rgba(255, 85, 110, 0.18);
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.danger-button:hover {
  background: rgba(255, 85, 110, 0.13);
}


/* =========================================================
   AUTH MESSAGE
   ========================================================= */

.message {
  min-height: 20px;

  margin-top: 14px;

  text-align: center;

  color: var(--red);

  font-size: 14px;
}


/* =========================================================
   APP HEADER
   ========================================================= */

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;

  width: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding:
    max(16px, env(safe-area-inset-top))
    20px
    14px;

  background:
    rgba(7, 8, 12, 0.58);

  border-bottom: 1px solid rgba(255, 255, 255, 0.07);

  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
}

.app-header-left {
  display: flex;
  align-items: center;

  gap: 12px;
}

.app-brand-icon {
  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 14px;

  background:
    linear-gradient(
      145deg,
      rgba(155, 124, 255, 0.25),
      rgba(155, 124, 255, 0.07)
    );

  border: 1px solid rgba(255, 255, 255, 0.11);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.app-brand {
  font-size: 16px;
  font-weight: 700;

  letter-spacing: -0.3px;
}

.app-welcome {
  margin-top: 2px;

  color: var(--text-muted);

  font-size: 12px;
}

.header-icon-button {
  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 14px;

  color: rgba(255, 255, 255, 0.72);

  background: rgba(255, 255, 255, 0.055);

  border: 1px solid rgba(255, 255, 255, 0.09);

  cursor: pointer;

  font-size: 20px;
}


/* =========================================================
   APP CONTENT
   ========================================================= */

.app-content {
  width: min(100%, 900px);

  margin: 0 auto;

  padding:
    22px
    20px
    calc(
      var(--bottom-nav-height)
      + var(--bottom-nav-bottom)
      + env(safe-area-inset-bottom)
      + 38px
    );
}

.app-section {
  animation:
    sectionIn 0.28s ease both;
}

@keyframes sectionIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* =========================================================
   HOME HERO
   ========================================================= */

.home-hero {
  position: relative;

  min-height: 225px;

  overflow: hidden;

  border-radius: 30px;

  margin-bottom: 16px;

  border: 1px solid rgba(255, 255, 255, 0.12);

  background:
    linear-gradient(
      135deg,
      rgba(145, 110, 255, 0.28),
      rgba(75, 62, 145, 0.12) 45%,
      rgba(255, 255, 255, 0.04)
    );

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    0 25px 65px rgba(0, 0, 0, 0.28);

  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
}

.home-hero::before {
  content: "";

  position: absolute;

  width: 230px;
  height: 230px;

  right: -80px;
  top: -90px;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(196, 180, 255, 0.30),
      transparent 68%
    );

  filter: blur(5px);
}

.home-hero::after {
  content: "";

  position: absolute;

  width: 160px;
  height: 160px;

  left: -80px;
  bottom: -80px;

  border-radius: 50%;

  background:
    rgba(78, 125, 255, 0.16);

  filter: blur(35px);
}

.home-hero-content {
  position: relative;
  z-index: 2;

  padding: 30px;
}

.hero-eyebrow,
.section-eyebrow,
.card-eyebrow,
.small-label {
  display: block;

  color: var(--text-muted);

  font-size: 10px;

  font-weight: 800;

  letter-spacing: 1.5px;

  text-transform: uppercase;
}

.home-hero h1 {
  margin-top: 8px;

  font-size: clamp(34px, 9vw, 52px);

  line-height: 0.98;

  letter-spacing: -2px;
}

.home-hero h1 span {
  color: var(--accent-light);
}

.home-hero p {
  max-width: 500px;

  margin-top: 16px;

  color: var(--text-secondary);

  font-size: 15px;

  line-height: 1.55;
}


/* =========================================================
   SEASON STATUS
   ========================================================= */

.season-status-card {
  display: flex;
  align-items: center;

  gap: 14px;

  padding: 17px;

  border-radius: 21px;

  margin-bottom: 30px;
}

.status-icon {
  width: 46px;
  height: 46px;

  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 15px;

  background:
    rgba(155, 124, 255, 0.15);

  font-size: 21px;
}

.status-content {
  display: flex;
  flex-direction: column;

  gap: 3px;
}

.status-content strong {
  font-size: 15px;
}

.status-content span:last-child {
  color: var(--text-muted);

  font-size: 12px;
}


/* =========================================================
   SECTION HEADINGS
   ========================================================= */

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  margin:
    0
    0
    14px;
}

.section-heading h2 {
  margin-top: 5px;

  font-size: 21px;

  letter-spacing: -0.7px;
}

.news-heading {
  margin-top: 30px;
}


/* =========================================================
   QUICK CARDS
   ========================================================= */

.quick-grid {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 12px;
}

.quick-card {
  min-height: 125px;

  position: relative;

  display: flex;
  flex-direction: column;
  align-items: flex-start;

  padding: 18px;

  text-align: left;

  color: #fff;

  border-radius: 23px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.10),
      rgba(255, 255, 255, 0.045)
    );

  border: 1px solid var(--border);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07);

  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);

  cursor: pointer;

  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.quick-card:hover {
  background:
    rgba(255, 255, 255, 0.11);
}

.quick-icon {
  font-size: 23px;

  margin-bottom: 16px;
}

.quick-text {
  display: flex;
  flex-direction: column;

  gap: 4px;
}

.quick-text strong {
  font-size: 14px;
}

.quick-text small {
  color: var(--text-muted);

  font-size: 11px;

  line-height: 1.35;
}

.quick-arrow {
  position: absolute;

  right: 15px;
  bottom: 14px;

  color: var(--text-muted);

  font-size: 18px;
}


/* =========================================================
   NEWS
   ========================================================= */

.news-list {
  display: flex;
  flex-direction: column;

  gap: 12px;
}

.news-card {
  padding: 18px;

  border-radius: 22px;

  position: relative;
  overflow: hidden;
}

.news-card::before {
  content: "";

  position: absolute;

  left: 0;
  top: 0;
  bottom: 0;

  width: 3px;

  background:
    linear-gradient(
      180deg,
      var(--accent),
      transparent
    );
}

.news-card-title {
  font-size: 16px;

  font-weight: 700;

  margin-bottom: 7px;
}

.news-card-text {
  color: var(--text-secondary);

  font-size: 13px;

  line-height: 1.5;
}

.news-card-date {
  margin-top: 12px;

  color: var(--text-muted);

  font-size: 10px;
}


/* =========================================================
   FUTURE
   ========================================================= */

.future-grid {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 12px;
}

.future-card {
  min-height: 170px;

  padding: 18px;

  border-radius: 22px;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.future-icon {
  font-size: 25px;

  margin-bottom: 20px;
}

.future-card strong {
  font-size: 14px;

  margin-bottom: 6px;
}

.future-card span:last-child {
  color: var(--text-muted);

  font-size: 11px;

  line-height: 1.45;
}


/* =========================================================
   PAGE TITLE
   ========================================================= */

.page-title {
  margin-bottom: 24px;
}

.page-title h1 {
  margin-top: 5px;

  font-size: clamp(32px, 8vw, 44px);

  letter-spacing: -1.7px;
}

.page-title p {
  max-width: 560px;

  margin-top: 9px;

  color: var(--text-muted);

  font-size: 14px;

  line-height: 1.5;
}

.page-title-row {
  display: flex;
  justify-content: space-between;
}


/* =========================================================
   ROSTER
   ========================================================= */

.roster-summary {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 10px;

  margin-bottom: 20px;
}

.stat-card {
  min-height: 92px;

  padding: 15px;

  border-radius: 19px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-card span {
  color: var(--text-muted);

  font-size: 9px;

  font-weight: 800;

  letter-spacing: 1px;
}

.stat-card strong {
  font-size: 22px;

  letter-spacing: -0.7px;
}

.roster-content {
  display: flex;
  flex-direction: column;

  gap: 10px;
}

.roster-card {
  display: flex;
  align-items: center;

  gap: 13px;

  padding: 13px;

  border-radius: 20px;
}

.roster-avatar {
  width: 50px;
  height: 50px;

  flex-shrink: 0;

  border-radius: 16px;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    linear-gradient(
      145deg,
      rgba(155, 124, 255, 0.24),
      rgba(255, 255, 255, 0.05)
    );

  border: 1px solid var(--border);

  font-size: 20px;
}

.roster-info {
  min-width: 0;

  flex: 1;
}

.roster-info strong {
  display: block;

  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;

  font-size: 14px;
}

.roster-info span {
  display: block;

  margin-top: 3px;

  color: var(--text-muted);

  font-size: 11px;
}

.roster-points {
  font-weight: 800;

  font-size: 15px;
}


/* =========================================================
   LEAGUE ACTIONS
   ========================================================= */

.league-actions {
  display: grid;

  gap: 11px;

  margin-bottom: 30px;
}

.primary-action-card,
.secondary-action-card {
  width: 100%;

  min-height: 75px;

  display: flex;
  align-items: center;

  gap: 14px;

  padding: 15px 17px;

  text-align: left;

  border-radius: 21px;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.primary-action-card {
  color: #fff;

  background:
    linear-gradient(
      135deg,
      rgba(154, 123, 255, 0.30),
      rgba(112, 80, 222, 0.15)
    );

  border: 1px solid rgba(174, 151, 255, 0.25);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 15px 40px rgba(100, 70, 210, 0.13);
}

.secondary-action-card {
  color: #fff;

  background:
    rgba(255, 255, 255, 0.055);

  border: 1px solid var(--border);
}

.action-card-icon {
  width: 42px;
  height: 42px;

  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 14px;

  background:
    rgba(255, 255, 255, 0.08);

  font-size: 20px;
}

.primary-action-card span:nth-child(2),
.secondary-action-card span:nth-child(2) {
  display: flex;
  flex-direction: column;

  gap: 3px;

  flex: 1;
}

.primary-action-card strong,
.secondary-action-card strong {
  font-size: 14px;
}

.primary-action-card small,
.secondary-action-card small {
  color: var(--text-muted);

  font-size: 11px;
}

.action-card-arrow {
  color: var(--text-muted);

  font-size: 21px;
}

.league-heading {
  margin-bottom: 13px;
}


/* =========================================================
   LEAGUE LIST
   ========================================================= */

.league-list {
  display: flex;
  flex-direction: column;

  gap: 11px;
}

.league-card {
  width: 100%;

  display: flex;
  align-items: center;

  gap: 14px;

  padding: 15px;

  border-radius: 22px;

  color: #fff;

  text-align: left;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.09),
      rgba(255, 255, 255, 0.045)
    );

  border: 1px solid var(--border);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06);

  cursor: pointer;

  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.league-card:hover {
  background:
    rgba(255, 255, 255, 0.11);
}

.league-card-logo {
  width: 52px;
  height: 52px;

  flex-shrink: 0;

  border-radius: 17px;

  display: flex;
  align-items: center;
  justify-content: center;

  object-fit: cover;

  background:
    linear-gradient(
      145deg,
      rgba(155, 124, 255, 0.25),
      rgba(255, 255, 255, 0.05)
    );

  border: 1px solid var(--border);

  font-size: 21px;
}

.league-card-info {
  min-width: 0;

  flex: 1;
}

.league-card-info strong {
  display: block;

  font-size: 15px;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.league-card-info span {
  display: block;

  margin-top: 4px;

  color: var(--text-muted);

  font-size: 11px;
}

.league-card-arrow {
  color: var(--text-muted);

  font-size: 20px;
}


/* =========================================================
   SCORES
   ========================================================= */

.glass-filter {
  display: flex;

  gap: 4px;

  padding: 4px;

  margin-bottom: 18px;

  border-radius: 16px;

  background:
    rgba(255, 255, 255, 0.045);

  border: 1px solid var(--border);

  overflow-x: auto;
}

.score-filter {
  flex: 1;

  min-height: 39px;

  padding: 0 14px;

  white-space: nowrap;

  border-radius: 12px;

  color: var(--text-muted);

  background: transparent;

  cursor: pointer;

  font-size: 12px;

  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.score-filter.active {
  color: #fff;

  background:
    rgba(255, 255, 255, 0.10);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.scores-content {
  display: flex;
  flex-direction: column;

  gap: 9px;
}

.score-card {
  display: flex;
  align-items: center;

  gap: 12px;

  min-height: 68px;

  padding: 11px 13px;

  border-radius: 20px;
}

.score-position {
  width: 29px;

  flex-shrink: 0;

  text-align: center;

  color: var(--text-muted);

  font-size: 12px;

  font-weight: 800;
}

.score-avatar {
  width: 43px;
  height: 43px;

  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 14px;

  background:
    rgba(155, 124, 255, 0.12);

  border: 1px solid var(--border);
}

.score-info {
  min-width: 0;

  flex: 1;
}

.score-info strong {
  display: block;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  font-size: 13px;
}

.score-info span {
  display: block;

  margin-top: 3px;

  color: var(--text-muted);

  font-size: 10px;
}

.score-total {
  font-size: 16px;

  font-weight: 800;
}


/* =========================================================
   BOTTOM NAVIGATION
   ========================================================= */

.bottom-navigation {
  position: fixed;

  z-index: 100;

  left: 50%;

  bottom:
    calc(
      var(--bottom-nav-bottom)
      + env(safe-area-inset-bottom)
    );

  transform: translateX(-50%);

  width:
    min(
      calc(100% - 28px),
      570px
    );

  height: var(--bottom-nav-height);

  padding: 7px;

  display: grid;

  grid-template-columns:
    repeat(4, 1fr);

  gap: 4px;

  border-radius: 27px;

  background:
    linear-gradient(
      145deg,
      rgba(35, 36, 45, 0.82),
      rgba(15, 16, 22, 0.76)
    );

  border: 1px solid rgba(255, 255, 255, 0.14);

  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25);

  backdrop-filter:
    blur(30px)
    saturate(180%);

  -webkit-backdrop-filter:
    blur(30px)
    saturate(180%);

  overflow: hidden;
}

.bottom-navigation::before {
  content: "";

  position: absolute;

  top: 0;
  left: 15%;

  width: 70%;
  height: 1px;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.28),
      transparent
    );

  pointer-events: none;
}

.bottom-nav-button {
  position: relative;

  min-width: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 3px;

  border-radius: 20px;

  color: rgba(255, 255, 255, 0.42);

  background: transparent;

  cursor: pointer;

  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.bottom-nav-button.active {
  color: #fff;

  background:
    linear-gradient(
      145deg,
      rgba(155, 124, 255, 0.21),
      rgba(155, 124, 255, 0.08)
    );

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.bottom-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  height: 25px;

  font-size: 19px;

  line-height: 1;
}

.bottom-nav-label {
  font-size: 9px;

  font-weight: 700;

  letter-spacing: 0.15px;
}


/* =========================================================
   LOADING
   ========================================================= */

.loading-card {
  min-height: 100px;

  padding: 20px;

  border-radius: 21px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 10px;

  color: var(--text-muted);

  font-size: 12px;
}

.loading-spinner {
  width: 17px;
  height: 17px;

  border-radius: 50%;

  border:
    2px solid rgba(255, 255, 255, 0.14);

  border-top-color: var(--accent-light);

  animation:
    spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.empty-state {
  padding: 34px 20px;

  text-align: center;

  border-radius: 23px;
}

.empty-state-icon {
  font-size: 32px;

  margin-bottom: 12px;
}

.empty-state strong {
  display: block;

  font-size: 15px;

  margin-bottom: 6px;
}

.empty-state p {
  color: var(--text-muted);

  font-size: 12px;

  line-height: 1.5;
}


/* =========================================================
   LEAGUE PAGE
   ========================================================= */

#leaguePage {
  min-height: 100vh;
  min-height: 100dvh;

  background:
    radial-gradient(
      circle at 15% 0%,
      rgba(125, 92, 255, 0.16),
      transparent 32%
    ),
    radial-gradient(
      circle at 90% 15%,
      rgba(66, 148, 255, 0.08),
      transparent 30%
    ),
    var(--bg);
}

.topbar {
  position: sticky;

  top: 0;

  z-index: 50;

  height: 66px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding:
    max(10px, env(safe-area-inset-top))
    18px
    10px;

  background:
    rgba(7, 8, 12, 0.58);

  border-bottom: 1px solid rgba(255, 255, 255, 0.07);

  backdrop-filter:
    blur(25px)
    saturate(180%);

  -webkit-backdrop-filter:
    blur(25px)
    saturate(180%);
}

.icon-button {
  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 14px;

  color: #fff;

  background:
    rgba(255, 255, 255, 0.07);

  border: 1px solid var(--border);

  cursor: pointer;

  font-size: 27px;

  line-height: 1;
}

.league-header-name {
  max-width: 60%;

  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;

  font-weight: 700;

  font-size: 15px;
}

.league-content {
  width: min(100%, 900px);

  margin: 0 auto;

  padding:
    18px
    20px
    max(40px, env(safe-area-inset-bottom));
}


/* =========================================================
   LEAGUE HERO
   ========================================================= */

.league-hero {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 15px;

  padding: 20px;

  border-radius: 27px;

  overflow: hidden;

  background:
    linear-gradient(
      145deg,
      rgba(155, 124, 255, 0.18),
      rgba(255, 255, 255, 0.055)
    );

  border: 1px solid var(--border);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 20px 50px rgba(0, 0, 0, 0.22);

  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}

.league-identity {
  min-width: 0;

  display: flex;
  align-items: center;

  gap: 13px;
}

.league-logo,
.league-logo-placeholder {
  width: 58px;
  height: 58px;

  flex-shrink: 0;

  border-radius: 18px;

  object-fit: cover;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    rgba(255, 255, 255, 0.08);

  border: 1px solid rgba(255, 255, 255, 0.12);

  font-size: 24px;
}

.league-hero h1 {
  max-width: 100%;

  margin-top: 3px;

  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;

  font-size: 21px;

  letter-spacing: -0.6px;
}

.credits-box {
  flex-shrink: 0;

  padding: 10px 13px;

  border-radius: 14px;

  color: #fff;

  background:
    rgba(0, 0, 0, 0.20);

  border: 1px solid rgba(255, 255, 255, 0.08);

  font-size: 12px;

  font-weight: 700;
}


/* =========================================================
   LEAGUE MENU
   ========================================================= */

.league-menu {
  display: flex;

  gap: 5px;

  margin:
    14px
    0
    18px;

  padding: 5px;

  border-radius: 19px;

  background:
    rgba(255, 255, 255, 0.045);

  border: 1px solid var(--border);

  overflow-x: auto;

  scrollbar-width: none;

  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.league-menu::-webkit-scrollbar {
  display: none;
}

.league-menu-button {
  min-width: 68px;

  min-height: 52px;

  flex: 1;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 3px;

  border-radius: 14px;

  color: var(--text-muted);

  background: transparent;

  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.league-menu-button span {
  font-size: 16px;
}

.league-menu-button small {
  font-size: 9px;

  font-weight: 700;
}

.league-menu-button.active {
  color: #fff;

  background:
    rgba(255, 255, 255, 0.10);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}


/* =========================================================
   LEAGUE VIEWS
   ========================================================= */

.league-view {
  animation:
    sectionIn 0.25s ease both;
}

.description-card,
.invite-card,
.info-card,
.management-section {
  border-radius: 22px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.085),
      rgba(255, 255, 255, 0.04)
    );

  border: 1px solid var(--border);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06);

  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
}

.description-card {
  padding: 18px;

  margin-bottom: 12px;
}

.description-card p {
  margin-top: 7px;

  color: var(--text-secondary);

  font-size: 13px;

  line-height: 1.55;
}

.invite-card {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 15px;

  padding: 17px;

  margin-bottom: 25px;
}

.invite-card strong {
  display: block;

  margin-top: 4px;

  letter-spacing: 1.4px;

  font-size: 17px;
}

.invite-actions {
  display: flex;

  gap: 6px;
}

.small-button {
  min-height: 36px;

  padding: 0 11px;

  border-radius: 11px;

  color: #fff;

  background:
    rgba(155, 124, 255, 0.15);

  border: 1px solid rgba(155, 124, 255, 0.22);

  cursor: pointer;

  font-size: 11px;

  font-weight: 700;
}

.secondary-small {
  color: var(--text-secondary);

  background:
    rgba(255, 255, 255, 0.06);

  border-color: var(--border);
}

.section-title {
  margin-bottom: 12px;
}

.section-title h2 {
  font-size: 18px;

  letter-spacing: -0.4px;
}


/* =========================================================
   MEMBERS
   ========================================================= */

.member-list {
  display: flex;
  flex-direction: column;

  gap: 9px;
}

.member-card {
  display: flex;
  align-items: center;

  gap: 12px;

  padding: 13px 15px;

  border-radius: 18px;

  background:
    rgba(255, 255, 255, 0.055);

  border: 1px solid rgba(255, 255, 255, 0.08);
}

.member-avatar {
  width: 40px;
  height: 40px;

  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 13px;

  background:
    rgba(155, 124, 255, 0.13);

  font-size: 17px;
}

.member-info {
  min-width: 0;

  flex: 1;
}

.member-info strong {
  display: block;

  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;

  font-size: 13px;
}

.member-info span {
  display: block;

  margin-top: 3px;

  color: var(--text-muted);

  font-size: 10px;
}

.member-remove {
  min-height: 34px;

  padding: 0 9px;

  border-radius: 10px;

  color: var(--red);

  background:
    rgba(255, 85, 110, 0.08);

  border: 1px solid rgba(255, 85, 110, 0.14);

  cursor: pointer;

  font-size: 10px;
}


/* =========================================================
   INFO
   ========================================================= */

.info-card {
  overflow: hidden;
}

.info-row {
  min-height: 58px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 15px;

  padding: 0 17px;

  border-bottom:
    1px solid rgba(255, 255, 255, 0.06);
}

.info-row:last-child {
  border-bottom: 0;
}

.info-row span {
  color: var(--text-muted);

  font-size: 12px;
}

.info-row strong {
  max-width: 60%;

  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;

  font-size: 13px;

  text-align: right;
}


/* =========================================================
   MANAGEMENT
   ========================================================= */

.management-section {
  padding: 18px;
}

.management-grid {
  display: grid;

  gap: 9px;
}


/* =========================================================
   MODALS
   ========================================================= */

.modal {
  position: fixed;

  z-index: 200;

  inset: 0;

  display: flex;
  align-items: flex-end;
  justify-content: center;

  padding:
    20px
    20px
    max(20px, env(safe-area-inset-bottom));

  background:
    rgba(0, 0, 0, 0.58);

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  animation:
    modalBackgroundIn 0.2s ease both;
}

@keyframes modalBackgroundIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-card {
  position: relative;

  width: min(100%, 520px);

  max-height: calc(100vh - 40px);

  overflow-y: auto;

  padding: 27px 22px 23px;

  border-radius: 28px;

  background:
    linear-gradient(
      145deg,
      rgba(32, 33, 42, 0.94),
      rgba(16, 17, 23, 0.96)
    );

  border: 1px solid rgba(255, 255, 255, 0.13);

  box-shadow:
    0 35px 100px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);

  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);

  animation:
    modalCardIn 0.25s ease both;
}

@keyframes modalCardIn {
  from {
    opacity: 0;
    transform: translateY(25px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-card h2 {
  margin-bottom: 22px;

  font-size: 23px;

  letter-spacing: -0.7px;
}

.modal-card label {
  display: block;

  margin:
    15px
    0
    7px;

  color: var(--text-secondary);

  font-size: 11px;

  font-weight: 700;
}

.close-button {
  position: absolute;

  top: 15px;
  right: 15px;

  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 12px;

  color: var(--text-secondary);

  background:
    rgba(255, 255, 255, 0.07);

  border: 1px solid var(--border);

  cursor: pointer;

  font-size: 20px;
}


/* =========================================================
   TOAST
   ========================================================= */

#toast {
  position: fixed;

  z-index: 500;

  left: 50%;

  bottom:
    calc(
      var(--bottom-nav-height)
      + var(--bottom-nav-bottom)
      + env(safe-area-inset-bottom)
      + 16px
    );

  transform:
    translate(-50%, 15px);

  max-width:
    calc(100% - 36px);

  padding: 12px 17px;

  border-radius: 15px;

  color: #fff;

  background:
    rgba(28, 29, 37, 0.88);

  border: 1px solid rgba(255, 255, 255, 0.13);

  box-shadow:
    0 15px 45px rgba(0, 0, 0, 0.35);

  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);

  opacity: 0;

  pointer-events: none;

  transition:
    opacity 0.25s ease,
    transform 0.25s ease;

  font-size: 12px;

  text-align: center;
}

#toast.show {
  opacity: 1;

  transform:
    translate(-50%, 0);
}


/* =========================================================
   DESKTOP
   ========================================================= */

@media (min-width: 700px) {

  .app-content {
    padding-left: 28px;
    padding-right: 28px;
  }

  .bottom-navigation {
    height: 72px;
  }

  .home-hero {
    min-height: 280px;
  }

  .home-hero-content {
    padding: 42px;
  }

  .quick-grid {
    gap: 15px;
  }

  .quick-card {
    min-height: 140px;
  }

  .league-actions {
    grid-template-columns: 1fr 1fr;
  }

  .modal {
    align-items: center;
  }

  .modal-card {
    max-height: 90vh;
  }

}


/* =========================================================
   LARGE DESKTOP
   ========================================================= */

@media (min-width: 1000px) {

  .app-content {
    width: min(100%, 1000px);

    padding-top: 32px;
  }

  .home-hero {
    min-height: 310px;
  }

  .home-hero h1 {
    font-size: 58px;
  }

  .future-grid {
    grid-template-columns: 1fr 1fr;
  }

}


/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 380px) {

  .app-content {
    padding-left: 14px;
    padding-right: 14px;
  }

  .quick-grid {
    gap: 8px;
  }

  .quick-card {
    padding: 14px;

    min-height: 115px;
  }

  .future-grid {
    grid-template-columns: 1fr;
  }

  .roster-summary {
    gap: 7px;
  }

  .stat-card {
    padding: 12px;
  }

  .stat-card strong {
    font-size: 19px;
  }

  .bottom-navigation {
    width: calc(100% - 18px);

    bottom:
      calc(
        8px
        + env(safe-area-inset-bottom)
      );

    height: 70px;

    border-radius: 24px;
  }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;

    scroll-behavior: auto !important;

    transition-duration: 0.01ms !important;
  }

}


/* =========================================================
   SAFE AREA
   ========================================================= */

@supports (padding: max(0px)) {

  #authPage {
    padding-bottom:
      max(
        24px,
        env(safe-area-inset-bottom)
      );
  }

  .bottom-navigation {
    margin-bottom: 0;
  }

}
