/* FlameWire UI v2 — calm sticky chrome, pill nav, drawer */

.ui-v2 .topbar {
  display: none;
}

.ui-v2 .mobile-nav {
  display: none !important;
}

.v2-header {
  background: rgba(12, 7, 9, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-image: none;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(200, 16, 46, 0.55);
  transition: padding 0.2s ease, background 0.2s ease;
}

.v2-header.is-compact .brand-mark {
  width: 48px;
  height: 48px;
}

.v2-header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0;
  min-height: 72px;
}

.v2-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  text-decoration: none;
  /* let Wire ECG trail paint outside the wordmark box */
  overflow: visible;
}

.v2-brand .brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(241, 190, 72, 0.35);
  transition: width 0.2s ease, height 0.2s ease;
}

.v2-brand .brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1;
  overflow: visible;
  position: relative;
  z-index: 2;
}

/* Center-nav “Wire” dropdown — red so the media hub stands out from the strip */
.v2-nav-pills > .v2-drop:first-child .v2-pill:not(.active) {
  color: #fff;
  background: var(--flame-red);
  box-shadow: 0 4px 14px rgba(200, 16, 46, 0.3);
}

.v2-nav-pills > .v2-drop:first-child .v2-pill:not(.active):hover {
  background: var(--flame-red-dark);
  color: #fff;
}

/* Center-nav “Team” dropdown — Flames gold / black text */
.v2-nav-pills .v2-pill-team,
.v2-nav-pills .v2-pill-team:hover,
.v2-nav-pills .v2-pill-team.active {
  color: #0b0b0c;
  background: var(--flame-gold);
  box-shadow: 0 4px 14px rgba(241, 190, 72, 0.35);
}

.v2-nav-pills .v2-pill-team:hover {
  background: #f5cb62;
  color: #0b0b0c;
}

.v2-nav-pills .v2-pill-team.active {
  background: #f1be48;
  color: #0b0b0c;
  box-shadow: 0 4px 16px rgba(241, 190, 72, 0.45);
}

.v2-nav-pills .v2-pill-team .v2-caret {
  border-top-color: #0b0b0c;
  opacity: 0.85;
}

/* Center-nav CalgaryPuck pill — black / white text */
.v2-nav-pills .v2-pill-calgarypuck,
.v2-nav-pills .v2-pill-calgarypuck:hover,
.v2-nav-pills .v2-pill-calgarypuck.active {
  color: #fff;
  background: #0b0b0c;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.v2-nav-pills .v2-pill-calgarypuck:hover {
  background: #1a1a1a;
  color: #fff;
}

