/* ========== 导航响应式 ========== */
@media (max-width: 768px) {
  .nav-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 20px;
    color: #555;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
    margin-right: auto;
  }

  .nav-toggle-btn:hover {
    background: #f0f2f5;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 8px 16px 16px;
    border-bottom: 1px solid #e8ecf0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    gap: 2px;
    z-index: 200;
  }

  .nav-links a {
    padding: 12px 16px;
    font-size: 15px;
  }

  .nav-toggle-input:checked + .nav-links {
    display: flex !important;
  }

  .nav-inner {
    flex-wrap: wrap;
    position: relative;
  }

  .nav-logo {
    margin-right: 0;
  }

  .nav-right {
    margin-left: auto;
  }
}

/* ========== 首页响应式 ========== */
@media (max-width: 1024px) {
  .home-layout {
    flex-direction: column;
  }
  .home-sidebar {
    width: 100%;
  }
  .ai-role-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 768px) {
  .container {
    padding: 16px;
  }
  .stats-bar {
    flex-wrap: wrap;
    gap: 12px;
  }
  .stat-item {
    flex: 1;
    min-width: calc(50% - 6px);
    padding: 16px;
  }
  .ai-section {
    display: none;
  }
  .content-sidebar {
    display: none;
  }
  .hero-card {
    padding: 20px 16px;
    overflow: hidden;
  }
  .hero-search {
    flex-wrap: nowrap;
    max-width: 100%;
  }
  .hero-search input {
    width: 1px;
    flex: 1;
    min-width: 0;
    font-size: 14px;
    padding: 10px 14px;
  }
  .hero-search-btn {
    white-space: nowrap;
    padding: 10px 16px;
    font-size: 14px;
  }
  .hero-card .hero-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  .hero-card .hero-actions a {
    padding: 10px 20px;
    font-size: 14px;
  }
  .hero-card .hero-actions .btn-ask {
    background: rgba(255,255,255,0.2);
  }
  .hero-card .hero-actions .btn-answer {
    background: rgba(255,255,255,0.2);
  }
  .question-card {
    padding: 16px;
  }
  .question-card .q-title {
    font-size: 17px;
  }
  .q-actions {
    flex-wrap: wrap;
    gap: 12px;
  }
  .q-actions .q-action-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .ai-role-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .role-card {
    padding: 10px 6px;
  }
  .role-card .role-avatar {
    width: 36px;
    height: 36px;
  }
  .role-card .role-name {
    font-size: 11px;
  }
  .stat-item {
    min-width: 0;
  }
  .stat-item .stat-icon {
    display: none;
  }
  .stat-item .stat-number {
    font-size: 22px;
  }
}

/* ========== 推荐页响应式 ========== */
@media (max-width: 1024px) {
  .recommend-wrapper .content-sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .recommend-wrapper {
    flex-direction: column;
  }
  .recommend-wrapper .page-header h1 {
    font-size: 20px;
  }
  .recommend-wrapper .page-header p {
    font-size: 13px;
  }
}

/* ========== 内容详情页响应式 ========== */
@media (max-width: 768px) {
  .content-wrapper {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    order: -1;
    margin-bottom: 16px;
  }
  .sidebar .sidebar-card {
    display: none;
  }
  .q-header {
    padding: 24px 20px;
  }
  .q-header .q-title {
    font-size: 22px;
  }
  .q-content {
    font-size: 14px;
    padding: 12px 16px;
  }
  .answers-section {
    padding: 20px;
  }
  .answer-content {
    font-size: 14px;
  }
  .answer-content h3 {
    font-size: 15px;
  }
  .btn-write-answer {
    padding: 11px 0;
    font-size: 14px;
  }
}
