body {
  background-color: #070b12 !important;
  background-image:
    linear-gradient(rgba(5, 8, 14, 0.62), rgba(8, 8, 12, 0.84)),
    url("ghostly-sonic-bg.png") !important;
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}

/* Final brand color overrides */
body .nav-wordmark { color: #ef3949; }
body .nav-wordmark span { color: #f5f1f3; }
body .updates-heading h1,
body .updates-heading h1 span { color: #f5f1f3; }
body .release-section h2,
body .release-section h2 span { color: #ef3949; }
body .shots-heading h2,
body .shots-heading h2 span { color: #f5f1f3; }

body.cosline-home::before {
  background: radial-gradient(ellipse at 50% 18%, rgba(148, 24, 47, 0.2), transparent 38%) !important;
}

.star-field {
  opacity: 0.2 !important;
}

.navbar,
.cosline-nav {
  background: rgba(8, 10, 16, 0.88);
  border: 1px solid rgba(142, 149, 165, 0.28) !important;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
  margin-top: 18px;
  padding-inline: 20px;
}

.cosline-home .latest-updates {
  padding-top: 72px;
}

.cosline-nav,
.navbar {
  display: grid !important;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
}

.cosline-nav nav,
.navbar nav {
  justify-self: center;
}

.nav-ip,
.ip-button {
  justify-self: end;
}

.nav-wordmark,
.logo {
  display: flex !important;
  align-items: center;
}

.nav-brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-right: 10px;
  filter: drop-shadow(0 0 9px rgba(223, 37, 55, 0.5));
}

.cosline-footer a,
.socials a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(13, 14, 20, 0.72);
  transition: border-color .2s, background .2s, transform .2s;
}

.cosline-footer a:hover,
.socials a:hover {
  border-color: rgba(239, 57, 73, 0.7);
  background: rgba(55, 17, 25, 0.82);
  transform: translateY(-2px);
}

.social-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #ef3949;
  stroke-width: 1.8;
  flex: 0 0 auto;
}

.social-icon path {
  fill: #ef3949;
  stroke: none;
}

.live-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #7bea9c !important;
}

.live-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #56e683;
  box-shadow: 0 0 12px rgba(86, 230, 131, 0.9);
}

.live-status.is-error {
  color: #ff8a95 !important;
}

.live-status.is-error::before {
  background: #ef3949;
  box-shadow: 0 0 12px rgba(239, 57, 73, 0.8);
}

.rank-table .stats-message {
  padding: 34px 18px;
  color: #9e989d;
  text-align: center;
  font: 700 12px 'Barlow Condensed';
  letter-spacing: 0.8px;
}

/* Global ELO leaderboard */
.leaderboard-page {
  max-width: 1040px;
}

.leaderboard-heading {
  margin-bottom: 34px;
  padding: 0 4px;
}

.leaderboard-heading h1 {
  letter-spacing: 1px;
}

.leaderboard-heading > div > p:last-child {
  color: #aaa4aa;
  font-size: 13px;
}

.leaderboard-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-top: 2px solid #e43142;
  background: rgba(10, 10, 14, 0.94);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46), 0 0 40px rgba(190, 25, 47, 0.08);
}

.leaderboard-card-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  min-height: 90px;
  padding: 21px 24px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(105deg, rgba(40, 13, 20, 0.96), rgba(13, 12, 16, 0.96) 55%);
}

.leaderboard-card-head p,
.leaderboard-card-head h2 {
  margin: 0;
}

.leaderboard-card-head p {
  margin-bottom: 5px;
  color: #e54555;
  font: 700 9px 'Barlow Condensed';
  letter-spacing: 2px;
}

.leaderboard-card-head h2 {
  color: #f6f2f3;
  font: 900 29px/1 'Barlow Condensed';
  letter-spacing: 1px;
}

.leaderboard-card-head h2 span {
  color: #ef3949;
}

.leaderboard-card-head small {
  color: #817a80;
  font: 700 9px 'Barlow Condensed';
  letter-spacing: 1.5px;
}

.leaderboard-scroll {
  overflow-x: auto;
}

.leaderboard-card .rank-table {
  min-width: 680px;
  margin: 0;
  border: 0;
  background: transparent;
}

.leaderboard-card .rank-table th {
  padding: 13px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #171419;
  color: #918a90;
  font-size: 10px;
  letter-spacing: 1.25px;
}

