/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ──────────────────────────────────────────────────────────────────── */
body {
  background-color: #000;
  color: #e8e8e8;
  font-family: Verdana, sans-serif;
  font-size: 14px;
  min-height: 100vh;
}

a { color: #a0c4ff; text-decoration: none; }
a:hover { color: #fff; text-decoration: underline; }

/* ── Header ────────────────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 62px;       /* 8px top gap + 54px inner bar */
  padding-top: 8px;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  max-width: 1100px;
  width: 90%;
  margin: 0 auto;
  background: rgba(10, 10, 20, 0.88);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 0 20px;
}

.site-header .site-name {
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 0.04em;
  color: #fff;
}

.site-header .page-name {
  margin-left: 18px;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  border-left: 1px solid rgba(255,255,255,0.15);
  padding-left: 18px;
}

.site-header h3 {
  margin: 0 0 0 auto;
  font-size: 16px;
  font-weight: normal;
}

/* ── Layout shell ──────────────────────────────────────────────────────────── */
/* Centered wrapper that leaves space on both sides */
.layout {
  display: flex;
  margin-top: 62px;
  min-height: calc(100vh - 62px);
  max-width: 1100px;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
}

/* ── Sidebar ───────────────────────────────────────────────────────────────── */
.sidebar {
  /* sticky so it scrolls with the page but stays visible */
  position: sticky;
  top: 62px;
  align-self: flex-start;
  height: calc(100vh - 62px);
  overflow-y: auto;
  width: 200px;
  flex-shrink: 0;
  background: rgba(8, 8, 18, 0.80);
  backdrop-filter: blur(6px);
  border-right: 1px solid rgba(255,255,255,0.07);
  border-radius: 0 0 8px 0;
  padding: 20px 0;
}

.sidebar nav ul {
  list-style: none;
}

.sidebar nav > ul > li {
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar nav a,
.sidebar nav .nav-toggle {
  display: block;
  padding: 10px 20px;
  color: #c8d8f0;
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  user-select: none;
}

.sidebar nav a:hover,
.sidebar nav .nav-toggle:hover {
  background: rgba(255,255,255,0.07);
  color: #fff;
  text-decoration: none;
}

/* Dropdown toggle */
.nav-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-toggle::after {
  content: '▸';
  font-size: 10px;
  opacity: 0.5;
  transition: transform 0.2s;
}

.nav-toggle.open::after {
  transform: rotate(90deg);
}

/* Sub-page list */
.sub-nav {
  display: none;
  background: rgba(255,255,255,0.03);
}

.sub-nav.open {
  display: block;
}

.sub-nav a {
  padding-left: 36px;
  font-size: 12px;
  color: #8ab0d8;
}

.sub-nav a:hover { color: #fff; }

.sidebar nav a.active {
  color: #fff;
  background: rgba(255,255,255,0.10);
  border-left: 2px solid #a0c4ff;
  padding-left: 18px;
}

.sub-nav a.active {
  padding-left: 34px;
}

/* ── Main content ──────────────────────────────────────────────────────────── */
.content {
  flex: 1;
  padding: 32px 40px;
  margin: 20px;
  background: rgba(10, 10, 10, 0.6);
  border-radius: 8px;
}

.content h1 {
  font-size: 22px;
  margin-bottom: 16px;
  color: #fff;
}

.content p {
  line-height: 1.7;
  margin-bottom: 12px;
  color: #ccc;
}

.content ul {
  margin: 12px 0 12px 20px;
  line-height: 1.8;
}

/* ── Comments section ──────────────────────────────────────────────────────── */
.comments {
  background: rgba(30, 30, 40, 0.9);
  border-radius: 8px;
  padding: 20px;
  margin: 20px;
  max-width: 600px;
}

.comments h2 {
  color: #fff;
  margin-bottom: 16px;
  font-size: 18px;
}

.comment-form {
  margin-bottom: 20px;
}

.comment-input,
.comment-textarea {
  display: block;
  margin-bottom: 8px;
  padding: 8px;
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
}

.comment-input::placeholder,
.comment-textarea::placeholder {
  color: rgba(255,255,255,0.5);
}

.comment-button {
  background: rgba(160,196,255,0.8);
  color: #000;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
}

.comment-button:hover {
  background: rgba(160,196,255,1);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-item {
  background: rgba(255,255,255,0.05);
  border-left: 3px solid #a0c4ff;
  padding: 12px;
  border-radius: 4px;
}

.comment-name {
  font-weight: bold;
  color: #a0c4ff;
  margin-bottom: 4px;
}

.comment-text {
  color: #ccc;
  line-height: 1.5;
  word-wrap: break-word;
}
