@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Press+Start+2P&display=swap');.app-header {
  position: relative;
  width: 100%;
  z-index: 1000;
}

@media (max-width: 992px) {
  .app-header {
    position: sticky;
    top: 0;
  }
}

.navbar {
  height: 75px;
  width: 100%;
  display: flex;
  align-items: center;
  margin-top: 20px;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, rgba(10, 11, 26, 0.8) 0%, rgba(20, 22, 54, 0.6) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 0 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  position: relative;
  z-index: 1020;
  display: flex;
  justify-content: space-between;
}

.navbar.menu-open {
  z-index: 3100;
  /* Higher than nav-menu-container (2500) */
}

.navbar-content {
  display: flex;
  align-items: center;
}

.logo-text {
  display: flex !important;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.navbar-logo-icon {
  width: 24px;
  height: 24px;
  filter: drop-shadow(1.5px 1.5px 0px rgba(0, 0, 0, 0.5));
}

.version-tag {
  font-size: 0.55rem;
  font-weight: 500;
  color: var(--color-secondary);
  background: rgba(6, 182, 212, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(6, 182, 212, 0.2);
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.8;
  margin-top: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.version-tag:hover {
  background: rgba(6, 182, 212, 0.25);
  border-color: rgba(6, 182, 212, 0.45);
  opacity: 1;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  color: #fff;
  margin-right: 2rem;
  transition: all 0.3s ease;
}

.navbar-brand:hover {
  color: #fff !important;
  text-shadow: 0 0 15px var(--color-gold-light);
  opacity: 1;
}

.nav-menu-container.desktop-only {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex: 1;
  justify-content: space-between;
}

.nav-menu-container.mobile-only {
  display: none;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 4000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.mobile-menu-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.navbar-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-family: 'Press Start 2P', cursive;
  font-weight: 400;
  font-size: 0.65rem;
  transition: all 0.3s ease;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--color-secondary);
  border-bottom-color: var(--color-secondary);
  text-shadow: var(--neon-glow-secondary);
}

/* Dropdown JOGAR */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-trigger {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dropdown-arrow {
  font-size: 0.7rem;
  opacity: 0.7;
  transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-arrow,
.nav-dropdown.dropdown-open .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(10, 11, 30, 0.95);
  backdrop-filter: blur(20px);
  min-width: 220px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(6, 182, 212, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 5px;
}

/* Desktop menu items: more spacing and clearer visual separation */
.nav-menu-container.desktop-only .navbar-links {
  gap: 0.85rem;
  align-items: center;
}

.nav-menu-container.desktop-only .navbar-links > .nav-link,
.nav-menu-container.desktop-only .navbar-links > .nav-dropdown > .dropdown-trigger {
  padding: 0.7rem 1rem;
  letter-spacing: 0.02em;
}

.nav-menu-container.desktop-only .navbar-links > .nav-link:hover,
.nav-menu-container.desktop-only .navbar-links > .nav-dropdown:hover > .dropdown-trigger {
  background: rgba(6, 182, 212, 0.08);
  border-color: rgba(6, 182, 212, 0.25);
}

.nav-menu-container.desktop-only .navbar-links > .nav-link:not(:last-child),
.nav-menu-container.desktop-only .navbar-links > .nav-dropdown {
  margin-right: 0.15rem;
}

.nav-menu-container.desktop-only .nav-dropdown {
  padding: 0;
}

.nav-menu-container.desktop-only .dropdown-trigger {
  border-bottom: 2px solid transparent;
}

.nav-dropdown.dropdown-open .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  color: #94a3b8;
  text-decoration: none;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding-left: 1.25rem;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.05);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.lang-switcher {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 12px;
  border-radius: var(--border-radius-md);
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.lang-switcher:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--neon-glow-secondary);
}

.lang-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  opacity: 0.6;
  filter: grayscale(0.5);
  padding: 0;
  overflow: visible;
}

.flag-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.lang-btn:hover {
  opacity: 1;
  filter: grayscale(0.1);
}

.lang-btn.active {
  opacity: 1;
  filter: grayscale(0);
}

.lang-btn.active .flag-img {
  border: 1.5px solid var(--color-secondary);
  box-shadow: 0 0 10px var(--color-secondary);
  animation: flag-pulse 2s infinite;
}

@keyframes flag-pulse {
  0% {
    box-shadow: 0 0 2px var(--color-secondary);
  }

  50% {
    box-shadow: 0 0 10px var(--color-secondary);
  }

  100% {
    box-shadow: 0 0 2px var(--color-secondary);
  }
}

.lang-label {
  display: none !important;
}

/* User Menu */
.user-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 4px 8px;
  border-radius: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-info:hover .user-avatar {
  transform: scale(1.08) rotate(4deg);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.5);
  border-color: rgba(6, 182, 212, 0.8);
}

.user-info:hover .user-name {
  color: #fff;
  text-shadow: 0 0 8px rgba(6, 182, 212, 0.3);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-name {
  font-size: 0.9rem;
  color: #e2e8f0;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-logout {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ef4444;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 3000;
}

.menu-close-btn {
  display: none;
}

.mobile-toggle .bar {
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.menu-open .mobile-toggle {
  /* No longer hiding the button completely, letting the 'open' class handle the X animation */
  z-index: 6000;
  /* Stay above everything else to allow closing */
}

.nav-action-btn {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  /* Removido margin-right para usar apenas o gap do container */
}

.nav-action-btn:hover {
  background: transparent;
  transform: scale(1.15);
}

.nav-action-btn.muted {
  opacity: 0.5;
  filter: grayscale(1);
}

.mobile-mute-btn {
  display: none !important;
}

/* Mobile Responsive */
@media (max-width: 992px) {
  .app-header {
    /* Padding lateral agora é gerenciado pela classe .container interna */
  }

  .navbar {
    margin-top: 15px;
    margin-bottom: 1.5rem;
    width: 100%;
    height: 60px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 1.5rem;
    display: flex;
    justify-content: center;
  }

  .navbar-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
  }

  .mobile-toggle {
    display: flex;
  }

  .mobile-toggle.open .bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }

  .mobile-toggle.open .bar:nth-child(2) {
    opacity: 0;
  }

  .mobile-toggle.open .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }

  .navbar-brand {
    font-size: 1.25rem;
    margin-right: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .navbar-brand .brand-name {
    display: none !important;
  }

  .navbar-brand .navbar-logo-icon {
    width: 101px !important;
    height: 101px !important;
    filter: drop-shadow(2px 3px 0px rgba(0, 0, 0, 0.6)) !important;
    z-index: 100 !important;
  }

  .navbar-brand .version-tag {
    display: none !important;
  }

  .nav-menu-container.desktop-only {
    display: none;
  }

  .nav-menu-container.mobile-only {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: rgba(10, 11, 22, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    flex-direction: column;
    justify-content: flex-start;
    padding: 80px 1.5rem 2rem;
    gap: 1.5rem;
    margin: 0;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9999;
    overflow-y: auto;
    visibility: hidden;
    pointer-events: none;
  }

  .nav-menu-container.mobile-only.mobile-open {
    transform: translateX(0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    z-index: 9999;
  }

  .navbar-links {
    flex-direction: column;
    width: 100%;
    gap: 1.5rem;
  }

  .nav-link {
    font-size: 0.7rem;
    width: 100%;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .navbar-actions {
    flex-direction: column;
    width: 100%;
    align-items: flex-start;
    gap: 2rem;
  }

  .lang-switcher {
    width: auto;
    justify-content: center;
    padding: 8px;
    margin: 10px auto;
  }

  .user-menu {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 1.5rem;
  }

  .login-nav-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
  }

  .mobile-menu-header {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 2600;
  }

  .menu-close-btn {
    display: block;
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
  }

  .mobile-mute-btn {
    display: flex !important;
    padding: 6px;
    font-size: 1.1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #fff;
    z-index: 3000;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .mobile-mute-btn:hover {
    background: transparent;
    transform: scale(1.15);
  }

  .mobile-mute-btn.muted {
    opacity: 0.5;
    filter: grayscale(1);
  }
}

/* Medium Desktop Screens (Prevent Link Overlapping) */
@media (min-width: 993px) and (max-width: 1300px) {
  .navbar-brand {
    margin-right: 1rem !important;
  }
  .nav-menu-container.desktop-only {
    gap: 1rem !important;
  }
  .navbar-links {
    gap: 0.75rem !important;
  }
  .nav-link {
    font-size: 0.55rem !important;
  }
  .navbar-actions {
    gap: 0.75rem !important;
  }
  .lang-switcher {
    padding: 4px 8px !important;
    gap: 8px !important;
  }
  .user-menu {
    gap: 0.75rem !important;
  }
  .user-name {
    font-size: 0.8rem !important;
  }
  .user-logged-out-layout {
    gap: 0.75rem !important;
  }
}

/* User Menu Logged-In Layout */
.user-logged-in-layout {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.user-menu-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-actions-subrow {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-controls-group {
  display: flex;
  align-items: center;
  background: rgba(10, 11, 26, 0.5);
  padding: 6px 16px;
  border-radius: 30px;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.03), 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-controls-group:hover {
  border-color: rgba(6, 182, 212, 0.25);
  background: rgba(10, 11, 26, 0.75);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.lang-switcher-inline {
  display: flex;
  gap: 10px;
}

.user-controls-group .separator {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.1);
}

.sound-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a1a1aa;
}

.sound-btn:hover {
  color: var(--color-secondary);
  text-shadow: 0 0 8px rgba(6, 182, 212, 0.8);
  transform: scale(1.15);
}

.sound-btn.muted {
  opacity: 0.5;
  filter: grayscale(1);
}

.btn-logout-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a1a1aa;
  transition: all 0.2s ease;
}

.btn-logout-icon:hover {
  color: #ef4444;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
  transform: scale(1.15);
}

.user-logged-out-layout {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Sub-navbar under the main navbar when logged in */
@media (min-width: 993px) {
  .navbar:has(+ .user-sub-navbar) {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
  }
  .navbar:has(+ .user-sub-navbar) .nav-menu-container.desktop-only {
    justify-content: center;
  }
}

.user-sub-navbar {
  display: none;
  position: relative;
  z-index: 1010;
}

@media (min-width: 993px) {
  .user-sub-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -1.5rem;
    margin-bottom: 1.5rem;
    padding: 12px 2rem;
    /* background: linear-gradient(180deg, rgba(10, 11, 26, 0.65) 0%, rgba(16, 18, 43, 0.45) 100%); */
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 0 0 var(--border-radius-md) var(--border-radius-md) !important;
    border: 1px solid rgba(6, 182, 212, 0.12);
    /* border-top: none !important; */
    /* box-shadow: 0 15px 35px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 20px rgba(6, 182, 212, 0.03); */
    width: 100%;
    transition: all 0.3s ease;
  }
}

/* Message Center / Notifications Dropdown */
.notification-bell-container {
  position: relative;
}

.notification-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.15rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a1a1aa;
  position: relative;
  transition: all 0.2s ease;
}

.notification-btn:hover {
  color: var(--color-secondary);
  transform: scale(1.1);
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.8);
}

.notification-btn.has-unread {
  animation: bell-swing 1.5s ease infinite alternate;
}

.notification-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  padding: 2px 5px;
  font-size: 0.6rem;
  font-weight: 800;
  font-family: sans-serif;
  line-height: 1;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
}

.notification-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  transform: translateY(12px);
  background: rgba(10, 11, 26, 0.98);
  backdrop-filter: blur(25px);
  min-width: 320px;
  max-width: 360px;
  border-radius: 12px;
  border: 1px solid rgba(6, 182, 212, 0.25);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(6, 182, 212, 0.15);
  z-index: 5000;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

.notification-header h4 {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.notification-actions {
  display: flex;
  gap: 8px;
}

.btn-link-action {
  background: transparent;
  border: none;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-secondary);
  cursor: pointer;
  transition: all 0.2s;
  padding: 2px 6px;
  border-radius: 4px;
}

.btn-link-action:hover {
  background: rgba(6, 182, 212, 0.1);
  color: #fff;
}

.btn-link-action.danger {
  color: #ef4444;
}

.btn-link-action.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #fff;
}

.notification-list {
  max-height: 250px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

/* Custom Scrollbar for Notifications list */
.notification-list::-webkit-scrollbar {
  width: 4px;
}

.notification-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

.notification-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.notification-empty {
  text-align: center;
  padding: 1.5rem;
  color: #64748b;
  font-size: 0.75rem;
  font-style: italic;
}

.notification-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.6rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid #64748b;
  gap: 8px;
  transition: all 0.2s;
}

.notification-item.unread {
  background: rgba(6, 182, 212, 0.04);
}

.notification-item.award {
  border-left-color: var(--color-gold-light);
}

.notification-item.info {
  border-left-color: var(--color-secondary);
}

.notification-item-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.notification-item-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  text-align: left;
}

.notification-item-content {
  font-size: 0.7rem;
  color: #94a3b8;
  line-height: 1.3;
  text-align: left;
}

.notification-item-time {
  font-size: 0.6rem;
  color: #475569;
  align-self: flex-start;
}

.btn-delete-notification {
  background: transparent;
  border: none;
  color: #475569;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 2px;
  transition: color 0.2s;
}

.btn-delete-notification:hover {
  color: #ef4444;
}

@keyframes bell-swing {
  0% { transform: rotate(0); }
  20% { transform: rotate(15deg); }
  40% { transform: rotate(-10deg); }
  60% { transform: rotate(5deg); }
  80% { transform: rotate(-5deg); }
  100% { transform: rotate(0); }
}

.notification-badge-menu {
  background: #ef4444;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.6rem;
  font-weight: 800;
  font-family: sans-serif;
  line-height: 1;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
  display: inline-block;
  vertical-align: middle;
  margin-left: 5px;
}

/* Desktop Dropdown grouping */
.dropdown-section-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.5rem;
  color: var(--color-secondary);
  padding: 0.5rem 0.75rem 0.25rem 0.75rem;
  letter-spacing: 0.05em;
  opacity: 0.8;
  text-transform: uppercase;
  border-bottom: 1px dashed rgba(6, 182, 212, 0.15);
  margin-bottom: 0.25rem;
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0.5rem 0.5rem;
}