.v2-nav-pills .v2-pill-calgarypuck.active {
  background: #000;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Arcade pill — always white / black text */
.v2-nav-pills .v2-pill-arcade,
.v2-nav-pills .v2-pill-arcade:hover,
.v2-nav-pills .v2-pill-arcade.active,
.v2-nav-pills .v2-pill-arcade[aria-expanded="true"] {
  color: #0b0b0c;
  background: #fff;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.2);
}

.v2-nav-pills .v2-pill-arcade:hover {
  background: #f2f2f2;
  color: #0b0b0c;
}

.v2-nav-pills .v2-pill-arcade .v2-caret {
  border-top-color: #0b0b0c;
  opacity: 0.85;
}

.v2-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.v2-nav-pills {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(210, 210, 215, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.v2-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.72);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.v2-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.v2-pill.active {
  color: #fff;
  background: var(--flame-red);
  box-shadow: 0 4px 14px rgba(200, 16, 46, 0.35);
}

.v2-pill-btn {
  appearance: none;
}

.v2-caret {
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  opacity: 0.75;
  margin-top: 1px;
}

.v2-drop {
  position: relative;
}

.v2-menu {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  min-width: 12.5rem;
  padding: 0.4rem;
  border-radius: 14px;
  background: #14090c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.v2-menu-right {
  left: auto;
  right: 0;
}

.v2-menu[hidden] {
  display: none !important;
}

.v2-menu a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.v2-menu a:hover,
.v2-menu a.active {
  background: rgba(200, 16, 46, 0.9);
  color: #fff;
}

.v2-menu-sep {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0.3rem 0.4rem;
}

.v2-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.v2-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(241, 190, 72, 0.12);
  border: 1px solid rgba(241, 190, 72, 0.35);
  color: #fff;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  max-width: 14rem;
}

.v2-chip:hover {
  background: rgba(241, 190, 72, 0.2);
}

.v2-chip-team {
  color: var(--flame-gold);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.v2-chip-record {
  color: #fff;
}

.v2-chip-pts {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  font-size: 0.72rem;
}

.v2-icon-btn {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  font-family: inherit;
  transition: background 0.15s ease;
}

.v2-icon-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.v2-burger {
  display: none;
  flex-direction: column;
  gap: 4px;
}

.v2-burger span {
  display: block;
  width: 14px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* Drawer (mobile) */
.v2-drawer[hidden] {
  display: none !important;
}

.v2-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.v2-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  border: 0;
  cursor: pointer;
}

.v2-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(20rem, 88vw);
  height: 100%;
  background: #12090b;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -16px 0 48px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  color: #fff;
  animation: v2-drawer-in 0.2s ease;
}

@keyframes v2-drawer-in {
  from {
    transform: translateX(12px);
    opacity: 0.6;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.v2-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.v2-drawer-body {
  overflow-y: auto;
  padding: 0.75rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.v2-drawer-label {
  margin: 1rem 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.v2-drawer-label:first-child {
  margin-top: 0.25rem;
}

.v2-drawer-body a {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 650;
  text-decoration: none;
}

.v2-drawer-body a:hover,
.v2-drawer-body a.active {
  background: var(--flame-red);
  color: #fff;
}

/* Small test badge */
.v2-ui-badge {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(12, 7, 9, 0.88);
  border: 1px solid rgba(241, 190, 72, 0.35);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.v2-ui-badge a {
  color: var(--flame-gold);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
}

.v2-ui-badge a:hover {
  text-decoration: underline;
}

body.ui-v2 .main {
  padding-top: 1.25rem;
}

/*
  Tablet / phone — single line, ribbon centered:
  [logo] ........ [pill ribbon] ........ [theme]
*/
@media (max-width: 960px) {
  .v2-header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 0.4rem;
    min-height: 0;
    padding: 0.45rem 0;
  }

  .v2-brand {
    grid-column: 1;
    justify-self: start;
  }

  .v2-brand .brand-name {
    display: none; /* wordmark off — mark only, frees ribbon space */
  }

  .v2-brand .brand-mark {
    width: 36px;
    height: 36px;
  }

  body.ui-v2 .v2-brand .brand-mark,
  body.ui-v2 .v2-header.is-compact .brand-mark {
    width: 36px;
    height: 36px;
  }

  .v2-nav {
    grid-column: 2;
    display: flex;
    min-width: 0;
    justify-content: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }

  .v2-nav::-webkit-scrollbar {
    display: none;
  }

  .v2-nav-pills {
    flex-wrap: nowrap;
    width: max-content;
    max-width: none;
    margin-inline: auto;
  }

  .v2-actions {
    grid-column: 3;
    justify-self: end;
    margin-left: 0;
    gap: 0.3rem;
  }

  .v2-pill {
    font-size: 0.68rem;
    padding: 0.34rem 0.62rem;
    letter-spacing: 0.03em;
  }

  .v2-icon-btn {
    width: 2.1rem;
    height: 2.1rem;
  }

  /* Dropdown menus are position:fixed via JS so they escape overflow scroll */
  .v2-menu {
    max-height: min(70vh, 22rem);
    overflow-y: auto;
  }
}

@media (max-width: 520px) {
  .v2-brand .brand-mark {
    width: 32px;
    height: 32px;
  }

  body.ui-v2 .v2-brand .brand-mark,
  body.ui-v2 .v2-header.is-compact .brand-mark {
    width: 32px;
    height: 32px;
  }

  .v2-pill {
    font-size: 0.64rem;
    padding: 0.32rem 0.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .v2-drawer-panel {
    animation: none;
  }

  .ui-v2 .card:hover,
  .ui-v2 .stack-item:hover,
  .ui-v2 .game-row:hover,
  .ui-v2 .card-media > img {
    transform: none;
  }
}

/* ═══════════════════════════════════════════════════════
   Visual polish — premium sports-desk atmosphere
   ═══════════════════════════════════════════════════════ */

body.ui-v2 {
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -15%, rgba(200, 16, 46, 0.13), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(241, 190, 72, 0.07), transparent 50%),
    radial-gradient(ellipse 40% 35% at 0% 20%, rgba(200, 16, 46, 0.05), transparent 45%);
  background-attachment: fixed;
}

[data-theme="dark"] body.ui-v2 {
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -12%, rgba(225, 29, 58, 0.18), transparent 55%),
    radial-gradient(ellipse 45% 35% at 100% 5%, rgba(241, 190, 72, 0.08), transparent 50%),
    radial-gradient(ellipse 40% 30% at 0% 15%, rgba(200, 16, 46, 0.1), transparent 45%);
}

/* Selection + focus */
body.ui-v2 ::selection {
  background: rgba(200, 16, 46, 0.28);
  color: inherit;
}

body.ui-v2 a:focus-visible,
body.ui-v2 button:focus-visible,
body.ui-v2 select:focus-visible {
  outline: 2px solid var(--flame-gold);
  outline-offset: 2px;
}

/* Header — deeper glass, soft red edge glow */
body.ui-v2 .v2-header {
  background: linear-gradient(
    180deg,
    rgba(14, 7, 9, 0.94) 0%,
    rgba(10, 5, 7, 0.88) 100%
  );
  border-bottom: 0;
  box-shadow:
    0 1px 0 rgba(200, 16, 46, 0.65),
    0 8px 32px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.ui-v2 .v2-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(241, 190, 72, 0.35) 20%,
    rgba(200, 16, 46, 0.9) 50%,
    rgba(241, 190, 72, 0.35) 80%,
    transparent 100%
  );
  pointer-events: none;
}

body.ui-v2 .site-header.v2-header {
  position: sticky;
}

body.ui-v2 .v2-brand .brand-mark {
  width: 58px;
  height: 58px;
  box-shadow:
    0 0 0 2px rgba(241, 190, 72, 0.45),
    0 0 18px rgba(200, 16, 46, 0.35);
}

body.ui-v2 .v2-header.is-compact .brand-mark {
  width: 48px;
  height: 48px;
}

body.ui-v2 .v2-nav-pills {
  background: rgba(200, 200, 206, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 1px 3px rgba(0, 0, 0, 0.18);
}

body.ui-v2 .v2-chip {
  box-shadow: 0 2px 12px rgba(241, 190, 72, 0.12);
}

/* Section titles — gold tick accent */
body.ui-v2 .section-head {
  border-bottom: 1px solid var(--line);
  position: relative;
  padding-bottom: 0.7rem;
}

body.ui-v2 .section-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 3.25rem;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--flame-red), var(--flame-gold));
}

body.ui-v2 .section-head h2 {
  letter-spacing: 0.03em;
}

body.ui-v2 .section-head a:not(.btn) {
  transition: color 0.15s ease, transform 0.15s ease;
}

body.ui-v2 .section-head a:not(.btn):hover {
  color: var(--flame-red-dark);
  transform: translateX(2px);
}

body.ui-v2 .page-title {
  letter-spacing: 0.03em;
  background: linear-gradient(105deg, var(--ink) 0%, var(--ink) 55%, var(--flame-red) 140%);
  -webkit-background-clip: text;
  background-clip: text;
}

@supports (-webkit-background-clip: text) {
  body.ui-v2 .page-title {
    color: transparent;
  }
  [data-theme="dark"] body.ui-v2 .page-title {
    background: linear-gradient(105deg, #fff 0%, #f2eee8 50%, #e11d3a 130%);
    -webkit-background-clip: text;
    background-clip: text;
  }
}

/* Cards — lift, image zoom, cleaner edges */
body.ui-v2 .card {
  border: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

body.ui-v2 .card:hover {
  transform: translateY(-3px);
  border-color: rgba(200, 16, 46, 0.22);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(200, 16, 46, 0.08);
}

body.ui-v2 .card-media {
  isolation: isolate;
}

body.ui-v2 .card-media > img:not(.publisher-logo-img) {
  transition: transform 0.45s ease;
}

body.ui-v2 .card:hover .card-media > img:not(.publisher-logo-img) {
  transform: scale(1.04);
}

body.ui-v2 .badge {
  letter-spacing: 0.06em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
}

body.ui-v2 .featured .card {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}

body.ui-v2 .featured .card-body h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

body.ui-v2 .stack-item {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

body.ui-v2 .stack-item:hover {
  border-color: rgba(200, 16, 46, 0.2);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
}

/* Home standings — glass strip */
body.ui-v2 .home-standings {
  background: linear-gradient(
    105deg,
    rgba(200, 16, 46, 0.08) 0%,
    var(--paper-2) 35%,
    var(--paper-2) 100%
  );
  border: 1px solid var(--line);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

body.ui-v2 .home-standings::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--flame-red), var(--flame-gold));
  border-radius: 12px 0 0 12px;
}

body.ui-v2 .home-standings a {
  transition: opacity 0.15s ease;
}

body.ui-v2 .home-standings a:hover {
  opacity: 0.85;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Schedule / game rows */
body.ui-v2 .game-row {
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

body.ui-v2 .game-row:hover {
  transform: translateY(-1px);
  border-color: rgba(200, 16, 46, 0.2);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.07);
}

/* Forum board */
body.ui-v2 .forum-board {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}

body.ui-v2 .forum-board-banner {
  background: linear-gradient(120deg, #1a0c10 0%, #12090b 45%, #1c1014 100%);
}

/* Footer */
body.ui-v2 .site-footer {
  background:
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.15) 8px),
    var(--chrome-bg);
  border-top: 1px solid rgba(200, 16, 46, 0.35);
  box-shadow: inset 0 1px 0 rgba(241, 190, 72, 0.12);
}

body.ui-v2 .site-footer a {
  transition: color 0.15s ease;
}

body.ui-v2 .site-footer a:hover {
  color: #fff;
}

/* Tables */
body.ui-v2 .data-table {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

/* Buttons */
body.ui-v2 .btn-primary {
  box-shadow: 0 4px 14px rgba(200, 16, 46, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

body.ui-v2 .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(200, 16, 46, 0.38);
}

/* Dropdown menus */
body.ui-v2 .v2-menu {
  backdrop-filter: blur(12px);
  background: rgba(18, 9, 12, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* Publisher logo cards */
body.ui-v2 .card-media-logo {
  background:
    radial-gradient(circle at 50% 35%, rgba(241, 190, 72, 0.14), transparent 48%),
    linear-gradient(160deg, #221018 0%, #0d090b 100%);
}

body.ui-v2 .card-media-logo > img.publisher-logo-img {
  transition: transform 0.25s ease;
}

body.ui-v2 .card:hover .card-media-logo > img.publisher-logo-img {
  transform: scale(1.06);
}

/* Soft main padding breathing room */
body.ui-v2 .main {
  padding-bottom: 4.5rem;
}

/* Season select / forms */
body.ui-v2 select {
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.ui-v2 select:hover {
  border-color: rgba(200, 16, 46, 0.35);
}

body.ui-v2 select:focus {
  border-color: var(--flame-red);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.15);
}
