/* BrittanyCorp milestones — vertical level cards + HUD */

.ms-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 0.5rem 2rem;
}

.ms-hero {
  margin-bottom: 1.75rem;
}

.ms-title {
  margin: 0 0 1rem;
  text-align: center;
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ffffff 0%, #60a5fa 40%, #3b82f6 60%, #ffffff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titleGlow 3s ease-in-out infinite alternate;
}

.ms-hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  flex-wrap: wrap;
  text-align: left;
}

.ms-hero-copy {
  flex: 1 1 280px;
  min-width: 0;
}

.ms-kicker {
  display: none;
}

.ms-subtitle {
  margin: 0;
  max-width: 34rem;
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.35;
  color: #e2e8f0;
  text-transform: uppercase;
}

.ms-subtitle strong {
  color: #fbbf24;
  -webkit-text-fill-color: #fbbf24;
}

.ms-rules {
  margin: 0.7rem 0 0;
  max-width: 36rem;
  color: #94a3b8;
  font-size: 0.88rem;
  line-height: 1.45;
}

.ms-hero .timer-container,
.ms-timer {
  text-align: left;
  margin: 0;
  flex: 0 0 auto;
}

.ms-hero .timer {
  padding: 0.65rem 1rem;
  border-radius: 12px;
  border-width: 1px;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}

.ms-hero .timer-label {
  margin-bottom: 0.25rem;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
}

.ms-hero .timer-display {
  font-size: 1.05rem;
  text-shadow: none;
}

.ms-cycle {
  margin: 0.75rem 0 0;
  color: #fbbf24;
  font-weight: 700;
  font-size: 0.9rem;
}

/* ---- HUD: account + summary ---- */

.ms-hud {
  margin: 0 auto 1.75rem;
  padding: 1.25rem 1.35rem;
  border-radius: 20px;
  border: 1px solid rgba(59, 130, 246, 0.28);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(18px);
  box-shadow: 0 0 28px rgba(59, 130, 246, 0.08);
}

.ms-hud-guest {
  display: grid;
  gap: 0.85rem;
}

.ms-hud-guest[hidden],
.ms-hud-user[hidden],
.ms-hud-stats[hidden],
.ms-link-form[hidden] {
  display: none !important;
}

.ms-hud-login {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.ms-hud-login-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ms-hud-login-copy {
  margin: 0.4rem 0 0;
  max-width: 420px;
  color: #94a3b8;
  font-size: 0.88rem;
  line-height: 1.45;
}

.ms-hud-login-copy strong {
  color: #93c5fd;
}

.ms-hud-hint {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
}

.ms-discord-btn,
.ms-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  border-radius: 14px;
  padding: 0.8rem 1.35rem;
  transition: 0.22s ease;
}

.ms-discord-btn {
  background: linear-gradient(135deg, #5865f2, #4453d6);
  color: #fff;
  box-shadow: 0 10px 26px rgba(88, 101, 242, 0.35);
}

.ms-discord-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(88, 101, 242, 0.5);
  color: #fff;
}

.ms-logout-btn {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #e2e8f0;
  padding: 0.55rem 0.95rem;
  font-size: 0.8rem;
  margin-left: auto;
}

.ms-logout-btn:hover {
  background: rgba(59, 130, 246, 0.22);
  color: #fff;
}

.ms-hud-profile {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.ms-account-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #3b82f6;
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.4);
}

.ms-account-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 900;
}

.ms-account-links {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: #94a3b8;
}

.ms-account-error {
  margin: 0.5rem 0 0;
  color: #f87171;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
}

.ms-link-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(59, 130, 246, 0.15);
}

.ms-link-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.45rem;
}

.ms-link-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.ms-link-input {
  flex: 1;
  min-width: 180px;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(10, 14, 26, 0.8);
  color: #fff;
  font: inherit;
  font-weight: 700;
}

.ms-link-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.ms-link-hint {
  margin: 0.45rem 0 0;
  color: #64748b;
  font-size: 0.8rem;
}

.ms-hud-stats {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(59, 130, 246, 0.15);
}

.ms-hud-stat {
  text-align: center;
}

.ms-hud-stat-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
}

.ms-hud-stat-value {
  display: block;
  margin-top: 0.3rem;
  font-size: 1.35rem;
  font-weight: 900;
}

.ms-hud-stat-value.blue {
  color: #93c5fd;
  text-shadow: 0 0 16px rgba(59, 130, 246, 0.4);
}

.ms-hud-stat-value.gold {
  color: #fbbf24;
  text-shadow: 0 0 16px rgba(251, 191, 36, 0.4);
}

.ms-hud-stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(148, 163, 184, 0.2);
}

.ms-hud-meter {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  overflow: hidden;
  margin-top: 0.25rem;
}

.ms-hud-meter-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.45);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Individual avatars (avatars/avatar01.png … avatar20.png) ---- */

.ms-avatar {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
  filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.3));
}

.ms-badge-wrap {
  position: relative;
  flex-shrink: 0;
  z-index: 1;
}