/* Mobile Accordion */
.mobile-accordion {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.mobile-accordion .accordion-trigger {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  cursor: pointer;
  outline: none;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.65rem;
  color: var(--text-secondary);
  padding: 0.75rem 0;
  transition: all 0.3s ease;
}

.mobile-accordion .accordion-trigger:hover {
  color: var(--color-secondary);
  text-shadow: var(--neon-glow-secondary);
}

.mobile-accordion .accordion-arrow {
  font-size: 0.6rem;
  color: var(--text-secondary);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-accordion.open .accordion-arrow {
  transform: rotate(90deg);
  color: var(--color-secondary);
}

.mobile-accordion .accordion-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-left: 1rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.mobile-accordion.open .accordion-content {
  max-height: 250px;
  opacity: 1;
  padding-top: 0.25rem;
  padding-bottom: 0.5rem;
}

.mobile-accordion .sub-link {
  font-size: 0.6rem !important;
  padding: 0.4rem 0.5rem !important;
  opacity: 0.9;
  border-left: 2px solid rgba(6, 182, 212, 0.2);
  transition: all 0.2s ease;
}

.mobile-accordion .sub-link:hover {
  border-left-color: var(--color-secondary);
  background: rgba(6, 182, 212, 0.05);
  padding-left: 0.75rem !important;
}
.page-header-standard {
  margin-bottom: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Centraliza o conteúdo horizontalmente */
  text-align: center;
}

.page-header-standard .header-content {
  padding: 20px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
}

.page-header-standard h1 {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  margin: 0px 0px 0.2rem 0px !important;
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1.4;
  text-align: center;
}

.page-header-standard .subtitle {
  font-family: 'Outfit', sans-serif;
  color: var(--color-text-dim, #94a3b8);
  font-size: 1.1rem;
  max-width: 800px;
  line-height: 1.6;
  margin-left: auto;
  margin-right: auto;
}

.page-header-standard .header-extra {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
  gap: 1rem;
}

/* Utilitário para centralizar extras (Ex: Multiplayer Badge) */
.page-header-standard.header-extra-centered .header-extra {
  align-items: center;
  text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {

  .page-header-standard h1 {
    font-size: clamp(1rem, 4.5vw, 1.4rem);
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
  }

  .page-header-standard .header-content {
    padding-left: 0;
    padding-right: 0;
  }

  .page-header-standard .subtitle {
    font-size: 0.9rem;
  }

}.home-page {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 1.25rem 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mb-60 {
  margin-bottom: 3.75rem;
}

.mb-30 {
  margin-bottom: 1.875rem;
}

.mb-140 {
  margin-bottom: 8.75rem;
}

.home-hero-shell-vertical {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.home-scene-panel {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  width: 100%;
  border-radius: var(--border-radius-lg);
  display: flex;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.hero-actions-center {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
  margin-top: 0.5rem;
}

.home-copy-panel .logo-container {
  width: 100%;
  display: flex;
  justify-content: center;
}

.home-copy-panel .page-title.logo-text {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1.3;
  margin: 0 auto 0.75rem;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.home-copy-panel .logo-text .h1-primary {
  color: var(--text-primary) !important;
  text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.6);
}

.home-copy-panel .logo-text .text-gradient-gold {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(4px 4px 0px rgba(0, 0, 0, 0.6));
}

/* .home-scene-panel foi mesclado acima com fundo transparente */

.home-hero-poster-img,
.home-hero-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 0;
  max-height: 500px;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 25px rgba(156, 199, 255, 0.15), inset 0 0 20px rgba(255, 255, 255, 0.05);
  display: block;
}

.home-hero-video {
  background: rgba(5, 7, 22, 0.85);
}

.home-video-sound-toggle {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 38px;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 8px;
  background: rgba(8, 12, 30, 0.82);
  color: #ffffff;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.58rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.2), 0 8px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.home-video-sound-toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 79, 191, 0.65);
  box-shadow: 0 0 22px rgba(255, 79, 191, 0.28), 0 10px 24px rgba(0, 0, 0, 0.42);
}

.home-video-sound-toggle.enabled {
  border-color: rgba(34, 197, 94, 0.65);
  background: rgba(9, 35, 30, 0.86);
}

.home-video-sound-icon {
  font-family: system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1;
}

.home-hero-speech-bubble {
  position: absolute;
  top: 41%;
  left: 6%;
  max-width: 380px;
  background: rgba(26, 15, 46, 0.9);
  border: 2px solid var(--color-primary);
  border-radius: 12px;
  padding: 0.8rem 1.1rem;
  box-shadow: 0 0 15px rgba(255, 0, 127, 0.3), 4px 4px 0px rgba(0, 0, 0, 0.5);
  z-index: 10;
  backdrop-filter: blur(8px);
  animation: float-bubble 4s ease-in-out infinite alternate, fade-in-bubble 0.6s ease-out;
}

.speech-bubble-tail {
  position: absolute;
  top: -10px;
  right: 60px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid var(--color-primary);
}

.speech-bubble-tail::after {
  content: '';
  position: absolute;
  top: 2px;
  left: -8px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid rgba(26, 15, 46, 0.9);
}

.speech-bubble-text {
  margin: 0;
  font-size: 0.75rem;
  font-family: 'Press Start 2P', cursive;
  line-height: 1.5;
  color: #fff;
  text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.8);
}

@keyframes float-bubble {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

@keyframes fade-in-bubble {
  from { opacity: 0; transform: scale(0.9) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@media (max-width: 768px) {
  .home-hero-speech-bubble {
    top: 55%;
    left: 5%;
    right: 5%;
    max-width: none;
    padding: 0.6rem 0.9rem;
  }
  
  .speech-bubble-text {
    font-size: 0.65rem;
  }
  
  .speech-bubble-tail {
    top: -10px;
    bottom: auto;
    left: 40px;
    right: auto;
    border-top: 0;
    border-bottom: 10px solid var(--color-primary);
  }
  
  .speech-bubble-tail::after {
    top: 2px;
    bottom: auto;
    left: -8px;
    right: auto;
    border-top: 0;
    border-bottom: 8px solid rgba(26, 15, 46, 0.9);
  }

  .home-video-sound-toggle {
    right: 0.75rem;
    bottom: 0.75rem;
    min-height: 34px;
    padding: 0.5rem 0.65rem;
    font-size: 0.5rem;
  }
}

.hero-hint {
  font-size: 0.75rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 0.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn-large {
  padding: 1rem 1.35rem;
  min-width: 210px;
}

.home-page .page-subtitle {
  max-width: 680px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1rem;
}

.features-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.feature-card {
  min-height: 200px;
  padding: 1.75rem 1.6rem;
  text-align: left;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  border-radius: var(--border-radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.95rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-card-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.85rem;
}

/* Card Categories styling to match HowToPlay API styling with Neon glows */
.feature-card.adventure .feature-card-title {
  color: var(--color-accent) !important;
}
.feature-card.adventure:hover {
  border-color: var(--color-accent);
  box-shadow: var(--neon-glow-accent), 0 10px 30px rgba(0, 0, 0, 0.5);
}

.feature-card.solo .feature-card-title {
  color: var(--color-primary) !important;
}
.feature-card.solo:hover {
  border-color: var(--color-primary);
  box-shadow: var(--neon-glow-primary), 0 10px 30px rgba(0, 0, 0, 0.5);
}

.feature-card.multiplayer .feature-card-title {
  color: var(--color-secondary) !important;
}
.feature-card.multiplayer:hover {
  border-color: var(--color-secondary);
  box-shadow: var(--neon-glow-secondary), 0 10px 30px rgba(0, 0, 0, 0.5);
}

.feature-card h3.feature-card-title {
  margin: 0;
  line-height: 1.45;
  font-size: 0.85rem;
  font-family: 'Press Start 2P', cursive;
}

.feature-card p {
  margin: 0;
  line-height: 1.6;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Pink Button to match Page Guide styling */
.btn-pink {
  background: #FF1EAD !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(255, 30, 173, 0.25) !important;
}

.btn-pink:hover {
  background: #ff4ab9 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(255, 30, 173, 0.5) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}

.btn-pink:active {
  transform: translateY(0px) !important;
  box-shadow: 0 4px 10px rgba(255, 30, 173, 0.2) !important;
}

/* Seções do Layout Bonx */
.press-start-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.2rem;
  text-transform: uppercase;
  color: #fbbf24;
  text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.6);
  margin-bottom: 0.75rem;
  letter-spacing: 1px;
}

.section-subtitle {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 0;
  filter: drop-shadow(2px 2px 0px rgba(0, 0, 0, 0.5));
  transition: transform 0.1s steps(2);
}

.feature-card:hover .feature-icon {
  transform: scale(1.15) rotate(-5deg);
}

/* Seção de Confrontos Recentes (Estilo Bonx) */
.upcoming_gaming_section {
  width: 100%;
}

.upcoming_gaming_inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.upcoming_gaming_list {
  background: var(--bg-secondary);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.upcoming_gaming_list:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.55);
}

.upcoming_gaming_text {
  flex: 1;
  text-align: left;
}

.upcoming_gaming_text .match-date {
  font-size: 0.75rem;
  font-family: monospace;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 0.4rem;
}

.upcoming_gaming_text h3 {
  margin: 0 0 0.5rem;
}

.upcoming_gaming_text h3 a {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8rem;
  color: #ffffff;
  line-height: 1.5;
  text-decoration: none;
  transition: color 0.1s steps(2);
}

.upcoming_gaming_text h3 a:hover {
  color: var(--color-accent);
}

.upcoming_gaming_text .match-tag {
  font-size: 0.65rem;
  font-weight: bold;
  color: var(--color-secondary);
  background: rgba(52, 164, 224, 0.1);
  border: 1px solid rgba(52, 164, 224, 0.2);
  padding: 2px 8px;
  display: inline-block;
}

.upcoming_play_video {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.play-icon-container {
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.play-icon-container:hover {
  transform: scale(1.15);
  background: var(--color-accent);
  box-shadow: 0 6px 15px rgba(250, 204, 21, 0.5);
  border-color: rgba(255, 255, 255, 0.2);
}

.play-arrow {
  color: #000000;
  font-size: 1.2rem;
  margin-left: 2px;
}

.play-label {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.upcoming_gaming_thumb {
  display: flex;
  align-items: center;
}

/* Confronto VS */
.vs-matchup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vs-avatar {
  width: 50px;
  height: 50px;
  background: rgba(10, 11, 22, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: var(--border-radius-md);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.vs-matchup:hover .vs-avatar {
  border-color: var(--color-secondary);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.3);
}

.vs-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.vs-badge {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.65rem;
  color: var(--color-accent);
  text-shadow: 2px 2px 0px #000;
  padding: 4px 8px;
  background: #000;
  border: 2px solid var(--color-accent);
}

/* Seção de Estatísticas (Estilo Bonx) */
.counterup_section {
  width: 100%;
}

.counterup_inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  width: 100%;
}

.single_counterup {
  background: var(--bg-secondary);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  padding: 1.5rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 120px;
  border-radius: var(--border-radius-lg);
  transition: all 0.3s ease;
}

.single_counterup:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.15);
}

.counterup-number {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.4rem;
  margin: 0 0 0.5rem;
  text-shadow: 3px 3px 0px #000;
}

.counterup-number.color-accent {
  color: var(--color-accent);
}
.counterup-number.color-primary {
  color: var(--color-primary);
}
.counterup-number.color-secondary {
  color: var(--color-secondary);
}
.counterup-number.color-danger {
  color: var(--color-danger);
}

.counterup-label {
  font-family: monospace;
  font-weight: bold;
  font-size: 0.7rem;
  letter-spacing: 1px;
  color: var(--text-muted);
}

/* Responsividade de Seções Adicionais */
@media (max-width: 980px) {
  .home-hero-shell {
    grid-template-columns: 1fr;
  }

  .home-copy-panel,
  .home-scene-panel,
  .home-hero-poster-img {
    min-height: 0;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .counterup_inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .upcoming_gaming_list {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1rem;
    gap: 1.25rem;
  }
  
  .upcoming_gaming_text {
    text-align: center;
  }
  
  .upcoming_gaming_text h3 a {
    font-size: 0.75rem;
  }
}

@media (max-width: 600px) {
  .home-page {
    padding: 1rem 0.85rem 3rem;
  }

  .home-page .page-title {
    font-size: clamp(1.5rem, 0.5vw, 2.4rem);
    line-height: 0.92;
    letter-spacing: 0.05em;
  }

  .home-copy-panel {
    padding: 1.25rem 1.15rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn-large {
    width: 100%;
    min-width: 0;
  }

  .home-copy-panel,
  .home-scene-panel,
  .home-hero-poster-img {
    min-height: 0;
  }

  .home-hero-poster-img {
    aspect-ratio: 16 / 11;
  }
  
  .press-start-title {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .counterup_inner {
    grid-template-columns: 1fr;
  }
}

.home-title-with-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.home-logo-icon {
  width: 101px;
  height: 101px;
  filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.4));
  transform: translateY(-10px);
}

@media (max-width: 768px) {
  .home-logo-icon {
    width: 38px;
    height: 38px;
    transform: translateY(-3px);
  }
  .home-title-with-logo {
    gap: 12px;
  }
}
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  min-width: 280px;
  max-width: 400px;
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 20px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  animation: toastSlideIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.toast-item:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: var(--color-primary-neon, #ffd700);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  flex-shrink: 0;
}

.toast-item.success {
  border-left: 4px solid #10b981;
}
.toast-item.success .toast-icon {
  background: #10b981;
  color: white;
}

.toast-item.error {
  border-left: 4px solid #ef4444;
}
.toast-item.error .toast-icon {
  background: #ef4444;
  color: white;
}

.toast-message {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
}
.app-footer-bar {
  background: rgba(18, 7, 43, 0.75); /* Theme purple translucent */
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.5rem 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-top: 20px;
  font-size: 0.8rem;
  z-index: 10;
}

.footer-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.footer-left {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-logo {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.55rem;
  color: var(--color-accent);
  text-shadow: 0 0 8px rgba(255, 190, 26, 0.4);
  letter-spacing: 1px;
}

.footer-copyright {
  color: var(--text-muted);
  font-weight: 500;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.footer-link:hover {
  color: var(--color-secondary);
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}

.footer-sep {
  color: rgba(255, 255, 255, 0.1);
  user-select: none;
}

@media (max-width: 600px) {
  .footer-content {
    gap: 0.75rem;
  }
}
/* CSS Variables & Tokens specific to Pit Stop Redesign */
.pit-stop-container {
  --neon-blue: #00ffff;
  --neon-pink: #ff00ff;
  --neon-purple: #a78bfa;
  --neon-yellow: #facc15;
  --racer-gold: #fbbf24;
  --bg-deep: #090b11;
  --bg-card: rgba(13, 18, 33, 0.75);
  --border-cyan: rgba(0, 255, 255, 0.2);
  --border-pink: rgba(255, 0, 255, 0.2);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  font-family: var(--font-family);
  color: var(--text-primary);
  background: transparent;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 1.5rem;
  overflow-y: auto;
  position: relative;
}

/* Header design */
.pit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  gap: 1.5rem;
}

.header-left-group {
  display: flex;
  align-items: center;
  gap: 20px;
}

.pit-back-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pit-back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.08);
}

.pit-title-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* ── live-tag removed ── */

.pit-main-title {
  font-size: 2.2rem;
  font-weight: 900;
  margin: 0;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fff 30%, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.championship-progress {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.progress-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--text-secondary);
}

.progress-pills {
  display: flex;
  gap: 8px;
}

.progress-pill {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 900;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.progress-pill.current {
  background: rgba(255, 0, 255, 0.15);
  border-color: var(--neon-pink);
  color: var(--neon-pink);
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
}

.progress-pill.completed {
  background: rgba(0, 255, 255, 0.15);
  border-color: var(--neon-blue);
  color: var(--neon-blue);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.progress-pill.locked {
  opacity: 0.4;
}

/* Mobile Tabs Navigation */
.mobile-tabs {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 12px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.tab-btn.active {
  background: rgba(0, 255, 255, 0.1);
  border-color: var(--neon-blue);
  color: #fff;
  text-shadow: 0 0 8px var(--neon-blue);
  box-shadow: inset 0 0 10px rgba(0, 255, 255, 0.1), 0 4px 15px rgba(0, 255, 255, 0.15);
}

/* Main Grid Layout */
.pit-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: stretch;
}

/* Columns */
.pit-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Panel Design */
.pit-panel {
  background: var(--bg-card);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--border-cyan);
  border-radius: 12px;
  padding: 1.5rem;
  box-sizing: border-box;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.75rem;
}

.header-icon {
  font-size: 1.2rem;
}

.panel-header h2 {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  margin: 0;
  text-transform: uppercase;
  color: var(--neon-blue);
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

/* Holographic Robot Preview Box */
.holo-preview-box {
  position: relative;
  height: 180px;
  background: radial-gradient(circle at center, rgba(16, 24, 48, 0.8) 0%, rgba(8, 12, 24, 0.95) 100%);
  border: 1px solid rgba(0, 255, 255, 0.15);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.25rem;
  box-shadow: inset 0 0 20px rgba(0, 255, 255, 0.1);
}

.holo-grid-bg {
  position: absolute;
  inset: 0;
  background-size: 20px 20px;
  background-image: 
    linear-gradient(to right, rgba(0, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
  opacity: 0.75;
}

.scanner-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
  box-shadow: 0 0 10px var(--neon-blue);
  animation: scan 4s linear infinite;
  z-index: 2;
}

@keyframes scan {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}

.package-card .pkg-info,
.package-card .progress-bar-mini,
.package-card .progress-text {
  position: relative;
  z-index: 1;
}

/* panel subhead (e.g. #1 de 3) */
.panel-subhead {
  display: block;
  font-size: 0.75em;
  opacity: 0.7;
  margin-top: 3px;
  letter-spacing: 0;
  font-weight: 600;
  text-transform: none;
}

/* Garage body: preview box and skin list side-by-side when screen is wider, stack on mobile */
.garage-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 640px) {
  .garage-body {
    grid-template-columns: 1fr;
  }
}

/* Telemetry stats section */
.ps-telemetry {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.ps-telemetry-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 6px;
}

.ps-telemetry-title {
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--neon-blue);
}

.ps-telemetry-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.3;
}

.ps-stat-row {
  display: grid;
  grid-template-columns: 38px 1fr 32px;
  align-items: center;
  gap: 8px;
}

.ps-stat-label {
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--text-secondary);
  text-align: right;
}

.ps-stat-track {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.ps-stat-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.45s cubic-bezier(0.4,0,0.2,1);
}

.ps-stat-value {
  font-size: 0.65rem;
  font-weight: 800;
  color: #fff;
  text-align: right;
}

.robot-chassis-showcase {
  position: relative;
  z-index: 3;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.robot-avatar-glow {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateZ(20px);
}

.avatar-text {
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  text-transform: uppercase;
}

.chassis-reflection {
  position: absolute;
  width: 80px;
  height: 8px;
  background: radial-gradient(ellipse, rgba(0, 255, 255, 0.4), transparent 70%);
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  animation: hoverFloat 2.5s ease-in-out infinite alternate;
}

@keyframes hoverFloat {
  from { transform: translateX(-50%) scale(0.85); opacity: 0.5; }
  to { transform: translateX(-50%) scale(1.15); opacity: 0.9; }
}

.robot-info-badge {
  position: absolute;
  bottom: 10px;
  left: 15px;
  z-index: 4;
  text-align: left;
}

.robot-name {
  font-size: 0.95rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.robot-type {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--neon-blue);
  opacity: 0.8;
}

/* Telemetry Specs Section */
.telemetry-specs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.specs-title {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 6px;
}

.telemetry-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 800;
}

.stat-label {
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.stat-value {
  color: #fff;
}

.stat-bar-bg {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.02);
}

.stat-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.stat-bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.15), transparent);
}

.bar-cyan { background: linear-gradient(90deg, #0ea5e9, var(--neon-blue)); }
.bar-pink { background: linear-gradient(90deg, #db2777, var(--neon-pink)); }
.bar-yellow { background: linear-gradient(90deg, #d97706, var(--neon-yellow)); }
.bar-purple { background: linear-gradient(90deg, #7c3aed, var(--neon-purple)); }

.spec-description {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 4px 0 0 0;
  font-style: italic;
}

/* Skin Selector wrapper */
.skin-selector-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.selector-title {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
}

.skin-grid-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}

.skin-select-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-align: left;
}

.skin-select-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 255, 255, 0.3);
  transform: translateY(-1px);
}

.skin-select-card.equipped {
  background: rgba(0, 255, 255, 0.06);
  border-color: var(--neon-blue);
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.15);
}

.card-indicator {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background-color: var(--neon-blue);
  border-radius: 0 3px 3px 0;
  transition: height 0.25s ease;
}

.skin-select-card.equipped .card-indicator {
  height: 60%;
}

.card-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
}

.card-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.skin-select-card.equipped .card-name {
  color: #fff;
}

/* Track Briefing Panel & Card */
.track-briefing-panel {
  border-color: var(--border-pink);
}

.track-briefing-panel h2 {
  color: var(--neon-pink);
  text-shadow: 0 0 10px rgba(255, 0, 255, 0.2);
}

.track-details-card {
  background: rgba(255, 0, 255, 0.02);
  border: 1px solid rgba(255, 0, 255, 0.1);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.track-header-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.track-tag {
  font-size: 0.6rem;
  font-weight: 900;
  color: var(--neon-pink);
  letter-spacing: 1px;
}

.difficulty-tag {
  font-size: 0.6rem;
  font-weight: 800;
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.3);
  color: var(--neon-yellow);
  padding: 2px 8px;
  border-radius: 10px;
}

.track-name {
  font-size: 1.3rem;
  font-weight: 900;
  margin: 0;
  color: #fff;
}

.track-description-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

.track-stats-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 10px;
  margin-top: 5px;
}

.mini-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.mini-label {
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.mini-val {
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
}

/* Action button */
.briefing-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.start-race-hint {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin: 0;
  letter-spacing: 0.3px;
}

.start-race-button {
  width: 100%;
  position: relative;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-blue));
  border: none;
  color: #fff;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 900;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(255, 0, 255, 0.35);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.start-race-button:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 6px 28px rgba(0, 255, 255, 0.5);
}

.start-race-button:active {
  transform: translateY(1px);
}

.btn-glow-layer {
  position: absolute;
  inset: 0;
  background: inherit;
  filter: blur(10px);
  opacity: 0.4;
  z-index: -1;
  border-radius: inherit;
}

/* Championship standings panel */
.standings-panel {
  border: 1px solid rgba(250, 204, 21, 0.5) !important;
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.15), 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.standings-panel .panel-header h2 {
  color: var(--neon-yellow) !important;
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.3) !important;
}

.player-rank-badge {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 900;
  background: rgba(0, 255, 255, 0.1);
  border: 1px solid var(--neon-blue);
  color: var(--neon-blue);
  padding: 3px 8px;
  border-radius: 4px;
}

.standings-list-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.standings-table-header {
  display: grid;
  grid-template-columns: 50px 1fr 100px;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-secondary);
  letter-spacing: 1px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.header-points {
  text-align: right;
}

.standings-item-row {
  display: grid;
  grid-template-columns: 50px 1fr 100px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  font-weight: 700;
  transition: background 0.2s ease;
}

.standings-item-row:last-child {
  border-bottom: none;
}

.player-row-highlight {
  background: rgba(0, 255, 255, 0.04);
  border-left: 3px solid var(--neon-blue);
  padding-left: 9px; /* adjust for border width to prevent shifting */
}

.racer-rank {
  font-weight: 900;
}

.rank-num {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.rank-num.rank-1 { color: var(--racer-gold); text-shadow: 0 0 6px rgba(251,191,36,0.3); }
.rank-num.rank-2 { color: #cbd5e1; }
.rank-num.rank-3 { color: #b45309; }

.racer-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.racer-name-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.racer-pts-bar-track {
  height: 3px;
  background: rgba(255,255,255,0.07);
  border-radius: 2px;
  overflow: hidden;
  width: 100%;
}

.racer-pts-bar-fill {
  height: 100%;
  border-radius: 2px;
  opacity: 0.55;
  transition: width 0.5s ease;
}

.racer-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.racer-name {
  font-size: 0.85rem;
  color: #fff;
}

.player-row-highlight .racer-name {
  color: var(--neon-blue);
  font-weight: 800;
}

.racer-score {
  text-align: right;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 2px;
}

.points-number {
  font-size: 0.95rem;
  font-weight: 900;
  color: #fff;
}

.player-row-highlight .points-number {
  color: var(--neon-blue);
}

.points-unit {
  font-size: 0.6rem;
  color: var(--text-secondary);
}

/* Footer Actions */
.pit-footer-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 0.5rem;
}

.exit-pit-button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.exit-pit-button:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  background: rgba(255,255,255,0.02);
}

/* Responsive Rules */
@media (max-width: 900px) {
  .pit-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 600px) {
  .pit-stop-container {
    padding: 1rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  .header-left-group {
    display: contents;
  }

  .pit-header {
    display: grid !important;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 1.2rem;
  }

  .pit-back-btn {
    grid-column: 1;
    grid-row: 1;
    width: fit-content;
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .championship-progress {
    grid-column: 2;
    grid-row: 1;
    align-items: flex-end;
  }

  .pit-title-wrapper {
    grid-column: 1 / span 2;
    grid-row: 2;
    width: 100%;
  }

  .pit-main-title {
    font-size: 1.6rem;
    white-space: nowrap;
  }

  .mobile-tabs {
    display: grid;
  }

  /* Hide columns based on tab selection on small devices */
  .tab-hidden {
    display: none !important;
  }

  .tab-visible {
    display: flex !important;
  }

  .skin-grid-selector {
    grid-template-columns: repeat(2, 1fr);
  }

  .panel-header {
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
  }

  .panel-header h2 {
    font-size: clamp(0.55rem, 3.1vw, 0.8rem) !important;
    white-space: nowrap;
  }

  .pit-panel {
    padding: 1rem !important;
  }

  .track-details-card {
    padding: 0.85rem !important;
  }

  .track-name {
    font-size: clamp(0.95rem, 5vw, 1.25rem) !important;
  }

  .player-rank-badge {
    margin-left: 0;
    width: max-content;
  }

  .standings-table-header, .standings-item-row {
    grid-template-columns: 40px 1fr 75px;
    padding: 8px 6px;
  }
}
/* Cyberpunk Premium Stylesheet for BattleRaceResult */
.cyber-result-screen {
  --neon-cyan: #00f3ff;
  --neon-pink: #ff0055;
  --neon-yellow: #facc15;
  --neon-purple: #9d4edd;
  --bg-dark: #0a0c14;
  --bg-panel: rgba(10, 12, 20, 0.2);
  --border-glow: rgba(0, 243, 255, 0.25);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --font-family: 'Outfit', sans-serif;

  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-color: rgba(6, 8, 14, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  /* Tech Vignette Gradient */
  background-image: 
    radial-gradient(circle at 50% 30%, rgba(0, 243, 255, 0.15), transparent 70%),
    radial-gradient(circle at 50% 70%, rgba(0, 162, 255, 0.1), transparent 75%);
  background-size: 100% 100%, 100% 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto;
  padding: 3rem 1.5rem;
  z-index: 99999;
  font-family: var(--font-family);
  color: var(--text-primary);
  box-sizing: border-box;
  /* Let content panels size correctly */
  --panel-flex: 0 0 auto;
}

/* Subtle scanline overlay animation */
.cyber-result-screen::before {
  content: " ";
  display: block;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  z-index: 10;
  background-size: 100% 3px, 3px 100%;
  pointer-events: none;
  opacity: 0.45;
}

.cyber-result-screen.podium-bg {
  background-image: 
    radial-gradient(circle at 50% 30%, rgba(255, 0, 85, 0.18), transparent 70%),
    radial-gradient(circle at 50% 70%, rgba(250, 204, 21, 0.1), transparent 75%);
}

.cyber-header-wrapper {
  text-align: center;
  margin-bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 20;
}

.cyber-title {
  font-size: 2.8rem;
  font-weight: 900;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 0 0 10px rgba(0, 243, 255, 0.5), 0 0 30px rgba(0, 243, 255, 0.2);
  margin: 0 0 0.8rem 0;
  position: relative;
  font-family: var(--font-family);
}

.cyber-title::after {
  content: "";
  display: block;
  width: 60%;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
  margin: 0.5rem auto 0 auto;
}

.cyber-title.trophy-title {
  font-size: 3.2rem;
  text-shadow: 0 0 15px rgba(255, 0, 85, 0.6), 0 0 35px rgba(255, 0, 85, 0.3);
}

.cyber-title.trophy-title::after {
  background: linear-gradient(90deg, transparent, var(--neon-pink), transparent);
}

.cyber-subtitle {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--neon-cyan);
  background: rgba(0, 243, 255, 0.05);
  border: 1px solid rgba(0, 243, 255, 0.3);
  text-shadow: 0 0 8px rgba(0, 243, 255, 0.4);
  padding: 0.5rem 1.8rem;
  border-radius: 4px;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: inline-block;
  margin: 0;
}

.cyber-subtitle.pink-accent {
  color: var(--neon-pink);
  background: rgba(255, 0, 85, 0.05);
  border-color: rgba(255, 0, 85, 0.3);
  text-shadow: 0 0 8px rgba(255, 0, 85, 0.4);
}

/* Cyber Panels */
.cyber-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-glow);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.05), inset 0 0 15px rgba(0, 243, 255, 0.02);
  border-radius: 8px;
  width: 100%;
  max-width: 800px;
  margin-bottom: 2rem;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
  z-index: 20;
  flex: var(--panel-flex, 0 0 auto);
  display: flex;
  flex-direction: column;
}

.cyber-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--neon-cyan);
  box-shadow: 0 0 10px var(--neon-cyan);
}

.cyber-panel.pink-theme::before {
  background: var(--neon-pink);
  box-shadow: 0 0 10px var(--neon-pink);
}

.cyber-panel.pink-theme {
  border-color: rgba(255, 0, 85, 0.25);
  box-shadow: 0 0 20px rgba(255, 0, 85, 0.05), inset 0 0 15px rgba(255, 0, 85, 0.02);
}

.cyber-panel.gold-theme::before {
  background: var(--neon-yellow);
  box-shadow: 0 0 10px var(--neon-yellow);
}

.cyber-panel.gold-theme {
  border-color: rgba(250, 204, 21, 0.45) !important;
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.08), inset 0 0 15px rgba(250, 204, 21, 0.02) !important;
}

.cyber-panel-title {
  margin: 0;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.cyber-panel-title-dot {
  width: 6px;
  height: 6px;
  background-color: var(--neon-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--neon-cyan);
  display: inline-block;
}

.pink-theme .cyber-panel-title-dot {
  background-color: var(--neon-pink);
  box-shadow: 0 0 8px var(--neon-pink);
}

/* Cyber Tables */
.cyber-table {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.cyber-table-body {
  max-height: 420px;
  overflow-y: auto;
  flex: 1;
}

/* Podium final standings: fixed scroll window so remaining racers are visible via scroll */
.podium-bg .cyber-table-body {
  max-height: 350px !important;
  overflow-y: auto;
  flex: none;
}

/* Gold scrollbar for podium table */
.podium-bg .cyber-table-body::-webkit-scrollbar {
  width: 4px;
}

.podium-bg .cyber-table-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

.podium-bg .cyber-table-body::-webkit-scrollbar-thumb {
  background: rgba(250, 204, 21, 0.4);
  border-radius: 4px;
}

.podium-bg .cyber-table-body::-webkit-scrollbar-thumb:hover {
  background: var(--neon-yellow);
}

.cyber-table-header {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 20px;
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
}

.cyber-table-row {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-weight: 700;
  font-size: 1rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.cyber-table-row:last-child {
  border-bottom: none;
}

.cyber-table-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.cyber-table-row.player-highlight {
  background: rgba(0, 243, 255, 0.06);
  border-left: 2px solid var(--neon-cyan);
  box-shadow: inset 5px 0 15px rgba(0, 243, 255, 0.05);
  font-weight: 900;
}

/* Column mappings */
.col-rank { width: 60px; font-weight: 900; font-family: monospace; color: var(--text-secondary); }
.col-driver { flex: 1; text-align: left; }
.col-time { width: 120px; text-align: center; color: var(--text-secondary); font-family: monospace; font-size: 0.95rem; }
.col-pts { width: 110px; text-align: right; font-weight: 900; font-family: monospace; }

.player-highlight .col-pts {
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(0, 243, 255, 0.3);
}

.player-highlight .col-rank {
  color: var(--neon-cyan);
}

/* Cyber Buttons & Actions */
.cyber-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
  z-index: 20;
}

.cyber-btn {
  font-family: var(--font-family);
  font-size: 1.2rem;
  font-weight: 900;
  color: #ffffff;
  padding: 0.9rem 3rem;
  background: transparent;
  border: 1px solid var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.15);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  transition: all 0.3s ease;
  clip-path: polygon(10px 0%, 100% 0%, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0% 100%, 0% 10px);
}

.cyber-btn::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: var(--neon-cyan);
  z-index: -1;
  opacity: 0.15;
  transition: all 0.3s ease;
}

.cyber-btn:hover {
  box-shadow: 0 0 25px rgba(0, 243, 255, 0.4);
  transform: translateY(-2px);
  border-color: #fff;
}

.cyber-btn:hover::before {
  opacity: 0.35;
}

.cyber-btn.pink-btn {
  border-color: var(--neon-pink);
  box-shadow: 0 0 15px rgba(255, 0, 85, 0.15);
}

.cyber-btn.pink-btn::before {
  background: var(--neon-pink);
}

.cyber-btn.pink-btn:hover {
  box-shadow: 0 0 25px rgba(255, 0, 85, 0.4);
}

.cyber-btn-link {
  background: none;
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.cyber-btn-link:hover {
  color: #fff;
  border-color: var(--neon-pink);
  text-shadow: 0 0 8px rgba(255, 0, 85, 0.5);
}

/* Cyber Podium Design */
.cyber-podium-container {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 20px;
  height: 400px;
  width: 100%;
  max-width: 600px;
  margin: 1rem auto 2.5rem auto;
  box-sizing: border-box;
  z-index: 20;
}

.cyber-podium-position {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  height: 100%;
  justify-content: flex-end;
  position: relative;
}

.podium-3d-model-wrapper {
  width: 100%;
  height: 160px;
  margin-bottom: -20px;
  z-index: 5;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.podium-3d-model-wrapper.first-model {
  height: 190px;
  margin-bottom: -25px;
}

.cyber-podium-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px 10px 20px 10px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: none !important;
  background: rgba(13, 18, 33, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  position: relative;
  transition: all 0.3s ease;
  box-sizing: border-box;
  flex: none; /* Do not flex size, use explicit heights */
}

.cyber-podium-column::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 3px;
  background: var(--text-secondary);
}

.cyber-podium-column:hover {
  transform: translateY(-5px);
  background: rgba(13, 18, 33, 0.85);
}

.cyber-podium-column.column-first {
  height: 180px;
  border-color: rgba(250, 204, 21, 0.4);
  box-shadow: 0 0 30px rgba(250, 204, 21, 0.08);
  z-index: 3;
}

.cyber-podium-column.column-first::before {
  background: var(--neon-yellow);
  box-shadow: 0 0 10px var(--neon-yellow);
}

.cyber-podium-column.column-second {
  height: 140px;
  border-color: rgba(0, 243, 255, 0.4);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.05);
  z-index: 2;
}

.cyber-podium-column.column-second::before {
  background: var(--neon-cyan);
  box-shadow: 0 0 10px var(--neon-cyan);
}

.cyber-podium-column.column-third {
  height: 110px;
  border-color: rgba(255, 0, 85, 0.4);
  box-shadow: 0 0 20px rgba(255, 0, 85, 0.05);
  z-index: 1;
}

.cyber-podium-column.column-third::before {
  background: var(--neon-pink);
  box-shadow: 0 0 10px var(--neon-pink);
}

.cyber-podium-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(9, 11, 17, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 12px;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.column-first .cyber-podium-avatar {
  border-color: var(--neon-yellow);
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.3);
}

.column-second .cyber-podium-avatar {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.column-third .cyber-podium-avatar {
  border-color: var(--neon-pink);
  box-shadow: 0 0 15px rgba(255, 0, 85, 0.3);
}

.crown-bounce {
  animation: crownBounce 1.5s infinite alternate ease-in-out;
}

@keyframes crownBounce {
  from { transform: translateY(0); }
  to { transform: translateY(-6px); }
}

.cyber-podium-name {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 6px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.cyber-podium-score {
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text-secondary);
  font-family: monospace;
}

.gold-text {
  color: var(--neon-yellow) !important;
  text-shadow: 0 0 8px rgba(250, 204, 21, 0.4);
}

.cyber-podium-step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 16px;
  font-family: monospace;
}

.column-first .cyber-podium-step {
  border-color: var(--neon-yellow);
  color: var(--neon-yellow);
  background: rgba(250, 204, 21, 0.05);
}

/* Animations */
.animate-pop {
  animation: popIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.delay-1 { animation-delay: 0.12s; }
.delay-2 { animation-delay: 0.24s; }

@keyframes popIn {
  from { transform: translateY(15px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Scrollbar styling */
.cyber-result-screen::-webkit-scrollbar {
  width: 6px;
}

.cyber-result-screen::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

.cyber-result-screen::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.cyber-result-screen::-webkit-scrollbar-thumb:hover {
  background: var(--neon-cyan);
}

@media (max-width: 600px) {
  /* Full-height stretch: screen fills device */
  .cyber-result-screen {
    padding: 2rem 0.75rem !important;
    justify-content: space-between !important;
    overflow-y: auto !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  /* Header more compact */
  .cyber-header-wrapper {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .cyber-title {
    font-size: 1.4rem !important;
    letter-spacing: 1px;
    margin: 0;
  }

  .cyber-title::after {
    margin: 0.15rem auto 0 auto;
    width: 60px;
  }

  .cyber-title.trophy-title {
    font-size: 1.25rem !important;
  }

  .cyber-subtitle {
    font-size: 0.7rem;
    padding: 0.2rem 0.8rem;
  }

  /* Panel grows to fill remaining space */
  .cyber-panel {
    --panel-flex: 0 0 auto;
    margin-top: auto;
    margin-bottom: auto;
    max-width: 100%;
    min-height: 0;
  }

  .cyber-panel-title {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    letter-spacing: 1px;
    flex-wrap: nowrap;
    align-items: center;
    flex-shrink: 0;
  }

  .cyber-panel-title-dot {
    width: 5px;
    height: 5px;
  }

  .cyber-table-header {
    padding: 6px 10px;
    font-size: 0.7rem;
    flex-shrink: 0;
  }

  .cyber-table-row {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  /* Table body fills remaining panel space (race result only) */
  .cyber-table-body {
    max-height: 450px !important; /* Allow all 7 racers to be visible on tall portrait mobile screens */
    overflow-y: auto;
    flex: 1;
    min-height: 0;
  }

  @media (max-height: 640px) {
    .cyber-table-body {
      max-height: 200px !important; /* Cap height on short landscape screens */
    }
  }

  /* Podium keeps a fixed scroll window on mobile too */
  .podium-bg .cyber-table-body {
    max-height: 350px !important;
    overflow-y: auto;
    flex: 1;
  }

  /* Cap the gold standings panel so it does NOT grow unbounded */
  .podium-bg .cyber-panel.gold-theme {
    --panel-flex: 0 !important;
    height: auto !important;
    max-height: 400px !important;
    flex: 0 0 auto;
  }

  /* Make cyber-table inside podium shrink properly */
  .podium-bg .cyber-table {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  /* Adjust column widths on mobile results */
  .col-rank { width: 32px; }
  .col-time { width: 70px; font-size: 0.75rem; }
  .col-pts { width: 65px; font-size: 0.75rem; }

  /* Actions button area compact */
  .cyber-actions {
    margin-top: 0;
    margin-bottom: 0;
    flex-shrink: 0;
    gap: 8px !important;
  }

  /* Podium adjustments */
  .cyber-podium-container {
    height: 220px;
    gap: 6px;
    margin: 0.3rem auto 0.4rem auto;
    flex-shrink: 0;
    align-items: flex-end;
  }

  .cyber-podium-position {
    height: 100%;
  }

  .podium-3d-model-wrapper {
    height: 85px;
    margin-bottom: -12px;
  }

  .podium-3d-model-wrapper.first-model {
    height: 105px;
    margin-bottom: -15px;
  }

  .cyber-podium-column {
    padding: 6px 4px 10px 4px;
  }

  .cyber-podium-column.column-first {
    height: 90px;
  }

  .cyber-podium-column.column-second {
    height: 70px;
  }

  .cyber-podium-column.column-third {
    height: 55px;
  }

  .cyber-podium-avatar {
    width: 28px;
    height: 28px;
    font-size: 13px;
    margin-bottom: 3px;
  }

  .cyber-podium-name {
    font-size: 0.65rem;
    margin-bottom: 3px;
  }

  .cyber-podium-score {
    font-size: 0.6rem;
    margin-bottom: 4px;
  }

  .cyber-podium-step {
    width: 18px;
    height: 18px;
    font-size: 9px;
  }
}

@keyframes fadeInPodiumOverlay {
  from {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.podium-overlay-panel {
  animation: fadeInPodiumOverlay 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.testerace-page {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #0a0c14;
  font-family: 'Outfit', sans-serif;
  z-index: 9999;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
}

.exit-race-btn-hud {
  width: 100%;
  margin-top: 15px;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #ff5555;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.exit-race-btn-hud:hover {
  background: rgba(220, 38, 38, 0.35);
  border-color: #ff3333;
  color: #fff;
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.4);
}

.testerace-container {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
}

.testerace-canvas {
  width: 100%;
  height: 100%;
}

/* Overlays */
.countdown-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 12, 20, 0.4);
  pointer-events: none;
  z-index: 10;
}

.countdown-number {
  font-size: 7rem;
  font-weight: 900;
  color: #ff00ff;
  text-shadow: 0 0 30px #ff00ff, 0 0 10px #00ffff;
  animation: popScale 0.8s ease-out infinite;
}

@keyframes popScale {
  0% { transform: scale(0.6); opacity: 0; }
  40% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 0.9; }
}

/* Stuck / Rescue Warning */
.stuck-warning-overlay {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  pointer-events: none;
  animation: stuckFadeIn 0.2s ease-out;
}

@keyframes stuckFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.stuck-warning-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: rgba(10, 12, 20, 0.88);
  border: 2px solid rgba(255, 165, 0, 0.75);
  border-radius: 14px;
  padding: 10px 22px 12px;
  box-shadow: 0 0 22px rgba(255, 165, 0, 0.35), inset 0 0 12px rgba(255, 165, 0, 0.08);
  backdrop-filter: blur(8px);
  min-width: 210px;
  text-align: center;
}

.stuck-icon {
  font-size: 1.4rem;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(255, 165, 0, 0.7));
}

.stuck-text {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffa500;
  text-shadow: 0 0 10px rgba(255, 165, 0, 0.6);
  white-space: nowrap;
}

.stuck-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 165, 0, 0.18);
  border-radius: 2px;
  overflow: hidden;
}

.stuck-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #ff6600, #ffa500);
  border-radius: 2px;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(255, 165, 0, 0.7);
}

.game-over-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  z-index: 10000;
  background: rgba(18, 14, 28, 0.9);
  border: 2px solid #ff00ff;
  box-shadow: 0 0 30px rgba(255, 0, 255, 0.3);
  border-radius: 12px;
  text-align: center;
}

.game-over-overlay h2 {
  font-size: 2.2rem;
  color: #00ffff;
  text-shadow: 0 0 12px #00ffff;
  margin-bottom: 1.5rem;
}

.pulse-glow {
  background: linear-gradient(135deg, #ff00ff, #00ffff);
  color: #fff;
  border: none;
  padding: 0.8rem 2rem;
  font-weight: bold;
  font-size: 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.4);
}

.pulse-glow:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.7);
}

/* Glass HUD Design */
.glass-panel {
  background: rgba(13, 17, 30, 0.75);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 10px;
  color: #e2e8f0;
}

/* Speedometer Dashboard */
.hud-speedometer-container {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 15;
  pointer-events: none;
}

.hud-mobile-stats-row {
  display: none;
}

.hud-mute-btn {
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  padding: 8px;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.hud-mute-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.hud-stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 140px;
  margin-bottom: 6px;
  background: rgba(10, 12, 20, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 8px;
  padding: 6px 12px;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.05), inset 0 0 8px rgba(0, 255, 255, 0.05);
  pointer-events: auto;
}

.hud-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hud-stat-label {
  font-size: 0.55rem;
  letter-spacing: 1px;
  color: #64748b;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.hud-stat-value {
  font-size: 0.9rem;
  font-weight: 800;
  font-family: monospace;
}

.speedometer-gauge {
  position: relative;
  width: 120px;
  height: 120px;
  background: rgba(10, 12, 20, 0.85);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  border: 1px solid rgba(0, 255, 255, 0.15);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.1), inset 0 0 15px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.speedometer-gauge svg {
  position: absolute;
  top: 0;
  left: 0;
}

.speed-text-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.speed-number {
  font-size: 2.2rem;
  font-weight: 900;
  font-family: 'Outfit', monospace;
  color: #ffffff;
  line-height: 1;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.speed-unit {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #00ffff;
  margin-top: 2px;
  text-shadow: 0 0 6px rgba(0, 255, 255, 0.5);
}

.neon-cyan { color: #00ffff; text-shadow: 0 0 10px rgba(0, 255, 255, 0.5); }
.neon-pink { color: #ff00ff; text-shadow: 0 0 10px rgba(255, 0, 255, 0.5); }
.neon-yellow { color: #facc15; text-shadow: 0 0 10px rgba(250, 204, 21, 0.5); }
.hud-empty { font-size: 0.9rem; color: #ef4444; }

/* Left Side Leaderboard */
.hud-leaderboard {
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 200px;
  padding: 1rem;
  z-index: 5;
}

.hud-leaderboard h3 {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.4rem;
  margin-bottom: 0.75rem;
  color: #00ffff;
}

.leaderboard-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.leaderboard-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: bold;
  padding: 2px 4px;
  border-radius: 4px;
}

.leaderboard-item.player-highlight {
  background: rgba(0, 243, 255, 0.08);
  border-left: 2px solid #00f3ff;
  padding-left: 6px;
  box-shadow: inset 3px 0 10px rgba(0, 243, 255, 0.05);
}

.leaderboard-rank {
  color: #94a3b8;
}

.leaderboard-name {
  flex: 1;
  margin-left: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-lap {
  color: #a78bfa;
  font-size: 0.75rem;
}

/* Right Side Garage control panel */
.hud-controls {
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 240px;
  padding: 1rem;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hud-controls h3 {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.4rem;
  margin: 0;
  color: #ff00ff;
}

.description-text {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0;
}

.skin-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.skin-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 0.4rem;
  font-size: 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.skin-btn:hover {
  background: rgba(0, 229, 255, 0.1);
  border-color: #00ffff;
  color: #fff;
}

.skin-btn.selected {
  background: rgba(255, 0, 255, 0.2);
  border-color: #ff00ff;
  color: #fff;
  box-shadow: 0 0 5px rgba(255, 0, 255, 0.4);
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.ctrl-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.75rem;
  padding: 0.4rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s;
}

.ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.ctrl-btn.reset {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
}

.ctrl-btn.reset:hover {
  background: rgba(239, 68, 68, 0.35);
}

.instructions {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 0.5rem;
  font-size: 0.75rem;
}

.instructions h4 {
  margin: 0 0 0.3rem 0;
  color: #94a3b8;
}

.instructions ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: #cbd5e1;
}

.key {
  display: inline-block;
  background: #334155;
  padding: 0 4px;
  border-radius: 3px;
  font-family: monospace;
  font-weight: bold;
}

/* Scanline CRT simulation overlay */
.crt-glow-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  background-size: 100% 4px, 6px 100%;
  pointer-events: none;
  z-index: 15;
  opacity: 0.45;
}

/* Virtual Touch Controls Overlay */
.virtual-controls-container {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 25px;
  z-index: 999;
  pointer-events: none; /* Let canvas through */
}

.virtual-steering-pad {
  display: flex;
  gap: 15px;
  pointer-events: auto; /* Catch touch events */
}

.virtual-actions-pad {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 15px;
  pointer-events: auto; /* Catch touch events */
}

.virtual-steering-pad {
  display: flex;
  align-items: center;
  gap: 35px; /* Increased to separate buttons */
  background: rgba(13, 17, 30, 0.4);
  padding: 12px;
  border-radius: 60px;
  border: 1px solid rgba(0, 229, 255, 0.15);
  backdrop-filter: blur(8px);
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.steer-btn {
  width: 68px !important;
  height: 68px !important;
}

.steer-btn .arrow-icon {
  width: 32px !important;
  height: 32px !important;
}

.drag-indicator-track {
  width: 80px;
  height: 6px;
  background: rgba(0, 229, 255, 0.15);
  border-radius: 3px;
  position: relative;
  overflow: visible;
}

.drag-indicator-thumb {
  width: 14px;
  height: 14px;
  background: #ff00ff;
  border: 2px solid #00ffff;
  border-radius: 50%;
  position: absolute;
  top: -4px;
  left: calc(50% - 7px);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.8);
  transition: transform 0.05s ease-out;
}

.touch-btn {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  border: 2px solid rgba(0, 229, 255, 0.3);
  background: rgba(13, 17, 30, 0.7);
  backdrop-filter: blur(5px);
  color: #00ffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.15);
  transition: transform 0.05s ease, background-color 0.1s, border-color 0.1s, box-shadow 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

.touch-btn:active, .touch-btn.active {
  transform: scale(0.92);
  background: rgba(0, 229, 255, 0.25);
  border-color: #00ffff;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
  color: #fff;
}

.arrow-icon {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 0 4px rgba(0, 229, 255, 0.5));
}

.action-btn {
  width: 65px;
  height: 65px;
}

.pedals-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 15px;
  pointer-events: auto;
}

.arrows-y-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accel-btn {
  border-color: rgba(0, 255, 102, 0.35);
  color: #00ff66;
}

.accel-btn:active, .accel-btn.active {
  background: rgba(0, 255, 102, 0.25);
  border-color: #00ff66;
  box-shadow: 0 0 20px rgba(0, 255, 102, 0.5);
}

.accel-btn .arrow-icon {
  filter: drop-shadow(0 0 4px rgba(0, 255, 102, 0.5));
}

.brake-btn {
  border-color: rgba(255, 85, 85, 0.35);
  color: #ff5555;
}

.brake-btn:active, .brake-btn.active {
  background: rgba(255, 85, 85, 0.25);
  border-color: #ff5555;
  box-shadow: 0 0 20px rgba(255, 85, 85, 0.5);
}

.brake-btn .arrow-icon {
  filter: drop-shadow(0 0 4px rgba(255, 85, 85, 0.5));
}

.nitro-btn {
  background: rgba(250, 204, 21, 0.1);
  border-color: rgba(250, 204, 21, 0.35);
  color: #facc15;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.5px;
  animation: pulseNeonBorder 2s infinite alternate;
}

.nitro-btn:active {
  background: rgba(250, 204, 21, 0.3);
  border-color: #facc15;
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.6);
}

@keyframes pulseNeonBorder {
  from { border-color: rgba(250, 204, 21, 0.3); }
  to { border-color: rgba(250, 204, 21, 0.85); }
}

.mobile-garage-toggle {
  display: none;
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  border-color: rgba(255, 0, 255, 0.3);
  cursor: pointer;
}

/* Mobile and Tablet Media Queries */
@media (max-width: 1024px) {
  .mobile-garage-toggle {
    display: block;
  }

  .hud-controls {
    display: none; /* Hide garage panel by default on mobile */
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9);
    transition: all 0.25s ease-out;
  }

  .hud-controls.mobile-open {
    display: flex;
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
    top: 3.5rem;
    right: 1rem;
  }
}

@media (max-width: 768px) {
  .hud-mobile-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 140px;
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(10, 12, 20, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    padding: 6px 12px;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.05);
    z-index: 10;
  }

  .hud-mute-btn {
    position: absolute;
    right: 10px;
    top: 70px; /* Directly below the mobile-stats-row */
    width: 38px;
    height: 38px;
    z-index: 100;
  }

  .hud-speedometer-container .hud-stats-row {
    display: none;
  }

  .hud-speedometer-container {
    left: 25px; /* Above the virtual steering pad (left/right arrows) */
    right: auto;
    bottom: 110px;
    transform: none;
  }

  .speedometer-gauge {
    width: 90px;
    height: 90px;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.1), inset 0 0 10px rgba(0, 0, 0, 0.6);
  }

  .speed-number {
    font-size: 1.6rem;
  }

  .hud-controls.mobile-open {
    top: 10.5rem !important;
  }
  
  .hud-label {
    font-size: 0.55rem;
    letter-spacing: 1px;
  }

  .hud-leaderboard {
    width: 110px;
    padding: 0.4rem 0.5rem;
    left: 8px;
    top: 8px;
  }

  .hud-leaderboard h3 {
    font-size: 0.7rem;
    margin-bottom: 0.3rem;
    padding-bottom: 0.2rem;
  }

  .leaderboard-list {
    gap: 0.3rem;
  }

  .leaderboard-item {
    font-size: 0.65rem;
  }

  .leaderboard-lap {
    display: none;
  }

  .exit-race-btn-hud {
    font-size: 9px;
    padding: 3px 6px;
    margin-top: 6px;
    width: 100%;
    box-sizing: border-box;
  }

  .virtual-controls-container {
    bottom: 15px;
    padding: 0 15px;
  }

  .virtual-steering-pad {
    padding: 6px;
    gap: 6px;
  }

  .drag-indicator-track {
    width: 50px;
  }

  .touch-btn {
    width: 54px;
    height: 54px;
  }
  
  .action-btn {
    width: 52px;
    height: 52px;
  }

  .arrow-icon {
    width: 24px;
    height: 24px;
  }

  /* Game Over Mobile Sizing */
  .game-over-overlay {
    padding: 1.2rem 1.5rem;
    width: 85%;
    max-width: 320px;
    box-sizing: border-box;
  }

  .game-over-overlay h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    line-height: 1.3;
  }

  .pulse-glow {
    padding: 0.6rem 1.4rem;
    font-size: 0.95rem;
  }
}

