:root {
  --bg: #0a0f1c;
  --panel: rgba(16, 22, 40, 0.72);
  --stroke: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --text-2: #a0a0a0;
  --blue: #0066ff;
  --neon: #00e5ff;
  --purple: #7b2eff;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --glow: 0 0 0 1px rgba(0, 229, 255, 0.18), 0 0 22px rgba(0, 229, 255, 0.22);
  --glow-strong: 0 0 0 1px rgba(0, 229, 255, 0.22), 0 0 34px rgba(0, 229, 255, 0.3);
  --font: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(1200px 600px at 70% -20%, rgba(0, 102, 255, 0.35), transparent 60%),
    radial-gradient(900px 550px at 10% 10%, rgba(123, 46, 255, 0.25), transparent 55%),
    radial-gradient(700px 520px at 85% 80%, rgba(0, 229, 255, 0.18), transparent 55%),
    var(--bg);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
  background: linear-gradient(180deg, rgba(10, 15, 28, 0.9), rgba(10, 15, 28, 0.68));
  border-right: 1px solid var(--stroke);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
}

.sidebar__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 18px;
}

.sidebar__close {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--glow);
}

.brand__text {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
}

.nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid transparent;
}

.nav__item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

.nav__item.is-active {
  background: linear-gradient(180deg, rgba(0, 102, 255, 0.18), rgba(0, 229, 255, 0.06));
  border-color: rgba(0, 229, 255, 0.22);
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.12), 0 0 26px rgba(0, 229, 255, 0.18);
}

.nav__icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.9);
}

.nav__label {
  font-weight: 600;
  font-size: 14px;
}

.sidebar__bottom {
  margin-top: auto;
  padding: 14px 12px;
}

.sidebar__hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.4;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(10, 15, 28, 0.88), rgba(10, 15, 28, 0.68));
  backdrop-filter: blur(12px);
}

.topbar__menu {
  display: none;
}

.topbar__title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.topbar__kicker {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__sub {
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
}

.search:hover {
  border-color: rgba(0, 229, 255, 0.22);
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.12);
}

.search__text {
  font-size: 13px;
  font-weight: 600;
}

.content {
  padding: 18px 18px 110px;
}

.section {
  margin: 18px 0 26px;
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section__title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.section__link {
  font-size: 12px;
  color: rgba(0, 229, 255, 0.92);
}

.section__link:hover {
  text-decoration: underline;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.game-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  aspect-ratio: 1 / 1;
}

.game-card:hover {
  border-color: rgba(0, 229, 255, 0.18);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 229, 255, 0.1);
}

.game-card__thumb {
  position: absolute;
  inset: 0;
  background: radial-gradient(120px 120px at 30% 20%, rgba(0, 229, 255, 0.18), transparent 60%),
    radial-gradient(140px 140px at 80% 70%, rgba(123, 46, 255, 0.18), transparent 65%),
    linear-gradient(180deg, rgba(0, 102, 255, 0.15), rgba(10, 15, 28, 0.2));
}

.game-card__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.05) 6px,
    rgba(255, 255, 255, 0.01) 6px,
    rgba(255, 255, 255, 0.01) 12px
  );
  opacity: 0.4;
}

.game-card__meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 10px 10px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55));
  display: grid;
  gap: 4px;
}

.game-card__name {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.2px;
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.65);
}

.game-card__tag {
  width: fit-content;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 15, 28, 0.45);
  backdrop-filter: blur(10px);
}

.ribbon {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 8px;
  font-size: 10px;
  font-weight: 800;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(0, 102, 255, 0.75), rgba(0, 229, 255, 0.55));
  box-shadow: var(--glow);
}

.fav {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 15, 28, 0.55);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
}

.fav:hover {
  border-color: rgba(0, 229, 255, 0.25);
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.1);
}

.play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 140ms ease;
}

.game-card:hover .play {
  opacity: 1;
}

.play__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.22);
  background: rgba(10, 15, 28, 0.6);
  box-shadow: var(--glow-strong);
  color: rgba(255, 255, 255, 0.95);
  font-weight: 800;
  font-size: 13px;
}

.play__btn svg {
  color: rgba(0, 229, 255, 0.95);
}

.footer {
  margin-top: 22px;
}

.footer__note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  font-size: 12px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.45);
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.96);
}

.btn--primary {
  background: linear-gradient(180deg, rgba(0, 102, 255, 0.95), rgba(123, 46, 255, 0.85));
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.18), 0 18px 40px rgba(0, 0, 0, 0.4);
}

.btn--primary:hover {
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.24), 0 18px 48px rgba(0, 0, 0, 0.45);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn--ghost:hover {
  border-color: rgba(0, 229, 255, 0.22);
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.12);
}

.btn--full {
  width: 100%;
}

.icon-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.9);
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-btn:hover {
  border-color: rgba(0, 229, 255, 0.22);
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.12);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 30;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: none;
  background: linear-gradient(180deg, rgba(10, 15, 28, 0.4), rgba(10, 15, 28, 0.92));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 10px 12px;
  gap: 6px;
  backdrop-filter: blur(12px);
}

.bottom-nav__item {
  flex: 1;
  display: grid;
  gap: 6px;
  place-items: center;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--font);
  cursor: pointer;
  padding: 8px 8px;
  border-radius: 14px;
}

.bottom-nav__item span {
  font-size: 11px;
  font-weight: 700;
}

.bottom-nav__item.is-active {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 229, 255, 0.18);
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.08);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
}

.modal__panel {
  width: min(440px, 100%);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(16, 22, 40, 0.8), rgba(10, 15, 28, 0.85));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal__title {
  font-weight: 900;
  letter-spacing: 0.2px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 10px;
  gap: 10px;
}

.tabs__tab {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.9);
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
}

.tabs__tab.is-active {
  border-color: rgba(0, 229, 255, 0.22);
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.1);
  background: linear-gradient(180deg, rgba(0, 102, 255, 0.18), rgba(123, 46, 255, 0.12));
}

.form {
  padding: 4px 16px 16px;
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 8px;
}

.field__label {
  font-size: 12px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.9);
}

.field__input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 15, 28, 0.6);
  color: rgba(255, 255, 255, 0.92);
  outline: none;
}

.field__input::placeholder {
  color: rgba(160, 160, 160, 0.9);
}

.field__input:focus {
  border-color: rgba(0, 229, 255, 0.22);
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.1);
}

.form__hint {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.4;
}

.form__msg {
  min-height: 18px;
  font-size: 12px;
  color: rgba(0, 229, 255, 0.95);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 86px;
  transform: translateX(-50%);
  z-index: 80;
  width: min(520px, calc(100% - 24px));
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 15, 28, 0.85);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(320px, 92vw);
    transform: translateX(-105%);
    transition: transform 160ms ease;
    z-index: 40;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }

  .sidebar.is-open {
    transform: translateX(0%);
  }

  .sidebar__close {
    display: grid;
  }

  .topbar__menu {
    display: grid;
  }

  .search__text {
    display: none;
  }

  .games-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .bottom-nav {
    display: flex;
  }

  .content {
    padding-bottom: 116px;
  }
}

@media (max-width: 390px) {
  .games-grid {
    gap: 8px;
  }
}