.leaderboard-card .rank-table th:first-child {
  width: 48%;
}

.leaderboard-card .rank-table th:not(:first-child),
.leaderboard-card .rank-table td:not(:first-child) {
  text-align: center;
}

.leaderboard-card .rank-table td {
  height: 58px;
  padding: 9px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.065);
  background: rgba(18, 16, 20, 0.72);
  color: #c9c3c7;
  font-size: 13px;
}

.leaderboard-card .rank-table tr:nth-child(even) td {
  background: rgba(27, 23, 28, 0.82);
}

.leaderboard-card .rank-table tbody tr {
  transition: transform 0.16s ease, filter 0.16s ease;
}

.leaderboard-card .rank-table tbody tr:hover td {
  background: rgba(73, 22, 31, 0.78);
}

.player-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left !important;
}

.leaderboard-position {
  width: 24px;
  flex: 0 0 24px;
  color: #777178;
  text-align: center;
  font: 900 17px 'Barlow Condensed';
}

.leaderboard-position.position-1 {
  color: #ffbf3d;
  text-shadow: 0 0 14px rgba(255, 191, 61, 0.42);
}

.leaderboard-position.position-2 {
  color: #d7dbe2;
}

.leaderboard-position.position-3 {
  color: #d88a5e;
}

.player-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid #544a50;
  background: #211c21 url('ghostly-logo.png') center/30px no-repeat;
  image-rendering: pixelated;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.28);
}

.player-avatar.is-missing {
  color: transparent;
}

.player-identity {
  min-width: 0;
}

.player-identity b {
  display: block;
  overflow: hidden;
  color: #f5f1f3;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-card .rating {
  color: #ffffff !important;
  font: 800 16px 'Barlow Condensed';
}

/* Unified white network wordmark */
body .nav-wordmark,
body .nav-wordmark span,
body .logo,
body .logo > span:last-child,
body .logo small {
  color: #ffffff;
}

body .nav-wordmark span {
  margin-left: 9px;
}

body .logo > span:last-child {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font: inherit;
  letter-spacing: inherit;
  line-height: 1;
}

body .logo small {
  display: inline;
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
}

/* Live Minecraft server card */
body .nav-ip,
body .ip-button {
  display: flex;
  min-width: 154px;
  min-height: 58px;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 3px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(12,13,18,.92);
  color: #fff;
  text-align: center;
}

.server-state-row,
.server-address-row {
  display: flex;
  align-items: center;
  justify-content: center;
}

.server-state-row {
  gap: 5px;
  color: #aaa5aa;
  font: 800 9px 'Barlow Condensed';
  letter-spacing: .8px;
}

.server-state-row strong {
  color: #f3eef0;
  font-size: 11px;
  letter-spacing: 1px;
}

.server-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e3a335;
  box-shadow: 0 0 8px currentColor;
}