/* ==========================================================================
   Tournament & Menu Screens Styling
   ========================================================================== */

/* Shared container layouts */
.testerace-page .container {
  max-width: 850px;
  width: 90%;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow-y: auto;
  max-height: 100vh;
  box-sizing: border-box;
}

/* Titles and Headers */
.text-gradient-gold {
  background: linear-gradient(135deg, #f59e0b, #fbbf24, #fef08a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #e2e8f0;
  margin: 2rem 0 1rem 0;
  letter-spacing: 1px;
}

/* Intro screen adjustments */
.race-intro-screen {
  justify-content: center;
  min-height: 100%;
}

/* Garage Robot Skin Selection in Menu */
.garage-setup-section {
  width: 100%;
  padding: 20px;
  margin-bottom: 30px;
  box-sizing: border-box;
}

.garage-setup-section h3 {
  font-size: 1rem;
  margin-top: 0;
  margin-bottom: 15px;
  color: #00ffff;
  letter-spacing: 1.5px;
}

.garage-setup-section .skin-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 576px) {
  .garage-setup-section .skin-selector {
    grid-template-columns: repeat(2, 1fr);
  }
}

.garage-setup-section .skin-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  height: auto;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.skin-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.skin-btn.selected .skin-avatar {
  background: linear-gradient(135deg, #ec4899, #d946ef);
}

/* Tracks timeline selection */
.tracks-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  margin-bottom: 35px;
}

