.structure-panel {
  width: 100%;
  position: static;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #13243b;
  box-shadow: none;
}
.root-course-section {
  overflow: hidden;
  border: 1px solid #d8e3ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(27, 65, 108, 0.07);
}
.root-course-section + .root-course-section {
  margin-top: 16px;
}
.root-course-content {
  padding: 14px 18px 20px;
}
.structure-head {
  position: relative;
  padding: 10px 20px;
  border-bottom: 1px solid #dfe8f2;
  background: linear-gradient(135deg, #f8fbff, #edf5fc);
}
.structure-head.has-image {
  min-height: 100px;
  padding: 10px 20px;
  box-sizing: border-box;
}
.structure-head.has-image h3,
.structure-head.has-image p {
  max-width: 440px;
}
.structure-head span {
  color: #167fbd;
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 800;
}
.structure-head h3 {
  margin: 0 0 2px;
  color: #102642;
  font-size: 22px;
}
.structure-head p {
  margin: 0;
  color: #71849a;
  font-size: 11px;
}
.structure-image {
  display: block;
  position: absolute;
  top: 10px;
  left: 50%;
  width: 220px;
  height: 80px;
  transform: translateX(-50%);
  border: 0;
  object-fit: contain;
  background: transparent;
}
.structure-image[hidden] {
  display: none;
}
.course-browser {
  display: block;
}
.course-library {
  scroll-margin-top: 82px;
}
.course-library + .course-library {
  margin-top: 56px;
}
.content-panel {
  display: none;
}
.course-tree {
  max-height: none;
  padding: 0;
}
.student-node {
  position: relative;
}
.student-node:before {
  border-color: #d6e3ef;
}
.student-line {
  min-height: 42px;
  padding: 8px 10px;
  cursor: default;
  border-radius: 7px;
  color: #263d58;
}
.student-line:hover {
  background: #f3f8fc;
}
.student-line.expandable {
  cursor: pointer;
}
.student-line.expandable:focus-visible {
  outline: 2px solid #1688cf;
  outline-offset: 2px;
}
.student-title {
  font-size: 13px;
  font-weight: 700;
}
.student-toggle {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #167db7;
  cursor: default;
}
.student-toggle span {
  display: block;
}
.student-toggle.expandable {
  cursor: pointer;
  background: #eaf4fb;
  transition:
    background 0.2s,
    transform 0.2s;
}
.student-toggle.expandable:hover {
  background: #dceef9;
}
.student-toggle.expandable span {
  width: 7px;
  height: 7px;
  border-right: 2px solid #167db7;
  border-bottom: 2px solid #167db7;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform 0.2s;
}
.student-node.collapsed > .student-line .student-toggle.expandable span {
  transform: rotate(-45deg) translate(0, 0);
}
.student-toggle.leaf-node span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b9cada;
}
.student-children {
  margin-left: 25px;
  border-left: 1px solid #d8e4ef;
  padding-left: 8px;
}
.student-node.collapsed > .student-children {
  display: none;
}
.resource-leaf {
  width: calc(100% - 8px);
  margin: 4px 0 4px 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  border: 1px solid #dde7f0;
  border-radius: 7px;
  background: #f9fbfd;
  color: #1d3651;
  box-shadow: 0 2px 7px rgba(31, 73, 112, 0.03);
}
.resource-leaf:hover {
  border-color: #8bc7e5;
  background: #eef8fd;
  transform: translateX(2px);
}
.resource-leaf .leaf-icon {
  width: 38px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 6px;
  background: #e7f3fb;
  color: #177db8;
  font: 800 10px monospace;
}
.resource-leaf.video .leaf-icon {
  color: #fff;
  background: linear-gradient(135deg, #1788c8, #30bedc);
  font-size: 13px;
}
.resource-leaf.pdf .leaf-icon {
  color: #d54b4b;
  background: #fff0f0;
}
.resource-leaf.code .leaf-icon {
  color: #19805f;
  background: #e8f8f1;
}
.resource-leaf span:nth-child(2) {
  min-width: 0;
}
.resource-leaf b,
.resource-leaf small {
  display: block;
}
.resource-leaf b {
  overflow: hidden;
  color: #19324d;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.resource-leaf small {
  margin-top: 2px;
  color: #7b8da0;
  font-size: 9px;
}
.resource-leaf i {
  margin-left: auto;
  color: #1782bc;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}
.pdf-pages {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-direction: column;
  gap: 12px;
  overflow: auto !important;
  padding: 12px 0;
  background: #cfd3d8 !important;
  -webkit-overflow-scrolling: touch;
}
.pdf-page {
  display: block;
  max-width: calc(100vw - 16px);
  height: auto !important;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
}
.pdf-loading,
.pdf-error {
  margin: auto;
  padding: 18px 24px;
  border-radius: 8px;
  background: #fff;
  color: #334;
  font-size: 13px;
}
.fullscreen-viewer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  z-index: 200;
  background: #020812;
}
.fullscreen-viewer .viewer-bar {
  height: 58px;
}
.viewer-actions {
  display: flex;
  gap: 8px;
}
.fullscreen-viewer .viewer-body {
  height: calc(100dvh - 58px);
  background: #282c34;
}
.fullscreen-viewer:fullscreen {
  width: 100vw;
  height: 100vh;
}
.fullscreen-viewer:fullscreen .viewer-body {
  height: calc(100vh - 58px);
}
@media (max-width: 600px) {
  .structure-head {
    padding: 12px 14px;
  }
  .structure-head.has-image {
    min-height: 0;
    padding: 12px 14px;
  }
  .structure-head.has-image h3,
  .structure-head.has-image p {
    max-width: none;
  }
  .structure-image {
    position: static;
    width: 120px;
    height: 50px;
    margin: 8px auto 0;
    transform: none;
  }
  .course-tree {
    padding: 0;
  }
  .root-course-content {
    padding: 10px 10px 14px;
  }
  .student-children {
    margin-left: 16px;
    padding-left: 5px;
  }
  .resource-leaf {
    width: calc(100% - 4px);
    margin-left: 4px;
  }
  .viewer-bar strong {
    max-width: 120px;
  }
  .viewer-actions .close-viewer {
    padding: 6px 7px;
    font-size: 10px;
  }
}
.root-access-gate {
  display: block;
  margin: 18px auto 22px;
  padding: 11px 18px;
  border: 1px solid #b9d4e7;
  border-radius: 8px;
  background: #f2f9fd;
  color: #1479ad;
  font-weight: 700;
  cursor: pointer;
}
.root-access-gate:hover {
  background: #e7f4fb;
}
