:root {
  --deep-space: #050505;
  --vector-stroke: 1.5px;
  --theme-speed: 0.6s;
}

html {
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: 80px;
}

/* PPL1 Theme (Cyan/Blue) */
[data-theme="ppl1"] {
  --glow-primary: #00ffff;
  --glow-primary-rgb: 0, 255, 255;
  --glow-secondary: #f13e60;
  --grid-color: rgba(0, 255, 255, 0.1);
  --bg-accent: #001a33;
}

/* PPL2 Theme (Red/Orange) */
[data-theme="ppl2"] {
  --glow-primary: #ff5e00;
  --glow-primary-rgb: 255, 94, 0;
  --glow-secondary: #ff0044;
  --grid-color: rgba(255, 60, 60, 0.1);
  --bg-accent: #330d00;
}

/* Info Theme (Acid Green/Emerald) */
[data-theme="info"] {
  --glow-primary: #00ff66;
  --glow-primary-rgb: 0, 255, 102;
  --glow-secondary: #00ccff;
  --grid-color: rgba(0, 255, 102, 0.1);
  --bg-accent: #00331a;
}

/* Leaderboard Theme (Deep Violet/Electric Blue) */
[data-theme="lb"] {
  --glow-primary: #bc13fe;
  --glow-primary-rgb: 188, 19, 254;
  --glow-secondary: #4d4dff;
  --grid-color: rgba(188, 19, 254, 0.1);
  --bg-accent: #1a0033;
}

/* Levels Theme (Cyber-Gold) */
[data-theme="levels"] {
  --glow-primary: #ffcc00;
  --glow-primary-rgb: 255, 204, 0;
  --glow-secondary: #ffaa00;
  --grid-color: rgba(255, 204, 0, 0.08);
  --bg-accent: #332200;
}

/* Theme: Account (Cyber-Link Blue) */
[data-theme="account"] {
  --glow-primary: #00aaff;
  --glow-primary-rgb: 0, 170, 255;
  --glow-secondary: #00eeff;
  --grid-color: rgba(0, 170, 255, 0.08);
  --bg-accent: #001a33;
}

.profile-identity {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--glow-primary);
  flex-wrap: wrap;
  gap: 20px;
}

