/* TitanMC game-mode hub v2 — scoped, compositor-first art direction. */
html body main.tryby-hub-v2 {
  --hub-gold: #f5d061;
  --hub-ink: #08090d;
  position: relative;
  isolation: isolate;
}

html body main.tryby-hub-v2 .hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(430px, 51vw, 610px);
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(88px, 10vw, 142px) 24px clamp(70px, 8vw, 112px);
  overflow: hidden;
  background:
    radial-gradient(48% 58% at 50% 33%, rgba(245, 208, 97, .12), transparent 72%),
    radial-gradient(30% 44% at 16% 48%, rgba(66, 218, 142, .045), transparent 72%),
    radial-gradient(32% 46% at 87% 40%, rgba(73, 199, 255, .05), transparent 72%);
}

html body main.tryby-hub-v2 .hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 72% 72% at 50% 42%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 72% 72% at 50% 42%, #000 0%, transparent 78%);
}

html body main.tryby-hub-v2 .hero::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(1180px, calc(100% - 40px));
  height: 1px;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(245, 208, 97, .16), rgba(245, 208, 97, .72), rgba(245, 208, 97, .16), transparent);
  box-shadow: 0 0 26px rgba(245, 208, 97, .15);
  transform: translateX(-50%);
}

html body main.tryby-hub-v2 .hero-badge {
  min-height: 34px;
  padding: 7px 15px;
  border-color: rgba(245, 208, 97, .25);
  background: rgba(245, 208, 97, .045);
  color: rgba(245, 208, 97, .86);
  letter-spacing: .18em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055), 0 12px 38px rgba(0, 0, 0, .22);
}

html body main.tryby-hub-v2 .hero-badge.is-unavailable .pulse-dot {
  background: #8a8692;
  box-shadow: 0 0 10px rgba(138, 134, 146, .35);
  animation: none;
}

html body main.tryby-hub-v2 .hero-badge.is-online .pulse-dot {
  background: #42da8e;
  box-shadow: 0 0 12px rgba(66, 218, 142, .58);
}

html body main.tryby-hub-v2 .hero h1.hero-title-shimmer {
  max-width: 1050px;
  margin: 24px auto 22px;
  font-family: 'Cinzel', 'Orbitron', serif;
  font-size: clamp(3.25rem, 7.3vw, 7.35rem);
  font-weight: 700;
  line-height: .89;
  letter-spacing: .015em;
  background: linear-gradient(112deg, #b87908 8%, #f5d061 38%, #fff3bd 50%, #f5d061 62%, #b87908 92%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 16px 34px rgba(0, 0, 0, .46)) drop-shadow(0 0 28px rgba(245, 208, 97, .11));
  animation: trybyHeroMetal 8s cubic-bezier(.45, 0, .25, 1) infinite;
}

@keyframes trybyHeroMetal {
  0%, 18% { background-position: 100% 50%; }
  52%, 100% { background-position: 0 50%; }
}

/* Keep the premium motion while it can actually be seen. Off-screen infinite
   animations waste compositor time during page scroll and make otherwise
   lightweight cards miss frames. */
html body main.tryby-hub-v2 .hero:not(.tryby-motion-active) h1.hero-title-shimmer,
html body main.tryby-hub-v2 .tryby-mode-card:not(.tryby-motion-active):not(:hover):not(:focus-within) .tryby-mode-core,
html body main.tryby-hub-v2 .tryby-mode-card:not(.tryby-motion-active):not(:hover):not(:focus-within) .card-players .dot {
  animation-play-state: paused !important;
}

html body main.tryby-hub-v2 .hero > p {
  max-width: 720px;
  color: rgba(232, 228, 220, .59);
  font-size: clamp(.98rem, 1.35vw, 1.14rem);
  line-height: 1.75;
}

html body main.tryby-hub-v2 .hero > p strong { color: #f5f1e8; }

html body main.tryby-hub-v2 .stats-bar {
  max-width: 1320px;
  margin-top: -34px;
  margin-bottom: clamp(58px, 7vw, 92px);
}

html body main.tryby-hub-v2 .stats-bar-inner {
  border: 1px solid rgba(245, 208, 97, .16);
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(21, 21, 29, .98), rgba(8, 9, 13, .99));
  box-shadow: 0 24px 70px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .055);
}

