:root {
  --discord: #5865f2;
  --discord-dark: #3440cf;
  --discord-soft: #eef0ff;
  --ink: #202331;
  --muted: #778095;
  --surface: #ffffff;
  --soft: #eef2ff;
  --line: rgba(88, 101, 242, 0.16);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 14%, rgba(88, 101, 242, 0.18), transparent 28rem),
    radial-gradient(circle at 83% 68%, rgba(35, 165, 90, 0.12), transparent 26rem),
    linear-gradient(135deg, #f5f7ff 0%, #e9edff 46%, #f9fbff 100%);
}

body.search-expanded {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.hero {
  width: min(1080px, 100%);
  min-height: min(720px, calc(100vh - 56px));
  position: relative;
  display: grid;
  place-items: center;
}

.hero-banner {
  width: 100%;
  min-height: 560px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 70px 28px 58px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.9)),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    linear-gradient(var(--line) 1px, transparent 1px);
  background-size: auto, 34px 34px, 34px 34px;
  box-shadow: 0 24px 80px rgba(55, 65, 110, 0.16);
  overflow: visible;
  transition:
    min-height 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-radius 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 360ms ease,
    padding 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 360ms ease;
}

.brand-mark {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(88, 101, 242, 0.16), inset 0 -2px 0 rgba(88, 101, 242, 0.08);
}

.brand-mark img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

h1 {
  max-width: 920px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  text-align: center;
  font-size: clamp(42px, 8vw, 86px);
  line-height: 0.98;
  letter-spacing: 0;
  color: #171a28;
}

.discord-chip {
  width: clamp(52px, 9vw, 84px);
  height: clamp(52px, 9vw, 84px);
  display: inline-grid;
  place-items: center;
  color: var(--discord);
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  transform: translateY(3px);
}

.discord-chip svg {
  width: 100%;
  height: 100%;
}

.discord-chip svg path,
.discord-login svg path {
  fill: currentColor;
  stroke: none;
}

body.search-expanded .hero-banner {
  position: fixed;
  inset: 0;
  z-index: 7;
  width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  justify-content: flex-start;
  padding: clamp(76px, 10vh, 112px) clamp(18px, 6vw, 96px) 48px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.95), rgba(248, 250, 255, 0.98)),
    linear-gradient(90deg, rgba(88, 101, 242, 0.11) 1px, transparent 1px),
    linear-gradient(rgba(88, 101, 242, 0.11) 1px, transparent 1px);
  background-size: auto, 36px 36px, 36px 36px;
}

body.search-expanded .brand-mark {
  width: 64px;
  height: 64px;
}

body.search-expanded .brand-mark img {
  width: 46px;
  height: 46px;
}

body.search-expanded h1 {
  font-size: clamp(34px, 6vw, 64px);
}

body.search-expanded .discord-chip {
  width: clamp(44px, 7vw, 66px);
  height: clamp(44px, 7vw, 66px);
}

.search-card {
  width: min(620px, 100%);
  height: 64px;
  display: grid;
  grid-template-columns: 1fr 46px 46px;
  align-items: center;
  gap: 2px;
  padding: 0 12px 0 24px;
  border: 1px solid rgba(32, 35, 49, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 18px 0 -10px rgba(32, 35, 49, 0.18),
    0 18px 36px rgba(72, 82, 140, 0.16),
    inset 0 2px 3px rgba(255, 255, 255, 0.9),
    inset 0 -3px 5px rgba(32, 35, 49, 0.08);
  transform: perspective(900px) rotateX(2deg);
  transition:
    width 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
    height 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-radius 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 360ms ease,
    transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
    background 360ms ease;
}

body.search-expanded .search-card {
  width: min(760px, 100%);
  height: 70px;
  grid-template-columns: 1fr 52px 52px;
  gap: 6px;
  padding: 0 12px 0 28px;
  border-color: rgba(88, 101, 242, 0.17);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 54px rgba(53, 63, 120, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transform: none;
}

.search-card input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #222636;
  font-size: 20px;
  font-weight: 700;
}

body.search-expanded .search-card input {
  font-size: 22px;
}

.search-card input::placeholder {
  color: #aeb5c2;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #2d3040;
  background: transparent;
}

.icon-button:hover,
.language-button:hover {
  background: rgba(88, 101, 242, 0.1);
}

body.search-expanded .icon-button {
  width: 48px;
  height: 48px;
  color: var(--discord);
  background: var(--discord-soft);
  box-shadow: none;
}

svg {
  width: 22px;
  height: 22px;
}

svg path,
svg circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.discord-login {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 16px;
  padding: 0 24px;
  color: #fff;
  background: linear-gradient(180deg, #6571ff, var(--discord));
  box-shadow: 0 16px 32px rgba(88, 101, 242, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.discord-login:hover {
  background: linear-gradient(180deg, #707bff, var(--discord-dark));
  transform: translateY(-1px);
}

.discord-login svg {
  width: 24px;
  height: 24px;
}

.language-picker {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 3;
}

.language-button {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(88, 101, 242, 0.16);
  border-radius: 14px;
  color: var(--discord);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 26px rgba(70, 82, 140, 0.12);
}

.language-menu {
  position: absolute;
  top: 58px;
  left: 0;
  width: 230px;
  max-height: 292px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(88, 101, 242, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 50px rgba(28, 35, 80, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top left;
  transition: opacity 180ms ease, transform 180ms ease;
}

.language-picker[data-open="true"] .language-menu,
.language-picker:hover .language-menu,
.language-picker:focus-within .language-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.language-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 12px;
  padding: 11px 12px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  font-weight: 750;
}

.language-option small {
  color: var(--muted);
  font-weight: 700;
}

.language-option:hover,
.language-option[aria-selected="true"] {
  background: var(--soft);
  color: var(--discord-dark);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 22, 40, 0.36);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.modal-backdrop[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: min(430px, 100%);
  position: relative;
  padding: 36px 34px 32px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(15, 20, 48, 0.24);
  text-align: center;
  transform: translateY(14px) scale(0.96);
  transition: transform 220ms ease;
}

.modal-backdrop[data-open="true"] .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #6b7285;
  background: var(--discord-soft);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.modal-close:hover {
  color: var(--discord);
  background: #e3e6ff;
  transform: rotate(90deg);
}

.modal-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(180deg, #6874ff, var(--discord));
  box-shadow: 0 14px 30px rgba(88, 101, 242, 0.24);
}

.modal h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.modal p {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.55;
}

.modal-login {
  width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .page-shell {
    padding: 16px;
  }

  .hero {
    min-height: calc(100vh - 32px);
  }

  .hero-banner {
    min-height: 620px;
    gap: 24px;
    padding: 80px 18px 44px;
  }

  .language-picker {
    top: 14px;
    left: 14px;
  }

  .language-menu {
    width: min(230px, calc(100vw - 32px));
  }

  .search-card {
    height: 60px;
    grid-template-columns: 1fr 42px 42px;
    padding-left: 20px;
  }

  body.search-expanded .search-card {
    height: 62px;
    grid-template-columns: minmax(0, 1fr) 42px 42px;
    gap: 4px;
    padding: 0 10px 0 18px;
  }

  body.search-expanded .search-card input {
    font-size: 18px;
  }

  body.search-expanded .icon-button {
    width: 40px;
    height: 40px;
  }

  .search-card input {
    font-size: 18px;
  }
}
