:root {
  color-scheme: light;
  --bg: #f3f7ff;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --text: #101827;
  --muted: #5e6b80;
  --line: #dce7fb;
  --line-soft: rgba(213, 226, 250, 0.72);
  --blue: #1268f3;
  --blue-deep: #0d56ce;
  --blue-soft: #e7f1ff;
  --cyan: #18c7c0;
  --violet: #8d6cff;
  --pink: #e22f7d;
  --orange: #f06b20;
  --shadow: 0 22px 64px rgba(71, 117, 191, 0.16);
  --soft-shadow: 0 14px 34px rgba(40, 92, 177, 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 87% 4%, rgba(194, 205, 255, 0.82), transparent 27rem),
    radial-gradient(circle at 0% 100%, rgba(118, 153, 255, 0.36), transparent 17rem),
    linear-gradient(135deg, #fafdff 0%, #f4f8ff 48%, #edf4ff 100%);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  font-size: 15px;
  letter-spacing: 0;
  overflow: hidden;
}

button {
  font: inherit;
}

.page-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(1px);
}

.bg-glow-top {
  top: -72px;
  right: -64px;
  width: 390px;
  height: 220px;
  background: linear-gradient(135deg, rgba(154, 170, 255, 0.34), rgba(255, 255, 255, 0));
}

.bg-glow-left {
  bottom: -70px;
  left: -42px;
  width: 188px;
  height: 188px;
  background: radial-gradient(circle, rgba(93, 129, 255, 0.42), rgba(93, 129, 255, 0));
}

.bg-glow-right {
  right: 30px;
  top: 49%;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #7068ff, #25d5df);
  box-shadow: 0 16px 28px rgba(37, 132, 232, 0.24);
}

.bg-dots {
  position: absolute;
  opacity: 0.68;
  background-image: radial-gradient(circle, rgba(74, 132, 245, 0.5) 2px, transparent 2.5px);
  background-size: 18px 18px;
}

.bg-dots-top {
  top: 40px;
  right: 26px;
  width: 74px;
  height: 38px;
  opacity: 0.18;
}

.bg-dots-side {
  right: 14px;
  top: 58%;
  width: 90px;
  height: 74px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 78px;
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(206, 220, 244, 0.66);
  box-shadow: 0 10px 34px rgba(54, 100, 171, 0.06);
  backdrop-filter: blur(20px);
}

.tabs {
  display: flex;
  align-items: stretch;
  gap: clamp(12px, 2vw, 32px);
  height: 100%;
  padding: 0 40px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  position: relative;
  flex: 0 0 auto;
  min-width: 94px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #050b1a;
  cursor: pointer;
  font-size: 18px;
  font-weight: 850;
  white-space: nowrap;
}

.tab::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 5px;
  border-radius: 999px 999px 0 0;
  background: transparent;
  content: "";
}

.tab.is-active {
  color: var(--blue);
}

.tab.is-active::after {
  background: linear-gradient(90deg, #0874ff, #2f82ff);
  box-shadow: 0 -1px 12px rgba(18, 104, 243, 0.38);
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
  gap: 24px;
  height: calc(100svh - 78px);
  padding: 10px 38px 0;
}

.question-panel,
.answer-panel {
  min-height: 0;
  border: 1px solid rgba(218, 229, 250, 0.78);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.question-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.question-panel::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.84), rgba(230, 241, 255, 0.52)),
    radial-gradient(circle at 10% 10%, rgba(95, 153, 255, 0.15), transparent 15rem);
  content: "";
  pointer-events: none;
}

.question-panel-header,
.question-list {
  position: relative;
  z-index: 2;
}

.sidebar-illustration {
  position: relative;
  z-index: 0;
}

.question-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  padding: 32px 32px 22px 24px;
}

.question-panel h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
  font-weight: 850;
}

.header-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 7px;
  background: linear-gradient(135deg, #eaf4ff, #ffffff);
  box-shadow: 0 6px 14px rgba(18, 104, 243, 0.22);
}

.header-icon svg,
.panel-tool svg,
.favorite-button svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-icon svg {
  width: 20px;
  height: 20px;
  color: var(--blue);
}