.track-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.track-card.locked {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.05);
}

.track-card.unlocked:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 229, 255, 0.4);
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.15);
}

.track-card.active {
  border-color: #ff00ff;
  background: rgba(255, 0, 255, 0.04);
  box-shadow: 0 4px 25px rgba(255, 0, 255, 0.15);
}

.track-card-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.track-number {
  font-size: 0.75rem;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 1px;
}

.track-card.active .track-number {
  color: #ff00ff;
}

.track-status-icon {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.track-card.active .track-status-icon {
  background: rgba(255, 0, 255, 0.2);
  color: #fff;
}

.track-card.locked .track-status-icon {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.track-card h3 {
  font-size: 1.15rem;
  margin: 0 0 6px 0;
  color: #f8fafc;
}

.track-card.locked h3 {
  color: #94a3b8;
}

.track-desc {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
}

/* Standings and scoreboards table */
.standings-table {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
}

.table-header, .table-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 20px;
  align-items: center;
}

.table-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 1px;
}

.table-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.95rem;
  font-weight: 600;
  transition: background-color 0.2s;
}

.table-row:last-child {
  border-bottom: none;
}

.player-row {
  background: rgba(0, 229, 255, 0.06);
  border-left: 3px solid #00ffff;
}

.standings-rank {
  width: 50px;
  text-align: left;
  color: #94a3b8;
  font-weight: 800;
}

