:root {
  color-scheme: dark;
  --bg: #17191e;
  --surface: #22262e;
  --surface-hover: #292e38;
  --border: #383f4b;
  --text: #f3f5f7;
  --muted: #aab2bf;
  --green: #56d394;
  --amber: #f1bd55;
  --blue: #71a7ff;
  --red: #ef7c78;
}

* { box-sizing: border-box; }

html { min-width: 320px; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; }

.siteHeader {
  border-bottom: 1px solid var(--border);
  background: #1c1f25;
}

.siteHeaderInner,
.directoryMain,
.siteFooter {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.siteHeaderInner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
}

.brandLogo {
  display: block;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255,255,255,.16);
}

.brand:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }

.brandDot { color: var(--amber); }

.languageNav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.languageNav a {
  min-width: 38px;
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.languageNav a[aria-current="page"] {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.directoryMain { padding: 34px 0 48px; }

.directoryHeading {
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 20px;
}

.directoryHeading h1 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: 0;
}

.directoryHeading p {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.accountCount {
  padding-bottom: 2px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

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

.accountCard {
  min-width: 0;
  min-height: 168px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 17px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.accountCard:hover {
  border-color: #596372;
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.accountCard:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.accountTop {
  min-width: 0;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
}

.accountAvatar,
.accountInitial {
  width: 56px;
  height: 56px;
  border: 1px solid #4a5260;
  border-radius: 50%;
  background: #303641;
}

.accountAvatar { object-fit: cover; }

.accountInitial {
  display: grid;
  place-items: center;
  color: var(--amber);
  font-size: 21px;
  font-weight: 800;
}

.accountIdentity { min-width: 0; }

.accountName {
  overflow: hidden;
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.verified {
  margin-left: 4px;
  color: var(--blue);
  font-size: 13px;
}

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

.accountMeta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.platform,
.marketsCount {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
}

.platform { color: var(--amber); }
.marketsCount { color: var(--green); }

.accountAction {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: #dce1e8;
  font-size: 12px;
  font-weight: 700;
}

.accountArrow {
  color: var(--amber);
  font-size: 18px;
  line-height: 1;
}

.emptyState {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.directorySeo {
  max-width: 900px;
  margin: 48px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.directorySeo h2 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 20px;
  line-height: 1.3;
}

.directorySeo h3 {
  margin: 24px 0 7px;
  color: var(--amber);
  font-size: 13px;
  line-height: 1.4;
}

.directorySeo p { margin: 0 0 12px; }
.directorySeo a { color: var(--green); }

.siteFooter {
  padding: 22px 0 30px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 820px) {
  .accountGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .siteHeaderInner,
  .directoryMain,
  .siteFooter { width: min(100% - 24px, 1120px); }

  .directoryMain { padding-top: 25px; }
  .directoryHeading { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .directoryHeading h1 { font-size: 25px; }
  .accountGrid { grid-template-columns: minmax(0, 1fr); }
  .accountCard { min-height: 158px; }
  .accountCount { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .accountCard { transition: none; }
}