.comm-tray {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Tactical Modal System */
.tactical-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.tactical-modal-overlay.active {
  display: flex;
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.tactical-modal {
  background: rgba(10, 10, 10, 0.95);
  border: 2px solid var(--glow-primary);
  width: 100%;
  max-width: 500px;
  padding: 40px;
  position: relative;
  clip-path: polygon(
    30px 0,
    100% 0,
    100% calc(100% - 30px),
    calc(100% - 30px) 100%,
    0 100%,
    0 30px
  );
  box-shadow: 0 0 30px rgba(var(--glow-primary-rgb), 0.2);
}

.tactical-modal .modal-header {
  margin-bottom: 25px;
  border-bottom: 1px solid rgba(var(--glow-primary-rgb), 0.2);
  padding-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tactical-modal .modal-title {
  font-family: "Syncopate", sans-serif;
  font-size: 1.2rem;
  color: var(--glow-primary);
  letter-spacing: 2px;
  margin: 0;
}

.tactical-modal .modal-body {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #ccc;
  margin-bottom: 30px;
}

.tactical-modal .modal-footer {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
}

/* Tactical Badges */
.tactical-badge {
  padding: 8px 12px;
  background: rgba(var(--glow-primary-rgb), 0.1);
  border: 1px solid var(--glow-primary);
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  clip-path: polygon(
    5px 0,
    100% 0,
    100% calc(100% - 5px),
    calc(100% - 5px) 100%,
    0 100%,
    0 5px
  );
  transition: all 0.3s;
  min-width: 100px;
  height: 45px;
  text-align: center;
}

.tactical-badge:hover {
  background: rgba(var(--glow-primary-rgb), 0.2);
  box-shadow: 0 0 10px rgba(var(--glow-primary-rgb), 0.2);
}

.tactical-badge .centered {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Tactical Bio & Scrollbar */
.tactical-bio {
  white-space: pre-line;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 15px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #ccc;
}

.tactical-bio,
.tactical-input,
.tactical-scroll {
  overflow-y: auto;
}

.tactical-bio::-webkit-scrollbar,
.tactical-input::-webkit-scrollbar,
.tactical-scroll::-webkit-scrollbar {
  width: 6px;
}

.tactical-bio::-webkit-scrollbar-button,
.tactical-input::-webkit-scrollbar-button,
.tactical-scroll::-webkit-scrollbar-button {
  background: transparent;
  height: 10px;
}

.tactical-bio::-webkit-scrollbar-button:hover,
.tactical-input::-webkit-scrollbar-button:hover,
.tactical-scroll::-webkit-scrollbar-button:hover {
  background: #333;
}

.tactical-bio::-webkit-scrollbar-button:single-button:vertical:decrement,
.tactical-input::-webkit-scrollbar-button:single-button:vertical:decrement,
.tactical-scroll::-webkit-scrollbar-button:single-button:vertical:decrement {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgba(0,170,255,1)'><polygon points='50,20 20,80 80,80'/></svg>");
  background-size: 8px;
  background-repeat: no-repeat;
  background-position: center;
}

.tactical-bio::-webkit-scrollbar-button:single-button:vertical:increment,
.tactical-input::-webkit-scrollbar-button:single-button:vertical:increment,
.tactical-scroll::-webkit-scrollbar-button:single-button:vertical:increment {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgba(0,170,255,1)'><polygon points='20,20 80,20 50,80'/></svg>");
  background-size: 8px;
  background-repeat: no-repeat;
  background-position: center;
}

.tactical-bio::-webkit-scrollbar-track,
.tactical-input::-webkit-scrollbar-track,
.tactical-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.tactical-bio::-webkit-scrollbar-thumb,
.tactical-input::-webkit-scrollbar-thumb,
.tactical-scroll::-webkit-scrollbar-thumb {
  background: var(--glow-primary);
  border-radius: 0;
}

.tactical-bio::-webkit-scrollbar-thumb:hover,
.tactical-input::-webkit-scrollbar-thumb:hover,
.tactical-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--glow-secondary);
}

/* Custom Scrollbar for Info Content */
.info-content::-webkit-scrollbar {
  width: 6px;
}

.info-content::-webkit-scrollbar-button {
  display: none !important;
  height: 0 !important;
  width: 0 !important;
}

.info-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.info-content::-webkit-scrollbar-thumb {
  background: var(--glow-primary);
  border-radius: 0;
}

.info-content::-webkit-scrollbar-thumb:hover {
  background: var(--glow-secondary);
}

.profile-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-bottom: 40px;
}

.meta-block {
  background: rgba(0, 170, 255, 0.05);
  border: 1px solid rgba(0, 170, 255, 0.2);
  padding: 15px 20px;
  position: relative;
  clip-path: polygon(
    10px 0,
    100% 0,
    100% calc(100% - 10px),
    calc(100% - 10px) 100%,
    0 100%,
    0 10px
  );
}

.meta-label {
  font-size: 0.65rem;
  color: var(--glow-secondary);
  letter-spacing: 2px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.meta-value {
  font-size: 1.1rem;
  font-weight: 700;
}

.level-card {
  background: rgba(0, 0, 0, 0.85);
  border: var(--vector-stroke) solid rgba(255, 204, 0, 0.4);
  padding: 20px;
  margin-bottom: 20px;
  clip-path: polygon(
    15px 0,
    100% 0,
    100% calc(100% - 15px),
    calc(100% - 15px) 100%,
    0 100%,
    0 15px
  );
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  /* Performance Optimization: Skip rendering of offscreen cards */
  content-visibility: auto;
  contain-intrinsic-size: auto 220px;
}

/* Tactical Dot Pattern for Cards */
.level-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
    circle at 1px 1px,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 0
  );
  background-size: 16px 16px;
  pointer-events: none;
  z-index: 0;
}

.level-card:hover {
  background: rgba(0, 0, 0, 0.95);
  border-color: rgba(255, 204, 0, 0.8);
  transform: translateY(-2px);
  box-shadow:
    0 5px 15px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(255, 204, 0, 0.2);
}

.level-card > * {
  position: relative;
  z-index: 2;
}

.level-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  padding: 2px 8px;
  text-transform: uppercase;
  border: 1px solid currentColor;
  border-radius: 0;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Tactical Layout System */
.tactical-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 40px;
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 30px;
}

@media (max-width: 800px) {
  .tactical-container {
    padding: 0 20px;
  }
  .level-grid {
    gap: 16px;
  }
}

