@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");

:root {
  --rdx-sticky-offset: 0px;
}

body > header.header {
  position: sticky;
  top: var(--rdx-sticky-offset);
  z-index: 40;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(11, 11, 15, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: 1360px;
  margin: auto;
  min-height: 60px;
  padding: 14px 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: "Press Start 2P", monospace;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
  text-decoration: none;
  text-shadow: 0 0 14px rgba(229, 9, 20, 0.25);
  transition: color 200ms ease, transform 200ms cubic-bezier(0.4, 0, 0.2, 1), text-shadow 250ms ease;
  white-space: nowrap;
}

.logo:hover,
.logo:focus-visible {
  color: #e50914;
  outline: none;
  text-shadow: 0 0 22px rgba(229, 9, 20, 0.45), 0 0 28px rgba(229, 9, 20, 0.28);
  transform: scale(1.02);
}

.pixel {
  animation: pixelGlow 3s ease-in-out infinite;
  background: conic-gradient(from 0deg, #e50914, #b20710);
  border-radius: 2px;
  box-shadow: 0 0 18px rgba(229, 9, 20, 0.65);
  display: inline-block;
  flex-shrink: 0;
  height: 18px;
  width: 18px;
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px 12px;
  flex-grow: 1;
  flex-wrap: wrap;
  min-width: 0;
}

.nav-link {
  align-items: center;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.86);
  display: inline-flex;
  font-size: 0.96rem;
  font-weight: 600;
  justify-content: center;
  padding: 8px 12px;
  text-decoration: none;
  transition: background-color 200ms ease, color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: #e50914;
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
  outline: none;
  transform: translateY(-1px);
}

.nav-link.is-active,
.nav-link[aria-current="page"] {
  background: #e50914;
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
}

.nav-cta {
  background: linear-gradient(135deg, #e50914, #c40812);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(229, 9, 20, 0.28);
  color: #fff;
  display: inline-flex;
  flex-shrink: 0;
  font-size: 0.94rem;
  font-weight: 700;
  justify-content: center;
  margin-left: 10px;
  padding: 12px 20px;
  text-decoration: none;
  transition: filter 200ms ease, transform 200ms ease, box-shadow 200ms ease;
  white-space: nowrap;
}

.nav-cta:hover,
.nav-cta:focus-visible {
  box-shadow: 0 8px 22px rgba(229, 9, 20, 0.34);
  filter: brightness(1.05);
  outline: none;
  transform: translateY(-1px);
}

.menu-toggle {
  align-items: center;
  background: none;
  border: none;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  display: none;
  flex-shrink: 0;
  height: 44px;
  justify-content: center;
  position: relative;
  transition: background-color 200ms ease, border-color 200ms ease, transform 200ms ease;
  width: 44px;
}

.menu-toggle-label {
  display: none;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  background: rgba(229, 9, 20, 0.1);
  outline: none;
  transform: translateY(-1px);
}

.hamburger-line {
  background: currentColor;
  border-radius: 999px;
  display: block;
  height: 2px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
  transition: 250ms ease;
  width: 18px;
}

.hamburger-line:nth-child(1) {
  top: 14px;
}

.hamburger-line:nth-child(2) {
  top: 21px;
}

.hamburger-line:nth-child(3) {
  top: 28px;
}

.menu-toggle.active .hamburger-line:nth-child(1) {
  top: 21px;
  transform: translateX(-50%) rotate(45deg);
}

.menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .hamburger-line:nth-child(3) {
  top: 21px;
  transform: translateX(-50%) rotate(-45deg);
}

.nav-dropdown {
  position: relative;
}

.dropdown-toggle {
  cursor: pointer;
}

.dropdown-menu {
  background: rgba(15, 15, 15, 0.95);
  border: 1px solid rgba(229, 9, 20, 0.3);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  display: none;
  left: 0;
  min-width: 180px;
  position: absolute;
  top: 100%;
  z-index: 1000;
}

.nav-dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-link {
  color: #fff;
  display: block;
  padding: 10px 16px;
  text-decoration: none;
  transition: background-color 200ms ease, color 200ms ease;
  white-space: nowrap;
}

.dropdown-link:hover,
.dropdown-link:focus-visible {
  background: rgba(229, 9, 20, 0.1);
  color: #e50914;
  outline: none;
}

#rdx-lang-banner {
  align-items: center;
  animation: rdx-slide-up 0.3s ease;
  background: rgba(15, 15, 18, 0.96);
  border: 1px solid rgba(229, 9, 20, 0.35);
  border-radius: 14px;
  bottom: 24px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  color: #f5f5f5;
  display: flex;
  gap: 12px;
  left: 50%;
  max-width: calc(100vw - 32px);
  padding: 14px 16px;
  position: fixed;
  transform: translateX(-50%);
  z-index: 1200;
}

#rdx-lang-banner .rdx-lang-copy {
  font-size: 0.92rem;
  line-height: 1.35;
}