.server-card.is-online .server-status-dot { background: #54df7d; color: #54df7d; }
.server-card.is-offline .server-status-dot { background: #f04352; color: #f04352; }
.server-card.is-online [data-server-status] { color: #65e68a; }
.server-card.is-offline [data-server-status] { color: #ff5967; }

.server-address-row {
  gap: 5px;
  color: #fff;
  font: 900 12px 'Barlow Condensed';
  letter-spacing: .9px;
}

.minecraft-mark {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  shape-rendering: crispEdges;
}

.server-copy-label {
  color: #ef4a59;
  font: 800 8px 'Barlow Condensed';
  letter-spacing: 1px;
}

@media (max-width: 850px) {
  body .ip-button { display: flex; }
}

@media (max-width: 650px) {
  body .nav-ip,
  body .ip-button {
    min-width: 142px;
    min-height: 52px;
  }
}

.leaderboard-card .wins {
  color: #78db91 !important;
  font-weight: 700;
}

.leaderboard-card .losses {
  color: #e8757f !important;
  font-weight: 700;
}

@media (max-width: 570px) {
  .leaderboard-heading {
    align-items: flex-start;
    gap: 18px;
  }

  .leaderboard-card-head {
    padding-inline: 17px;
  }

  .leaderboard-card .rank-table th,
  .leaderboard-card .rank-table td {
    padding-inline: 14px;
  }

  .leaderboard-card .rank-table th:nth-child(3),
  .leaderboard-card .rank-table td:nth-child(3) {
    display: table-cell;
  }
}

.uhc-leaderboard-page .page-heading h1,
.uhc-leaderboard-page .page-heading h1 span {
  color: #ef3949;
}

.uhc-leaderboard-card {
  max-width: none;
}

.uhc-table th:not(:first-child),
.uhc-table td:not(:first-child) {
  width: 150px;
  text-align: center;
}

.uhc-table .uhc-wins {
  color: #ffbf3d !important;
  font: 900 18px 'Barlow Condensed';
  text-shadow: 0 0 14px rgba(255, 191, 61, 0.24);
}

.uhc-table .uhc-games {
  color: #ffffff !important;
  font-weight: 800;
}

.uhc-table .uhc-kills {
  color: #f3eef0 !important;
  font-weight: 800;
}

.uhc-table .uhc-deaths {
  color: #ff6371 !important;
  font-weight: 800;
}

.uhc-leaderboard-page {
  max-width: 1040px;
}

.stats-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.secondary-stats-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(232, 51, 69, .8);
  background: rgba(232, 51, 69, .08);
  color: #f5f1f3;
  text-decoration: none;
  font: 800 10px 'Barlow Condensed';
  letter-spacing: 1.25px;
  transition: background .2s, box-shadow .2s, border-color .2s;
}

.secondary-stats-link:hover,
.secondary-stats-link.active {
  border-color: #ef3949;
  background: rgba(232, 51, 69, .23);
  box-shadow: 0 0 22px rgba(232, 51, 69, .17);
}

.disqualified-page .page-heading h1 span,
.disqualified-card .leaderboard-card-head h2 span {
  color: #ef3949;
}

.disqualified-table th:first-child {
  width: 64% !important;
}

.disqualified-table th:last-child,
.disqualified-table td:last-child {
  width: 36%;
  text-align: center;
}

.disqualified-date {
  color: #f4eef1 !important;
  font: 800 12px 'Barlow Condensed';
  letter-spacing: .65px;
}

.disqualified-pagination {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 12px 18px;
  border-top: 1px solid rgba(255,255,255,.09);
  background: rgba(12, 11, 15, .96);
}

.disqualified-pagination button {
  min-width: 118px;
  min-height: 38px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.035);
  color: #f5f1f3;
  cursor: pointer;
  font: 800 10px 'Barlow Condensed';
  letter-spacing: 1.1px;
}

.disqualified-pagination button:hover:not(:disabled) {
  border-color: #ef3949;
  background: rgba(232, 51, 69, .17);
}

.disqualified-pagination button:disabled {
  color: #5f5960;
  cursor: not-allowed;
  opacity: .62;
}

.disqualified-pagination span {
  min-width: 104px;
  color: #aaa3a8;
  text-align: center;
  font: 800 10px 'Barlow Condensed';
  letter-spacing: 1.2px;
}

@media (max-width: 850px) {
  .cosline-nav nav a,
  .navbar nav a {
    padding-inline: 8px;
    font-size: 10px;
  }
}

@media (max-width: 650px) {
  .cosline-nav,
  .navbar {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding-block: 9px;
  }

  .cosline-nav nav,
  .navbar nav {
    order: 3;
    width: 100%;
    height: 42px;
    justify-content: center;
  }

  .stats-heading-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .disqualified-table {
    min-width: 560px !important;
  }

  .disqualified-pagination {
    gap: 9px;
  }

  .disqualified-pagination button {
    min-width: 92px;
  }
}

/* Ghostly brand color hierarchy */
.nav-wordmark {
  color: #ef3949;
}

.nav-wordmark span {
  color: #f5f1f3;
}

.updates-heading h1,
.updates-heading h1 span {
  color: #f5f1f3;
}

.release-section h2,
.release-section h2 span {
  color: #ef3949;
}

.shots-heading h2,
.shots-heading h2 span {
  color: #f5f1f3;
}

.site-shell > footer,
.cosline-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 17px;
  text-align: center;
}

.socials,
.cosline-footer > div {
  justify-content: center;
  width: 100%;
  flex-wrap: wrap;
}

@media (max-width: 570px) {
  .socials a,
  .cosline-footer a {
    flex: 0 1 calc(50% - 6px);
  }
}

/* Compact social footer */
.site-shell > footer,
.cosline-footer {
  position: relative;
  padding: 22px 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(239, 57, 73, 0.45);
  background: linear-gradient(105deg, rgba(19, 16, 21, 0.96), rgba(8, 10, 15, 0.97));
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.2);
}

