body {
  margin: 0;
  font-family: sans-serif;
  font-size: 20px;
  min-height: 100vh;
  background-color: rgb(20, 20, 20);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  color: rgb(255, 255, 255);
  
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

body::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.container {
  display: flex;
  width: 100%;
  min-height: 100vh;
  align-items: flex-start;
}

aside {
  width: 250px;
  min-width: 250px;        /* ADD - prevents shrinking */
  overflow-y: auto;
  padding: 10px;
  background-color: rgba(27, 27, 27, 0.9);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
  font-size: 20px;
  margin: 15px;
  border-radius: 25px;
  position: sticky;        /* from previous fix */
  top: 15px;
  height: calc(100vh - 30px);  /* ADD - always full viewport height */
  min-height: calc(100vh - 30px);  /* ADD - never shrink below this */
  box-sizing: border-box;  /* ADD - padding included in height calc */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

aside::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.page {
    max-width: 3000px;
    padding: 40px;
    background-color: rgba(27, 27, 27, 0.9);
    border-radius: 25px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);

    /* animation */
  transform-origin: top;
  transform: scaleY(0);
  opacity: 0;
  animation: expandPage 0.4s ease-out forwards;

    width: 100%;             /* ADD */
  box-sizing: border-box;  /* ADD */

    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

@keyframes expandPage {
  0% {
    transform: scaleY(0);
    opacity: 0;
  }
  100% {
    transform: scaleY(1);
    opacity: 1;
  }
}

main {
  flex: 1;
  padding: 20px;
  overflow-y: auto;

  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

main::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.sidebar-item {
  border-radius: 5px;
  border-color: #61606048;
  margin: 5px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  display: block;
  text-decoration: none;
  color: rgb(241, 241, 241);
}

.sidebar-item.active {
  background: rgba(46, 46, 46, 0.9)
}

.sidebar-children {
  margin-left: 15px;
  display: none;
}

.sidebar-children.open {
  display: block;
}

ul {
  list-style-type: none;
  padding-left: 0;
  margin: 0;
}

.sidebar-children {
  margin-left: 12px; /* reduced from default */
  display: none;
}

.sidebar-children.open {
  display: block;
}

.sidebar-item:hover {
  background-color: #5f5f5f;
}

a {
  color: #007bff;                /* Link color (blue by default) */
  text-decoration: underline;      /* Underline */
  font-weight: bold;               /* Optional: make it bold */
  transition: color 0.3s ease;     /* Smooth hover effect */
}


mjx-container[jax="CHTML"] {
  text-align: left !important;
  margin-left: 0 !important;  /* remove default centering margin */
}

.inline-math-box {
  display: inline-block;
  border: 1px solid #ebebeb;
  padding: 25px 25px;
  border-radius: 10px;
  background-color: #f0f0f000;
}

.chart-container {
  max-width: 800px;
  margin: 40px 0;
  padding: 20px;
  background-color: rgba(27, 27, 27, 0.9);
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
  text-align: left;
}

.ema-formula-group, /* DO NOT use this var */
.half-line-box {
  position: relative;
  padding-left: 40px; /* Space for the bracket */
  margin-left: 20px;
}

.ema-formula-group::before, /* DO NOT use this var */
.half-line-box::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 25px;
  border: 3px solid #ffffff8a; /* Adjust color as needed */
  border-right: none;
  border-radius: 15px 0 0 15px; /* Curved edges on the left side */
}

.info {
  color: #7370fd;
  font-size: 30px;
  font-family:
    "Hoefler Text",
    "Baskerville",
    "Libre Baskerville",
    "Times New Roman",
    serif;
  font-weight: bold;
  font-style: italic;
}

.hastag {
  color: #828684;
  font-weight: bold;
}

.dash2 {
  color: #828684;
  font-weight: bold;
}

.new {
  background: linear-gradient(270deg, #ff0080, #7928ca, #2af598);
  background-size: 600% 600%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: new 5s ease infinite;
  margin-left: 27px;
}

.new4text {
  background: linear-gradient(270deg, #ff0080, #7928ca, #2af598);
  background-size: 600% 600%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: new 5s ease infinite;
}

@keyframes new {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.custom { 
  color: #007bff;
 
  /* TEXT UNDERLINE
 text-decoration: underline 1px;
 text-underline-offset: 4px;
 text-decoration-color: #3b4741;
 */  
}

.space {
  font-size: 30px;
}

.updatecat {
  color: #438f06;
  font-size: 25px;
}

.search-highlight {
  background-color: #007bff;
  color: white;
  padding: 0 2px;
  border-radius: 2px;
}

.blank {
  margin: 7px;
}
