.academy-page {
  background: #fff;
}

.hero-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  margin-top: -70px;
  min-height: 580px;
}
@media (max-width: 768px) {
  .hero-banner {
    min-height: auto;
  }
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0a1628 0%, #0d2348 50%, #1a0a3d 100%);
  background-size: cover;
  background-position: center;
}

.hero-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 180px 60px 120px 270px;
  display: flex;
  align-items: center;
}
@media (max-width: 1600px) {
  .hero-wrapper {
    padding: 130px 56px 72px 240px;
  }
}
@media (max-width: 1200px) {
  .hero-wrapper {
    padding: 120px 40px 64px 60px;
  }
}
@media (max-width: 768px) {
  .hero-wrapper {
    padding: 90px 16px 48px 16px;
  }
}

.hero-content-left {
  flex: 0 0 auto;
  width: 60%;
  max-width: 800px;
  text-align: left;
  animation: fade-in-left 0.8s ease-out;
}
@media (max-width: 768px) {
  .hero-content-left {
    width: 100%;
    text-align: center;
  }
}

@keyframes fade-in-left {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.hero-title {
  font-size: 44px;
  font-weight: 900;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
  color: #1a1a2e;
}
@media (max-width: 768px) {
  .hero-title {
    font-size: 28px;
  }
}

.hero-subtitle {
  font-size: 17px;
  color: rgba(26, 26, 46, 0.68);
  margin-bottom: 12px;
  line-height: 1.8;
}

.hero-desc {
  font-size: 14px;
  color: rgba(26, 26, 46, 0.55);
  margin-top: 16px;
}
.hero-desc strong {
  color: #6366f1;
  font-weight: 700;
  font-size: 17px;
}

.academy-layout {
  background: #f7f9fc;
  padding: 60px 0 80px;
}

.layout-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  gap: 48px;
  align-items: flex-start;
}
@media (max-width: 1024px) {
  .layout-inner {
    padding: 0 24px;
    flex-direction: column;
    gap: 32px;
  }
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
}
@media (max-width: 1024px) {
  .sidebar {
    width: 100%;
    position: static;
  }
}

.sidebar-scroll {
  background: #fff;
  border-radius: 16px;
  padding: 16px 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}
@media (max-width: 1024px) {
  .sidebar-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px;
  }
}

.sidebar-search {
  padding: 0 8px 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}
@media (max-width: 1024px) {
  .sidebar-search {
    width: 100%;
    padding: 0;
    margin-bottom: 0;
    border-bottom: none;
  }
  .sidebar-search .n-input__input-el {
    font-size: 16px;
  }
}

.sidebar-category-label {
  font-size: 11px;
  font-weight: 600;
  color: #bbb;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 16px 6px;
}
@media (max-width: 1024px) {
  .sidebar-category-label {
    display: none;
  }
}

.sidebar-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px 16px;
  font-size: 14px;
  color: #555;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  position: relative;
}
.sidebar-btn:hover {
  background: #f0f5ff;
  color: #1890ff;
}
.sidebar-btn.active {
  background: #e6f4ff;
  color: #1890ff;
  font-weight: 600;
  border-left: 3px solid #1890ff;
}
.sidebar-btn .cat-badge {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: #999;
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 10px;
}
@media (max-width: 1024px) {
  .sidebar-btn {
    width: auto;
    border-radius: 100px;
    padding: 8px 32px 8px 16px;
  }
  .sidebar-btn.active {
    border-left: none;
    background: #1890ff;
    color: #fff;
  }
  .sidebar-btn.active .cat-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
  }
  .sidebar-btn .cat-badge {
    right: 10px;
  }
}

.academy-main {
  flex: 1;
  min-width: 0;
}

.loading-wrap {
  flex: 1;
}

.qa-section {
  background: #fff;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid #e8e8e8;
  transition: all 0.3s;
}
.qa-section:hover {
  border-color: #1890ff;
  box-shadow: 0 4px 20px rgba(24, 144, 255, 0.12);
  transform: translateY(-2px);
}

.qa-detail {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
}
@media (max-width: 768px) {
  .qa-detail {
    padding: 20px 16px;
  }
}

.question-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.category-tag {
  flex-shrink: 0;
  display: inline-block;
  padding: 4px 12px;
  background: #e6f4ff;
  color: #1890ff;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  line-height: 20px;
  margin-top: 2px;
}

.detail-question {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0;
  line-height: 1.5;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.detail-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #999;
}

.detail-answer {
  font-size: 14px;
  color: #777;
  line-height: 1.8;
  margin-bottom: 24px;
  max-height: 120px;
  overflow: hidden;
}

.qa-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-detail {
  height: 42px;
  padding: 0 28px;
  background: #1890ff;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-detail:hover {
  background: #096dd9;
}

.btn-like {
  height: 42px;
  padding: 0 24px;
  background: #fff;
  color: #1890ff;
  border: 1.5px solid #1890ff;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-like:hover {
  background: #e6f4ff;
}

.pagination-wrap {
  display: flex;
  justify-content: center;
  margin-top: 32px;
  padding: 20px 0;
}

