:root {
  --pico-background-color: #0d0d0f;
  --pico-card-background-color: #13131a;
  --pico-card-border-color: #1e1e2a;
  --pico-color: #e2e2e2;
  --pico-muted-color: #888;
  --pico-primary: #7f6cf5;
  --pico-primary-hover: #9a88ff;
  --pico-primary-focus: rgba(127, 108, 245, 0.25);
  --pico-code-background-color: #1a1a1f;
  --pico-border-color: #1e1e2a;
  --pico-font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --pico-font-size: 16px;
  --pico-line-height: 1.6;
  --title-highlight-color: #e2e2e2;
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--pico-background-color);
  color: var(--pico-color);
  min-height: 100vh;
}

/* Layout */
.container {
  max-width: 1100px;
}

/* Header */
header.site-header {
  border-bottom: 1px solid var(--pico-border-color);
  padding: 1rem 0;
  margin-bottom: 2rem;
}

header.site-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--pico-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-title:hover {
  color: var(--pico-primary-hover);
}

.site-title .site-title-accent {
  color: var(--title-highlight-color);
}

/* Search icon button */
.search-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  color: var(--pico-muted-color);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.search-icon-btn:hover,
.search-icon-btn--active {
  color: var(--pico-primary);
  background: rgba(127, 108, 245, 0.08);
}

.search-icon-btn svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

/* Language switcher */
.lang-switcher {
  display: flex;
  border: 1px solid var(--pico-border-color);
  border-radius: 4px;
  overflow: hidden;
}

.lang-switcher button {
  padding: 0.18rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: transparent;
  border: none;
  color: var(--pico-muted-color);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}

.lang-switcher button + button {
  border-left: 1px solid var(--pico-border-color);
}

.lang-switcher button.active {
  background: var(--pico-primary);
  color: #fff;
}

.lang-switcher button:not(.active):hover {
  color: var(--pico-primary);
  background: rgba(127, 108, 245, 0.1);
}

/* Footer */
footer.site-footer {
  border-top: 1px solid var(--pico-border-color);
  margin-top: 4rem;
  padding: 2rem 0;
  color: var(--pico-muted-color);
  font-size: 0.85rem;
  text-align: center;
}

/* Loading & error states */
.state-loading,
.state-error,
.state-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--pico-muted-color);
}

.state-error {
  color: #e05c5c;
}

.spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--pico-border-color);
  border-top-color: var(--pico-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Utility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