.panel-tool {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #8bb4ee;
  cursor: pointer;
}

.panel-tool:hover {
  background: rgba(232, 242, 255, 0.8);
  color: var(--blue);
}

.panel-tool svg {
  width: 20px;
  height: 20px;
}

.question-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 3px 18px 170px 0;
}

.question-list::-webkit-scrollbar,
.answer-panel::-webkit-scrollbar {
  width: 8px;
}

.question-list::-webkit-scrollbar-thumb,
.answer-panel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(115, 157, 222, 0.3);
}

.question-item {
  display: block;
  width: calc(100% - 2px);
  min-height: 44px;
  margin: 0 0 3px;
  padding: 10px 14px 10px 28px;
  border: 0;
  border-left: 4px solid transparent;
  border-radius: 0 8px 8px 0;
  background: transparent;
  color: #0d1728;
  cursor: pointer;
  text-align: left;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.36;
}

.question-item:hover {
  background: rgba(231, 241, 255, 0.74);
  color: var(--blue-deep);
}

.question-item.is-active {
  border-left-color: var(--blue);
  background: linear-gradient(90deg, rgba(217, 235, 255, 0.98), rgba(196, 224, 255, 0.74));
  color: var(--blue-deep);
  box-shadow: 0 8px 20px rgba(33, 113, 230, 0.12);
}

.sidebar-illustration {
  position: absolute;
  right: 26px;
  bottom: 12px;
  left: 84px;
  height: 118px;
  opacity: 0.72;
  pointer-events: none;
}

.book-stack {
  position: absolute;
  left: 8px;
  bottom: 10px;
  width: 120px;
  height: 74px;
  transform: rotate(-7deg);
}