.socials,
.cosline-footer > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.socials a,
.cosline-footer a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 118px;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.025);
  color: #eee9ec;
  font: 800 11px 'Barlow Condensed';
  letter-spacing: 1.15px;
  text-transform: uppercase;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.socials a span,
.cosline-footer a span {
  display: none;
}

.socials a:hover,
.socials a:focus-visible,
.cosline-footer a:hover,
.cosline-footer a:focus-visible {
  border-color: rgba(239, 57, 73, 0.72);
  background: rgba(133, 25, 40, 0.2);
  color: #fff;
  outline: none;
  transform: translateY(-2px);
}

.socials .social-icon,
.cosline-footer .social-icon {
  width: 18px;
  height: 18px;
  color: #ef3949;
}

.site-shell > footer > p,
.cosline-footer > p {
  margin: 0;
  color: #777179;
}

@media (max-width: 570px) {
  .site-shell > footer,
  .cosline-footer {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px 16px;
  }

  .socials,
  .cosline-footer > div {
    display: flex !important;
    justify-content: center;
    width: 100%;
  }

  .socials a,
  .cosline-footer a {
    justify-content: center;
    min-width: 0;
    flex: 1;
  }
}

.release-meta .mc-head {
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background-color: #101116;
  background-image: url("aleexks-skin.png");
  background-repeat: no-repeat;
  background-size: 384px 384px;
  background-position: -48px -48px;
  image-rendering: pixelated;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(239, 57, 73, 0.2), 0 8px 20px rgba(0, 0, 0, 0.35);
}

.release-meta .mc-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("aleexks-skin.png");
  background-repeat: no-repeat;
  background-size: 384px 384px;
  background-position: -240px -48px;
  image-rendering: pixelated;
}

.release-meta .mc-head i {
  display: none;
}

.subpage {
  padding-inline: 24px;
  background: linear-gradient(180deg, rgba(7, 9, 14, 0.34), rgba(7, 7, 10, 0.72));
}

@media (max-width: 700px) {
  body {
    background-position: 56% center !important;
  }

  .cosline-nav,
  .navbar {
    grid-template-columns: 1fr auto;
  }

  .nav-ip,
  .ip-button {
    display: none !important;
  }

  .nav-brand-logo {
    width: 32px;
    height: 32px;
    margin-right: 6px;
  }
}

/* Moving star field across the whole network */
.global-star-field {
  position: fixed;
  inset: -140px;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.56;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.95) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(239,57,73,.9) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(128,157,214,.8) 0 1.2px, transparent 1.7px);
  background-size: 83px 83px, 137px 137px, 211px 211px;
  background-position: 12px 17px, 50px 91px, 114px 31px;
  animation:
    ghostlyStarsDrift 70s linear infinite,
    ghostlyStarsTwinkle 6.5s ease-in-out infinite alternate;
}

.global-star-field::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .5;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.9) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(227,45,65,.75) 0 1.2px, transparent 1.8px);
  background-size: 173px 173px, 263px 263px;
  background-position: 80px 12px, 25px 120px;
  animation:
    ghostlyStarsReverse 95s linear infinite,
    ghostlyStarsTwinkleSoft 8.5s ease-in-out infinite alternate-reverse;
}

.site-shell,
body.cosline-home > header,
body.cosline-home > main,
body.cosline-home > footer,
.toast {
  position: relative;
  z-index: 1;
}

.star-field {
  animation:
    ghostlyStarsDrift 80s linear infinite,
    ghostlyStarsTwinkleSoft 7.5s ease-in-out infinite alternate;
}

@keyframes ghostlyStarsDrift {
  from { transform: translate3d(-70px, -45px, 0) rotate(0deg); }
  to { transform: translate3d(70px, 55px, 0) rotate(.4deg); }
}

@keyframes ghostlyStarsReverse {
  from { transform: translate3d(65px, -40px, 0); }
  to { transform: translate3d(-65px, 75px, 0); }
}

@keyframes ghostlyStarsTwinkle {
  0%, 100% { opacity: .42; filter: brightness(.88); }
  45% { opacity: .58; filter: brightness(1.05); }
  70% { opacity: .5; filter: brightness(.96); }
}