.ms-badge-lock {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #0f172a;
  border: 1px solid #475569;
  color: #94a3b8;
  font-size: 0.58rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.ms-card.is-unlocked .ms-badge-lock {
  background: #1d4ed8;
  border-color: #3b82f6;
  color: #fff;
}

.ms-card.is-active .ms-badge-lock {
  background: #0c4a6e;
  border-color: #38bdf8;
  color: #7dd3fc;
}

/* ---- Tier rows (timeline) ---- */

.ms-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-left: 0.25rem;
}

.ms-list::before {
  content: "";
  position: absolute;
  left: 40px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(
    180deg,
    rgba(59, 130, 246, 0.45),
    rgba(148, 163, 184, 0.12) 40%,
    rgba(148, 163, 184, 0.08)
  );
  pointer-events: none;
}

.ms-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem 1.25rem;
  padding: 0.95rem 1.1rem 0.95rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-left: 3px solid rgba(100, 116, 139, 0.55);
  background: rgba(10, 16, 32, 0.72);
  backdrop-filter: blur(12px);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.ms-card:hover {
  border-color: rgba(59, 130, 246, 0.28);
  border-left-color: #3b82f6;
  background: rgba(15, 23, 42, 0.9);
}

.ms-card.is-preview .ms-avatar {
  filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.3));
}

.ms-card.is-locked .ms-avatar {
  filter: grayscale(0.9) brightness(0.5);
}

.ms-card.is-active {
  border-color: rgba(56, 189, 248, 0.35);
  border-left-color: #38bdf8;
  background: rgba(8, 47, 73, 0.35);
}

.ms-card.is-active .ms-avatar {
  filter: brightness(1.05) drop-shadow(0 0 12px rgba(56, 189, 248, 0.4));
}

.ms-card.is-unlocked {
  border-color: rgba(59, 130, 246, 0.32);
  border-left-color: #60a5fa;
  background: rgba(30, 58, 138, 0.16);
}

.ms-card.is-unlocked .ms-avatar {
  filter: drop-shadow(0 0 12px rgba(147, 197, 253, 0.55));
}

.ms-card-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ms-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.ms-card-level {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #64748b;
  background: none;
  padding: 0;
  border-radius: 0;
}

.ms-card.is-active .ms-card-level {
  color: #7dd3fc;
}

.ms-card.is-unlocked .ms-card-level {
  color: #93c5fd;
}

.ms-card-target {
  margin: 0;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  font-weight: 900;
  line-height: 1.1;
  color: #f8fafc;
  letter-spacing: -0.02em;
}

.ms-card-reward-block {
  text-align: right;
  min-width: 5.5rem;
}

.ms-card-reward-label {
  display: none;
}

.ms-card-reward {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 900;
  color: #93c5fd;
  text-shadow: none;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.ms-card.is-active .ms-card-reward,
.ms-card.is-unlocked .ms-card-reward {
  color: #fbbf24;
}

.ms-card-total {
  margin: 0.2rem 0 0;
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 600;
}

.ms-card-progress {
  min-width: 0;
}

.ms-card-progress-label {
  display: none;
}

.ms-rail {
  height: 4px;
  border-radius: 2px;
  background: rgba(148, 163, 184, 0.14);
  overflow: hidden;
}

.ms-rail-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, #1d4ed8, #38bdf8);
  box-shadow: none;
  transition: width 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.ms-card.is-unlocked .ms-rail-fill {
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.ms-card.is-active .ms-rail-fill {
  background: linear-gradient(90deg, #0284c7, #38bdf8);
}

.ms-card-hint {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  font-style: normal;
  color: #64748b;
}

.ms-card.is-active .ms-card-hint {
  color: #7dd3fc;
  font-weight: 600;
}

.ms-card.is-unlocked .ms-card-hint {
  color: #93c5fd;
  font-weight: 600;
}

.ms-card-status {
  min-width: 0;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.65);
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.ms-card.is-active .ms-card-status {
  border-color: rgba(56, 189, 248, 0.45);
  color: #7dd3fc;
  background: rgba(14, 116, 144, 0.2);
}

.ms-card.is-unlocked .ms-card-status {
  border-color: rgba(59, 130, 246, 0.45);
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.18);
}

.ms-note {
  max-width: 640px;
  margin: 2rem auto 0;
  text-align: center;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.55;
}

.ms-note strong {
  color: #93c5fd;
}

@media (max-width: 720px) {
  .ms-list::before {
    left: 32px;
  }

  .ms-card-top {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "head status"
      "reward reward";
  }

  .ms-card-head { grid-area: head; }
  .ms-card-status { grid-area: status; }
  .ms-card-reward-block {
    grid-area: reward;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .ms-hero-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .ms-hud-login {
    flex-direction: column;
    align-items: stretch;
  }

  .ms-hud-stats {
    grid-template-columns: 1fr;
  }

  .ms-hud-stat-divider {
    display: none;
  }

  .ms-list::before {
    display: none;
  }

  .ms-avatar {
    width: 56px;
    height: 56px;
  }
}