.book-stack span {
  position: absolute;
  left: 0;
  width: 118px;
  height: 29px;
  border-radius: 6px;
  background: linear-gradient(135deg, #6a8bff, #386df5);
  box-shadow: 0 10px 18px rgba(55, 101, 229, 0.22);
}

.book-stack span::before {
  position: absolute;
  right: 8px;
  bottom: 4px;
  left: 10px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  content: "";
}

.book-stack span:nth-child(1) {
  bottom: 44px;
}

.book-stack span:nth-child(2) {
  bottom: 22px;
  background: linear-gradient(135deg, #ffffff, #dfe9ff);
}

.book-stack span:nth-child(3) {
  bottom: 0;
}

.plant {
  position: absolute;
  right: 4px;
  bottom: 16px;
  width: 36px;
  height: 62px;
  border-bottom: 22px solid #dfe9ff;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
}

.plant::before {
  position: absolute;
  right: -8px;
  bottom: -27px;
  left: -8px;
  height: 6px;
  border-radius: 999px;
  background: rgba(63, 107, 199, 0.12);
  content: "";
}

.plant span {
  position: absolute;
  bottom: 19px;
  width: 16px;
  height: 30px;
  border-radius: 16px 16px 3px 16px;
  background: linear-gradient(135deg, #67e2b0, #22b986);
}

.plant span:nth-child(1) {
  left: -5px;
  transform: rotate(-34deg);
}

.plant span:nth-child(2) {
  left: 10px;
  bottom: 28px;
}

.plant span:nth-child(3) {
  right: -6px;
  transform: rotate(34deg) scale(0.86);
}

.answer-panel {
  position: relative;
  isolation: isolate;
  overflow: auto;
  padding: 36px 62px 42px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
    radial-gradient(circle at 86% 7%, rgba(206, 220, 255, 0.3), transparent 22rem);
}

.answer-content {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  min-height: 100%;
}

.answer-header,
.meta-chips,
.answer-full {
  position: relative;
  z-index: 2;
}

.answer-header {
  position: relative;
  min-height: 78px;
  padding: 0 170px 18px 0;
}

.title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 22px;
}

.question-number {
  display: inline-block;
  min-width: 78px;
  color: rgba(47, 116, 255, 0.25);
  font-size: 42px;
  line-height: 0.98;
  font-weight: 900;
}

.answer-title {
  margin: 4px 0 0;
  color: #07101f;
  font-size: 27px;
  line-height: 1.28;
  font-weight: 900;
}

.favorite-button {
  position: absolute;
  top: 9px;
  right: 92px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(61, 128, 246, 0.22);
  border-radius: 7px;
  background: rgba(242, 247, 255, 0.82);
  color: var(--blue);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}

.favorite-button:hover,
.favorite-button.is-active {
  background: rgba(225, 239, 255, 0.96);
  box-shadow: 0 8px 18px rgba(18, 104, 243, 0.12);
}

.favorite-button svg {
  width: 18px;
  height: 18px;
}

.favorite-button.is-active svg {
  fill: #ffcf46;
  stroke: #f0a900;
}

.answer-illustration {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 70px;
  height: 62px;
  perspective: 200px;
}

.server-card {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 50px;
  height: 44px;
  border-radius: 7px;
  background: linear-gradient(145deg, #7aa3ff, #406df4);
  box-shadow: 0 12px 22px rgba(54, 101, 218, 0.25);
  transform: rotateY(-18deg) rotateZ(9deg);
}

.server-card::before {
  position: absolute;
  right: 9px;
  bottom: -11px;
  width: 48px;
  height: 15px;
  border-radius: 50%;
  background: rgba(67, 108, 216, 0.13);
  content: "";
  transform: rotateZ(-9deg);
}

.server-card::after {
  position: absolute;
  top: -8px;
  right: -13px;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: #6d6cff;
  box-shadow: -46px 1px 0 -2px #4aa4ff, -17px 34px 0 -1px #ffc15a;
  content: "";
}

.server-card span {
  display: block;
  width: 28px;
  height: 3px;
  margin: 9px 0 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.server-card span:nth-child(2) {
  width: 21px;
  margin-top: 7px;
}

.server-card span:nth-child(3) {
  width: 30px;
  margin-top: 7px;
}

.meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -8px 0 18px 100px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(113, 164, 241, 0.32);
  border-radius: 7px;
  background: rgba(238, 246, 255, 0.9);
  color: #2367bc;
  font-size: 13px;
  font-weight: 800;
}

.markdown {
  color: #101827;
  font-size: 17px;
  line-height: 1.72;
}

.answer-full {
  margin: 0 0 4px;
  padding: 26px 30px;
  border: 1px solid rgba(199, 218, 248, 0.76);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.96)),
    radial-gradient(circle at 92% 10%, rgba(123, 170, 255, 0.15), transparent 15rem);
  box-shadow: 0 16px 34px rgba(84, 125, 194, 0.12);
}

.markdown p {
  margin: 0 0 16px;
}

.markdown p:last-child {
  margin-bottom: 0;
}

.markdown ul,
.markdown ol {
  margin: 0 0 18px;
  padding-left: 1.35em;
}

.markdown li {
  margin: 7px 0;
  padding-left: 3px;
}

.markdown li::marker {
  color: #0e2763;
  font-size: 0.75em;
}

.markdown blockquote {
  margin: 0 0 18px;
  padding: 12px 15px;
  border-left: 4px solid var(--blue);
  border-radius: 7px;
  background: rgba(241, 247, 255, 0.9);
  color: #38526f;
}

.markdown blockquote p {
  margin: 0;
}

.markdown h3,
.markdown h4 {
  margin: 24px 0 12px;
  color: var(--blue);
  font-size: 18px;
  line-height: 1.35;
}

.markdown strong {
  color: var(--orange);
  font-weight: 900;
}

.markdown code {
  padding: 0.1em 0.35em;
  border: 1px solid #e5eaff;
  border-radius: 5px;
  background: #f3f6ff;
  color: var(--pink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.88em;
}

.markdown pre {
  position: relative;
  margin: 8px 0 20px;
  padding: 18px 20px;
  overflow: auto;
  border: 1px solid #cfdcff;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #fbfdff, #f7faff),
    radial-gradient(circle at 100% 0, rgba(115, 151, 255, 0.1), transparent 12rem);
  color: #113158;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  font-size: 15px;
  line-height: 1.46;
}

.markdown pre::after {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(43, 69, 139, 0.62);
  border-radius: 3px;
  content: "";
  box-shadow: -5px 5px 0 -2px #f7faff, -5px 5px 0 0 rgba(43, 69, 139, 0.46);
}

.markdown pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

.answer-decoration {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.floating-ball {
  position: fixed;
  right: 20px;
  top: 49%;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #736cff, #22d1db);
  box-shadow: 0 15px 26px rgba(38, 138, 226, 0.27);
}

.side-dots {
  position: fixed;
  right: 4px;
  top: 58%;
  width: 94px;
  height: 76px;
  background-image: radial-gradient(circle, rgba(71, 126, 240, 0.42) 2px, transparent 2.5px);
  background-size: 18px 18px;
}

.code-tile {
  position: fixed;
  right: 82px;
  bottom: 44px;
  display: grid;
  width: 70px;
  height: 52px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #7e9cff, #3f62ef);
  color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 32px rgba(48, 95, 219, 0.22);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  z-index: 0;
  font-size: 18px;
  font-weight: 900;
  transform: rotate(-8deg);
}

.code-tile::before {
  position: absolute;
  right: 8px;
  bottom: -10px;
  left: 8px;
  height: 18px;
  border-radius: 50%;
  background: rgba(62, 104, 215, 0.12);
  content: "";
  transform: rotate(8deg);
}

.loading,
.empty-state {
  display: grid;
  min-height: 280px;
  place-items: center;
  color: var(--muted);
  font-size: 18px;
}

@media (max-width: 1100px) {
  body {
    overflow: auto;
  }

  .tabs {
    gap: 18px;
    padding-inline: 24px;
  }

  .tab {
    min-width: auto;
    font-size: 17px;
  }

  .app-shell {
    grid-template-columns: 318px minmax(0, 1fr);
    padding: 16px;
  }

  .answer-panel {
    padding: 30px 34px 38px;
  }

  .answer-header {
    padding-right: 120px;
  }

  .favorite-button {
    right: 74px;
  }

  .answer-illustration {
    right: 0;
  }

  .floating-ball,
  .side-dots,
  .code-tile {
    display: none;
  }
}

@media (max-width: 820px) {
  body {
    overflow: auto;
    background:
      radial-gradient(circle at 100% 0, rgba(181, 198, 255, 0.6), transparent 16rem),
      linear-gradient(160deg, #fbfdff, #edf5ff);
  }

  .topbar {
    height: 64px;
  }

  .tabs {
    gap: 12px;
    padding: 0 16px;
  }

  .tab {
    min-width: auto;
    padding: 0 6px;
    font-size: 16px;
  }

  .tab::after {
    height: 4px;
  }

  .app-shell {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: calc(100svh - 64px);
    gap: 12px;
    padding: 12px;
  }

  .question-panel {
    flex: 0 0 auto;
    max-height: 43svh;
  }

  .question-panel-header {
    padding: 18px 18px 14px;
  }

  .question-panel h2 {
    font-size: 17px;
  }

  .header-icon {
    width: 25px;
    height: 25px;
  }

  .question-list {
    padding: 0 12px 16px 0;
  }

  .question-item {
    min-height: 42px;
    padding: 10px 12px 10px 17px;
    border-left-width: 4px;
    font-size: 14px;
  }

  .sidebar-illustration {
    display: none;
  }

  .answer-panel {
    flex: 1 1 auto;
    overflow: visible;
    padding: 22px 17px 30px;
  }

  .answer-header {
    min-height: auto;
    padding: 0 0 14px;
  }

  .title-wrap {
    gap: 12px;
  }

  .question-number {
    min-width: 48px;
    font-size: 29px;
  }

  .answer-title {
    margin-top: 1px;
    font-size: 20px;
  }

  .favorite-button {
    position: static;
    margin: 14px 0 0 60px;
    height: 32px;
    font-size: 13px;
  }

  .answer-illustration {
    display: none;
  }

  .meta-chips {
    margin: 0 0 16px;
  }

  .answer-full {
    padding: 18px 16px;
  }

  .markdown {
    font-size: 15px;
    line-height: 1.75;
  }

  .markdown pre {
    font-size: 13px;
  }
}
  z-index: 0;