@media (max-width: 700px) {
  .level-grid {
    grid-template-columns: 1fr;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--deep-space);
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background-color var(--theme-speed);
}

/* Perspective Grid Animation */
.grid-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  perspective: 1000px;
  z-index: 0;
  overflow: hidden;
  /* background: var(--deep-space); */
  background: radial-gradient(
    circle at 50% 50%,
    var(--bg-accent) 0%,
    var(--deep-space) 85%
  );
  transition: background var(--theme-speed);
  contain: strict;
}

.grid {
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background-image:
    linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: rotateX(60deg) translate3d(0, 0, 0);
  animation: grid-move 20s linear infinite;
  transition: background-image var(--theme-speed);
  will-change: transform;
}

@keyframes grid-move {
  0% {
    transform: rotateX(60deg) translate3d(0, 0, 0);
  }
  100% {
    transform: rotateX(60deg) translate3d(0, 60px, 0);
  }
}

.ui-wrapper {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 20px 40px;
  min-height: 100vh;
}

/* Navigation Bar */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glow-primary);
  z-index: 1000;
  display: flex;
  justify-content: center;
  transition: border-color var(--theme-speed);
}

.nav-content {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.nav-brand {
  font-family: "Michroma", sans-serif;
  color: #fff;
  letter-spacing: 4px;
  font-size: 1.2rem;
  text-shadow: 0 0 10px var(--glow-primary);
  transition: text-shadow var(--theme-speed);
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-item {
  position: relative;
}

.nav-link {
  text-decoration: none;
  color: #888;
  font-size: 0.8rem;
  letter-spacing: 2px;
  transition: all 0.3s;
  position: relative;
  padding: 15px 0;
  display: block;
}

.nav-link:hover,
.nav-link.active {
  color: var(--glow-primary);
  text-shadow: 0 0 8px var(--glow-primary);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--glow-secondary);
  transition:
    width 0.3s ease,
    background-color var(--theme-speed);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Desktop Hover Logic */
@media (min-width: 901px) {
  .nav-item:hover .nav-link {
    color: var(--glow-primary);
    text-shadow: 0 0 8px var(--glow-primary);
  }
  .nav-item:hover .nav-link::after {
    width: 100%;
  }
  .nav-item:hover .dropdown-menu {
    display: flex;
  }
}

/* Dropdown Styles */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(15px);
  border: 1px solid var(--glow-primary);
  min-width: 200px;
  display: none;
  flex-direction: column;
  padding: 10px 0;
  z-index: 1001;
  animation: dropdownFade 0.3s ease-out;
}

@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  padding: 10px 20px;
  color: #ccc;
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 1px;
  transition: all 0.2s;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--glow-primary);
  padding-left: 25px;
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 5px 0;
}

.nav-status {
  font-size: 0.6rem;
  color: var(--glow-secondary);
  border: 1px solid var(--glow-secondary);
  padding: 4px 12px;
  letter-spacing: 1px;
  transition: all 0.3s;
  text-decoration: none;
  cursor: pointer;
}

.nav-status:hover {
  background: var(--glow-secondary);
  color: #000;
  box-shadow: 0 0 15px var(--glow-secondary);
}

/* Mobile Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  z-index: 1002;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--glow-primary);
  transition: all 0.3s;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: 0;
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    transition: height 0.4s cubic-bezier(0.77, 0.2, 0.05, 1);
    border-bottom: 1px solid var(--glow-primary);
    border-left: none;
    z-index: 1001;
    overflow-y: auto;
    padding: 0;
  }

  .nav-links.active {
    height: calc(100vh - 60px);
    padding: 20px 0;
  }

  .nav-item {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-link {
    font-size: 1rem;
    padding: 20px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .nav-link::after {
    display: none;
  }

  .nav-item.has-dropdown .nav-link::after {
    display: block;
    content: "+";
    position: static;
    width: auto;
    height: auto;
    background: none;
    font-family: "JetBrains Mono";
    color: var(--glow-primary);
    font-size: 1.2rem;
  }

  .nav-item.active .nav-link::after {
    content: "-";
  }

  .nav-links.active .nav-link {
    opacity: 1;
    transform: translateX(0);
  }

  .dropdown-menu {
    position: static;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: none;
    border-left: 2px solid var(--glow-primary);
    margin: 0;
    display: none;
    animation: none;
    padding: 0;
  }

  .nav-item.active .dropdown-menu {
    display: flex;
  }

  .dropdown-item {
    padding: 15px 40px;
    font-size: 0.8rem;
    border-bottom: none;
  }

  .nav-status {
    display: none;
  }

  /* Hamburger to X */
  .nav-toggle.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  /* Show account in mobile menu */
  .mobile-account {
    display: block !important;
    margin: 20px;
    color: var(--glow-secondary);
    border: 1px solid var(--glow-secondary);
    padding: 15px;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-align: center;
    opacity: 0;
    transition:
      background 0.2s ease,
      color 0.2s ease,
      box-shadow 0.2s ease,
      opacity 0.3s ease;
  }

  .mobile-account:hover {
    background: var(--glow-secondary) !important;
    color: #000 !important;
    box-shadow: 0 0 15px var(--glow-secondary) !important;
    transition-delay: 0s !important;
  }

  .nav-links.active .mobile-account {
    opacity: 1;
    transition-delay: 0s, 0s, 0s, 0.4s; /* Only delay the opacity (entrance) */
  }
}