#rdx-lang-banner .rdx-lang-btn {
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 14px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

#rdx-lang-banner .rdx-lang-btn:hover,
#rdx-lang-banner .rdx-lang-btn:focus-visible {
  outline: none;
  transform: translateY(-1px);
}

#rdx-lang-banner .rdx-lang-btn-primary {
  background: #e50914;
  color: #fff;
}

#rdx-lang-banner .rdx-lang-btn-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.72);
}

#rdx-locale-toolbar {
  position: sticky;
  top: 0;
  z-index: 48;
  background: rgba(10, 10, 14, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#rdx-locale-toolbar .rdx-locale-toolbar-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.rdx-locale-toolbar-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.rdx-locale-toolbar-eyebrow {
  color: #ffb7bd;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rdx-locale-toolbar-text {
  color: #f5f5f5;
  font-size: 0.88rem;
  line-height: 1.35;
}

#rdx-en-switcher {
  align-items: center;
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  color: #f5f5f5;
  display: inline-flex;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  justify-content: center;
  min-width: 96px;
  padding: 9px 16px;
  position: static;
  text-decoration: none;
  z-index: 1199;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

#rdx-en-switcher:hover,
#rdx-en-switcher:focus-visible {
  background: rgba(40, 40, 40, 0.98);
  border-color: rgba(229, 9, 20, 0.5);
  outline: none;
  transform: translateY(-1px);
}

#rdx-en-switcher.rdx-en-switcher-dual {
  letter-spacing: 0.02em;
}

#rdx-en-switcher .rdx-en-switcher-flags img {
  border-radius: 2px;
  display: block;
  height: 12px;
  width: 16px;
}

#rdx-en-switcher .rdx-en-switcher-text {
  white-space: nowrap;
}

@keyframes rdx-slide-up {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes headerMenuDrop {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pixelGlow {
  0%,
  100% {
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.4);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 25px rgba(229, 9, 20, 0.7), 0 0 35px rgba(229, 9, 20, 0.3);
    transform: scale(1.08);
  }
}

@media (max-width: 980px) {
  .nav {
    gap: 12px;
  }

  .nav-link {
    font-size: 0.95rem;
    padding: 8px 10px;
  }

  .nav-cta {
    padding: 11px 18px;
  }
}

@media (max-width: 1320px) {
  .nav {
    flex-wrap: wrap;
  }

  .lang-switcher {
    margin-left: auto;
  }

  .nav-cta {
    margin-left: 0;
  }

  .nav-menu {
    flex-basis: 100%;
    justify-content: flex-start;
    order: 4;
    padding-top: 2px;
  }
}

@media (max-width: 1100px) {
  .nav-link {
    font-size: 0.9rem;
    padding: 7px 10px;
  }

  .lang-btn {
    font-size: 0.78rem;
    padding: 7px 10px;
  }

  .nav-cta {
    font-size: 0.88rem;
    padding: 11px 16px;
  }
}

@media (max-width: 768px) {
  body > header.header {
    position: relative;
    top: auto;
    background: rgba(11, 11, 15, 0.88);
  }

  .nav {
    align-items: stretch;
    display: grid;
    gap: 12px;
    grid-template-areas:
      "logo logo"
      "language menu"
      "cta cta"
      "panel panel";
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: auto;
    padding: 16px 14px 18px;
  }

  .logo {
    grid-area: logo;
    justify-content: center;
    justify-self: center;
    max-width: 100%;
    text-align: center;
  }

  .lang-switcher {
    grid-area: language;
    margin-left: 0;
    width: 100%;
  }

  .lang-btn {
    justify-content: center;
    min-height: 52px;
    width: 100%;
  }

  .menu-toggle {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: inline-flex;
    gap: 10px;
    grid-area: menu;
    justify-content: center;
    margin-left: 0;
    min-height: 52px;
    padding: 0 18px 0 54px;
    width: 100%;
  }

  .menu-toggle-label {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .hamburger-line {
    left: 20px;
    transform: none;
    width: 18px;
  }

  .hamburger-line:nth-child(1) {
    top: 18px;
  }

  .hamburger-line:nth-child(2) {
    top: 25px;
  }

  .hamburger-line:nth-child(3) {
    top: 32px;
  }

  .menu-toggle.active .hamburger-line:nth-child(1) {
    top: 25px;
    transform: rotate(45deg);
  }

  .menu-toggle.active .hamburger-line:nth-child(3) {
    top: 25px;
    transform: rotate(-45deg);
  }

  .nav-cta {
    align-items: center;
    grid-area: cta;
    margin-left: 0;
    min-height: 52px;
    order: 3;
    width: 100%;
  }

  .nav-menu {
    align-items: stretch;
    animation: headerMenuDrop 250ms ease-out;
    background: rgba(15, 15, 20, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    display: none;
    flex-direction: column;
    gap: 8px;
    grid-area: panel;
    justify-content: flex-start;
    margin-top: 0;
    order: 4;
    padding: 14px;
    width: 100%;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-link {
    justify-content: flex-start;
    padding: 14px 16px;
    width: 100%;
  }

  #rdx-lang-banner {
    bottom: 24px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: calc(100vw - 24px);
  }

  #rdx-locale-toolbar .rdx-locale-toolbar-inner {
    align-items: stretch;
    flex-wrap: wrap;
    padding: 10px 12px;
  }

  .rdx-locale-toolbar-text {
    font-size: 0.8rem;
    line-height: 1.4;
  }

  #rdx-en-switcher {
    width: 100%;
    justify-content: center;
    min-width: 0;
  }
}

/* ── Language Switcher Dropdown ────────────────────────────────── */
.lang-switcher {
  position: relative;
  flex-shrink: 0;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 11px;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s;
  font-family: inherit;
}

.lang-btn .rdx-lang-btn-flag {
  border-radius: 2px;
  display: block;
  flex-shrink: 0;
  height: 15px;
  width: 20px;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.22);
}

