/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Arial, sans-serif;
}

/* Light theme code text override for Prism */
body.light pre code {
  color: #222 !important;
}

/* Optional: make other Prism tokens visible in light theme */
body.light .token.comment,
body.light .token.prolog,
body.light .token.doctype,
body.light .token.cdata {
  color: #6a737d !important; /* gray-ish for comments */
}

body.light .token.keyword,
body.light .token.selector,
body.light .token.tag {
  color: #d73a49 !important; /* red-ish for keywords/tags */
}

body.light .token.property,
body.light .token.string,
body.light .token.char,
body.light .token.attr-name,
body.light .token.attr-value,
body.light .token.number {
  color: #005cc5 !important; /* blue-ish for strings/numbers */
}

body.light .token.function,
body.light .token.class-name {
  color: #6f42c1 !important; /* purple for functions/classes */
}

/* BODY */
body.light {
  background: #f7f7f7;
  color: #222;
  transition: 0.3s;
}
body.dark {
  background: #0b1220;
  color: #e6eef8;
  transition: 0.3s;
}
body::-webkit-scrollbar {
  display: none;
}

/* SIDEBAR */
.sidebar {
  width: 260px;
  background: #ffffff;
  border-right: 1px solid #ddd;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  overflow-y: auto;
  padding: 20px;
  transition: transform 0.3s ease;
  z-index: 999;
}
.sidebar::-webkit-scrollbar {
  display: none;
}
body.dark .sidebar {
  background: #0f1724;
  border-color: #1e293b;
  color: #e6eef8;
}

.close-btn {
  display: none;
  cursor: pointer;
  text-align: right;
  font-size: 22px;
  margin-bottom: 10px;
}

.sidebar-heading {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}
.channel-logo {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  margin-right: 10px;
}
body.dark .channel-logo {
  border: 2px solid #fff; /* white border */
  border-radius: 50%; /* keeps it circular */
}

.channel-name {
  font-weight: bold;
  font-size: 16px;
}

#search {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  margin-bottom: 10px;
  background: #f2f2f2;
}
body.dark #search {
  background: #1e293b;
  color: #e6eef8;
  border: 1px solid #3a3f55;
}

#stageList li {
  list-style: none;
  margin-bottom: 5px;
}
#stageList li a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: 0.2s;
}
#stageList li a:hover {
  background: rgba(125, 211, 252, 0.2);
  padding-left: 15px;
}

/* RIGHT PANEL */
.right-panel {
  margin-left: 260px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s;
}

/* RIGHT HEADER */
.right-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #7dd8fc;
  color: #042;
  padding: 15px 20px;
  z-index: 1000;
}
.header-buttons button {
  margin-left: 10px;
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: #042;
  color: #fff;
}
body.dark .right-header {
  background: #1e293b;
  color: #e6eef8;
}
body.dark .header-buttons button {
  background: #7dd2fc;
  color: #042;
}

/* MAIN CONTENT */
main {
  padding: 20px;
  flex: 1;
  overflow-x: auto;
}

/* NAV BUTTONS */
.nav-buttons {
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
}
.nav-buttons button {
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: #7dd8fc;
  color: #042;
}
body.dark .nav-buttons button {
  background: #1e293b;
  color: #e6eef8;
}

/* CODE BLOCKS */
/* CODE BLOCKS */
pre {
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  position: relative;
  font-family: "Fira Code", monospace;
  margin-bottom: 20px;
}

/* Light theme */
body.light pre {
  background: #fff6e8;
  color: #222; /* <-- set text to black for light theme */
}

/* Dark theme */
body.dark pre {
  background: #1e1e2f;
  color: #f8f8f2;
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 6px;
  border: none;
  background: #7dd3fc;
  color: #042;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 15px;
  background: #f1f1f1;
  margin-top: auto;
}
body.dark footer {
  background: #0f1724;
  color: #e6eef8;
}

/* HAMBURGER */
.hamburger {
  display: none;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
}
/* MOBILE FIXES */
@media (max-width: 900px) {
  /* Sidebar behavior */
  .sidebar {
    transform: translateX(-260px);
  }
  .sidebar.show {
    transform: translateX(0);
  }

  /* Header fixes for perfect alignment */
  .right-header {
    flex-wrap: nowrap;
    justify-content: space-between;
    padding: 12px 15px;
  }

  /* Title fix – center alignment + no overlap */
  .right-header .logo {
    font-size: 18px;
    text-align: center;
    flex: 1;
    margin-right: 10px;
    white-space: nowrap;
  }

  /* Hamburger fix – keep it on right side properly */
  .hamburger {
    display: block;
    font-size: 26px;
    background: none;
    border: none;
    margin-left: auto;
  }

  /* Theme button & hamburger spacing fix */
  .header-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  /* Fix main content */
  main,
  .nav-buttons {
    margin-left: 0 !important;
  }

  /* Smaller header buttons on mobile */
  .header-buttons button {
    padding: 5px 10px;
    font-size: 14px;
  }

  .close-btn {
    display: block;
  }

  /* Remove left margin on right-panel */
  .right-panel {
    margin-left: 0;
  }
}

/* Make all stage images smaller and responsive */
main img {
  max-width: 400px; /* Adjust as needed */
  height: auto;
  display: block;
  margin: 10px 0;
  border: 1px solid #ccc; /* optional border to highlight output images */
  border-radius: 6px; /* optional rounded corners */
}
