* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f4f6f9;
  color: #222;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.layout {
  flex: 1;
  display: flex;
}

.sidebar {
  width: 320px;
  background: #1f2937;
  color: white;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

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

.sidebar h1 {
  margin-top: 0;
  border-bottom: 1px solid #444;
  padding-bottom: 10px;
}

.sidebar a {
  display: block;
  text-decoration: none;
  color: #d1d5db;
  padding: 8px 0;
  transition: 0.2s;
}

.sidebar a:hover {
  color: white;
  padding-left: 5px;
}

.sidebar-top {
  flex: 1;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid #374151;
  text-align: center;
}

.sidebar-footer a {
  color: #93c5fd;
  text-decoration: none;
  font-size: 16px;
}

.sidebar-footer a:hover {
  color: white;
}

.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.content {
  flex: 1;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.signature {
  background: #111827;
  color: #10b981;
  padding: 12px;
  border-radius: 6px;
  font-family: Consolas, monospace;
  overflow-x: auto;
  margin: 15px 0;
}

.doc {
  white-space: pre-wrap;
  line-height: 1.7;
}

.tag {
  display: inline-block;
  color: white;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

th, td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}

th {
  background: #f0f0f0;
}

.section-title {
  margin-top: 30px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.class-link {
  text-decoration: none;
  color: inherit;
}

.class-card:hover {
  transform: translateY(-3px);
}

.footer {
  text-align: center;
  color: #666;
  margin-top: 40px;
}

details {
  margin-bottom: 10px;
}

summary {
  cursor: pointer;
  font-weight: bold;
  padding: 5px 0;
}

.nav-children {
  margin-left: 15px;
}

.nav-children a {
  display: block;
  padding: 4px 0;
}

.tree-group {
  margin-bottom: 14px;
}

.tree-package {
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
}

.tree-package-sub {
  color: #d1d5db;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
  margin-left: 8px;
}

.tree-package:hover, .tree-package-sub:hover {
  color: #93c5fd;
}

.tree-content {
  margin-top: 6px;
}

.tree-module {
  color: #d1d5db;
  font-weight: 600;
  margin-top: 8px;
  margin-left: 10px;
  font-size: 14px;
}

.tree-class {
  display: block;
  margin-left: 22px;
  padding: 4px 0;
  color: #93c5fd;
  text-decoration: none;
  font-size: 14px;
}

.tree-class:hover {
  color: white;
}

/* Remove ugly default marker */

summary {
  list-style: none;
}

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

/* Custom expand arrow */

.tree-package::before {
  content: "▾ ";
  color: #9ca3af;
}

details:not([open]) .tree-package::before {
  content: "▸ ";
}

/* Sub tree arrows */

.tree-package-sub::before {
  content: "▾ ";
  color: #6b7280;
}

details:not([open]) > .tree-package-sub::before {
  content: "▸ ";
}

summary {
  cursor: pointer;
  font-weight: bold;
  color: white;
}

.nav-children {
  margin-top: 5px;
}

.site-footer {
  border-top: 1px solid #d1d5db;
  background: #f9fafb;
  padding: 12px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #6b7280;
}

.footer-left, .footer-right {
  font-size: 14px;
}

.footer-right {
  color: #93c5fd;
}

.architecture-box {
  background: #111;
  color: #00ff88;
  border-radius: 10px;
  padding: 30px;
  font-family: Consolas, monospace;
  line-height: 1.9;
  font-size: 16px;
}

.topic-card {
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 25px;
  height: 100%;
}

.topic-card h4 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
}

.problem-box {
  background: #f7f7f7;
  border-left: 5px solid #dc3545;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.problem-title {
  font-size: 18px;
  font-weight: 700;
}

.example-subtitle {
  color: #666;
  font-size: 16px;
}

.example-image {
  width: 70%;
  border-radius: 10px;
  border: 1px solid #ddd;
  margin-top: 15px;
}