.lang-btn[aria-expanded="true"] {
  background: rgba(229, 9, 20, 0.14);
  border-color: rgba(229, 9, 20, 0.38);
}

.lang-chevron {
  transition: transform 0.18s;
  opacity: 0.7;
}

.lang-btn[aria-expanded="true"] .lang-chevron {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #13131a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
  min-width: 292px;
  padding: 10px;
  z-index: 300;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  pointer-events: none;
}

.lang-dropdown.open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lang-current {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px 9px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 6px;
}

.lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 0.81rem;
  font-weight: 500;
  transition: background 0.13s, color 0.13s;
  white-space: nowrap;
}

.lang-option:hover {
  background: rgba(229, 9, 20, 0.13);
  color: #fff;
}

.lang-option img {
  border-radius: 2px;
  flex-shrink: 0;
  display: block;
}

.rdx-flag-pair {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}
.rdx-flag-pair img {
  border-radius: 2px;
  display: block;
  height: 15px;
  width: 20px;
}

.lang-option .rdx-en-flags {
  min-width: 44px;
  justify-content: center;
}

/* Mobile: anchored language panel */
@media (max-width: 768px) {
  .lang-dropdown {
    position: fixed;
    top: var(--rdx-lang-mobile-top, 96px);
    bottom: auto;
    left: 12px;
    right: 12px;
    border-radius: 22px;
    min-width: unset;
    width: auto;
    max-height: calc(100dvh - var(--rdx-lang-mobile-top, 96px) - 16px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 14px;
    scrollbar-gutter: stable;
    transform: translateY(-12px) scale(0.98);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  }

  .lang-dropdown.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
  }

  .lang-current {
    position: sticky;
    top: -14px;
    z-index: 1;
    margin: -14px -14px 10px;
    padding: 12px 14px 14px;
    background: linear-gradient(180deg, rgba(19, 19, 26, 0.98), rgba(19, 19, 26, 0.92));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 22px 22px 0 0;
  }

  .lang-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .lang-option {
    min-height: 50px;
    padding: 12px 14px;
    font-size: 0.9rem;
  }
}

/* Backdrop for mobile language dropdown */
.rdx-lang-backdrop {
  display: none;
}

@media (max-width: 768px) {
  .rdx-lang-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 299;
    opacity: 0;
    transition: opacity 0.28s ease;
    pointer-events: none;
  }

  .rdx-lang-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }
}

/* ── Footer ────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 28px;
}

.foot {
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px 20px;
  color: var(--muted, #9aa0a6);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  align-items: center;
}

.foot small {
  color: var(--muted, #9aa0a6);
}

.foot .link {
  color: var(--muted, #9aa0a6);
  transition: color 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.foot .link:hover {
  color: #fff;
}

footer .foot > div:last-child {
  display: flex;
  align-items: center;
  gap: 10px !important;
  justify-content: flex-end;
  flex-wrap: nowrap !important;
  row-gap: 0 !important;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .foot .link {
    white-space: normal;
  }
  footer .foot > div:last-child {
    gap: 12px !important;
    justify-content: flex-start;
    flex-wrap: wrap !important;
    row-gap: 8px !important;
    white-space: normal;
  }
}

@media (max-width: 768px) {
  .foot {
    grid-template-columns: 1fr;
    text-align: center;
  }

  footer .foot > div:first-child {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  footer .foot > div:last-child {
    justify-content: center !important;
  }
}

@media (max-width: 560px) {
  .nav {
    padding: 16px 14px 18px;
  }

  .logo {
    font-size: clamp(0.95rem, 4vw, 1.2rem);
  }

  .nav-cta {
    min-width: 0;
    width: 100%;
  }
}