.mobile-account {
  display: none;
}

.glitch-text {
  font-family: "Syncopate", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 0.9;
  text-align: center;
  color: var(--glow-primary);
  text-shadow:
    2px 0 var(--glow-secondary),
    -2px 0 var(--glow-primary);
  margin-bottom: 20px;
  letter-spacing: -2px;
  transition: all var(--theme-speed);
}

/* Tab System */
.unverified-medal {
  filter: brightness(0.5);
  transition: all 0.3s ease;
}

.unverified-medal:hover {
  filter: brightness(0.8);
}

.tab-system {
  width: 100%;
  max-width: 1000px;
  margin-bottom: 60px;
}

.tab-headers {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: -1px;
}

@media (max-width: 600px) {
  .tab-headers {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 15px;
  }

  .tab-btn {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
    clip-path: polygon(5% 0, 100% 0, 100% 80%, 95% 100%, 0 100%, 0 20%);
  }
}

.tab-btn {
  background: transparent;
  border: var(--vector-stroke) solid rgba(255, 255, 255, 0.1);
  color: #888;
  padding: 15px 30px;
  font-family: "Syncopate", sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s;
  clip-path: polygon(8% 0, 100% 0, 100% 70%, 92% 100%, 0 100%, 0 30%);
}

.tab-btn.active {
  border-color: var(--glow-primary);
  color: var(--glow-primary);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
  transform: translateY(-5px);
}

.tab-content {
  border: var(--vector-stroke) solid var(--glow-primary);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(15px);
  padding: 40px;
  display: none;
  animation: fadeIn 0.4s ease-out;
  transition: border-color var(--theme-speed);
}

@media (max-width: 800px) {
  .tab-content {
    padding: 25px 15px;
  }
}

.tab-content.active {
  display: block;
}

/* Tactical Tab List Item */
.tab-list-item {
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  /* Performance Optimization: Skip rendering of offscreen items */
  content-visibility: auto;
  contain-intrinsic-size: auto auto;
}

.tab-list-name {
  font-size: 0.9rem;
  flex: 1 1 auto;
  word-wrap: break-word;
}

.tab-list-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Content Styling */
.game-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.info-text,
.info-visuals {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.info-visuals {
  justify-content: space-evenly;
  gap: 20px;
}

.info-text {
  justify-content: space-between;
}

.feature-list {
  list-style: none;
}

.feature-list li {
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: #bbb;
  padding-left: 20px;
  position: relative;
}

.feature-list li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--glow-secondary);
  font-weight: bold;
  transition: color var(--theme-speed);
}

/* Video CRT Effect */
.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--glow-primary);
  background: #000;
  transition: border-color var(--theme-speed);
  overflow: hidden;
  padding: 1px;
}

.video-box {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
    linear-gradient(
      90deg,
      rgba(255, 0, 0, 0.04),
      rgba(0, 255, 0, 0.01),
      rgba(0, 0, 255, 0.04)
    );
  background-size:
    100% 3px,
    3px 100%;
  pointer-events: none;
  z-index: 2;
}

.video-container::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at center,
    transparent 30%,
    rgba(0, 0, 0, 0.3) 100%
  );
  pointer-events: none;
  z-index: 3;
}

.store-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 30px;
}