.standings-name {
  flex: 1;
  text-align: left;
}

.standings-points {
  font-weight: 800;
}

/* Podium Layout */
.podium-screen {
  min-height: 100%;
}

.podium-3d-visual {
  width: 100%;
  margin: 3rem 0;
  perspective: 1000px;
}

.podium-container-columns {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 15px;
  height: 240px;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.podium-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px 10px;
  flex: 1;
  border-bottom: none !important;
  border-radius: 12px 12px 0 0 !important;
  transition: transform 0.3s;
}

.podium-column:hover {
  transform: scale(1.03);
}

.podium-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.podium-avatar.highlight-gold {
  animation: pulseGold 2s infinite alternate;
}

@keyframes pulseGold {
  from { box-shadow: 0 0 10px rgba(251, 191, 36, 0.3); }
  to { box-shadow: 0 0 20px rgba(251, 191, 36, 0.7); }
}

.podium-name {
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.podium-score {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.podium-step-visual {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  color: #cbd5e1;
}

/* Height representation */
.column-first {
  height: 100%;
  background: rgba(251, 191, 36, 0.1) !important;
  border-color: rgba(251, 191, 36, 0.3) !important;
}
.column-first .podium-step-visual {
  background: #fbbf24;
  color: #1e1b4b;
}

.column-second {
  height: 80%;
  background: rgba(203, 213, 225, 0.07) !important;
  border-color: rgba(203, 213, 225, 0.2) !important;
}
.column-second .podium-step-visual {
  background: #cbd5e1;
  color: #1e293b;
}

.column-third {
  height: 65%;
  background: rgba(180, 83, 9, 0.07) !important;
  border-color: rgba(180, 83, 9, 0.2) !important;
}
.column-third .podium-step-visual {
  background: #b45309;
  color: #fff;
}


.adventure-page {
  max-width: 900px;
  margin: 0 auto;
  color: #fff;
}

.package-selection-header {
  padding-top: 20px;
  margin-top: 0;
  text-align: center;
}

.adventure-stage-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  margin-top: 15px;
}

.adventure-stage-actions .btn-back {
  flex-shrink: 0;
}

.selected-package-name {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.0rem;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.selected-package-desc {
  font-size: 0.9rem;
  color: #94a3b8;
}

/* Packages Container */
.packages-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 60px;
}

.package-card {
  position: relative;
  padding: 36px 20px 24px 20px;
  cursor: pointer;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--package-primary, #7c3aed) 26%, transparent), transparent 36%),
    radial-gradient(circle at bottom right, color-mix(in srgb, var(--package-secondary, #22d3ee) 22%, transparent), transparent 42%),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--package-dark, #111827) 82%, var(--package-primary, #7c3aed)) 0%,
      color-mix(in srgb, var(--package-dark, #111827) 94%, #000000) 100%
    );
  border: 4px solid var(--package-dark, #111827);
  box-shadow: 
    inset 2px 2px 0 rgba(255, 255, 255, 0.15), 
    inset -2px -2px 0 rgba(0, 0, 0, 0.6), 
    0 10px 25px rgba(0, 0, 0, 0.6);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
}

/* Top Ribs / Ridges of the cartridge */
.package-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 16px;
  background: repeating-linear-gradient(90deg, var(--package-dark), var(--package-dark) 8px, rgba(255, 255, 255, 0.08) 8px, rgba(255, 255, 255, 0.08) 16px);
  border-bottom: 3px solid var(--package-dark);
  opacity: 0.95;
  z-index: 2;
}

/* Gold connector board pins at the bottom */
.package-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  width: 60%;
  height: 6px;
  background: repeating-linear-gradient(90deg, #fbbf24 0px, #fbbf24 6px, transparent 6px, transparent 12px);
  opacity: 0.95;
  border-radius: 3px 3px 0 0;
  border: 1px solid var(--package-dark);
  border-bottom: none;
  z-index: 2;
}

.package-card .pkg-info,
.package-card .progress-bar-mini,
.package-card .progress-text {
  position: relative;
  z-index: 1;
}

.package-card:hover {
  border-color: var(--package-primary, var(--color-secondary));
  box-shadow: 
    0 0 0 1px var(--package-glow, rgba(34, 211, 238, 0.3)),
    0 0 24px var(--package-glow, rgba(34, 211, 238, 0.3)),
    0 10px 25px rgba(0, 0, 0, 0.6);
  transform: translateY(-4px);
}

.package-card.active {
  border-color: var(--package-tertiary, var(--color-gold));
  box-shadow: 
    0 0 0 1px var(--package-glow, rgba(34, 211, 238, 0.3)),
    0 0 32px var(--package-glow, rgba(34, 211, 238, 0.3)),
    0 10px 25px rgba(0, 0, 0, 0.6);
}

/* Cartridge Glossy Sticker Label */
.pkg-info {
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.08) 35%, transparent 35%, transparent 100%),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--package-dark, #111827) 76%, var(--package-primary, #7c3aed)) 0%,
      color-mix(in srgb, var(--package-dark, #111827) 92%, #000000) 100%
    );
  border: 2px solid color-mix(in srgb, var(--package-dark, #111827) 80%, var(--package-primary, #7c3aed));
  border-radius: 8px;
  padding: 18px 16px;
  margin-top: 5px;
  margin-bottom: 12px;
  box-shadow: 
    inset 1px 1px 0 rgba(255, 255, 255, 0.08), 
    inset -1px -1px 0 rgba(0, 0, 0, 0.4), 
    0 4px 10px rgba(0, 0, 0, 0.4);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.package-badge {
  position: absolute;
  top: 25px;
  right: 15px;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.5rem;
  background: linear-gradient(135deg, var(--package-primary, var(--color-secondary)), var(--package-secondary, #22d3ee));
  padding: 4px 8px;
  border: 2px solid #111827;
  color: #fff;
  z-index: 10;
  box-shadow: 2px 2px 0 #111827;
  transform: rotate(2deg);
}

.pkg-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.85rem;
  margin-top: 10px;
  margin-bottom: 8px;
  color: #fff;
  line-height: 1.4;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.pkg-desc {
  color: #94a3b8;
  font-size: 0.8rem;
  margin-bottom: 12px;
  line-height: 1.4;
}

.pkg-stats {
  font-size: 0.75rem;
  color: var(--color-gold);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  font-family: 'Space Mono', monospace;
  font-weight: bold;
}

.progress-bar-mini {
  height: 8px;
  background: #111827;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--package-primary, #3b82f6), var(--package-secondary, var(--color-secondary)));
  border-radius: 4px;
  transition: width 1s ease-out;
}

.progress-text {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 700;
  font-family: 'Space Mono', monospace;
  text-align: right;
  display: block;
}

/* Stages List */
.adventure-page .section-title {
  font-size: 1.8rem;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.text-cyan {
  color: var(--color-secondary);
}

.stages-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stage-item {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-radius: var(--border-radius-md);
  display: grid;
  grid-template-columns: 60px 1fr 100px 60px;
  align-items: center;
  padding: 20px 30px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stage-item:hover:not(.locked) {
  transform: translateY(-2px);
  box-shadow: var(--neon-glow-accent), 0 6px 15px rgba(0, 0, 0, 0.4);
  border-color: var(--color-accent);
}

.stage-item.locked {
  cursor: not-allowed;
  filter: grayscale(1);
}

.stage-item.completed {
  border-left: 4px solid #10b981;
}

.stage-number {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.9rem;
  color: var(--color-accent);
}

.stage-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  /* Garante que ocupe o espaço central */
}

.stage-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.75rem;
  margin: 0;
  color: #fff;
  display: block;
}

.stage-desc {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0;
  display: block;
}

.stage-difficulty {
  text-align: center;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 4px 0;
  border-radius: 4px;
  width: 30px;
  margin: 0 auto;
}

.stage-difficulty[data-diff="E"] {
  background: #10b981;
  color: #fff;
  border: 2px solid #000;
}

.stage-difficulty[data-diff="M"] {
  background: #f59e0b;
  color: #fff;
  border: 2px solid #000;
}

.stage-difficulty[data-diff="D"] {
  background: #ef4444;
  color: #fff;
  border: 2px solid #000;
}

.stage-status {
  text-align: right;
  font-size: 1.2rem;
}

@media (max-width: 768px) {
  .package-card {
    padding: 20px;
  }

  .package-info h3 {
    padding-right: 60px;
    font-size: 1.3rem;
  }

  .package-badge {
    top: 10px;
    right: 10px;
    font-size: 0.6rem;
  }

  .stage-item {
    grid-template-columns: 40px 1fr 40px;
    padding: 15px;
  }

  .stage-difficulty {
    display: none;
  }

  .adventure-page .section-title {
    font-size: 1.0rem;
    margin-bottom: 20px;
  }
}

.auth-required {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
}

.auth-container {
  max-width: 500px;
  padding: 60px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--bg-secondary);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-radius: var(--border-radius-lg);
}

.auth-icon {
  font-size: 4rem;
  margin-bottom: 10px;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.stages-view .btn-back-tactical {
  margin-bottom: 40px;
}

.adventure-page .btn-back {
  align-self: flex-start;
}

/* Reward Chip Preview in Stage Item */
.stage-reward-chip-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.2);
  padding: 6px 12px;
  border-radius: 4px;
  width: fit-content;
  margin-top: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.stage-item:hover:not(.locked) .stage-reward-chip-preview {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.1);
}

.reward-chip-icon {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.3));
}

.reward-chip-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.reward-chip-label {
  font-size: 0.55rem;
  font-family: 'Press Start 2P', cursive;
  color: #fbbf24;
  letter-spacing: 0.5px;
}

.reward-chip-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  margin-top: 1px;
}

.adventure-header-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  margin-top: 10px;
  gap: 12px;
}

.package-info-block {
  text-align: left;
  width: 100%;
}

.view-mode-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.34);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  gap: 4px;
  align-self: center;
  z-index: 10;
}

.view-mode-toggle .toggle-btn {
  background: transparent !important;
  border: 1px solid transparent !important;
  color: var(--text-muted, #94a3b8) !important;
  padding: 6px 12px !important;
  border-radius: 8px !important;
  cursor: pointer;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.48rem !important;
  font-weight: bold;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: none !important;
  transform: none !important;
}

.view-mode-toggle .toggle-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #fff !important;
}

.view-mode-toggle .toggle-btn.active {
  background: var(--color-secondary, #ec4899) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: var(--text-dark, #111827) !important;
  box-shadow: var(--neon-glow-secondary, 0 0 10px rgba(236, 72, 153, 0.5)) !important;
}

@media (max-width: 820px) {
  .adventure-stage-actions {
    flex-direction: column;
    align-items: center;
  }

  .view-mode-toggle {
    align-self: center;
    margin: 0 auto;
  }

  .adventure-stage-actions .btn-back {
    align-self: center;
  }
}

/* Retro Mario-style World Map */
.stages-map-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 34%),
    radial-gradient(circle at bottom right, rgba(6, 182, 212, 0.08), transparent 38%),
    linear-gradient(135deg, rgba(20, 24, 48, 0.96) 0%, rgba(10, 11, 22, 0.98) 100%);
  border: 4px solid rgba(255, 255, 255, 0.08);
  box-shadow: 
    inset 2px 2px 0 rgba(255, 255, 255, 0.15), 
    inset -2px -2px 0 rgba(0, 0, 0, 0.6), 
    0 10px 40px rgba(0, 0, 0, 0.6),
    0 0 18px rgba(6, 182, 212, 0.08);
  padding: 18px 0px 0px 0px;
}

