:root {
  --bg-1: #050b1a;
  --bg-2: #0a1930;
  --panel-bg: rgba(255, 255, 255, 0.035);
  --panel-bg-solid: #0d2140;
  --border: rgba(120, 170, 255, 0.16);
  --primary: #38b1ed;
  --primary-2: #7c8cff;
  --cyan: #5eead4;
  --indigo: #8b7bff;
  --text: #eef3fb;
  --text-muted: #9fb2cf;
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: var(--text);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  background:
    radial-gradient(circle at 10% 0%, rgba(56, 177, 237, 0.22), transparent 32%),
    radial-gradient(circle at 90% 12%, rgba(139, 123, 255, 0.20), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(94, 234, 212, 0.10), transparent 40%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--cyan); }

.layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 264px;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(13, 33, 64, 0.85) 0%, rgba(8, 20, 42, 0.9) 100%);
  backdrop-filter: blur(6px);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px 20px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.sidebar .brand .logo-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--indigo));
  box-shadow: 0 0 14px 2px rgba(56, 177, 237, 0.65);
}

.sidebar .brand strong {
  font-size: 1.18rem;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, #d9ecff 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lang-switch {
  padding: 0 24px 16px 24px;
  margin-bottom: 4px;
  font-size: 0.82rem;
  display: flex;
  gap: 8px;
  align-items: center;
}

.lang-switch a, .lang-switch span {
  padding: 3px 10px;
  border-radius: 999px;
}

.lang-switch span.current {
  background: linear-gradient(90deg, rgba(56,177,237,0.28), rgba(139,123,255,0.28));
  color: #dff0ff;
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(120, 170, 255, 0.25) inset;
}

.lang-switch a {
  color: var(--text-muted);
}

.lang-switch a:hover {
  text-decoration: none;
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

.sidebar nav {
  display: flex;
  flex-direction: column;
}

.sidebar .group-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--cyan);
  opacity: 0.75;
  padding: 18px 24px 6px 24px;
}

.sidebar nav a {
  color: var(--text-muted);
  padding: 9px 24px;
  font-size: 0.93rem;
  border-left: 3px solid transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar nav a:hover {
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(90deg, rgba(56, 177, 237, 0.12), transparent);
}

.sidebar nav a.active {
  color: #fff;
  border-left-color: var(--primary);
  background: linear-gradient(90deg, rgba(56, 177, 237, 0.22), rgba(139, 123, 255, 0.08));
  font-weight: 600;
  box-shadow: inset 0 0 18px rgba(56, 177, 237, 0.08);
}

/* Main content */
main {
  flex: 1;
  min-width: 0;
  padding: 40px clamp(20px, 5vw, 64px);
  max-width: 920px;
}

main h1 {
  font-size: 2.15rem;
  margin-top: 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
  background: linear-gradient(90deg, #ffffff 0%, var(--primary) 55%, var(--indigo) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  width: 100%;
}

main h2 {
  font-size: 1.4rem;
  margin-top: 2.2em;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 10px;
}

main h2::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--indigo));
  box-shadow: 0 0 8px 1px rgba(56, 177, 237, 0.7);
  flex-shrink: 0;
}

main h3 {
  font-size: 1.1rem;
  margin-top: 1.6em;
  color: #cfe6ff;
}

main p, main li { color: var(--text); }

.muted { color: var(--text-muted); }

.lead {
  font-size: 1.08rem;
  color: var(--text-muted);
}

table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  margin: 1.2em 0;
  font-size: 0.92rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

th, td {
  border-bottom: 1px solid var(--border);
  padding: 11px 14px;
  text-align: left;
}

th {
  background: linear-gradient(90deg, rgba(56, 177, 237, 0.22), rgba(139, 123, 255, 0.14));
  color: #eaf6ff;
  font-weight: 700;
}

tr:last-child td { border-bottom: none; }

tr:nth-child(even) td {
  background: rgba(255,255,255,0.025);
}

tr:hover td {
  background: rgba(56, 177, 237, 0.06);
}

code, pre {
  background: var(--panel-bg-solid);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: "Cascadia Code", Consolas, monospace;
  color: var(--cyan);
}

code {
  padding: 2px 6px;
  font-size: 0.88em;
}

pre {
  padding: 14px 16px;
  overflow-x: auto;
}

.callout {
  border-left: 4px solid var(--primary);
  background: linear-gradient(90deg, rgba(56, 177, 237, 0.12), rgba(139, 123, 255, 0.05));
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 13px 20px;
  margin: 1.2em 0;
  box-shadow: 0 4px 18px rgba(0,0,0,0.18);
}

.callout.warn {
  border-left-color: #f5a623;
  background: linear-gradient(90deg, rgba(245, 166, 35, 0.14), rgba(245, 166, 35, 0.04));
}

.callout.danger {
  border-left-color: #f5566a;
  background: linear-gradient(90deg, rgba(245, 86, 106, 0.14), rgba(245, 86, 106, 0.04));
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 1.5em 0;
}

.card {
  position: relative;
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 18px 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--indigo));
}

.card-grid .card:nth-child(3n+2)::before {
  background: linear-gradient(180deg, var(--cyan), var(--primary));
}

.card-grid .card:nth-child(3n+3)::before {
  background: linear-gradient(180deg, var(--indigo), var(--cyan));
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(56, 177, 237, 0.18);
  border-color: rgba(120, 170, 255, 0.32);
}

.card h3 { margin-top: 0; color: #eaf3ff; }

.pager {
  display: flex;
  justify-content: space-between;
  margin-top: 3em;
  padding-top: 1.2em;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
}

.pager a {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.pager a:hover {
  text-decoration: none;
  background: linear-gradient(90deg, rgba(56,177,237,0.18), rgba(139,123,255,0.12));
  border-color: rgba(120, 170, 255, 0.4);
  color: var(--text);
}

footer.page-footer {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 3em;
  padding-top: 1em;
}

.badge {
  display: inline-block;
  background: linear-gradient(90deg, var(--primary), var(--indigo));
  color: #06121f;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 6px;
}

.menu-toggle {
  display: none;
}

@media (max-width: 860px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    padding: 16px 0;
    backdrop-filter: none;
  }
  main { max-width: 100%; }
}