html body main.tryby-hub-v2 .stats-bar-inner::before {
  background: linear-gradient(90deg, transparent, rgba(245, 208, 97, .32), #f5d061, rgba(245, 208, 97, .32), transparent);
  background-size: 100% 100%;
  animation: none;
}

html body main.tryby-hub-v2 .stat-number { color: #f5d061; }

html body main.tryby-hub-v2 .modes-section {
  position: relative;
  isolation: isolate;
  max-width: 1380px;
  padding: 0 30px clamp(92px, 9vw, 132px);
}

html body main.tryby-hub-v2 .modes-section::before {
  content: '';
  position: absolute;
  inset: -54px 0 24px;
  z-index: -2;
  pointer-events: none;
  border-radius: 34px;
  background:
    radial-gradient(48% 34% at 50% 0%, rgba(245, 208, 97, .07), transparent 75%),
    linear-gradient(180deg, rgba(13, 14, 20, .42), rgba(8, 9, 13, 0));
}

html body main.tryby-hub-v2 .tryby-modes-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 28px);
  perspective: 1300px;
}

html body main.tryby-hub-v2 .tryby-mode-card {
  --hub-rgb: 245, 208, 97;
  --hub-accent: #f5d061;
  --hub-enter-x: 0px;
  --hub-enter-y: 0px;
  --hub-enter-rx: 0deg;
  --hub-tilt-x: 0deg;
  --hub-tilt-y: 0deg;
  --hub-lift: 0px;
  --hub-scale: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 465px;
  padding: clamp(25px, 2.4vw, 34px);
  overflow: hidden;
  border: 1px solid rgba(var(--hub-rgb), .22);
  border-radius: 24px;
  background:
    radial-gradient(80% 60% at 22% -8%, rgba(var(--hub-rgb), .13), transparent 70%),
    linear-gradient(155deg, rgba(22, 23, 31, .985), rgba(8, 9, 14, .995) 72%);
  box-shadow: 0 22px 58px rgba(0, 0, 0, .33), inset 0 1px 0 rgba(255, 255, 255, .055);
  opacity: 1;
  transform:
    perspective(1150px)
    translate3d(var(--hub-enter-x), calc(var(--hub-enter-y) + var(--hub-lift)), 0)
    rotateX(calc(var(--hub-enter-rx) + var(--hub-tilt-x)))
    rotateY(var(--hub-tilt-y))
    scale(var(--hub-scale));
  transform-origin: 50% 68%;
  transition:
    opacity .58s ease,
    transform .74s cubic-bezier(.16, 1, .3, 1),
    border-color .3s ease,
    box-shadow .36s ease,
    background-color .3s ease;
  transition-delay: var(--hub-delay, 0ms);
  backface-visibility: hidden;
  contain: layout paint style;
  isolation: isolate;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

html body main.tryby-hub-v2 .tryby-mode-card:nth-child(odd) { --hub-entry-direction: -32px; }
html body main.tryby-hub-v2 .tryby-mode-card:nth-child(even) { --hub-entry-direction: 32px; }

html body main.tryby-hub-v2.tryby-v2-ready .tryby-mode-card:not(.tryby-mode-in) {
  --hub-enter-x: var(--hub-entry-direction);
  --hub-enter-y: 42px;
  --hub-enter-rx: 6deg;
  opacity: 0;
}

html body main.tryby-hub-v2 .tryby-mode-card.tryby-mode-in {
  --hub-enter-x: 0px;
  --hub-enter-y: 0px;
  --hub-enter-rx: 0deg;
  opacity: 1;
}

html body main.tryby-hub-v2 .tryby-mode-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .04), transparent 24%),
    linear-gradient(90deg, transparent, rgba(var(--hub-rgb), .09), transparent);
  opacity: .54;
  transform: translate3d(-58%, 0, 0);
  transition: transform .9s cubic-bezier(.16, 1, .3, 1), opacity .34s ease;
  animation: none;
}

html body main.tryby-hub-v2 .tryby-mode-card::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  z-index: 3;
  width: auto;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--hub-accent), transparent);
  opacity: .34;
  transform: scaleX(.36);
  transition: opacity .3s ease, transform .52s cubic-bezier(.16, 1, .3, 1);
}

html body main.tryby-hub-v2 .tryby-card-glow {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, rgba(var(--hub-rgb), .15), rgba(var(--hub-rgb), .045) 38%, transparent 72%);
  transform: translate3d(-320px, -320px, 0);
  transition: opacity .26s ease;
  will-change: transform, opacity;
}