/* Giant Cartridge Top Ribs / Ridges */
.stages-map-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 16px;
  background: repeating-linear-gradient(90deg, #141830, #141830 8px, #1f243f 8px, #1f243f 16px);
  border-bottom: 3px solid rgba(255, 255, 255, 0.08);
  opacity: 0.95;
  z-index: 2;
}

/* Giant Cartridge Gold Pins */
.stages-map-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 30%;
  width: 40%;
  height: 6px;
  background: repeating-linear-gradient(90deg, rgba(6, 182, 212, 0.65) 0px, rgba(6, 182, 212, 0.65) 6px, transparent 6px, transparent 12px);
  opacity: 0.95;
  border-radius: 3px 3px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  z-index: 2;
}

.stages-map-board {
  width: 100%;
  min-width: 820px;
  height: 300px;
  position: relative;
  overflow: hidden;
  background-color: #9bd89b; /* Light green grass */
  background-image: 
    radial-gradient(rgba(45, 120, 45, 0.5) 1.5px, transparent 1.5px),
    radial-gradient(rgba(45, 120, 45, 0.5) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
  image-rendering: pixelated;
  user-select: none;
  border: 3px solid #111827;
  border-radius: 8px;
  box-shadow: 
    inset 1px 1px 0 rgba(255, 255, 255, 0.1), 
    inset -1px -1px 0 rgba(0, 0, 0, 0.4), 
    0 4px 10px rgba(0, 0, 0, 0.4);
}

.map-paths-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.map-path-line {
  stroke: #d5b27b; /* Light brown dirt path */
  stroke-width: 6px;
  stroke-dasharray: 10, 8;
  stroke-linecap: round;
}

.map-decoration-item {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
  animation: floatDec 4s infinite ease-in-out;
}

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

/* Level Node Circles */
.map-stage-node {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1e293b;
  border: 3px solid #000;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8rem;
  cursor: pointer;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 10;
}

.map-stage-node::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px dashed transparent;
  transition: all 0.3s ease;
}

/* Unlocked Node */
.map-stage-node:hover:not(.locked) {
  transform: translate(-50%, -50%) scale(1.18);
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.6), 0 8px 16px rgba(0, 0, 0, 0.4);
  background: #fbbf24;
  color: #000;
  border-color: #000;
}

/* Active Pulsing Unlocked level */
.map-stage-node.active {
  background: #3b82f6;
  border-color: #ffffff;
  color: #fff;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.7);
}

.map-stage-node.active::after {
  border-color: #3b82f6;
  animation: rotateDashed 12s linear infinite;
}

@keyframes rotateDashed {
  to { transform: rotate(360deg); }
}

/* Completed Level */
.map-stage-node.completed {
  background: #10b981;
  border-color: #000;
  color: #fff;
}

/* Locked Level */
.map-stage-node.locked {
  background: #64748b;
  border-color: #475569;
  color: #94a3b8;
  opacity: 0.85;
  cursor: not-allowed;
}

/* Small indicator symbol at bottom of nodes */
.node-status-icon {
  position: absolute;
  bottom: -10px;
  font-size: 0.65rem;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1px 4px;
  border-radius: 100px;
  color: #fff;
  pointer-events: none;
}

/* Stage Info Tooltip Popup */
.map-stage-tooltip {
  position: absolute;
  width: 250px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1px solid rgba(251, 191, 36, 0.4) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 15px rgba(251, 191, 36, 0.15) !important;
  --tooltip-transform: translate(-50%, -100%);
  transform: var(--tooltip-transform);
  z-index: 200;
  pointer-events: none;
  transition: none !important;
  animation: popTooltip 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.2) forwards;
}

.map-stage-tooltip::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px 8px 0;
  border-style: solid;
  border-color: rgba(15, 23, 42, 0.9) transparent;
  display: block;
  width: 0;
}

.map-stage-tooltip.align-left::after {
  left: 10%;
  transform: none;
}

.map-stage-tooltip.align-right::after {
  left: auto;
  right: 10%;
  transform: none;
}

.map-stage-tooltip.align-bottom::after {
  top: -8px;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 8px 8px;
  border-style: solid;
  border-color: rgba(15, 23, 42, 0.9) transparent;
  display: block;
  width: 0;
}

@keyframes popTooltip {
  from { transform: var(--tooltip-transform) scale(0.92); opacity: 0; }
  to { transform: var(--tooltip-transform) scale(1); opacity: 1; }
}

.tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.tooltip-stage-num {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.5rem;
  color: #fbbf24;
  letter-spacing: 0.5px;
}

.tooltip-diff {
  font-weight: 900;
  font-size: 0.65rem;
  background: #ef4444;
  color: #fff;
  border: 1.5px solid #000;
  padding: 1px 6px;
  border-radius: 3px;
}

