
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
 --bg: #111216;
 --bg-sidebar: #15161b;
 --bg-card: #191a20;
 --bg-card-hover: #202128;
 --border: #292a31;
 --border-hover: #41434d;
 --text: #e5e5e9;
 --text-secondary: #a3a4ad;
 --text-muted: #737580;
 --accent: #9baac4;
 --accent-hover: #c0cce0;
 --accent-soft: rgba(155, 170, 196, 0.09);
 --code-bg: #101116;
 --success: #75c69a;
 --warning: #d9b36c;
 --danger: #df8585;
}

* {
 box-sizing: border-box;
}

html {
 scroll-behavior: smooth;
}

body {
 margin: 0;
 font-family: 'Inter', sans-serif;
 background: var(--bg);
 color: var(--text);
 display: flex;
 min-height: 100vh;
 overflow-x: hidden;
 -webkit-font-smoothing: antialiased;
}

.developer-note {
 position: fixed;
 bottom: 20px;
 right: 20px;
 opacity: 0.75;
 font-size: 0.85rem;
 transition: all 0.25s ease;
 background: rgba(27, 28, 34, 0.94);
 padding: 9px 15px;
 border-radius: 8px;
 border: 1px solid var(--border);
 backdrop-filter: blur(12px);
}

.developer-note:hover {
 opacity: 1;
 transform: translateY(-2px);
 border-color: var(--border-hover);
 box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.page-topbar {
 display: flex;
 align-items: center;
 justify-content: space-between;
 padding: 16px 0;
 margin-bottom: 32px;
 border-bottom: 1px solid var(--border);
}

.topbar-left {
 display: flex;
 align-items: center;
 gap: 12px;
}

.topbar-info {
 display: flex;
 flex-direction: column;
}

.topbar-label {
 font-size: 0.72rem;
 font-weight: 600;
 letter-spacing: 0.07em;
 color: var(--text-muted);
 text-transform: uppercase;
}

.topbar-title {
 margin: 0;
 font-size: 1.2rem;
 font-weight: 600;
 letter-spacing: -0.035em;
 color: var(--text);
}

.topbar-actions {
 display: flex;
 align-items: center;
 gap: 10px;
}

.topbar-badge {
 padding: 5px 10px;
 border-radius: 6px;
 background: var(--bg-card);
 border: 1px solid var(--border);
 font-size: 0.75rem;
 font-weight: 500;
 color: var(--text-secondary);
}

.site-footer {
 display: flex;
 justify-content: center;
 align-items: center;
 gap: 12px;
 flex-wrap: wrap;
 margin-top: 48px;
 padding: 24px 0;
 color: var(--text-muted);
 font-size: 0.825rem;
 border-top: 1px solid var(--border);
}

.footer-divider {
 width: 3px;
 height: 3px;
 border-radius: 50%;
 background: var(--border-hover);
}

.sidebar {
 width: 280px;
 flex-shrink: 0;
 background: var(--bg-sidebar);
 border-right: 1px solid var(--border);
 padding: 22px 18px;
 overflow-y: auto;
 position: sticky;
 top: 0;
 height: 100vh;
}

.sidebar h2 {
 font-size: 0.7rem;
 text-transform: uppercase;
 letter-spacing: 0.09em;
 color: var(--text-muted);
 margin: 26px 0 12px;
 font-weight: 600;
}

.sidebar a {
 display: block;
 padding: 8px 11px;
 border-radius: 6px;
 color: var(--text-secondary);
 text-decoration: none;
 font-size: 0.85rem;
 transition: background 0.18s ease, color 0.18s ease;
}

.sidebar a:hover {
 background: var(--bg-card-hover);
 color: var(--text);
}

.sidebar input {
 width: 100%;
 padding: 10px 12px;
 border-radius: 7px;
 border: 1px solid var(--border);
 background: #111216;
 color: var(--text);
 margin-bottom: 20px;
 outline: none;
 transition: border-color 0.2s, box-shadow 0.2s;
 font-size: 0.85rem;
 font-family: inherit;
}

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

.sidebar input:focus {
 border-color: #626d80;
 box-shadow: 0 0 0 3px rgba(155, 170, 196, 0.08);
}

.sidebar-section {
 margin-bottom: 18px;
}

.sidebar-header {
 padding-bottom: 20px;
 margin-bottom: 20px;
 border-bottom: 1px solid var(--border);
}

.sidebar-brand {
 display: flex;
 align-items: center;
 gap: 12px;
 text-decoration: none;
}

.sidebar-brand:hover .sidebar-title {
 color: var(--accent-hover);
}

.sidebar-logo {
 width: 38px;
 height: 38px;
 object-fit: contain;
}

.sidebar-title {
 font-size: 1rem;
 font-weight: 650;
 color: var(--text);
 letter-spacing: -0.025em;
 transition: color 0.2s;
}

.section-header {
 display: flex;
 align-items: center;
 gap: 8px;
 padding: 8px 11px;
 cursor: pointer;
 border-radius: 6px;
 font-weight: 500;
 font-size: 0.85rem;
 color: var(--text);
 transition: background 0.18s;
}

.section-header:hover {
 background: var(--bg-card-hover);
}

.section-arrow {
 transition: transform 0.25s;
}

.section-header.open .section-arrow {
 transform: rotate(0deg);
}

.section-content {
 margin-top: 6px;
 padding-left: 12px;
}

.nav-link {
 display: flex;
 align-items: center;
 gap: 8px;
 padding: 8px 11px;
 border-radius: 6px;
 margin-bottom: 3px;
 transition: background 0.18s, color 0.18s;
 color: var(--text-secondary);
 text-decoration: none;
 font-size: 0.85rem;
}

.nav-link.active {
 background: var(--accent-soft);
 color: #dce2ed;
 font-weight: 550;
 border-left: 2px solid var(--accent);
}

.nav-link:hover {
 background: var(--bg-card-hover);
 color: var(--text);
}

main {
 flex: 1;
 padding: 44px 60px;
 width: 100%;
 min-width: 0;
 max-width: 100%;
}

article {
 background: #17181e;
 border: 1px solid var(--border);
 border-radius: 10px;
 padding: 42px;
 max-width: 980px;
 margin: 0 auto;
 box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

article h1 {
 font-size: 2rem;
 line-height: 1.25;
 letter-spacing: -0.045em;
 margin-bottom: 18px;
 font-weight: 700;
 color: #f0f0f2;
}

article h2 {
 font-size: 1.4rem;
 margin-top: 46px;
 margin-bottom: 18px;
 border-bottom: 1px solid var(--border);
 padding-bottom: 12px;
 letter-spacing: -0.03em;
 font-weight: 600;
 color: var(--text);
}

article h3 {
 font-size: 1.15rem;
 margin-top: 32px;
 margin-bottom: 12px;
 font-weight: 600;
 letter-spacing: -0.02em;
 color: #dedfe4;
}

article p {
 font-size: 0.95rem;
 color: var(--text-secondary);
 line-height: 1.8;
 margin-bottom: 17px;
}

article li {
 line-height: 1.8;
 color: var(--text-secondary);
 margin-bottom: 8px;
}

article ul,
article ol {
 margin-bottom: 18px;
 padding-left: 24px;
}

code {
 background: #202127;
 padding: 3px 6px;
 border-radius: 5px;
 font-size: 0.86em;
 font-family: 'Consolas', 'Monaco', monospace;
 color: #d5d9e2;
 border: 1px solid #30313a;
}

pre {
 background: var(--code-bg);
 border: 1px solid var(--border);
 padding: 18px;
 border-radius: 8px;
 overflow: auto;
 position: relative;
 font-family: 'Consolas', 'Monaco', monospace;
 font-size: 0.85rem;
 line-height: 1.7;
}

pre code {
 background: none;
 padding: 0;
 border: none;
 border-radius: 0;
}

::-webkit-scrollbar {
 width: 8px;
 height: 8px;
}

::-webkit-scrollbar-track {
 background: transparent;
}

::-webkit-scrollbar-thumb {
 background: #34353d;
 border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
 background: #50515b;
}

.home-link {
 background: var(--accent-soft);
 border-left: 3px solid var(--accent);
 color: var(--text);
 font-weight: 500;
}

.home-link:hover {
 background: var(--bg-card-hover);
}

.home-link.active {
 background: var(--accent-soft);
 color: var(--text);
 font-weight: 600;
}

.sidebar a.active,
.sub-item.active {
 background: var(--accent-soft);
 color: #dce2ed;
 font-weight: 550;
 border-left: 2px solid var(--accent);
}

.folder {
 margin-top: 6px;
}

.folder-header {
 display: flex;
 align-items: center;
 gap: 6px;
 cursor: pointer;
 padding: 7px 10px;
 border-radius: 6px;
 font-size: 0.85rem;
 color: var(--text-secondary);
 transition: background 0.18s, color 0.18s;
}

.folder-header:hover {
 background: var(--bg-card-hover);
 color: var(--text);
}

.arrow {
 font-size: 10px;
 color: var(--text-muted);
}

.folder-content {
 margin-left: 18px;
}

.sub-item {
 display: block;
 padding: 5px 10px;
 font-size: 0.84rem;
 color: var(--text-secondary);
 text-decoration: none;
 border-radius: 6px;
 transition: background 0.18s, color 0.18s;
}

.sub-item:hover {
 background: var(--bg-card-hover);
 color: var(--text);
}

.hint {
 padding: 16px 20px;
 border-radius: 8px;
 margin: 24px 0;
 line-height: 1.7;
 border: 1px solid var(--border);
 background: rgba(255, 255, 255, 0.015);
}

.hint-success {
 border-color: rgba(117, 198, 154, 0.3);
 background: rgba(117, 198, 154, 0.055);
 color: var(--success);
}

.hint-info {
 border-color: rgba(155, 170, 196, 0.3);
 background: rgba(155, 170, 196, 0.055);
 color: #bdc9dc;
}

.hint-warning {
 border-color: rgba(217, 179, 108, 0.3);
 background: rgba(217, 179, 108, 0.055);
 color: var(--warning);
}

.hint-danger {
 border-color: rgba(223, 133, 133, 0.3);
 background: rgba(223, 133, 133, 0.055);
 color: var(--danger);
}

.code-block {
 position: relative;
 background: var(--code-bg);
 border: 1px solid var(--border);
 border-radius: 8px;
 margin: 22px 0;
 padding-top: 42px;
 overflow: hidden;
}

.code-block.full {
 width: 100%;
}

.code-block pre {
 margin: 0;
 padding: 20px;
 overflow-x: auto;
 border: none;
 border-radius: 0;
}

.copy-btn {
 position: absolute;
 top: 9px;
 right: 9px;
 background: #202127;
 border: 1px solid var(--border);
 color: var(--text-secondary);
 font-size: 12px;
 padding: 6px 11px;
 border-radius: 5px;
 cursor: pointer;
 transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.copy-btn:hover {
 background: #292a32;
 border-color: var(--border-hover);
 color: var(--text);
}

article table {
 width: 100%;
 border-collapse: collapse;
 overflow: hidden;
 border-radius: 8px;
 background: #191a20;
 border: 1px solid var(--border);
 margin: 24px 0;
}

article thead th {
 padding: 13px 16px;
 font-weight: 600;
 color: #dedfe4;
 background: #202127;
 border-bottom: 1px solid var(--border);
 font-size: 0.83rem;
 text-align: left;
}

article tbody td {
 padding: 13px 16px;
 border-bottom: 1px solid var(--border);
 color: var(--text-secondary);
 font-size: 0.85rem;
}

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

article tbody tr:hover {
 background: rgba(255, 255, 255, 0.025);
}

article tbody td:first-child {
 font-weight: 550;
 color: var(--text);
}

article table strong {
 color: var(--text);
}

article a {
 color: #aebbd1;
 text-decoration: none;
 transition: color 0.2s;
}

article a:hover {
 color: #d1dced;
 text-decoration: underline;
}

article a:visited {
 color: #aebbd1;
}

details {
 background: #191a20;
 border: 1px solid var(--border);
 border-radius: 8px;
 margin: 20px 0;
 overflow: hidden;
 transition: border-color 0.2s, background 0.2s;
}

details[open] {
 border-color: var(--border-hover);
}

summary {
 list-style: none;
 cursor: pointer;
 padding: 15px 18px;
 font-weight: 550;
 color: var(--text);
 display: flex;
 align-items: center;
 gap: 10px;
 user-select: none;
 font-size: 0.9rem;
}

summary::-webkit-details-marker {
 display: none;
}

summary::after {
 content: "▶";
 margin-left: auto;
 font-size: 0.7rem;
 transition: transform 0.2s;
 color: var(--text-muted);
}

details[open] summary::after {
 transform: rotate(90deg);
}

summary:hover {
 background: rgba(255, 255, 255, 0.025);
}

details > *:not(summary) {
 padding: 16px 18px 20px;
 animation: expandFade 0.25s ease;
}

@keyframes expandFade {
 from {
  opacity: 0;
  transform: translateY(-4px);
 }
 to {
  opacity: 1;
  transform: translateY(0);
 }
}

@media (max-width: 1100px) {
 main {
  padding: 36px 30px;
 }

 article {
  padding: 32px;
 }
}

@media (max-width: 900px) {
 body {
  flex-direction: column;
 }

 .sidebar {
  width: 100%;
  height: auto;
  position: relative;
  padding: 20px;
  border-right: none;
  border-bottom: 1px solid var(--border);
  max-height: 300px;
 }

 main {
  padding: 24px 20px;
 }

 article {
  padding: 24px;
 }

 .page-topbar {
  padding: 12px 0 16px;
  margin-bottom: 24px;
 }

 .topbar-left {
  gap: 10px;
 }

 .topbar-label {
  font-size: 0.6875rem;
 }

 .topbar-title {
  font-size: 1.125rem;
 }

 .topbar-actions {
  display: none;
 }

 article h1 {
  font-size: 1.75rem;
 }

 article h2 {
  font-size: 1.25rem;
 }

 .site-footer {
  font-size: 0.8125rem;
  padding: 20px 0;
 }
}

@media (max-width: 520px) {
 main {
  padding: 18px 12px;
 }

 article {
  padding: 21px 18px;
  border-radius: 8px;
 }

 article h1 {
  font-size: 1.6rem;
 }

 article p {
  font-size: 0.9rem;
 }

 article table {
  display: block;
  overflow-x: auto;
 }

 .developer-note {
  bottom: 12px;
  right: 12px;
 }
}
