body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #fafafa;
  color: #333;
  font-size: 18px;
  line-height: 1.6;
}

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

.sidebar {
  width: 220px;
  background: #d6e5fb;
  color: #1a2a4f;
  padding: 1rem;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.1rem;
  line-height: 1.5;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 150ms ease-in-out;
}

.sidebar.loaded {
  opacity: 1;
}

.sidebar h2 {
  font-size: 1.2rem;
  color: #3399FF;
  margin-top: 0;
  font-weight: 600;
}

.sidebar a {
  display: block;
  padding: 0.5em 0.5em;
  margin: 0.5em 0;
  background: #a9c4f9;
  color: #08377c;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.4;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.15s ease;
  user-select: none;
}

.sidebar a:hover,
.sidebar a:focus {
  background: #7eaef9;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
  outline: none;
}

.sidebar a.active {
  background: #5e95f5;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  color: #fff;
  cursor: default;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  margin: 0;
  padding: 0;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 2rem);
}

.title {
  color: #3399FF;
  font-size: 1.8em;
  font-weight: bold;
  font-style: italic;
  text-align: center;
  margin-bottom: 20px;
}

.content {
  width: 100%;
  margin-left: 220px;
  padding: 2rem 2rem 2rem 2rem;
  flex: 1;
}

h1, h2 {
  color: #3399FF;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  font-weight: 700;
}

h3, h4 {
  color: #3399FF;
  margin-top: 2.5em;
  margin-bottom: 0.5em;
  font-weight: 700;
}

p {
  text-align: justify;
}

table {
  margin-top: -1em;
}

li {
  text-align: justify;
}

p + ul, p + ol {
  margin-top: -0.5em;
}

ul, ol {
  margin-bottom: 2em;
}

pre {
  background: #2d2d2d;
  color: #f8f8f2;
  padding: 1em;
  border-radius: 4px;
  overflow-x: auto;
  font-family: 'Source Code Pro', monospace, monospace;
  font-size: 0.9rem;
}

pre.line-numbers {
  padding-left: 3.8em;
}

.token.comment {
  font-style: italic;
  color: #8fa1c7;
}

.theme-toggle {
  color: #3399FF;
  margin-top: auto;
  margin-bottom: 0.5rem;
  padding: 0.6em 1em;
  font-size: 0.95rem;
  background: #f0f4ff;
  color: #1a2a4f;
  border: 2px #5e95f5;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: background-color 0.3s ease, transform 0.15s ease;
}

.theme-toggle:hover,
.theme-toggle:focus {
  background: #dbe8ff;
  transform: translateY(-2px);
  outline: none;
}

.content p {
  max-width: 900px;
}

.content li {
  max-width: 860px;
}

.sidebar ul li ul.submenu {
  display: none;
  margin-left: 1em;
  padding-left: 0;
  list-style: none;
}
.sidebar li.has-submenu.open > ul.submenu {
  display: block;
}
.sidebar ul li ul.submenu > li > a {
  display: block;
  padding: 0.35em 0.6em;
  margin: 0.25em 0;
  background: #c7d8fb;
  color: #08448c;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 1.5px 4px rgba(0, 0, 0, 0.06);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.15s ease;
  user-select: none;
}
.sidebar ul li ul.submenu > li > a:hover,
.sidebar ul li ul.submenu > li > a:focus {
  background: #a4c0fa;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
  transform: translateY(-1.5px);
  outline: none;
}
.sidebar ul li ul.submenu > li > a.active {
  background: #7c9ef9;
  color: #fff;
  cursor: default;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}
.sidebar ul li ul.submenu li {
  margin: 0;
  padding: 0;
}

.sidebar .sublist {
  margin: 0.3rem 0 0.8rem 0.6rem;
  padding-left: 0.5rem;
  list-style: none;
  font-size: 0.85rem;
  color: #0c254c;
  border-left: 2px solid #5e95f5;
  line-height: 1.3;
  text-align: left;
}

.sidebar .sublist li {
  margin: 0.2rem 0;
  text-align: left;
}

.sidebar .sublist a {
  display: block;
  padding: 0.2em 0.4em;
  margin: 0;
  background: transparent;
  color: orangered;
  text-decoration: none;
  font-weight: normal;
  font-size: 0.85rem;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.sidebar .sublist a:hover {
  background-color: #cce1ff;
  color: #08377c;
}

.button {
  display: inline-block;
  padding: 0.6em 1.2em;
  background: #a9c4f9;
  color: #08377c;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.15s ease;
  user-select: none;
}

.button:hover,
.button:focus {
  background: #7eaef9;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
  outline: none;
}

.button:active {
  background: #5e95f5;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset;
  transform: translateY(1px);
  color: #fff;
}

button:disabled,
button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
  background-color: #ccc;
  color: #666;
  box-shadow: none;
}

button:disabled:hover,
button[disabled]:hover {
  background-color: #ccc;
  color: #666;
  box-shadow: none;
}

.script-box {
  border-left: 8px solid;
  padding: 0px 12px;
  margin: 64px 0px 12px 0;
  border-radius: 6px;
  background: #f9f9f9;
}
.script-box p {
  margin-bottom: 8px;
}
.script-box h4 {
  color: black;
  display: inline-block;
  margin: 0;
}
.script-box h4::after {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
  color: white;
}
.beginner { border-color: #4CAF50; }
.beginner h4::after {
  content: "Beginner";
  background: #4CAF50;
}
.intermediate { border-color: #2196F3; }
.intermediate h4::after {
  content: "Intermediate";
  background: #2196F3;
}
.advanced { border-color: #F44336; }
.advanced h4::after {
  content: "Advanced";
  background: #F44336;
}
.expert { border-color: #212121; }
.expert h4::after {
  content: "Expert";
  background: #212121;
}