.tooltip-diff[data-diff="E"] { background: #10b981; }
.tooltip-diff[data-diff="M"] { background: #f59e0b; }

.tooltip-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.6rem;
  margin: 0 0 6px 0;
  color: #fff;
  line-height: 1.3;
}

.tooltip-desc {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.tooltip-reward {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.tooltip-reward .reward-chip-icon {
  font-size: 1rem;
}

.tooltip-reward .reward-chip-meta {
  display: flex;
  flex-direction: column;
}

.tooltip-reward .reward-chip-label {
  font-size: 0.45rem;
  font-family: 'Press Start 2P', cursive;
  color: #fbbf24;
}

.tooltip-reward .reward-chip-name {
  font-size: 0.7rem;
  font-weight: bold;
  color: #fff;
}

.tooltip-action {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  color: #22d3ee;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: right;
  margin-top: 4px;
}

@media (max-width: 768px) {
  .stages-map-wrapper {
    overflow-x: hidden;
    overflow-y: hidden;
  }

  .stages-map-board {
    min-width: unset;
    width: 100%;
    height: 780px; /* Taller canvas for vertical road */
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
  }

  .map-path-line {
    stroke-width: 5px;
    stroke-dasharray: 8, 6;
  }

  .map-stage-node {
    width: 38px;
    height: 38px;
    font-size: 0.7rem;
    border-width: 2.5px;
  }

  .node-status-icon {
    font-size: 0.55rem;
    bottom: -8px;
  }

  .map-decoration-item {
    font-size: 1.25rem;
  }

  .map-stage-tooltip {
    width: 220px;
    padding: 10px;
  }

  .map-stage-tooltip.align-bottom::after {
    top: -8px;
  }
}

/* ==========================================
   Modo Mapa da Aventura 3D - Tela Cheia (Fullscreen)
   ========================================== */

/* Remove cabeçalho e rodapé globais do site */
body.adventure-map-fullscreen .app-header {
  display: none !important;
}

body.adventure-map-fullscreen .app-footer-bar {
  display: none !important;
}

body.adventure-map-fullscreen .app-container {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  overflow: hidden !important;
}

body.adventure-map-fullscreen .main-content {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100vw !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
}

/* Forçar wrapper do mapa a preencher a tela inteira */
.adventure-page.fullscreen-active {
  max-width: 100vw !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  padding: 0 !important;
  margin: 0 !important;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  background: #0a0f1d;
  overflow: hidden;
}

.adventure-page.fullscreen-active .stages-view,
.adventure-page.fullscreen-active .stages-map-wrapper,
.adventure-page.fullscreen-active .adventure-three-map-container {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  position: absolute !important;
  top: 0;
  left: 0;
  z-index: 1;
}

/* Remove moldura retrô do cartucho no modo tela cheia */
.adventure-page.fullscreen-active .stages-map-wrapper::before,
.adventure-page.fullscreen-active .stages-map-wrapper::after {
  display: none !important;
}

/* Painel Superior Flutuante (HUD) */
.adventure-fullscreen-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: linear-gradient(180deg, rgba(10, 15, 29, 0.88) 0%, rgba(10, 15, 29, 0) 100%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10;
  pointer-events: none;
}

.adventure-fullscreen-header * {
  pointer-events: auto;
}

.btn-back-fullscreen {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.62rem !important;
  background: rgba(10, 11, 30, 0.82) !important;
  border: 1px solid rgba(0, 229, 255, 0.25) !important;
  color: #00e5ff !important;
  padding: 0.75rem 1.75rem !important;
  border-radius: 12px !important;
  letter-spacing: 1px !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  text-transform: none;
}

.btn-back-fullscreen:hover {
  background: rgba(0, 229, 255, 0.15) !important;
  border-color: #00e5ff !important;
  color: #fff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.45) !important;
}

.adventure-fullscreen-title-wrapper {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 11;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: none;
}

.adventure-fullscreen-category {
  font-size: 0.58rem;
  font-family: 'Press Start 2P', cursive;
  color: var(--package-primary, #00e5ff);
  letter-spacing: 1.5px;
  opacity: 0.95;
  margin-bottom: 4px;
  text-shadow: 0 0 10px var(--package-glow, rgba(0, 229, 255, 0.4));
}

.adventure-fullscreen-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.05rem;
  margin: 0;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
}

.fullscreen-toggle {
  background: rgba(10, 15, 29, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 4px !important;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.45) !important;
}

.fullscreen-toggle .toggle-btn {
  padding: 8px 12px !important;
  font-size: 0.8rem !important;
}

@media (max-width: 1024px) {
  .adventure-fullscreen-header {
    position: absolute !important;
    top: 0 !important;
    bottom: auto !important;
    left: 0 !important;
    right: 0 !important;
    height: 70px !important;
    padding: 0 16px !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    z-index: 10 !important;
    pointer-events: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .btn-back-fullscreen {
    padding: 8px 12px !important;
    font-size: 0.6rem !important;
    pointer-events: auto !important;
  }

  .adventure-fullscreen-title-wrapper {
    position: fixed !important;
    top: auto !important;
    bottom: 24px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 85% !important;
    max-width: 320px !important;
    z-index: 1000 !important;
    pointer-events: auto !important;
    background: rgba(10, 11, 30, 0.82) !important;
    border: 1px solid rgba(0, 229, 255, 0.2) !important;
    padding: 10px 16px !important;
    border-radius: 14px !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 15px rgba(0, 229, 255, 0.08) !important;
  }

  .adventure-fullscreen-category {
    font-size: 0.42rem !important;
  }

  .adventure-fullscreen-title {
    font-size: 0.72rem !important;
  }

  .mobile-hidden-spacer {
    display: none !important;
  }
}

/* Coming Soon Package Card */
.package-card.coming-soon {
  cursor: not-allowed !important;
  opacity: 0.6;
  filter: grayscale(0.85);
  transition: all 0.3s ease;
}

.package-card.coming-soon:hover {
  opacity: 0.75;
  filter: grayscale(0.45);
  transform: none !important;
  border-color: #374151 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6) !important;
}

.package-badge.coming-soon-badge {
  background: #374151 !important;
  color: #d1d5db !important;
  border-color: #4b5563 !important;
}

/* Scanline CRT simulation overlay */
.crt-glow-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  background-size: 100% 4px, 6px 100%;
  pointer-events: none;
  z-index: 15;
  opacity: 0.45;
}

.race-preview-page {
  position: relative;
  z-index: 2;
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-family: 'Outfit', sans-serif;
  color: #e2e8f0;
}

.badge-experimental {
  display: inline-block;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.6);
  color: #facc15;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 1.25rem;
  text-shadow: 0 0 5px rgba(250, 204, 21, 0.3);
}

.preview-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.preview-subtitle {
  color: #94a3b8;
  font-size: 1.05rem;
  line-height: 1.4;
  margin-bottom: 2rem;
  max-width: 540px;
}

.preview-image-container {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: 0 auto 2rem auto;
  border-radius: 12px;
  overflow: hidden;
}

.preview-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.preview-image-container:hover .preview-image {
  transform: scale(1.02);
}

.image-overlay-glow {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 20px rgba(6, 182, 212, 0.3);
  pointer-events: none;
  border-radius: 12px;
}

.preview-details {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #cbd5e1;
  margin-bottom: 2.5rem;
  max-width: 540px;
}

.preview-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.btn-back-link {
  background: none;
  border: none;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.btn-back-link:hover {
  color: #00ffff;
  text-shadow: 0 0 6px rgba(0, 255, 255, 0.3);
}

/* Animations */
.animate-fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile responsive styling */
@media (max-width: 576px) {
  .preview-title {
    font-size: 1.6rem;
  }
  
  .preview-subtitle {
    font-size: 0.9rem;
  }
  
  .preview-details {
    font-size: 0.85rem;
  }
}
.test-audio-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  background-color: #050508;
  color: #e2e8f0;
  font-family: 'Outfit', 'Inter', sans-serif;
  overflow: hidden;
}

.test-audio-canvas-container {
  flex: 1;
  position: relative;
  height: 100%;
}

.test-audio-sidebar {
  width: 420px;
  height: 100%;
  background: rgba(10, 10, 18, 0.85);
  backdrop-filter: blur(12px);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow-y: auto;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.test-audio-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #00f0ff;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.test-audio-subtitle {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 24px;
  line-height: 1.5;
}

.test-audio-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.test-audio-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #3b82f6;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.test-audio-controls-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.test-audio-control-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.test-audio-label {
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
}

.test-audio-value {
  color: #00f0ff;
  font-weight: 600;
}

.test-audio-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #1e293b;
  outline: none;
}

.test-audio-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #00f0ff;
  cursor: pointer;
  box-shadow: 0 0 8px #00f0ff;
  transition: transform 0.1s;
}

.test-audio-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.test-audio-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border: none;
  border-radius: 8px;
  color: white;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-align: center;
}

.test-audio-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.test-audio-btn.active {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
}

.test-audio-btn.active:hover {
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.test-audio-btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
}

.test-audio-btn-danger:hover {
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.test-audio-robot-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.test-audio-robot-info {
  display: flex;
  flex-direction: column;
}

.test-audio-robot-name {
  font-size: 13px;
  font-weight: 600;
}

.test-audio-robot-dist {
  font-size: 11px;
  color: #64748b;
}

.test-audio-back-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  padding: 8px 16px;
  font-weight: 500;
  cursor: pointer;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
  transition: all 0.2s;
}

.test-audio-back-btn:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: #00f0ff;
  color: #00f0ff;
}

.test-audio-helper-panel {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 16px;
  color: #94a3b8;
  font-size: 12px;
  backdrop-filter: blur(8px);
  z-index: 100;
}

.test-audio-helper-key {
  color: #00f0ff;
  font-weight: 600;
}
.counter {
  font-size: 16px;
  padding: 5px 10px;
  border-radius: 5px;
  color: var(--accent);
  background: var(--accent-bg);
  border: 2px solid transparent;
  transition: border-color 0.3s;
  margin-bottom: 24px;

  &:hover {
    border-color: var(--accent-border);
  }
  &:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
}

.hero {
  position: relative;

  .base,
  .framework,
  .vite {
    inset-inline: 0;
    margin: 0 auto;
  }

  .base {
    width: 170px;
    position: relative;
    z-index: 0;
  }

  .framework,
  .vite {
    position: absolute;
  }

  .framework {
    z-index: 1;
    top: 34px;
    height: 28px;
    transform: perspective(2000px) rotateZ(300deg) rotateX(44deg) rotateY(39deg)
      scale(1.4);
  }

  .vite {
    z-index: 0;
    top: 107px;
    height: 26px;
    width: auto;
    transform: perspective(2000px) rotateZ(300deg) rotateX(40deg) rotateY(39deg)
      scale(0.8);
  }
}

#center {
  display: flex;
  flex-direction: column;
  gap: 25px;
  place-content: center;
  place-items: center;
  flex-grow: 1;

  @media (max-width: 1024px) {
    padding: 32px 20px 24px;
    gap: 18px;
  }
}

#next-steps {
  display: flex;
  border-top: 1px solid var(--border);
  text-align: left;

  & > div {
    flex: 1 1 0;
    padding: 32px;
    @media (max-width: 1024px) {
      padding: 24px 20px;
    }
  }

  .icon {
    margin-bottom: 16px;
    width: 22px;
    height: 22px;
  }

  @media (max-width: 1024px) {
    flex-direction: column;
    text-align: center;
  }
}

#docs {
  border-right: 1px solid var(--border);

  @media (max-width: 1024px) {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

#next-steps ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 8px;
  margin: 32px 0 0;

  .logo {
    height: 18px;
  }

  a {
    color: var(--text-h);
    font-size: 16px;
    border-radius: 6px;
    background: var(--social-bg);
    display: flex;
    padding: 6px 12px;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: box-shadow 0.3s;

    &:hover {
      box-shadow: var(--shadow);
    }
    .button-icon {
      height: 18px;
      width: 18px;
    }
  }

  @media (max-width: 1024px) {
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;

    li {
      flex: 1 1 calc(50% - 8px);
    }

    a {
      width: 100%;
      justify-content: center;
      box-sizing: border-box;
    }
  }
}

#spacer {
  height: 88px;
  border-top: 1px solid var(--border);
  @media (max-width: 1024px) {
    height: 48px;
  }
}

.ticks {
  position: relative;
  width: 100%;

  &::before,
  &::after {
    content: '';
    position: absolute;
    top: -4.5px;
    border: 5px solid transparent;
  }

  &::before {
    left: 0;
    border-left-color: var(--border);
  }
  &::after {
    right: 0;
    border-right-color: var(--border);
  }
}

.language-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 8, 18, 0.82);
  backdrop-filter: blur(10px);
}

.language-modal {
  width: min(92vw, 520px);
  padding: 28px 24px 24px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.language-modal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--color-secondary);
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.18);
}

.language-modal h2 {
  margin: 0 0 10px;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #fff;
}