@keyframes ghostlyStarsTwinkleSoft {
  0%, 100% { opacity: .32; filter: brightness(.9); }
  55% { opacity: .52; filter: brightness(1.08); }
}

/* Compact Minecraft-style copy firework */
.minecraft-firework {
  position: fixed;
  width: 4px;
  height: 4px;
  z-index: 50;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.toast {
  display: none !important;
}

.minecraft-firework::before {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid #fff;
  box-shadow: 0 0 12px rgba(255,255,255,.9);
  animation: minecraftFireworkFlash .48s steps(4, end) forwards;
}

.firework-pixel {
  position: absolute;
  left: 0;
  top: 0;
  width: 5px;
  height: 5px;
  background: var(--pixel-color);
  box-shadow: 0 0 7px var(--pixel-color);
  animation: minecraftFireworkBurst .72s steps(6, end) var(--pixel-delay) forwards;
}

.server-card.is-copied .server-copy-label {
  color: #ffffff;
  text-shadow: 0 0 8px #ef3949;
}

@keyframes minecraftFireworkFlash {
  0% { opacity: 0; transform: scale(.3); }
  35% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(2.2); }
}

@keyframes minecraftFireworkBurst {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  72% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--pixel-x), var(--pixel-y)) scale(.45); }
}

/* Ghostly Shots */
.ghostly-shots {
  max-width: 970px;
  margin: 0 auto;
  padding: 12px 0 78px;
}

.shots-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,.14);
}

.shots-heading p,
.shots-heading h2,
.shots-heading small {
  margin: 0;
}

.shots-heading p {
  margin-bottom: 6px;
  color: #e33b4c;
  font: 700 10px 'Barlow Condensed';
  letter-spacing: 2px;
}

.shots-heading h2 {
  color: #f5f1f3;
  font: 900 38px/.92 'Barlow Condensed';
  letter-spacing: 1px;
}

.shots-heading h2 span {
  color: #f5f1f3;
}

.shots-heading small {
  display: block;
  margin-top: 7px;
  color: #817b82;
  font: 700 9px 'Barlow Condensed';
  letter-spacing: 1.45px;
}

.shots-count {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: #716b72;
  font: 800 15px 'Barlow Condensed';
}

.shots-count b {
  color: #ef3949;
  font-size: 31px;
}

.shots-carousel {
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr) 45px;
  align-items: center;
  gap: 13px;
}

.shots-viewport {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  background: #09090d;
  box-shadow: 0 22px 65px rgba(0,0,0,.5), 0 0 46px rgba(180,24,46,.1);
}

.shots-track {
  display: flex;
  gap: 0;
  transition: transform .58s cubic-bezier(.22,.8,.24,1);
  will-change: transform;
}

.shot-card {
  position: relative;
  flex: 0 0 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: #09090d;
  color: white;
  cursor: pointer;
  text-align: left;
}

.shot-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(4,4,7,.88) 100%);
  transition: background .22s ease;
}

.shot-card:hover::after,
.shot-card:focus-visible::after {
  background: linear-gradient(180deg, rgba(127,18,35,.08), rgba(4,4,7,.92) 100%);
}

.shot-card video,
.shot-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform .5s ease, filter .35s ease;
}

.shot-card:hover video,
.shot-card:focus-visible video,
.shot-card:hover img,
.shot-card:focus-visible img {
  transform: scale(1.045);
  filter: saturate(1.14) contrast(1.05);
}

.shot-overlay {
  position: absolute;
  left: 24px;
  bottom: 21px;
  z-index: 2;
}

.shot-overlay b,
.shot-overlay small {
  display: block;
}

.shot-overlay b {
  color: #fff;
  font: 900 25px 'Barlow Condensed';
  letter-spacing: 1.1px;
}

.shot-overlay small {
  margin-top: 3px;
  color: #c2bbc0;
  font: 700 9px 'Barlow Condensed';
  letter-spacing: 1.35px;
}

.shots-arrow {
  display: grid;
  width: 45px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(15,13,17,.88);
  color: #ef3949;
  font: 500 35px/1 'Barlow Condensed';
  cursor: pointer;
  transition: border-color .18s, background .18s, color .18s;
}

.shots-arrow:hover,
.shots-arrow:focus-visible {
  border-color: #ef3949;
  background: rgba(105,20,34,.55);
  color: #fff;
  outline: none;
}

