/* JTNav Responsive */

/* Tablet 769-1024 */
@media (min-width: 769px) and (max-width: 1024px) {
  .header-inner {
    padding: 16px 24px;
  }

  .front-layout {
    padding: 20px 24px;
    gap: 16px;
  }

  .front-sidebar {
    width: 200px;
  }

  .cat-section {
    padding: 20px;
  }

  .site-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .detail-page,
  .search-results,
  .submit-page {
    padding: 20px 24px;
  }

  .front-footer {
    padding: 20px 24px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .submit-page {
    padding: 24px;
  }

  .submit-card {
    padding: 24px;
  }
}

/* Mobile <=768 */
@media (max-width: 768px) {
  .pc-only {
    display: none !important;
  }

  .mobile-only {
    display: block !important;
  }

  /* Layout: single column, full width */
  .front-layout {
    flex-direction: column;
    padding: 12px;
    max-width: 100%;
  }

  .front-main {
    width: 100%;
  }

  .front-sidebar {
    display: none;
    width: 100%;
    position: static;
  }

  .header-inner {
    padding: 12px 16px;
    height: 52px;
  }

  .site-logo {
    font-size: 16px;
    gap: 8px;
  }

  .site-logo .logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 11px;
  }

  .site-logo .logo-img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
  }

  .search-box {
    width: 200px;
    height: 36px;
  }

  .search-box input {
    font-size: 13px;
  }

  .cat-section {
    padding: 8px;
    margin-bottom: 8px;
    border-radius: 8px;
  }

  .clickable-area::after {
    top: 12px;
    right: 12px;
    font-size: 16px;
  }

  .cat-section-header {
    font-size: 14px;
    margin-bottom: 8px;
  }

  .site-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .site-card {
    padding: 6px 8px;
    gap: 6px;
    border-radius: 8px;
    min-height: auto;
  }

  .site-card .card-icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    font-size: 14px;
  }

  .site-card .card-icon img {
    border-radius: 50% !important;
  }

  .site-card .card-name {
    font-size: 13px;
  }

  .site-card .card-desc {
    font-size: 11px;
  }

  .carousel-dot {
    width: 6px;
    height: 6px;
  }

  .carousel-dot.active {
    width: 16px;
  }

  /* Mobile bottom ad */
  .ad-mobile-bottom {
    margin: 0 16px 16px;
    padding: 0;
  }

  .ad-mobile-bottom::after {
    top: 6px;
    right: 22px;
  }

  .detail-page,
  .search-results,
  .submit-page {
    padding: 16px;
  }

  /* 移动端详情页适配 */
  .detail-card {
    padding: 24px 20px;
    border-radius: 12px;
  }

  .detail-main {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    text-align: left;
    margin-bottom: 20px;
  }

  .detail-icon-box {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    flex-shrink: 0;
  }

  .detail-icon-box img {
    width: 60px;
    height: 60px;
    border-radius: 50% !important;
    object-fit: cover;
  }

  .detail-icon-box .favicon-fallback {
    font-size: 36px;
  }

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

  .detail-tag {
    font-size: 12px;
    padding: 5px 12px;
    margin-bottom: 8px;
  }

  .detail-title {
    font-size: 22px;
    margin-bottom: 6px;
    line-height: 1.3;
  }

  .detail-description {
    font-size: 14px;
    margin-bottom: 0;
    line-height: 1.6;
  }

  .detail-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .detail-actions .detail-link-btn {
    padding: 8px 14px;
    font-size: 12px;
    flex: none;
    white-space: nowrap;
    justify-content: center;
  }

  .detail-divider {
    margin: 24px 0;
  }

  .detail-content-body {
    font-size: 14px;
    line-height: 1.8;
  }

  .detail-extra-info {
    padding: 16px;
    font-size: 13px;
  }

  .invite-code-clickable {
    font-size: 14px;
    padding: 3px 10px;
  }

  .related-section {
    padding: 20px;
    border-radius: 12px;
  }

  .related-section .section-title {
    font-size: 16px;
    margin-bottom: 16px;
  }

  .related-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .detail-header {
    padding: 18px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    border-radius: 10px;
  }

  .detail-header .detail-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    font-size: 20px;
  }

  .detail-header .detail-name {
    font-size: 16px;
  }

  .visit-btn {
    width: 100%;
    justify-content: center;
  }

  .front-footer {
    padding: 20px 16px;
  }

  .m-cat-fab {
    display: flex !important;
  }

  .m-cat-panel.show {
    display: block !important;
  }

  .m-cat-overlay.show {
    display: block !important;
  }

  /* 移动端公告轮播显示 */
  .mobile-notice-carousel {
    display: flex !important;
    align-items: center;
  }
}

/* Small Mobile <=480 */
@media (max-width: 480px) {
  .search-box {
    width: 160px;
  }

  .site-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
  }

  .clickable-area::after {
    top: 10px;
    right: 10px;
    font-size: 14px;
  }

  .site-card {
    padding: 7px 8px;
    gap: 7px;
    border-radius: 6px;
  }

  .site-card .card-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    font-size: 14px;
  }

  .site-card .card-icon img {
    border-radius: 50% !important;
  }

  .site-card .card-name {
    font-size: 12px;
  }

  .site-card .card-desc {
    display: none;
  }

  /* 小屏幕手机详情页适配 */
  .detail-page {
    padding: 12px;
  }

  .detail-card {
    padding: 20px 16px;
  }

  .detail-main {
    gap: 12px;
    margin-bottom: 16px;
  }

  .detail-icon-box {
    width: 72px;
    height: 72px;
    border-radius: 16px;
  }

  .detail-icon-box img {
    width: 52px;
    height: 52px;
    border-radius: 50% !important;
    object-fit: cover;
  }

  .detail-icon-box .favicon-fallback {
    font-size: 32px;
  }

  .detail-title {
    font-size: 20px;
    margin-bottom: 4px;
  }

  .detail-description {
    font-size: 13px;
    margin-bottom: 0;
  }

  .detail-actions {
    gap: 6px;
  }

  .detail-actions .detail-link-btn {
    padding: 7px 12px;
    font-size: 11px;
    white-space: nowrap;
  }

  .invite-code-clickable {
    font-size: 13px;
    padding: 2px 8px;
  }

  .related-grid {
    gap: 10px;
  }
}