:root {
    --bg-1: #0e1621;
    --bg-2: #152030;
    --accent: #5dc5ee;
    --accent-2: #6ee7b7;
    --muted: #b8c6d3;
    --text: #e6eef6;
    --card-bg: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.08);
    --radius: 12px;
    --shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%) fixed;
    background-attachment: fixed;
    background-size: cover;
    color: var(--text);
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* HEADER */
/* App Bar */
.app-bar {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    padding: 12px 20px;
    z-index: 999;
  }
  
  .app-bar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 5%;
  }
  
  /* Brand */
  .brand {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .brand__logo {
    height: 60px; /* bigger logo */
    width: auto;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
    transition: transform 0.3s ease;
  }
  
  .brand__logo:hover {
    transform: scale(1.05);
  }

  .brand__tagline {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: white;
    max-width: 320px;
    line-height: 1.4;
  }
  
  /* Topbar Right (GitHub) */
  .topbar-right {
    display: flex;
    align-items: center;
    gap: 3vh;
  }
  
  .github-logo {
    height: 28px;
    width: auto;
    filter: drop-shadow(0 1px 4px rgba(0,0,0,0.5));
    transition: transform 0.3s ease, filter 0.3s ease;
  }
  
  .github-logo:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6));
    cursor: pointer;
  }
  
  /* Optional: subtle glow on app bar hover */
  .app-bar:hover {
    box-shadow: 0 8px 22px rgba(0,0,0,0.45);
  }
  

/* CONTENT */
.app-content {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 30px 20px;
    max-width: 100vw;
}

.content-inner {
    display: flex;
    flex: 1;
    width: 100%;
    height: 100%;
}

/* PLOT CONTAINER */
.plot-container {
    /* background: var(--card-bg); */
    /* border-radius: var(--radius); */
    /* border: 1px solid var(--border); */
    padding: 3px;
    /* box-shadow: var(--shadow); */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex: 1;
    min-width: 0;
    /* overflow: hidden; */
}

.plot-container .bk-Tabs {
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

/* FOOTER */
.page-footer {
    text-align: center;
    padding: 10px;
    color: var(--muted);
    font-size: 0.9rem;
}

.help-toggle-btn {
  width: 30px;
  height: 30px;
  text-align: center;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 700;
}

.help-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(750px, calc(100vw - 12px));
  max-width: 100vw;
  height: 100dvh;
  background: rgba(248, 248, 248, 0.98);
  color: #3a3a3a;
  border-left: 1px solid #ddd;
  box-sizing: border-box;
  padding: 18px 22px 24px;
  box-shadow: -12px 0 30px rgba(0,0,0,0.18);
  transform: translateX(calc(100% + 12px));
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  z-index: 9998;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.help-panel__content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.help-panel__content > * {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
}

.help-panel.open {
  transform: translateX(0);
}

.help-panel h2 {
  margin: 0 40px 14px 0;
}

.help-close {
  position: absolute;
  top: 14px;
  right: 18px;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.tutorial-toggle-btn {
  display: none; /* Hidden for now */
}

/* RESPONSIVE */
@media (max-width: 980px) {
  .help-panel {
    width: min(860px, calc(100vw - 12px));
    padding: 16px 18px 20px;
  }
}

@media (max-width: 700px) {
  .help-panel {
    width: 100vw;
    padding: 14px 14px 18px;
    border-left: none;
  }

  .help-close {
    top: 12px;
    right: 14px;
  }
}

@media (max-width: 800px) {
    /* .brand__logo { height: 36px; }
    .app-content { padding: 20px 10px; }
    .plot-container { padding: 12px; } */
}