.detail-content .modal-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.detail-content .modal-meta .source {
  font-size: 13px;
  color: #999;
}
.detail-content .modal-answer {
  line-height: 1.8;
  color: #333;
  margin-bottom: 24px;
  word-break: break-word;
}
.detail-content .modal-answer h1, .detail-content .modal-answer h2, .detail-content .modal-answer h3, .detail-content .modal-answer h4, .detail-content .modal-answer h5, .detail-content .modal-answer h6 {
  font-weight: 600;
  margin: 24px 0 12px;
  line-height: 1.4;
}
.detail-content .modal-answer h1 {
  font-size: 24px;
}
.detail-content .modal-answer h2 {
  font-size: 20px;
}
.detail-content .modal-answer h3 {
  font-size: 18px;
}
.detail-content .modal-answer h4 {
  font-size: 16px;
}
.detail-content .modal-answer p {
  margin: 12px 0;
}
.detail-content .modal-answer ul, .detail-content .modal-answer ol {
  padding-left: 24px;
  margin: 12px 0;
}
.detail-content .modal-answer li {
  margin: 8px 0;
}
.detail-content .modal-answer strong, .detail-content .modal-answer b {
  color: #1890ff;
}
.detail-content .modal-answer a {
  color: #1890ff;
  text-decoration: underline;
}
.detail-content .modal-answer a:hover {
  color: #096dd9;
}
.detail-content .modal-answer img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 12px 0;
}
.detail-content .modal-answer table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}
.detail-content .modal-answer th, .detail-content .modal-answer td {
  border: 1px solid #e0e0e0;
  padding: 8px 12px;
  text-align: left;
}
.detail-content .modal-answer th {
  background: #fafafa;
  font-weight: 600;
}
.detail-content .modal-answer blockquote {
  border-left: 4px solid #1890ff;
  padding: 8px 16px;
  margin: 12px 0;
  background: #f6f8fa;
  color: #555;
}
.detail-content .modal-answer pre {
  background: #f6f8fa;
  padding: 12px 16px;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 13px;
  margin: 12px 0;
}
.detail-content .modal-answer code {
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 13px;
}
.detail-content .modal-answer pre code {
  background: none;
  padding: 0;
}
.detail-content .modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid #f0f0f0;
}
.detail-content .modal-footer .stats {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: #999;
}
.detail-content .modal-footer .stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.detail-content .modal-tags {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #666;
}

.cta-section {
  position: relative;
  overflow: hidden;
  background: url("../img/footer-bg.png") center/cover no-repeat;
  padding: 50px 0;
  text-align: center;
  color: #111827;
}
.cta-section .container {
  position: relative;
  z-index: 1;
}
.cta-section h2 {
  font-size: 34px;
  font-weight: 400;
  margin-bottom: 16px;
}
.cta-section p {
  font-size: 17px;
  color: rgba(17, 24, 39, 0.76);
  margin-bottom: 32px;
}

.cta-btn {
  display: inline-block;
  height: 52px;
  padding: 0 48px;
  background: linear-gradient(40deg, #686BFD 30%, #2488FA 100%) !important;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}
.cta-btn:hover {
  background: linear-gradient(90deg, #4f52d9 0%, #6366f1 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
  .cta-section {
    padding: 36px 0;
  }
  .cta-section h2 {
    font-size: 24px;
  }
  .cta-section p {
    font-size: 14px;
    margin-bottom: 24px;
  }
  .cta-btn {
    height: 44px;
    padding: 0 32px;
    font-size: 14px;
  }
  .detail-content .modal-footer {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  .detail-content .modal-footer .stats {
    gap: 16px;
    font-size: 13px;
  }
}
@media (max-width: 480px) {
  .cta-section h2 {
    font-size: 20px;
  }
}
.search-input {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  height: 30px;
  padding: 0 10px;
  border: 1px solid #e0e0e6;
  border-radius: 3px;
  background: #fff;
  transition: border-color 0.2s;
}
.search-input:focus-within {
  border-color: #1890ff;
}
.search-input svg {
  width: 14px;
  height: 14px;
  fill: #999;
  flex-shrink: 0;
}
.search-input input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  font-size: 14px;
  color: #333;
  background: transparent;
}
.search-input input::placeholder {
  color: #bbb;
}

.pagination-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pagination-bar .page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #e0e0e6;
  background: #fff;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: all 0.2s;
}
.pagination-bar .page-btn:hover {
  color: #1890ff;
  border-color: #1890ff;
}
.pagination-bar .page-btn.active {
  background: #1890ff;
  border-color: #1890ff;
  color: #fff;
}
.pagination-bar .page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pagination-bar .page-ellipsis {
  color: #999;
  padding: 0 4px;
}

.empty-wrap {
  padding: 80px 0;
  text-align: center;
  font-size: 14px;
  color: #999;
}

.meta-item svg,
.stats svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.qa-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.qa-modal {
  width: 900px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 8px;
  padding: 24px 28px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}
.qa-modal .qa-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.qa-modal .qa-modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0;
  line-height: 1.5;
}
.qa-modal .qa-modal-close {
  flex-shrink: 0;
  border: none;
  background: none;
  font-size: 20px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 2px;
}
.qa-modal .qa-modal-close:hover {
  color: #333;
}

.modal-tag {
  display: inline-block;
  padding: 0 8px;
  height: 22px;
  line-height: 22px;
  font-size: 12px;
  border-radius: 2px;
  color: #2080f0;
  background: rgba(32, 128, 240, 0.1);
}

.like-primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 16px;
  background: #1890ff;
  color: #fff;
  border: none;
  border-radius: 3px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.like-primary-btn:hover {
  background: #40a9ff;
}
.like-primary-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

@media (max-width: 768px) {
  .qa-modal {
    padding: 18px 16px;
  }
}