html body main.tryby-hub-v2 .card-corner,
html body main.tryby-hub-v2 .card-corner::before,
html body main.tryby-hub-v2 .card-corner::after { pointer-events: none; }

html body main.tryby-hub-v2 .card-corner::before,
html body main.tryby-hub-v2 .card-corner::after {
  content: '';
  position: absolute;
  z-index: 4;
  width: 17px;
  height: 17px;
  opacity: .55;
  transition: width .36s cubic-bezier(.16, 1, .3, 1), height .36s cubic-bezier(.16, 1, .3, 1), opacity .28s ease;
}

html body main.tryby-hub-v2 .card-corner::before {
  top: 13px;
  left: 13px;
  border-top: 1px solid var(--hub-accent);
  border-left: 1px solid var(--hub-accent);
}

html body main.tryby-hub-v2 .card-corner::after {
  right: 13px;
  bottom: 13px;
  border-right: 1px solid var(--hub-accent);
  border-bottom: 1px solid var(--hub-accent);
}

html body main.tryby-hub-v2 .tryby-mode-card[data-mode='survival'] { --hub-rgb: 66, 218, 142; --hub-accent: #42da8e; }
html body main.tryby-hub-v2 .tryby-mode-card[data-mode='bedwars'] { --hub-rgb: 255, 93, 104; --hub-accent: #ff5d68; }
html body main.tryby-hub-v2 .tryby-mode-card[data-mode='prison'] { --hub-rgb: 255, 179, 66; --hub-accent: #ffb342; }
html body main.tryby-hub-v2 .tryby-mode-card[data-mode='skywars'] { --hub-rgb: 73, 199, 255; --hub-accent: #49c7ff; }
html body main.tryby-hub-v2 .tryby-mode-card[data-mode='duels'] { --hub-rgb: 110, 152, 255; --hub-accent: #6e98ff; }
html body main.tryby-hub-v2 .tryby-mode-card[data-mode='boxpvp'] { --hub-rgb: 255, 74, 129; --hub-accent: #ff4a81; }
html body main.tryby-hub-v2 .tryby-mode-card[data-mode='skyblock'] { --hub-rgb: 112, 223, 207; --hub-accent: #70dfcf; --card-color: #70dfcf !important; --card-color-rgb: 112, 223, 207 !important; }
html body main.tryby-hub-v2 .tryby-mode-card[data-mode='uhc'] { --hub-rgb: 205, 113, 255; --hub-accent: #cd71ff; --card-color: #cd71ff !important; --card-color-rgb: 205, 113, 255 !important; }

html body main.tryby-hub-v2 .tryby-mode-card .card-header,
html body main.tryby-hub-v2 .tryby-mode-card .card-title,
html body main.tryby-hub-v2 .tryby-mode-card .card-desc,
html body main.tryby-hub-v2 .tryby-mode-card .card-features,
html body main.tryby-hub-v2 .tryby-mode-card .card-cta,
html body main.tryby-hub-v2 .tryby-mode-card .card-badge { position: relative; z-index: 2; }

html body main.tryby-hub-v2 .tryby-mode-card .card-header {
  align-items: flex-start;
  min-height: 112px;
  margin-bottom: 20px;
}

html body main.tryby-hub-v2 .tryby-mode-card .card-icon-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 102px;
  height: 102px;
  flex: 0 0 102px;
  overflow: visible;
  border: 1px solid rgba(var(--hub-rgb), .28);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 34%, rgba(var(--hub-rgb), .22), transparent 60%),
    linear-gradient(145deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .014));
  color: var(--hub-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .085), 0 16px 35px rgba(0, 0, 0, .28), 0 0 36px rgba(var(--hub-rgb), .09);
  transform: translate3d(0, 0, 0);
  transition: transform .62s cubic-bezier(.16, 1, .3, 1), border-color .3s ease, box-shadow .35s ease;
}

html body main.tryby-hub-v2 .tryby-mode-card .card-icon-wrap::before,
html body main.tryby-hub-v2 .tryby-mode-card .card-icon-wrap::after {
  content: '';
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(var(--hub-rgb), .21);
  transform: rotate(45deg);
}

html body main.tryby-hub-v2 .tryby-mode-card .card-icon-wrap::before { inset: 12px; border-radius: 17px; opacity: .65; }
html body main.tryby-hub-v2 .tryby-mode-card .card-icon-wrap::after { inset: 26px; border-radius: 10px; opacity: .38; }

html body main.tryby-hub-v2 .tryby-mode-card .card-icon-wrap > i { display: none !important; }

html body main.tryby-hub-v2 .tryby-artifact-svg {
  position: relative;
  z-index: 2;
  width: 72px;
  height: 72px;
  overflow: visible;
  filter: none;
}

html body main.tryby-hub-v2 .tryby-svg-line { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
html body main.tryby-hub-v2 .tryby-svg-heavy { fill: none; stroke: currentColor; stroke-width: 2.35; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
html body main.tryby-hub-v2 .tryby-svg-fill { fill: currentColor; stroke: none; }
html body main.tryby-hub-v2 .tryby-svg-soft { fill: currentColor; stroke: none; opacity: .22; }
html body main.tryby-hub-v2 .tryby-svg-dim { fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; opacity: .44; vector-effect: non-scaling-stroke; }
html body main.tryby-hub-v2 .tryby-mode-core { transform-box: fill-box; transform-origin: center; animation: trybyCoreFloat 3.8s ease-in-out infinite; }
html body main.tryby-hub-v2 .tryby-mode-card:nth-child(2n) .tryby-mode-core { animation-delay: -1.25s; }
html body main.tryby-hub-v2 .tryby-mode-card:nth-child(3n) .tryby-mode-core { animation-delay: -2.15s; }

@keyframes trybyCoreFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

html body main.tryby-hub-v2 .tryby-mode-card .card-players {
  margin-left: auto;
  border: 1px solid rgba(var(--hub-rgb), .2);
  background: rgba(0, 0, 0, .24);
  color: rgba(245, 241, 232, .6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}

html body main.tryby-hub-v2 .tryby-mode-card:has(.card-badge) .card-players { margin-top: 29px; }

html body main.tryby-hub-v2 .tryby-mode-card .card-players .dot {
  background: #ff5d5d;
  box-shadow: 0 0 10px rgba(255, 93, 93, .5);
}

html body main.tryby-hub-v2 .tryby-mode-card .card-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  min-height: 24px;
  border-color: rgba(var(--hub-rgb), .26);
  background: rgba(var(--hub-rgb), .09);
  color: var(--hub-accent);
  letter-spacing: .08em;
}

html body main.tryby-hub-v2 .tryby-mode-card .card-title {
  margin: 0 0 9px;
  color: #f7f2e8;
  font-family: 'Teko', 'Rajdhani', sans-serif;
  font-size: clamp(2rem, 2.7vw, 2.55rem);
  font-weight: 750;
  line-height: 1;
  letter-spacing: .06em;
  transition: color .26s ease, transform .34s cubic-bezier(.22, 1, .36, 1);
}

html body main.tryby-hub-v2 .tryby-mode-card .card-desc {
  margin-bottom: 20px;
  color: rgba(232, 228, 220, .58);
  font-size: .93rem;
  line-height: 1.67;
}

html body main.tryby-hub-v2 .tryby-mode-card .card-features { gap: 7px; margin-bottom: 24px; }

html body main.tryby-hub-v2 .tryby-mode-card .card-feature-tag {
  min-height: 28px;
  padding: 5px 10px;
  border-color: rgba(var(--hub-rgb), .16);
  background: rgba(var(--hub-rgb), .045);
  color: rgba(232, 228, 220, .58);
}

html body main.tryby-hub-v2 .tryby-mode-card .card-feature-tag i { color: var(--hub-accent); }

html body main.tryby-hub-v2 .tryby-mode-card .card-cta {
  min-height: 46px;
  margin-top: auto;
  padding: 11px 19px;
  border: 1px solid rgba(var(--hub-rgb), .34);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(var(--hub-rgb), .94), rgba(var(--hub-rgb), .7));
  color: #08090d;
  box-shadow: 0 12px 28px rgba(var(--hub-rgb), .14), inset 0 1px 0 rgba(255, 255, 255, .25);
}

html body main.tryby-hub-v2 .tryby-mode-card:focus-visible {
  --hub-lift: -6px;
  outline: 2px solid rgba(var(--hub-rgb), .86);
  outline-offset: 5px;
  border-color: rgba(var(--hub-rgb), .66);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .46), 0 0 0 6px rgba(var(--hub-rgb), .12);
}

@media (hover: hover) and (pointer: fine) {
  html body main.tryby-hub-v2 .tryby-mode-card.tryby-mode-in:hover {
    --hub-lift: -10px;
    --hub-scale: 1.009;
    z-index: 5;
    border-color: rgba(var(--hub-rgb), .58);
    box-shadow: 0 32px 82px rgba(0, 0, 0, .47), 0 0 48px rgba(var(--hub-rgb), .12), inset 0 1px 0 rgba(255, 255, 255, .1);
    transition-delay: 0ms;
  }
  html body main.tryby-hub-v2 .tryby-mode-card:hover::before { opacity: 1; transform: translate3d(58%, 0, 0); }
  html body main.tryby-hub-v2 .tryby-mode-card:hover::after { opacity: .95; transform: scaleX(.88); }
  html body main.tryby-hub-v2 .tryby-mode-card:hover .card-icon-wrap { transform: translate3d(0, -5px, 0) rotate(-2deg) scale(1.035); border-color: rgba(var(--hub-rgb), .54); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .11), 0 22px 46px rgba(0, 0, 0, .34), 0 0 44px rgba(var(--hub-rgb), .16); }
  html body main.tryby-hub-v2 .tryby-mode-card:nth-child(even):hover .card-icon-wrap { transform: translate3d(0, -5px, 0) rotate(2deg) scale(1.035); }
  html body main.tryby-hub-v2 .tryby-mode-card:hover .card-title { color: var(--hub-accent); transform: translateX(3px); }
  html body main.tryby-hub-v2 .tryby-mode-card:hover .card-corner::before,
  html body main.tryby-hub-v2 .tryby-mode-card:hover .card-corner::after { width: 27px; height: 27px; opacity: .92; }
}

@media (max-width: 1180px) {
  html body main.tryby-hub-v2 .tryby-modes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  html body main.tryby-hub-v2 .modes-section { padding-inline: 20px; }
  html body main.tryby-hub-v2 .tryby-modes-grid { grid-template-columns: 1fr; }
  html body main.tryby-hub-v2 .tryby-mode-card { min-height: 400px; }
}

@media (max-width: 600px) {
  html body main.tryby-hub-v2 .hero { min-height: 420px; padding: 72px 16px 76px; }
  html body main.tryby-hub-v2 .hero h1.hero-title-shimmer { margin-top: 20px; font-size: clamp(2.6rem, 15vw, 4.2rem); line-height: .93; }
  html body main.tryby-hub-v2 .hero > p { font-size: .92rem; line-height: 1.65; }
  html body main.tryby-hub-v2 .stats-bar { margin-top: -24px; padding-inline: 14px; }
  html body main.tryby-hub-v2 .stats-bar-inner { border-radius: 17px; }
  html body main.tryby-hub-v2 .modes-section { padding: 0 13px 86px; }
  html body main.tryby-hub-v2 .tryby-modes-grid { gap: 15px; }
  html body main.tryby-hub-v2 .tryby-mode-card {
    --hub-entry-direction: 0px !important;
    min-height: 385px;
    padding: 20px 19px 19px;
    border-radius: 19px;
    transition-duration: .54s;
  }
  html body main.tryby-hub-v2.tryby-v2-ready .tryby-mode-card:not(.tryby-mode-in) { --hub-enter-y: 30px; --hub-enter-rx: 4deg; }
  html body main.tryby-hub-v2 .tryby-mode-card .card-header { min-height: 91px; margin-bottom: 16px; }
  html body main.tryby-hub-v2 .tryby-mode-card .card-icon-wrap { width: 82px; height: 82px; flex-basis: 82px; border-radius: 20px; }
  html body main.tryby-hub-v2 .tryby-mode-card .card-icon-wrap::before { inset: 10px; border-radius: 14px; }
  html body main.tryby-hub-v2 .tryby-mode-card .card-icon-wrap::after { inset: 21px; border-radius: 8px; }
  html body main.tryby-hub-v2 .tryby-artifact-svg { width: 59px; height: 59px; }
  html body main.tryby-hub-v2 .tryby-mode-card .card-title { font-size: 2rem; }
  html body main.tryby-hub-v2 .tryby-mode-card .card-desc { font-size: .88rem; }
  html body main.tryby-hub-v2 .tryby-mode-card .card-feature-tag { font-size: .69rem; }
}

@media (max-width: 370px) {
  html body main.tryby-hub-v2 .tryby-mode-card { padding-inline: 16px; }
  html body main.tryby-hub-v2 .tryby-mode-card .card-players { padding-inline: 7px; font-size: .72rem; }
  html body main.tryby-hub-v2 .tryby-mode-card .card-badge { right: 14px; }
}