.store-link {
  border: 1px solid var(--glow-primary);
  padding: 15px;
  text-align: center;
  text-decoration: none;
  color: var(--glow-primary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
}

.store-link:hover {
  background: var(--glow-primary);
  color: #000;
  box-shadow: 0 0 20px var(--glow-primary);
}

.store-btn {
  border: 1px solid var(--glow-primary);
  padding: 15px;
  text-align: center;
  text-decoration: none;
  color: var(--glow-primary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.3s;
  display: flex;
  font-family: "JetBrains Mono", monospace;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  max-width: 100%;
  box-sizing: border-box;
}

.store-btn:hover {
  background: var(--glow-primary);
  color: #000;
  box-shadow: 0 0 20px var(--glow-primary);
}

.danger-link {
  border: 1px solid #ff0044;
  padding: 15px;
  text-align: center;
  text-decoration: none;
  color: #ff0044;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 0, 68, 0.05);
  max-width: 100%;
  box-sizing: border-box;
}

.danger-link:hover {
  background: #ff0044;
  color: #000;
  box-shadow: 0 0 20px #ff0044;
}

.danger-btn {
  border: 1px solid #ff0044;
  padding: 15px;
  text-align: center;
  text-decoration: none;
  color: #ff0044;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.3s;
  display: flex;
  font-family: "JetBrains Mono", monospace;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  background: rgba(255, 0, 68, 0.05);
  max-width: 100%;
  box-sizing: border-box;
}

.danger-btn:hover {
  background: #ff0044;
  color: #000;
  box-shadow: 0 0 20px #ff0044;
}

/* Danger Utilities */
.text-danger-tactical {
  color: #ff0044 !important;
}
.border-danger-tactical {
  border-color: #ff0044 !important;
}
.bg-danger-tactical {
  background: #ff0044 !important;
  color: #000 !important;
}
.glow-danger-tactical {
  box-shadow: 0 0 30px rgba(255, 0, 68, 0.2) !important;
}

.title-img {
  max-width: 100%;
  height: auto;
}

/* News Feed Section */
.news-feed-container {
  width: 100%;
  max-width: 1000px;
  margin-top: 40px;
  padding: 40px 0;
}

.news-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
}

.header-line {
  flex-grow: 1;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--glow-primary),
    transparent
  );
  opacity: 0.3;
}

.news-title {
  font-family: "Syncopate", sans-serif;
  font-size: 1rem;
  letter-spacing: 4px;
  color: var(--glow-primary);
  white-space: nowrap;
}

.news-grid {
  display: grid;
  max-width: 700px;
  grid-template-columns: 1fr;
  gap: 20px;
}

.news-grid-container {
  display: flex;
  justify-content: center;
}

