:root {
  color-scheme: dark;
  --bg: #080808;
  --surface: #121212;
  --accent: #ff2e88;
  --text: #f3f3f4;
  --muted: #9a9a9a;
  --divider: #2a2a2a;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

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

body {
  font-family: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN",
    "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: -20% 0 auto;
  height: 42vh;
  background: radial-gradient(
    ellipse 80% 70% at 50% 0%,
    rgba(255, 46, 136, 0.16),
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 28px 20px calc(48px + var(--safe-bottom));
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: var(--text);
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex: 0 0 auto;
  display: block;
}

.brand span {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang-select {
  position: relative;
  flex: 0 0 auto;
}

.lang-trigger {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(243, 243, 244, 0.12);
  background: rgba(18, 18, 18, 0.92);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.lang-trigger:hover {
  border-color: rgba(255, 46, 136, 0.4);
  background: #16161c;
}

.lang-select.is-open .lang-trigger {
  border-color: rgba(255, 46, 136, 0.55);
  background: rgba(255, 46, 136, 0.1);
  box-shadow:
    0 0 0 1px rgba(255, 46, 136, 0.12),
    0 10px 28px rgba(0, 0, 0, 0.35);
}

.lang-globe {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 46, 136, 0.14);
  color: var(--accent);
  flex: 0 0 auto;
}

.lang-trigger-label {
  display: inline-block;
  max-width: 9.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
}

.lang-chevron {
  display: block;
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  color: var(--muted);
  transition: transform 0.18s ease, color 0.15s ease;
}

.lang-select.is-open .lang-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: min(260px, calc(100vw - 32px));
  max-height: min(360px, 58vh);
  overflow-y: auto;
  overflow-x: hidden;
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #101014;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 24px 56px rgba(0, 0, 0, 0.6);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.lang-select.is-open .lang-menu {
  display: flex;
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  text-decoration: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 550;
  letter-spacing: -0.015em;
  line-height: 1.2;
  border-radius: 14px;
  border: 1px solid rgba(42, 42, 42, 0.9);
  background: transparent;
  padding: 11px 14px;
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease;
}

.lang-option:hover {
  background: rgba(243, 243, 244, 0.05);
  border-color: rgba(243, 243, 244, 0.18);
}

.lang-option.is-active {
  background: rgba(255, 46, 136, 0.16);
  border-color: rgba(255, 46, 136, 0.55);
  color: #fff;
  font-weight: 650;
}

.lang-option-label {
  min-width: 0;
}

.lang-check {
  display: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  flex: 0 0 auto;
}

.lang-option.is-active .lang-check {
  display: inline-flex;
}

@media (prefers-reduced-motion: reduce) {
  .lang-trigger,
  .lang-chevron,
  .lang-option {
    transition: none;
  }
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.meta {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 0.95rem;
}

.card {
  background: color-mix(in srgb, var(--surface) 92%, black);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 22px 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

h2 {
  margin: 28px 0 10px;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.card > h2:first-child { margin-top: 0; }

p, li {
  color: color-mix(in srgb, var(--text) 88%, var(--muted));
  font-size: 0.98rem;
}

p { margin: 0 0 12px; }

ul {
  margin: 0 0 12px;
  padding-left: 1.2rem;
}

li { margin: 0 0 6px; }

a { color: var(--accent); }

.footer {
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
}

.langs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.langs a {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 14px;
  padding: 14px 14px;
  font-weight: 600;
  font-size: 0.95rem;
}

.langs a:hover {
  border-color: rgba(255, 46, 136, 0.45);
}

.langs a small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}