.shots-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 16px;
}

.shots-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #4b464c;
  cursor: pointer;
  transform: rotate(45deg);
  transition: background .2s, box-shadow .2s, transform .2s;
}

.shots-dots button.active {
  background: #ef3949;
  box-shadow: 0 0 12px rgba(239,57,73,.85);
  transform: rotate(45deg) scale(1.25);
}

.shot-lightbox {
  width: min(940px, calc(100vw - 36px));
  padding: 0;
  border: 1px solid rgba(255,255,255,.2);
  background: #09090d;
  color: #fff;
  box-shadow: 0 30px 100px #000;
}

.shot-lightbox::backdrop {
  background: rgba(0,0,0,.88);
  backdrop-filter: blur(6px);
}

.shot-lightbox video,
.shot-lightbox > img {
  display: block;
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
  background: #000;
}

.shot-lightbox > div {
  padding: 13px 18px 16px;
}

.shot-lightbox p,
.shot-lightbox b {
  margin: 0;
  font-family: 'Barlow Condensed';
}

.shot-lightbox p {
  color: #ef3949;
  font-size: 9px;
  letter-spacing: 1.7px;
}

.shot-lightbox b {
  font-size: 19px;
  letter-spacing: 1px;
}

.shot-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(6,6,9,.82);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

/* Fixed 8-bit ambient player */
.ambient-player {
  position: fixed;
  top: 106px;
  right: 18px;
  z-index: 100;
  display: grid;
  grid-template-columns: auto 84px;
  align-items: center;
  gap: 8px 10px;
  width: 274px;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,.18);
  border-left: 2px solid #ef3949;
  background: rgba(7,9,14,.92);
  box-shadow: 0 12px 38px rgba(0,0,0,.52), 0 0 24px rgba(207,31,54,.12);
  backdrop-filter: blur(11px);
}

.ambient-toggle {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  text-align: left;
}

.pixel-speaker {
  position: relative;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  border: 2px solid #ef3949;
  background: #26151a;
  image-rendering: pixelated;
}

.pixel-speaker::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 9px;
  width: 7px;
  height: 10px;
  background: #fff;
  box-shadow: 5px -4px #fff, 5px 4px #fff;
}

.pixel-speaker i {
  position: absolute;
  right: 4px;
  width: 2px;
  background: #ef3949;
  animation: pixelSound .7s steps(2,end) infinite alternate;
}

.pixel-speaker i:nth-child(1){top:7px;height:4px}.pixel-speaker i:nth-child(2){top:12px;height:6px;animation-delay:.12s}.pixel-speaker i:nth-child(3){top:19px;height:4px;animation-delay:.24s}
.ambient-player.is-paused .pixel-speaker i,.ambient-player.is-locked .pixel-speaker i{animation-play-state:paused;opacity:.25}

.ambient-copy {
  min-width: 0;
}

.ambient-copy small,
.ambient-copy b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: 'Barlow Condensed';
}

.ambient-copy small {
  color: #8f888e;
  font-size: 8px;
  letter-spacing: 1.45px;
}

.ambient-copy b {
  margin-top: 3px;
  color: #f4f0f2;
  font-size: 11px;
  letter-spacing: .65px;
}

.ambient-volume {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 5px;
  color: #777178;
  font: 800 8px 'Barlow Condensed';
}

.ambient-volume input {
  width: 100%;
  height: 3px;
  accent-color: #ef3949;
  cursor: pointer;
}

.ambient-bars {
  grid-column: 1/-1;
  display: flex;
  height: 3px;
  gap: 3px;
}

.ambient-bars i {
  flex: 1;
  background: #ef3949;
  opacity: .24;
  animation: ambientPulse 1.2s steps(3,end) infinite;
}

.ambient-bars i:nth-child(2){animation-delay:.18s}.ambient-bars i:nth-child(3){animation-delay:.36s}.ambient-bars i:nth-child(4){animation-delay:.54s}.ambient-bars i:nth-child(5){animation-delay:.72s}
.ambient-player:not(.is-playing) .ambient-bars i{animation-play-state:paused;opacity:.1}

@keyframes pixelSound { to { transform: translateX(2px); opacity:.35; } }
@keyframes ambientPulse { 50% { opacity: .9; } }