.language-modal p {
  margin: 0 0 22px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.language-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.language-modal-btn {
  min-width: 160px;
}

@media (max-width: 640px) {
  .language-modal {
    padding: 24px 18px 20px;
  }

  .language-modal-actions {
    flex-direction: column;
  }

  .language-modal-btn {
    width: 100%;
  }
}

:root {
  /* Fonts */
  --font-sans: 'Outfit', sans-serif;
  --font-pixel: 'Press Start 2P', cursive;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Colors */
  --surface-page: var(--bg-primary);
  --surface-panel: var(--bg-secondary);
  --surface-panel-soft: rgba(255, 255, 255, 0.05);
  --surface-overlay: rgba(2, 6, 23, 0.72);
  --surface-glass: var(--glass-bg);

  --accent-primary: var(--color-primary);
  --accent-secondary: var(--color-secondary);
  --accent-warning: var(--color-warning);
  --accent-gold: var(--color-accent);
  --accent-danger: var(--color-danger);

  --text-on-dark: var(--text-primary);
  --text-subtle: var(--text-secondary);
  --text-faint: var(--text-muted);

  /* Borders and radii */
  --border-subtle: 1px solid rgba(255, 255, 255, 0.08);
  --border-strong: 1px solid rgba(255, 255, 255, 0.16);
  --radius-sm: 6px;
  --radius-md: var(--border-radius-md);
  --radius-lg: var(--border-radius-lg);

  /* Shadows and glows */
  --shadow-panel: var(--pixel-shadow);
  --shadow-elevated: var(--glass-shadow);
  --shadow-cyan: var(--neon-glow-secondary);
  --shadow-green: var(--neon-glow-primary);
  --shadow-gold: var(--neon-glow-accent);

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;

  /* Layers */
  --z-base: 1;
  --z-header: 100;
  --z-hud: 500;
  --z-overlay: 1000;
  --z-modal: 30000;
  --z-toast: 2147483647;
}
:root {
  /* Cyber-Neon Theme - Inspired by Comic Panel 1 Colors */
  --bg-primary: #12072b; /* Deep purple/violet from trees and shadows */
  --bg-secondary: rgba(30, 15, 60, 0.75); /* Translucent dark purple */
  --bg-tertiary: rgba(142, 227, 36, 0.15); /* Translucent lime green */

  --color-primary: #8ee324; /* Bright lime green of the grass */
  --color-secondary: #00e5ff; /* Vibrant cyan of the trees and shirt */
  --color-accent: #ffbe1a; /* Warm sunset yellow of the sun */
  --color-danger: #ff007f; /* Neon pink/magenta of the glowing ball and flowers */
  --color-warning: #f59e0b;

  /* Theme Gold/Yellow Variables from Image */
  --color-gold-light: #ffd54f;
  --color-gold-mid: #ffbe1a;
  --color-gold-dark: #f59e0b;
  --gold-gradient: linear-gradient(to bottom, var(--color-gold-light), var(--color-gold-mid));

  --text-primary: #ffffff;
  --text-secondary: #e2e8f0;
  --text-muted: #a0aec0;
  --text-dark: #12072b;

  --border-main: 1px solid rgba(255, 255, 255, 0.1);
  --pixel-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);

  --glass-bg: rgba(18, 7, 43, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);

  --border-radius-lg: 10px;
  --border-radius-md: 10px;

  --neon-glow-primary: 0 0 15px rgba(142, 227, 36, 0.35);
  --neon-glow-secondary: 0 0 15px rgba(0, 229, 255, 0.35);
  --neon-glow-accent: 0 0 15px rgba(255, 190, 26, 0.35);
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
button,
input,
select,
textarea {
  font-family: inherit;
}
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: calc(var(--vh, 1vh) * 100);
  background-color: #12072b;
  background-image:
    radial-gradient(circle at 80% 20%, rgba(255, 190, 26, 0.12), transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(255, 0, 127, 0.08), transparent 50%),
    linear-gradient(rgba(18, 7, 43, 0.82), rgba(18, 7, 43, 0.92)),
    url('/assets/background/background_robo.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  position: relative;
  isolation: isolate;
}
html::before,
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  display: none !important;
}
html::before {
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.98) 0 8%, transparent 8.5%),
    radial-gradient(circle at 26% 14%, rgba(255, 255, 255, 0.98) 0 11%, transparent 11.5%),
    radial-gradient(circle at 39% 11%, rgba(255, 255, 255, 0.95) 0 9%, transparent 9.4%),
    radial-gradient(circle at 72% 13%, rgba(255, 255, 255, 0.98) 0 10%, transparent 10.5%),
    radial-gradient(circle at 81% 11%, rgba(255, 255, 255, 0.96) 0 8.5%, transparent 9%),
    radial-gradient(circle at 90% 18%, rgba(255, 255, 255, 0.94) 0 7%, transparent 7.5%),
    radial-gradient(circle at 52% 16%, rgba(255, 255, 255, 0.92) 0 10%, transparent 10.4%);
  opacity: 0.92;
  mix-blend-mode: screen;
}
body::before {
  background:
    /* far hills */
    linear-gradient(165deg, transparent 58%, rgba(112, 150, 108, 0.34) 58.4%, rgba(112, 150, 108, 0.34) 62%, transparent 62.3%),
    linear-gradient(171deg, transparent 63%, rgba(126, 168, 116, 0.28) 63.2%, rgba(126, 168, 116, 0.28) 67%, transparent 67.3%),
    /* middle blocky hills */
    linear-gradient(178deg, transparent 70%, rgba(88, 128, 92, 0.35) 70.2%, rgba(88, 128, 92, 0.35) 76%, transparent 76.3%),
    /* ground blocks */
    linear-gradient(180deg, transparent 80%, rgba(151, 177, 127, 0.9) 80.2%, rgba(151, 177, 127, 0.9) 83%, transparent 83.2%),
    linear-gradient(180deg, transparent 86%, rgba(132, 160, 102, 0.95) 86.2%, rgba(132, 160, 102, 0.95) 90%, transparent 90.2%),
    linear-gradient(180deg, transparent 92%, rgba(120, 147, 91, 0.92) 92.2%, rgba(120, 147, 91, 0.92) 96%, transparent 96.2%),
    /* subtle block texture */
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size:
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%,
    48px 48px,
    48px 48px;
  background-position:
    center 0,
    center 0,
    center 0,
    center 0,
    center 0,
    center 0,
    center 0,
    center 0;
  opacity: 0.9;
}
/* Modern Cyber Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(10, 11, 22, 0.9);
}
::-webkit-scrollbar-thumb {
  background: rgba(6, 182, 212, 0.25);
  border: 1px solid rgba(6, 182, 212, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-secondary);
  box-shadow: var(--neon-glow-secondary);
}
body {
  overflow-x: hidden;
  overflow-y: auto;
}
#root {
  min-height: 100vh;
  min-height: 100dvh;
  min-height: calc(var(--vh, 1vh) * 100);
  display: flex;
  flex-direction: column;
}
.app-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  /*padding-bottom: 4rem;*/
}
.main-content-full {
  padding: 0;
  margin: 0;
  height: 100vh;
  overflow: hidden;
}
a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
}
a:hover {
  color: var(--color-accent);
  text-shadow: 0 0 8px var(--color-accent);
}
/* Utility Classes */
.mt-1 {
  margin-top: 0.25rem !important;
}
.mt-2 {
  margin-top: 0.5rem !important;
}
.mt-3 {
  margin-top: 1rem !important;
}
.mt-4 {
  margin-top: 1.5rem !important;
}
.mt-5 {
  margin-top: 3rem !important;
}
.mb-1 {
  margin-bottom: 0.25rem !important;
}
.mb-2 {
  margin-bottom: 0.5rem !important;
}
.mb-3 {
  margin-bottom: 1rem !important;
}
.mb-4 {
  margin-bottom: 1.5rem !important;
}
.mb-5 {
  margin-bottom: 3rem !important;
}
.w-100 {
  width: 100% !important;
}
.h1-primary {
  color: var(--text-primary) !important;
}
.mx-auto {
  margin-left: auto !important;
  margin-right: auto !important;
}
.glass-panel {
  background: var(--surface-panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: var(--border-subtle);
  box-shadow: var(--shadow-panel), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md) !important;
  font-weight: bold;
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  cursor: pointer;
  border: var(--border-strong) !important;
  outline: none;
  box-shadow: var(--shadow-panel) !important;
  line-height: 1.5;
  text-transform: uppercase;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.btn-sm {
  padding: 0.4rem 0.8rem !important;
  font-size: 0.55rem !important;
}
.btn-primary-neon {
  background: rgba(6, 182, 212, 0.15) !important;
  border: 1px solid var(--accent-secondary) !important;
  color: var(--accent-secondary) !important;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2) !important;
}
.btn-primary-neon:hover {
  background: var(--accent-secondary) !important;
  color: var(--surface-page) !important;
  box-shadow: var(--shadow-cyan) !important;
  transform: translateY(-2px) !important;
}
.btn-primary-neon:active {
  transform: translateY(0px) !important;
}
.btn-danger-neon {
  background: rgba(239, 68, 68, 0.15) !important;
  border: 1px solid var(--accent-danger) !important;
  color: var(--accent-danger) !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2) !important;
}
.btn-danger-neon:hover {
  background: var(--accent-danger) !important;
  color: var(--text-on-dark) !important;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.5) !important;
  transform: translateY(-2px) !important;
}
.btn-danger-neon:active {
  transform: translateY(0px) !important;
}
.btn-primary {
  background: var(--accent-primary) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2) !important;
}
.btn-primary:hover {
  background: #10b981 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}
.btn-primary:active {
  transform: translateY(0px) !important;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2) !important;
}
.btn-secondary {
  background: var(--accent-secondary) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2) !important;
}
.btn-secondary:hover {
  background: #06b6d4 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.45) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}
.btn-secondary:active {
  transform: translateY(0px) !important;
  box-shadow: 0 4px 10px rgba(6, 182, 212, 0.2) !important;
}
.btn-success {
  background: rgba(16, 185, 129, 0.15) !important;
  border: 1px solid var(--accent-primary) !important;
  color: #4ade80 !important;
}
.btn-success:hover {
  background: var(--accent-primary) !important;
  color: white !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4) !important;
}
.btn-success:active {
  transform: translateY(0px) !important;
}
.btn-recon-tactical {
  background: rgba(250, 204, 21, 0.15) !important;
  border: 1px solid var(--accent-gold) !important;
  color: var(--accent-gold) !important;
}
.btn-recon-tactical:hover {
  background: var(--accent-gold) !important;
  color: #000 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(250, 204, 21, 0.4) !important;
}
.btn-back {
  background: rgba(239, 68, 68, 0.15) !important;
  border: 1px solid var(--accent-danger) !important;
  color: #f87171 !important;
}
.btn-back:hover {
  background: var(--accent-danger) !important;
  color: white !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4) !important;
}
.btn-back:active {
  transform: translateY(0px) !important;
}
.btn-accent {
  background: var(--accent-gold) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #000 !important;
}
.btn-accent:hover {
  background: #fef08a !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(250, 204, 21, 0.4) !important;
}
.btn-accent:active {
  transform: translateY(0px) !important;
}
.btn-edit-solo {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: white !important;
}
.btn-edit-solo:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.15) !important;
}
.btn-xl {
  max-width: 300px;
}
.btn-doc {
  background: rgba(239, 68, 68, 0.15) !important;
  border: 1px solid var(--accent-danger) !important;
  color: #f87171 !important;
}
.btn-doc:hover {
  background: var(--accent-danger) !important;
  color: white !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4) !important;
}
.btn:disabled {
  opacity: 0.5 !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: #64748b !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}
/* Tactical Back Button Standard */
.btn-back-tactical {
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent-secondary);
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
  font-size: 0.7rem;
  width: fit-content;
  text-decoration: none !important;
}
.btn-back-tactical:hover {
  color: #0a0b1e;
  border-color: var(--color-gold-light);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}
.btn-back-tactical .btn-icon {
  font-size: 1.1rem;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
}
@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
  }

  50% {
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.8);
  }

  100% {
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
  }
}
.glow-border {
  border: 1px solid var(--color-secondary);
  animation: pulse-glow 2s infinite;
}
h1,
h2,
h3,
h4,
h5,
h6,
btn {
  font-family: 'Press Start 2P', cursive;
  font-weight: 400;
  letter-spacing: 0px;
  text-transform: uppercase;
}
/* Typography System - Retro Cyber Hierarchy */
h1, .page-title {
  font-size: 1.8rem;
  color: var(--color-accent);
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.25);
  margin-bottom: 1.25rem;
  line-height: 1.4;
}
h1:focus,
h1:active,
.navbar-brand:focus,
.navbar-brand:active {
  outline: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
h2, .section-title {
  font-size: 1.25rem;
  color: var(--color-secondary);
  margin-bottom: 1rem;
  line-height: 1.4;
}
h3 {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}
h4 {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
/* Responsive Headings */
@media (max-width: 768px) {
  h1, .page-title {
    font-size: 1.4rem;
  }
  h2, .section-title {
    font-size: 1.05rem;
  }
  h3 {
    font-size: 0.85rem;
  }
  h4 {
    font-size: 0.75rem;
  }
}
@media (max-width: 480px) {
  h1, .page-title {
    font-size: 1.2rem;
  }
  h2, .section-title {
    font-size: 0.95rem;
  }
  h3 {
    font-size: 0.8rem;
  }
  h4 {
    font-size: 0.7rem;
  }
}
.text-gradient {
  background: linear-gradient(to right, var(--color-secondary), var(--color-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-subtitle, .subtitle {
  font-size: 1.05rem;
  font-family: 'Outfit', sans-serif;
  color: var(--text-secondary);
  opacity: 0.85;
  letter-spacing: 0.5px;
  line-height: 1.6;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
/* Normal Text Helper */
.text-normal {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
}
.text-muted-custom {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
}
.text-gradient-gold {
  background: linear-gradient(to right, #fbbf24, #f59e0b, #d97706);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.text-gradient-cyan {
  background: linear-gradient(to right, #06b6d4, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}
@media (max-width: 768px) {
  .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
  }
}
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.text-center {
  text-align: center;
}
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}
/* Global Loading Screen Styles */
.global-loading-screen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.55);
  z-index: 2147483647;
  overflow: hidden;
  touch-action: none;
  pointer-events: all;
  isolation: isolate;
}
.global-loading-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 35%, rgba(6, 182, 212, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.62), rgba(15, 23, 42, 0.84));
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
  pointer-events: none;
  z-index: 0;
}
.global-loading-screen > * {
  position: relative;
  z-index: 1;
}
body:has(.global-loading-screen) {
  overflow: hidden !important;
}
.loading-screen-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  animation: fadeIn 0.8s ease-out;
}
.loading-robot-container {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}
.loading-robot {
  width: 180px;
  height: 180px;
  z-index: 2;
  filter: drop-shadow(4px 4px 0px rgba(0, 0, 0, 0.5));
  animation: float 3s ease-in-out infinite;
  image-rendering: pixelated;
}
.loading-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 4px solid rgba(6, 182, 212, 0.05);
  border-top: 4px solid var(--color-secondary);
  border-radius: 50%;
  animation: spin 1.5s linear infinite;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}
.loading-ring-outer {
  position: absolute;
  width: 120%;
  height: 120%;
  border: 2px dashed rgba(16, 185, 129, 0.1);
  border-bottom: 2px dashed var(--color-primary);
  border-radius: 50%;
  animation: spin-reverse 2.5s linear infinite;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}
/* Responsive Loading */
@media (max-width: 480px) {
  .loading-content {
    width: 90%;
    gap: 1.5rem;
  }

  .loading-robot-container {
    width: 240px;
    height: 240px;
  }

  .loading-robot {
    width: 160px;
    height: 160px;
  }

  .loading-text-new {
    font-size: 1.3rem;
    text-align: center;
    line-height: 35px;
  }

  .loading-bar-container-new {
    width: 100%;
    max-width: 250px;
  }

  .loading-subtext {
    font-size: 0.7rem;
    padding: 0 20px;
    text-align: center;
  }
}
.loading-text-new {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0px;
  text-transform: uppercase;
  margin: 0;
  color: var(--color-accent);
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.35);
  text-align: center;
  width: 100%;
}
.loading-bar-container-new {
  width: 320px;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}
.loading-bar-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--color-secondary), var(--color-primary));
  box-shadow: 0 0 10px var(--color-secondary);
  border-radius: 4px;
  animation: loadIndeterminate 2s ease-in-out infinite;
}
.loading-subtext {
  color: #94a3b8;
  font-family: monospace;
  font-size: 0.75rem;
  letter-spacing: 2px;
  margin: 0;
  text-transform: uppercase;
  text-align: center;
  opacity: 0.8;
}
.text-gradient-gold {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes spin-reverse {
  to {
    transform: rotate(-360deg);
  }
}
@keyframes loadIndeterminate {
  0% {
    width: 0%;
    margin-left: 0;
  }
  50% {
    width: 60%;
    margin-left: 20%;
  }
  100% {
    width: 0%;
    margin-left: 100%;
  }
}
@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(-2deg);
  }
}
@keyframes loading-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}
@media (max-width: 600px) {
  .loading-text-new {
    font-size: 1.6rem;
    letter-spacing: 2px;
  }

  .loading-bar-container-new {
    width: 250px;
  }

  .loading-robot-container {
    width: 140px;
    height: 140px;
  }

  .loading-robot {
    width: 80px;
    height: 80px;
    margin: 0 auto;
  }
}
/* CRT TV Scanline & Vignette Effect Overlay */
.crt-overlay-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.crt-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Let clicks pass through to the arena */
  z-index: 100;
  
  /* Vignette + Curve simulated bulb shadow */
  background: radial-gradient(
    circle, 
    rgba(255, 255, 255, 0.04) 0%, 
    rgba(0, 0, 0, 0.25) 60%, 
    rgba(0, 0, 0, 0.75) 100%
  );
  
  /* Gentle scanlines */
  background-image: 
    radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, rgba(0, 0, 0, 0.25) 60%, rgba(0, 0, 0, 0.75) 100%),
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.16) 0px,
      rgba(0, 0, 0, 0.16) 1.5px,
      transparent 1.5px,
      transparent 3px
    );
  
  /* Grid sizing */
  background-size: 100% 100%, 100% 3px;
  
  /* Phosphor CRT inner bloom/glow */
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.85);
  
  /* CRT Screen Flicker */
  animation: crt-flicker 0.15s infinite;
}
/* Subtle phosphor line scroll scan */
.crt-screen::after {
  content: " ";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.04) 10%,
    rgba(255, 255, 255, 0) 20%
  );
  opacity: 0.75;
  pointer-events: none;
  animation: crt-scandown 15s linear infinite;
}
@keyframes crt-flicker {
  0% { opacity: 0.993; }
  50% { opacity: 1.0; }
  100% { opacity: 0.996; }
}
@keyframes crt-scandown {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}
.pwa-update-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 30000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 4px solid #000;
  background: rgba(26, 28, 44, 0.98);
  color: var(--text-primary);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.6);
}
.pwa-update-button {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.55rem;
  text-transform: uppercase;
  border: 3px solid #000;
  background: var(--color-accent);
  color: #000;
  padding: 10px 14px;
  cursor: pointer;
  box-shadow: 3px 3px 0 #000;
}
.pwa-update-button:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #000;
}
@media (max-width: 640px) {
  .pwa-update-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .pwa-update-button {
    width: 100%;
  }
}
/* Cyberpunk modern page animations */
@keyframes pageSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-page-entry {
  animation: pageSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes floating {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
.animate-floating {
  animation: floating 4s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
  }
  50% {
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.6);
  }
}
.animate-pulse-glow {
  animation: pulseGlow 3s ease-in-out infinite;
}
/* Shared Cyberpunk background layout for race menus */
.race-menu-layout {
  position: relative;
   background-size: 40px 40px, 40px 40px, 100% 100%, 100% 100% !important;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
}
.race-menu-layout::before {
  content: " ";
  display: block;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  z-index: 1;
  background-size: 100% 3px, 3px 100%;
  pointer-events: none;
  opacity: 0.4;
}

