/* Palette aligned with Tanky/Theme/Theme.swift — TankyTheme.Colors */
:root {
  --tanky-primary: rgb(41, 125, 252);
  --tanky-primary-soft: rgba(41, 125, 252, 0.12);
  --tanky-secondary: rgb(36, 212, 204);
  --tanky-secondary-soft: rgba(36, 212, 204, 0.14);
  --tanky-accent: rgb(125, 102, 245);
  --tanky-accent-soft: rgba(125, 102, 245, 0.1);

  --bg-top: #ffffff;
  --bg-bottom: #f2f4f8;
  --surface: #ffffff;
  --surface-elevated: #fafbfe;
  --text: #1c1c1e;
  --muted: rgba(60, 60, 67, 0.72);
  --border: rgba(41, 125, 252, 0.12);
  --card-shadow: 0 4px 24px rgba(41, 125, 252, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  --radius-card: 22px;
  --radius-pill: 999px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-top: #1c1c1e;
    --bg-bottom: #2c2c2e;
    --surface: rgba(44, 44, 46, 0.85);
    --surface-elevated: #3a3a3c;
    --text: #f5f5f7;
    --muted: rgba(235, 235, 245, 0.6);
    --border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 4px 32px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Rounded",
    "SF Pro Text",
    system-ui,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  color: var(--text);
  line-height: 1.65;
  position: relative;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  background-attachment: fixed;
}

/* Soft orbs like TankyBackground (primary + secondary blur) */
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
  opacity: 0.9;
}

body::before {
  width: 280px;
  height: 280px;
  background: var(--tanky-primary);
  opacity: 0.14;
  top: -120px;
  right: -40px;
}

body::after {
  width: 240px;
  height: 240px;
  background: var(--tanky-secondary);
  opacity: 0.16;
  bottom: -80px;
  left: -60px;
}

@media (prefers-color-scheme: dark) {
  body::before {
    opacity: 0.22;
  }
  body::after {
    opacity: 0.18;
  }
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

a {
  color: var(--tanky-primary);
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  color: var(--tanky-accent);
  text-decoration: underline;
}

header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--tanky-primary) 0%, var(--tanky-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
  filter: brightness(1.05);
}

h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
  line-height: 1.25;
  color: var(--text);
}

.meta {
  font-size: 0.875rem;
  color: var(--muted);
}

h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: var(--text);
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

p strong {
  color: var(--text);
}

ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--muted);
}

li {
  margin-bottom: 0.35rem;
}

.lang-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.lang-bar a {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(
    135deg,
    var(--tanky-primary-soft) 0%,
    var(--tanky-accent-soft) 100%
  );
  border: 1px solid var(--border);
  color: var(--tanky-primary);
}

.lang-bar a:hover {
  background: linear-gradient(
    135deg,
    rgba(41, 125, 252, 0.2) 0%,
    rgba(125, 102, 245, 0.15) 100%
  );
  text-decoration: none;
  color: var(--tanky-accent);
}

@media (prefers-color-scheme: dark) {
  .lang-bar a {
    color: rgb(120, 180, 255);
  }
  .lang-bar a:hover {
    color: rgb(180, 170, 255);
  }
}

.index-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.index-card h2 {
  margin-top: 0;
  color: var(--text);
}

.lang-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.lang-list li {
  margin-bottom: 0.75rem;
}

.lang-list a {
  font-weight: 600;
  color: var(--tanky-primary);
}

.lang-list a:hover {
  color: var(--tanky-accent);
}

footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--muted);
}

footer a {
  font-weight: 600;
}