@media (max-width: 700px) {
  .ghostly-shots {
    margin-inline: 20px;
  }

  .shots-heading h2 {
    font-size: 32px;
  }

  .shots-carousel {
    grid-template-columns: 35px minmax(0, 1fr) 35px;
    gap: 7px;
  }

  .shots-arrow {
    width: 35px;
    height: 48px;
  }

  .ambient-player {
    top: 76px;
    right: 10px;
    width: 222px;
    grid-template-columns: auto 65px;
  }

  .ambient-copy small {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .global-star-field,
  .global-star-field::before,
  .star-field,
  .pixel-speaker i,
  .ambient-bars i {
    animation: none !important;
  }
  .shots-track,
  .shot-card video {
    transition: none !important;
  }
  .minecraft-firework::before,
  .firework-pixel {
    display: none !important;
    animation: none !important;
  }
}

/* v18: unified temple background, language switch and rank-aware player links */
body,
body.cosline-home {
  background-color: #050607 !important;
  background-image:
    linear-gradient(rgba(3, 4, 6, .24), rgba(3, 4, 7, .40)),
    url("ghostly-temple-bg.png") !important;
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}

body.cosline-home::before {
  background: linear-gradient(180deg, rgba(5, 6, 9, .05), rgba(5, 6, 9, .18)) !important;
}

.global-star-field,
.global-star-field::before,
.star-field {
  display: none !important;
  background: none !important;
  animation: none !important;
}

.server-language-stack {
  justify-self: end;
  display: grid;
  justify-items: stretch;
  gap: 5px;
  min-width: 113px;
}

.server-language-stack > .nav-ip,
.server-language-stack > .ip-button {
  width: 100%;
  justify-self: stretch;
}

.language-switch {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  padding: 0;
  background: transparent;
  border: 0;
}

.language-option {
  min-width: 52px;
  height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 2px 6px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(82,82,88,.72);
  color: #e9e9eb;
  cursor: pointer;
  font: 900 11px 'Barlow Condensed', sans-serif;
  letter-spacing: .5px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.35), 0 4px 12px rgba(0,0,0,.22);
  transition: border-color .16s, background .16s, color .16s, box-shadow .16s, transform .16s;
}

.language-option .language-flag {
  width: 19px;
  height: 12px;
  display: inline-block;
  border: 1px solid rgba(255,255,255,.52);
  box-shadow: 0 1px 3px rgba(0,0,0,.48);
}

