:root {
  --primary: #ff3333;
  --primary-dark: #cc0000;
  --dark: #1a1a1a;
  --light: #e0e0e0;
  --accent: #990000;
  --table-bg: rgba(30, 30, 30, 0.8);
  --table-border: rgba(255, 255, 255, 0.1);
}

body {
  font-family: "Kanit", sans-serif;
  background-color: var(--dark);
  color: var(--light);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

[data-i18n="hero_subtitle"] {
  white-space: pre-line;
}

.header {
  background: rgba(10, 10, 18, 0.95);
  border-bottom: 2px solid var(--primary);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 70px;
}

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

.logo-img {
  height: 40px;
  width: auto;
  transition: transform 0.3s;
}

.logo-img:hover {
  transform: scale(1.1);
}

.logo-text {
  font-family: "Orbitron", sans-serif;
  font-size: 1.8rem;
  background: linear-gradient(to right, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
  text-decoration: none !important;
  flex-wrap: nowrap;
}

.nav-link {
  color: var(--light) !important;
  padding: 0.45rem 0.8rem;
  border-radius: 4px;
  transition: all 0.3s;
  font-weight: 600;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  background-color: var(--primary) !important;
  color: var(--dark) !important;
  text-decoration: none !important;
}

.login-btn {
  background-color: var(--primary);
  color: var(--dark) !important;
  padding: 0.5rem 1.5rem;
  border-radius: 4px;
  font-weight: 700;
  transition: all 0.3s;
  text-decoration: none !important;
  border: none;
}

.login-btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  text-decoration: none !important;
}

.dsc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1.5rem;
  background: #5865f2;
  color: white !important;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
  text-decoration: none !important;
  border: none;
}

.dsc-btn:hover {
  background: #4752c4;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(88, 101, 242, 0.4);
}

.lang-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lang-menu--header {
  position: absolute;
  top: 10px;
  right: 12px;
}

.lang-menu--corner {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 10000;
}

.lang-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.48rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(224, 224, 224, 0.92);
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease, border-color 160ms ease;
  white-space: nowrap;
}

.lang-menu-icon {
  border-radius: 3px;
}

.lang-menu-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.2);
}

.lang-menu-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.65);
  outline-offset: 2px;
}

.lang-menu-caret {
  opacity: 0.85;
  font-size: 0.9em;
}

.lang-menu-label {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 901px) {
  .nav-links {
    gap: 0.75rem;
  }

  .nav-link {
    padding: 0.4rem 0.65rem;
    font-size: 0.95rem;
  }

  .dsc-btn {
    padding: 0.45rem 1.1rem;
    font-size: 0.95rem;
  }

  .login-btn {
    padding: 0.45rem 1.1rem;
  }

  .lang-menu-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.92rem;
  }

  .lang-menu-list {
    min-width: 170px;
  }
}

.lang-menu-list {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 190px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(18, 18, 22, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  display: none;
  z-index: 9999;
}

.lang-menu[data-open="true"] .lang-menu-list {
  display: block;
}

.lang-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 10px;
  border: 0;
  background: transparent;
  color: rgba(224, 224, 224, 0.92);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
  transition: background 140ms ease, transform 140ms ease;
  text-align: left;
}

.lang-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.lang-menu-item[aria-pressed="true"] {
  background: rgba(255, 51, 51, 0.18);
  border: 1px solid rgba(255, 51, 51, 0.28);
}

.lang-flag {
  width: 18px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
  vertical-align: -2px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.lang-flag--ru {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='12' viewBox='0 0 18 12'%3E%3Crect width='18' height='12' fill='%23fff'/%3E%3Crect width='18' height='8' y='4' fill='%23003A9B'/%3E%3Crect width='18' height='4' y='8' fill='%23D52B1E'/%3E%3C/svg%3E");
}

.lang-flag--gb {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='12' viewBox='0 0 18 12'%3E%3Crect width='18' height='12' fill='%23012169'/%3E%3Cpath d='M0 0 L18 12 M18 0 L0 12' stroke='%23fff' stroke-width='3'/%3E%3Cpath d='M0 0 L18 12 M18 0 L0 12' stroke='%23C8102E' stroke-width='1.6'/%3E%3Crect x='7.2' width='3.6' height='12' fill='%23fff'/%3E%3Crect y='4.2' width='18' height='3.6' fill='%23fff'/%3E%3Crect x='7.8' width='2.4' height='12' fill='%23C8102E'/%3E%3Crect y='4.8' width='18' height='2.4' fill='%23C8102E'/%3E%3C/svg%3E");
}

.user-wrapper {
  position: relative;
  display: inline-block;
}

.user-pill {
  background: var(--primary);
  color: var(--dark);
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  font-family: "Kanit", sans-serif;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  box-shadow: 0 2px 5px rgba(255, 51, 51, 0.2);
}

.user-pill:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 51, 51, 0.3);
}

.user-pill i:first-child {
  font-size: 1rem;
}

.dropdown-arrow {
  font-size: 0.9rem;
  margin-left: 4px;
  transition: transform 0.3s;
}

.user-wrapper:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.user-menu {
  position: absolute;
  right: 0;
  top: 100%;
  background: rgba(10, 10, 18, 0.98);
  min-width: 180px;
  border-radius: 8px;
  padding: 8px 0;
  margin-top: 10px;
  border: 1px solid var(--table-border);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s;
  z-index: 1000;
}

.user-wrapper:hover .user-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 0.7rem 1.5rem;
  color: var(--light);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.menu-item i {
  width: 20px;
  margin-right: 10px;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.8;
}

.menu-item:hover {
  background: rgba(255, 51, 51, 0.1);
  color: var(--primary);
  padding-left: 1.7rem;
}

.menu-item:hover i {
  opacity: 1;
}

.menu-item.logout {
  color: #ff3333 !important;
}

.menu-item.logout:hover {
  background: rgba(255, 0, 0, 0.1);
  color: #ff3333;
}

.footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 2rem;
  color: rgba(224, 224, 224, 0.6);
  border-top: 1px solid var(--table-border);
  margin-top: auto;
  font-size: 0.9rem;
}

.footer-copy {
  grid-column: 2;
  justify-self: center;
}

.footer-link {
  grid-column: 3;
  justify-self: end;
  color: rgba(224, 224, 224, 0.75) !important;
  text-decoration: none !important;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--table-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}

.footer-link-left {
  grid-column: 1;
  justify-self: start;
}

.footer-link:hover {
  border-color: rgba(255, 51, 51, 0.6);
  color: var(--light) !important;
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    height: auto;
    padding: 1rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
  }
}

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

  .footer-copy,
  .footer-link {
    grid-column: auto;
    justify-self: center;
  }
}