footer {
  margin-top: auto;
  padding: 40px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.comm-hub {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.comm-link {
  width: 45px;
  height: 45px;
  border: 1px solid var(--glow-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  background: rgba(255, 255, 255, 0.02);
  clip-path: polygon(20% 0, 100% 0, 100% 80%, 80% 100%, 0 100%, 0 20%);
}

.comm-link:hover {
  background: var(--glow-primary);
  box-shadow: 0 0 15px var(--glow-primary);
  transform: translateY(-5px);
}

.comm-link img {
  width: 20px;
  height: 20px;
  filter: invert(0);
  transition: filter 0.3s;
}

.comm-link:hover img {
  filter: invert(1);
}

.copyright {
  opacity: 0.4;
  font-size: 0.7rem;
  letter-spacing: 4px;
  text-transform: uppercase;
}

@media (max-width: 800px) {
  .game-info-grid {
    grid-template-columns: 1fr;
  }
  .tab-btn {
    padding: 10px 15px;
    font-size: 0.6rem;
  }
}

/* Mastodon Post Styles */
.tactical-post {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  padding: 20px;
  margin-bottom: 30px;
  position: relative;
  transition: all 0.3s;
}

.tactical-post:hover {
  border-color: var(--glow-primary);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.post-user {
  display: flex;
  gap: 15px;
  align-items: center;
}

.avatar-frame {
  width: 46px;
  height: 46px;
  border: 1px solid var(--glow-primary);
  padding: 2px;
  clip-path: polygon(20% 0, 100% 0, 100% 80%, 80% 100%, 0 100%, 0 20%);
}

.avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-meta .display-name a {
  color: var(--glow-primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.user-meta .handle {
  color: #666;
  font-size: 0.7rem;
}

.post-date a {
  color: var(--glow-secondary);
  text-decoration: none;
  font-size: 0.7rem;
  letter-spacing: 1px;
}

.post-content {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #ccc;
  margin-bottom: 15px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* .post-content a {
    color: var(--glow-primary);
    text-decoration: none;
    opacity: 0.8;
}

.post-content a:hover {
    opacity: 1;
    text-decoration: underline;
} */

.boost-notice {
  font-size: 0.6rem;
  color: var(--glow-secondary);
  margin: 10px 0;
  letter-spacing: 2px;
}

.boosted-post {
  border-left: 2px solid var(--glow-secondary);
  padding-left: 15px;
  margin-left: 5px;
}

.post-media {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.media-container {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.media-container img,
.media-container video {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 600px) {
  .tactical-post {
    padding: 15px;
  }
  .post-header {
    flex-direction: column;
    gap: 10px;
  }
  .post-date {
    align-self: flex-end;
  }
  .user-meta .display-name a {
    font-size: 0.8rem;
  }
}

/* Info Pages Theme (FAQ, Privacy, etc.) */
.info-container {
  width: 100%;
  max-width: 900px;
  margin: 40px auto;
  padding: 60px;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid var(--glow-primary);
  position: relative;
  clip-path: polygon(
    0 40px,
    40px 0,
    100% 0,
    100% calc(100% - 40px),
    calc(100% - 40px) 100%,
    0 100%
  );
}

@media (max-width: 600px) {
  .info-container {
    padding: 30px 20px;
    clip-path: polygon(
      0 20px,
      20px 0,
      100% 0,
      100% calc(100% - 20px),
      calc(100% - 20px) 100%,
      0 100%
    );
  }
}

@media (max-width: 400px) {
  .info-container {
    padding: 25px 15px;
  }
}

.info-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
    circle at 2px 2px,
    rgba(255, 255, 255, 0.05) 1px,
    transparent 0
  );
  background-size: 20px 20px;
  pointer-events: none;
  z-index: -1;
}

.info-title {
  font-family: "Syncopate", sans-serif;
  font-size: clamp(1.2rem, 5vw, 2.5rem);
  color: var(--glow-primary);
  text-shadow: 0 0 15px var(--glow-primary);
  margin-bottom: 40px;
  letter-spacing: 2px;
  border-bottom: 2px solid var(--glow-secondary);
  display: inline-block;
  padding-bottom: 10px;
  max-width: 100%;
  word-wrap: break-word;
}

.info-section {
  margin-bottom: 20px;
  width: 100%;
}

.info-section h3 {
  font-family: "Michroma", sans-serif;
  color: var(--glow-primary);
  font-size: clamp(0.9rem, 3vw, 1.1rem);
  margin-bottom: 20px;
  letter-spacing: 1px;
  word-wrap: break-word;
}

.info-section h3::before {
  content: "//";
  margin-right: 0.8em;
  color: var(--glow-secondary);
}

.info-content {
  font-size: 0.9rem;
  line-height: 1.8;
  color: #ccc;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.info-content img,
.info-content code,
.info-content video {
  max-width: 100%;
  height: auto;
}

.info-content b,
.info-content strong {
  color: var(--glow-primary);
  font-weight: 700;
}

.link,
.post-content a {
  color: var(--glow-secondary);
  text-decoration: none;
  border-bottom: 1px dashed var(--glow-secondary);
  transition: all 0.3s;
}

.link:hover,
.post-content a:hover {
  color: var(--glow-primary);
  border-bottom: 1px solid var(--glow-primary);
  text-shadow: 0 0 8px var(--glow-primary);
}

.info-list {
  list-style: none;
  margin: 20px 0;
}

.info-list li {
  margin-bottom: 10px;
  padding-left: 25px;
  position: relative;
}

.info-list li::before {
  content: "■";
  position: absolute;
  left: 0;
  color: var(--glow-primary);
  font-size: 0.8rem;
  top: 2px;
}

/* Leaderboard Specific */
.lb-menu {
  list-style: none;
  margin: 20px 0 40px;
}

.lb-menu li {
  margin-bottom: 15px;
}

.lb-table-container {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--glow-primary);
  background: rgba(0, 0, 0, 0.4);
  margin: 20px 0;
}

.tactical-table {
  width: 100%;
  border-collapse: collapse;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  text-align: center;
}

.tactical-table th {
  background: rgba(var(--glow-primary), 0.1);
  color: var(--glow-primary);
  padding: 15px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.75rem;
  border-bottom: 2px solid var(--glow-primary);
}

.tactical-table td {
  padding: 12px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #ccc;
  transition: all 0.2s;
}

.tactical-table tr {
  /* Performance Optimization: Skip rendering of offscreen rows */
  content-visibility: auto;
  contain-intrinsic-size: auto auto;
}

.tactical-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.tactical-table tr:hover td {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.tactical-table .colorize a,
.tactical-table .colorize span {
  text-decoration: none;
}

.sigm {
  color: var(--glow-secondary);
  font-size: 0.75rem;
  opacity: 0.8;
}

.tactical-flag-container {
  display: inline-block;
  position: relative;
  line-height: 0;
  width: 28px;
  height: 21px;
  border: 1px solid rgba(var(--glow-primary), 0.4);
  border-radius: 5px;
  background: #000;
  overflow: hidden;
  vertical-align: middle;
}

.tactical-flag-container .fi {
  width: 100%;
  height: 100%;
  transform: scale(1.1); /* Slight zoom to hide package-specific borders */
}

.lb-link {
  display: block;
  padding: 15px 25px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
  letter-spacing: 1px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  overflow-wrap: break-word;
  word-break: break-word;
}

.lb-link::before {
  content: ">";
  display: inline-block;
  vertical-align: middle;
  margin-right: 15px;
  color: var(--glow-primary);
  font-weight: bold;
  transition: transform 0.3s;
}

.lb-link:hover {
  border-color: var(--glow-primary);
  background: rgba(var(--glow-primary), 0.1);
  box-shadow: inset 0 0 20px rgba(var(--glow-primary), 0.05);
  padding-left: 35px;
}

.lb-link:hover::before {
  transform: translateX(5px);
  text-shadow: 0 0 8px var(--glow-primary);
}

.lb-link::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.05),
    transparent
  );
  transition: 0.5s;
}

.lb-link:hover::after {
  left: 100%;
}

.lb-link-icon {
  color: var(--glow-primary);
  margin-right: 8px;
  vertical-align: middle;
}

/* Tactical Buttons & Groups */
.btn-group {
  display: inline-flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px;
  margin-bottom: 20px;
  clip-path: polygon(
    5px 0,
    100% 0,
    100% calc(100% - 5px),
    calc(100% - 5px) 100%,
    0 100%,
    0 5px
  );
  max-width: 100%;
}

@media (max-width: 600px) {
  .btn-group {
    display: flex;
    flex-wrap: wrap;
    clip-path: none;
    background: transparent;
    padding: 0;
    gap: 5px;
  }

  .tactical-btn {
    flex: 1 1 auto;
    text-align: center;
    clip-path: polygon(
      5px 0,
      100% 0,
      100% calc(100% - 5px),
      calc(100% - 5px) 100%,
      0 100%,
      0 5px
    );
  }
}

.tactical-btn {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #888;
  padding: 10px 20px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
}

.tactical-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.tactical-btn.active {
  background: var(--glow-primary);
  color: #000;
  border-color: var(--glow-primary);
  box-shadow: 0 0 15px var(--glow-primary);
}

/* Tactical Collapse */
.tactical-collapse-trigger {
  background: transparent;
  border: 1px solid var(--glow-secondary);
  color: var(--glow-secondary);
  padding: 8px 16px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 2px;
  cursor: pointer;
  margin-bottom: 15px;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tactical-collapse-trigger::before {
  content: "[+]";
  font-weight: bold;
}

.tactical-collapse-trigger.active {
  background: var(--glow-secondary);
  color: #000;
}

.tactical-collapse-trigger.active::before {
  content: "[-]";
}

.tactical-collapse-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0, 1, 0, 1);
  background: rgba(var(--glow-secondary), 0.05);
  border-left: 2px solid var(--glow-secondary);
}

.tactical-collapse-content.active {
  max-height: 1000px;
  transition: max-height 0.4s ease-in;
  margin-bottom: 30px;
}

.alert-tactical {
  padding: 20px;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #ccc;
}

/* Tactical Search */
.tactical-search-container {
  width: 100%;
  margin-bottom: 20px;
  position: relative;
}

.tactical-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 15px 20px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
  letter-spacing: 1px;
  transition:
    border-color 0.3s,
    background-color 0.3s,
    box-shadow 0.3s;
  outline: none;
  resize: vertical;
}

.tactical-input:focus {
  border-color: var(--glow-primary);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 15px rgba(var(--glow-primary), 0.1);
}

.tactical-input option {
  background-color: #0a0a0a;
  color: #fff;
}

.tactical-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
}

/* Tactical Form Components */
.tactical-switch {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  cursor: pointer;
  user-select: none;
}

.tactical-switch-input {
  display: none;
}

.tactical-switch-rail {
  width: 40px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(var(--glow-primary-rgb), 0.3);
  position: relative;
  transition: all 0.3s;
  flex-shrink: 0;
}

.tactical-switch-thumb {
  width: 12px;
  height: 12px;
  background: #888;
  position: absolute;
  top: 3px;
  left: 4px;
  transition: all 0.3s;
}

.tactical-switch-input:checked + .tactical-switch-rail {
  background: rgba(var(--glow-primary-rgb), 0.2);
  border-color: var(--glow-primary);
}

.tactical-switch-input:checked + .tactical-switch-rail .tactical-switch-thumb {
  left: 22px;
  background: var(--glow-primary);
  box-shadow: 0 0 10px var(--glow-primary);
}

.tactical-input-group {
  display: flex;
  margin-bottom: 20px;
  width: 100%;
}

.tactical-input-group .tactical-input {
  flex: 1;
  min-width: 0;
}

@media (max-width: 500px) {
  .tactical-input-group {
    flex-direction: column;
  }

  .tactical-input-prefix {
    border-right: 1px solid rgba(var(--glow-primary-rgb), 0.3) !important;
    border-bottom: none;
  }
}

.tactical-input-prefix {
  background: rgba(var(--glow-primary-rgb), 0.1);
  border: 1px solid rgba(var(--glow-primary-rgb), 0.3);
  border-right: none;
  color: var(--glow-secondary);
  padding: 15px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  letter-spacing: 1px;
  white-space: nowrap;
}

/* FAQ Specific */
.faq-list {
  list-style: none;
}

.faq-item {
  margin-bottom: 40px;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  padding-left: 25px;
  transition: border-color 0.3s;
}

.faq-item:hover {
  border-left-color: var(--glow-primary);
}

.faq-question {
  font-family: "Michroma", sans-serif;
  color: var(--glow-primary);
  font-size: 1rem;
  margin-bottom: 15px;
  display: block;
}

.faq-answer {
  color: #bbb;
  font-size: 0.9rem;
  line-height: 1.6;
}

.faq-answer ul {
  margin-top: 15px;
}

@media (max-width: 700px) {
  .info-container {
    padding: 30px 20px;
    clip-path: none;
    border-radius: 0;
  }
}

/* Contributor Cards */
.contributor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
  width: 100%;
  margin: 20px 0 40px;
}

@media (max-width: 450px) {
  .contributor-grid {
    grid-template-columns: 1fr;
  }
}

.contributor-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  display: flex;
  gap: 20px;
  transition: all 0.3s;
  position: relative;
}

.contributor-card:hover {
  border-color: var(--glow-primary);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

.contributor-avatar-frame {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border: 1px solid var(--glow-primary);
  padding: 2px;
  clip-path: polygon(20% 0, 100% 0, 100% 80%, 80% 100%, 0 100%, 0 20%);
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contributor-avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contributor-avatar-frame i {
  font-size: 1.5rem;
  color: var(--glow-primary);
}

.contributor-details {
  flex-grow: 1;
  min-width: 0; /* Enable text truncation in flex items */
}

.contributor-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.contributor-id {
  min-width: 0;
}

.contributor-name {
  font-family: "Michroma", sans-serif;
  font-size: 0.95rem;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.contributor-role {
  font-size: 0.7rem;
  color: var(--glow-secondary);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
}

.contributor-links {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.contributor-link {
  color: #fff;
  font-size: 1rem;
  opacity: 0.5;
  transition: all 0.3s;
  text-decoration: none;
}

.contributor-link:hover {
  opacity: 1;
  color: var(--glow-primary);
  transform: translateY(-2px);
}

.contributor-bio {
  font-size: 0.8rem;
  color: #888;
  line-height: 1.4;
}

hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 20px 0;
}