.language-flag.flag-en {
  background:
    linear-gradient(90deg, transparent 43%, #fff 43% 57%, transparent 57%),
    linear-gradient(transparent 37%, #fff 37% 63%, transparent 63%),
    linear-gradient(90deg, transparent 47%, #d5263d 47% 53%, transparent 53%),
    linear-gradient(transparent 44%, #d5263d 44% 56%, transparent 56%),
    #234b91;
}

.language-flag.flag-es {
  background: linear-gradient(#bf1e2e 0 25%, #f4cd3b 25% 75%, #bf1e2e 75% 100%);
}

.language-option:hover,
.language-option:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.48);
  outline: 0;
}

.language-option.is-active {
  border-color: #62e47f;
  background: linear-gradient(180deg, rgba(48,145,75,.94), rgba(27,99,48,.94));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(126,255,153,.22), 0 0 13px rgba(74,220,108,.28);
}

.rank-colored-username {
  color: var(--username-color, #fff) !important;
  text-shadow: 0 0 8px color-mix(in srgb, var(--username-color, #fff) 36%, transparent);
  transition: color .16s, filter .16s, text-shadow .16s;
}

.profile-player-row:hover .rank-colored-username,
.profile-player-row:focus .rank-colored-username,
.team-member-name:hover,
.team-member-name:focus-visible {
  filter: brightness(1.28);
  text-shadow: 0 0 12px color-mix(in srgb, var(--username-color, #fff) 58%, transparent);
}

.team-member-name {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--username-color, #fff);
  text-decoration: none;
  font: 800 20px/1 'Barlow Condensed';
  white-space: nowrap;
}

.player-search.player-search-compact {
  justify-content: flex-end;
}

@media (max-width: 850px) {
  .server-language-stack {
    min-width: 109px;
  }
  .server-language-stack > .nav-ip,
  .server-language-stack > .ip-button {
    display: none !important;
  }
}

@media (max-width: 620px) {
  .server-language-stack { min-width: 91px; }
  .language-option { min-width: 42px; height: 23px; padding-inline: 4px; font-size: 9px; }
  .language-option .language-flag { width: 17px; height: 11px; }
}

/* v20: cat-night backdrop, centered locale controls and interaction polish */
body,
body.cosline-home {
  background-image:
    linear-gradient(rgba(3, 5, 8, .14), rgba(3, 5, 8, .26)),
    url("ghostly-cat-night-bg.png") !important;
}

.server-language-stack {
  justify-items: center;
}

.language-switch {
  width: 100%;
  justify-content: center;
}

.language-option .language-flag {
  position: relative;
  overflow: hidden;
}

.language-flag.flag-en {
  background: repeating-linear-gradient(
    to bottom,
    #b22234 0 1px,
    #fff 1px 2px
  );
}

.language-flag.flag-en::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 46%;
  height: 58%;
  background:
    radial-gradient(circle, #fff 0 18%, transparent 20%) 1px 1px / 4px 3px,
    #3c3b6e;
}

.click-target {
  will-change: transform;
  transform: translateZ(0) scale(1);
  transition: transform .075s cubic-bezier(.22, .92, .38, 1.35), box-shadow .075s ease;
}

.click-area:active .click-target {
  transform: translateZ(0) scale(.93);
  box-shadow: 0 0 0 8px #8e1a29, 0 0 38px #ff334b;
}

.click-area:focus-visible {
  outline: 2px solid #ef3949;
  outline-offset: 3px;
}

.test-stat {
  align-items: center;
}

.final-result {
  display: grid;
  gap: 10px;
  margin: 5px 0 16px;
  padding: 15px 0 2px;
  border-top: 1px solid var(--line);
}

.final-result[hidden] {
  display: none !important;
}

.final-result-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px 8px;
}

.final-result-line > span {
  color: #938b90;
  font: 800 10px 'Barlow Condensed';
  letter-spacing: 1px;
}

.final-result-line > strong {
  color: #fff;
  font: 900 18px 'Barlow Condensed';
  letter-spacing: .35px;
}

.final-result > small {
  color: #bdb6bb;
  font-size: 10px;
  line-height: 1.45;
}

.share-attempt {
  display: block;
  margin-top: 2px;
  color: #ff6675;
  text-decoration: none;
  font: 800 10px/1.45 'Inter', sans-serif;
  transition: color .16s, text-shadow .16s;
}

.share-attempt:hover,
.share-attempt:focus-visible {
  color: #fff;
  text-shadow: 0 0 10px #ef3949;
  outline: none;
}

.player-name-link {
  color: inherit;
  text-decoration: none;
  outline: 0;
}

.global-elo-block > small,
.practice-record > small {
  color: #f04454;
  font-size: 13px;
  letter-spacing: 1.35px;
}

.streak-grid > div {
  position: relative;
  overflow: hidden;
  padding-left: 31px;
}

.streak-grid > div::before {
  content: "";
  position: absolute;
  inset: 11px auto 11px 0;
  width: 3px;
  background: #ef3949;
  box-shadow: 0 0 12px #ef394988;
}

.streak-grid span {
  color: #ef4656;
  font-size: 12px;
  letter-spacing: 1.15px;
}

/* v22: denser navigation and detached language controls */
@media (min-width: 851px) {
  .navbar,
  .cosline-nav {
    grid-template-columns: 215px auto minmax(0, 1fr) !important;
    column-gap: 8px;
    overflow: visible;
  }

  .navbar nav,
  .cosline-nav nav {
    justify-self: start;
  }

  .navbar nav a,
  .cosline-nav nav a {
    padding-inline: 6px !important;
    font-size: 10px !important;
  }

  .nav-wordmark {
    letter-spacing: 1.1px !important;
  }

  .logo {
    letter-spacing: 1px !important;
  }

  .header-actions {
    justify-self: end;
    margin-right: 25px;
  }

  .server-language-stack {
    position: relative;
    align-self: center;
    display: block;
    min-width: 113px;
  }

  .server-language-stack > .nav-ip,
  .server-language-stack > .ip-button {
    width: 100%;
    transform: translateY(0);
  }

  .server-language-stack > .language-switch {
    position: absolute;
    top: calc(100% + 13px);
    left: 50%;
    width: max-content;
    transform: translateX(-50%);
    z-index: 8;
  }
}
