:root {
  --bg: #0f1220;
  --panel: #151933;
  --text: #e6e8f0;
  --muted: #9aa0c7;
  --accent: #4f7cff;
  --danger: #ff4f4f;
  --border: #24285a;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ===== LAYOUT ===== */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: #11152f;
  border-right: 1px solid var(--border);
  padding: 20px;
}

.sidebar-section {
  margin-top: 15px;
  font-size: 12px;
  font-weight: bold;
  color: var(--muted);
}

.sidebar a {
  display: block;
  padding: 8px 10px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 6px;
}

.sidebar a.active,
.sidebar a:hover {
  background: var(--accent);
  color: white;
}

.content {
  flex: 1;
  padding: 32px;
  display: flex;
  flex-direction: column;
}

/* ===== TOP BAR ===== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.actions a,
.actions button {
  margin-left: 10px;
  padding: 8px 12px;
  background: var(--accent);
  color: white;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.actions .logout {
  background: var(--danger);
}

/* ===== DOC CONTENT ===== */
.docs-content h1 {
  font-size: 34px;
}

.docs-content p {
  line-height: 1.7;
}

/* ===== NORMAL CODE BLOCK ===== */
pre {
  background: #0c0f25;
  color: white;
  padding: 16px;
  border-radius: 8px;
  font-family: Consolas, monospace;
  overflow-x: auto;
}

/* ===== COPY BOX (THIS IS WHAT YOU WERE MISSING) ===== */
.copy-box {
  position: relative;
  background: #f6f7fb;
  border: 1px solid #e2e4ee;
  border-radius: 10px;
  padding: 18px;
  margin: 20px 0;
  color: #111;
}

.copy-box pre {
  background: transparent;
  color: #111;
  padding: 0;
}

.copy-box-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 12px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.copy-box-btn:hover {
  opacity: 0.9;
}

/* ===== SEARCH ===== */
#search {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
}

/* ===== EDITOR (UNCHANGED, STAYS BIG) ===== */
.editor-form {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#editor {
  flex: 1;
  width: 100%;
  min-height: 80vh;
  background: #0b0f24;
  color: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  font-size: 16px;
  font-family: Consolas, monospace;
  line-height: 1.7;
  resize: none;
}
