* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a,
a:link,
a:visited,
a:hover,
a:active,
a:focus {
  text-decoration: none !important;
}

:root {
  --primary: #1890ff;
  --primary-dark: #1677cc;
  --sidebar-bg: #1e8fff;
  --sidebar-hover: rgba(255,255,255,0.15);
  --sidebar-active: rgba(255,255,255,0.22);
  --bg-page: #f5f7fb;
  --bg-white: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #8a97a8;
  --text-muted: #b0b8c5;
  --border: #e6ebf2;
  --green: #22b573;
  --pink: #ff6fa8;
  --purple: #6c63ff;
  --teal: #1fb7c9;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
}

.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* ======== Sidebar ======== */
.sidebar {
  width: 195px;
  min-width: 195px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  padding: 20px 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
}

.logo-icon img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  background: transparent;
}

.logo-text {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  width: 80px;
}

.logo-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
}

.logo-sub {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.65);
  margin-top: 2px;
  text-align: justify;
  text-align-last: justify;
  width: 100%;
  white-space: nowrap;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 8px 0;
  overflow-y: auto;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.1);
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  font-size: 13px;
  gap: 8px;
  position: relative;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.nav-item.active {
  background: var(--sidebar-active);
  color: #fff;
}

.nav-svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.nav-count {
  margin-left: auto;
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.12);
  padding: 1px 6px;
  border-radius: 8px;
  line-height: 1.4;
}

.nav-group {
  position: relative;
}

.nav-item.nav-parent {
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 13px;
  font-weight: inherit;
  line-height: inherit;
  color: rgba(255,255,255,0.75);
}

.nav-item.nav-parent:hover,
.nav-group.open > .nav-item.nav-parent {
  color: #fff;
}

.nav-parent .nav-arrow {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-left: 4px;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.nav-parent .nav-count {
  margin-left: auto;
}

.nav-group.open > .nav-parent .nav-arrow {
  transform: rotate(180deg);
}

.nav-children {
  display: none;
  padding: 2px 0 6px;
  background: rgba(0,0,0,0.12);
}

.nav-group.open > .nav-children {
  display: block;
}

.nav-child {
  padding: 8px 14px 8px 38px;
  font-size: 13px;
}

.nav-child.active {
  background: var(--sidebar-active);
  color: #fff;
}

/* ======== Main Content ======== */
.main-content {
  flex: 1;
  margin-left: 195px;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ======== Topbar ======== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  height: 50px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.menu-toggle:hover {
  background: var(--bg-page);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-primary);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
  width: 260px;
  gap: 8px;
}

.search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--text-primary);
  width: 100%;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.btn-outline {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border: 1px solid var(--primary);
  border-radius: 6px;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.btn-outline:hover {
  background: rgba(24,144,255,0.06);
}

.btn-primary {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

/* ======== Content Body ======== */
.content-body {
  flex: 1;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

/* ======== Intro Section ======== */
.intro-section {
  display: flex;
  gap: 20px;
}

.intro-cards {
  flex: 0 0 42%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.intro-card {
  background: var(--bg-white);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.intro-card-body {
  flex: 1;
  min-width: 0;
  padding-right: 8px;
}

.intro-card-tag {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 2px;
  line-height: 1.3;
}

.intro-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
  line-height: 1.3;
}

.intro-card-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.35;
}

.intro-card-stats {
  display: flex;
  gap: 6px;
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 500;
}

.stat-badge.blue {
  background: #e6f4ff;
  color: var(--primary);
}

.stat-badge.green {
  background: #e6f9f2;
  color: var(--green);
}

.stat-badge.pink {
  background: #fff0f5;
  color: var(--pink);
}

.stat-badge.purple {
  background: #f0efff;
  color: var(--purple);
}

.intro-card-illust {
  width: 78px;
  height: 78px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.intro-card-illust img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* ======== Flow Line Animations ======== */
@keyframes flowLine {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -24; }
}

@keyframes flowLineReverse {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 24; }
}

@keyframes flowLineSlow {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -30; }
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.35; r: 2; }
  50% { opacity: 1; r: 3; }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

@keyframes riseUp {
  0% { transform: translateY(6px); opacity: 0.4; }
  50% { transform: translateY(0px); opacity: 1; }
  100% { transform: translateY(6px); opacity: 0.4; }
}

@keyframes floatBlock {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.flow-line {
  stroke-dasharray: 4 4;
  animation: flowLine 2.5s linear infinite;
}

.flow-line-fast {
  stroke-dasharray: 3 5;
  animation: flowLine 1.8s linear infinite;
}

.flow-line-reverse {
  stroke-dasharray: 4 4;
  animation: flowLineReverse 3s linear infinite;
}

.flow-line-slow {
  stroke-dasharray: 5 5;
  animation: flowLineSlow 3.5s linear infinite;
}

.pulse-dot {
  animation: pulseDot 2s ease-in-out infinite;
}

.pulse-glow {
  animation: pulseGlow 2.5s ease-in-out infinite;
}

.rise-block {
  animation: riseUp 3s ease-in-out infinite;
}

.float-block {
  animation: floatBlock 3s ease-in-out infinite;
}

.float-block-delay {
  animation: floatBlock 3s ease-in-out 0.8s infinite;
}

/* ======== Notice Panel ======== */
.notice-panel {
  flex: 1;
  background: var(--bg-white);
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.notice-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.notice-tabs {
  display: flex;
  gap: 4px;
}

.notice-tab {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.notice-tab.active {
  background: var(--primary);
  color: #fff;
}

.notice-tab:hover:not(.active) {
  background: var(--bg-page);
}

.notice-body {
  padding: 4px 0;
}

.notice-item {
  display: flex;
  align-items: flex-start;
  padding: 14px 20px;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.notice-item:last-child {
  border-bottom: none;
}

.notice-category {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}

.notice-category.blue { background: var(--primary); }
.notice-category.green { background: var(--green); }
.notice-category.purple { background: var(--purple); }
.notice-category.teal { background: var(--teal); }

.notice-content {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}

.notice-link {
  color: var(--primary);
  text-decoration: none;
  word-break: break-all;
}

.notice-link:hover {
  opacity: 0.85;
}

.notice-domains {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.domain-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #f0f5ff;
  border: 1px solid #d6e4ff;
  border-radius: 4px;
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
  transition: all 0.15s;
}

.domain-tag:hover {
  background: #e6f0ff;
  border-color: var(--primary);
}

.notice-index {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 2px;
}

/* ======== Resource Section ======== */
.resource-section {
  flex: 1;
}

.resource-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.resource-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

.resource-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.resource-count {
  font-size: 13px;
  color: var(--text-secondary);
}

.view-toggle {
  display: flex;
  gap: 2px;
  background: var(--bg-page);
  border-radius: 6px;
  padding: 2px;
}

.view-btn {
  border: none;
  background: transparent;
  padding: 5px 7px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.view-btn.active {
  background: var(--bg-white);
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.resource-table-wrapper {
  overflow-x: auto;
  border-radius: 8px;
  background: var(--bg-white);
  box-shadow: var(--shadow);
}

.resource-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.resource-table thead {
  background: var(--primary);
}

.resource-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 500;
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
}

.resource-table th.col-poster {
  width: 60px;
  padding: 12px 0 12px 20px;
}

.col-name { width: auto; }
.col-status { width: 140px; }
.col-type { width: 90px; }
.col-year { width: 70px; }
.col-rating { width: 80px; }
.col-time { width: 110px; }

.resource-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}

.resource-table td.col-poster {
  padding: 10px 0 10px 20px;
}

.resource-table tbody tr:hover {
  background: #f8faff;
}

.resource-table tbody tr:last-child td {
  border-bottom: none;
}

.poster-img {
  width: 44px;
  height: 60px;
  border-radius: 4px;
  object-fit: cover;
  background: linear-gradient(135deg, #e6f0ff, #d0e2ff);
  display: flex;
  align-items: center;
  justify-content: center;
}

.poster-placeholder {
  width: 44px;
  height: 60px;
  border-radius: 4px;
  background: linear-gradient(135deg, #e8f0fe, #d2e3fc);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.name-cell {
  display: flex;
  flex-direction: column;
}

.name-main {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
}

.name-main:hover {
  color: var(--primary);
}

.name-sub {
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
}

.name-meta {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.name-extra {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-muted);
}

.name-type {
  font-size: 11px;
  color: var(--text-muted);
}

.name-score .rating-star {
  margin-right: 2px;
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  background: #e6f4ff;
  color: var(--primary);
  white-space: nowrap;
}

.rating-star {
  color: #faad14;
  margin-right: 4px;
}

.rating-value {
  font-weight: 500;
}

.loading-cell {
  text-align: center;
  padding: 60px 16px !important;
  color: var(--text-muted);
  font-size: 13px;
}

.empty-cell {
  text-align: center;
  padding: 60px 16px !important;
  color: var(--text-muted);
  font-size: 13px;
}

/* ======== Pagination ======== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin-top: 24px;
}

.page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-white);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  text-decoration: none;
}

.page-btn:hover,
.page-btn:visited,
.page-btn:active,
.page-btn:focus {
  text-decoration: none;
}

.pagination a,
.pagination a:link,
.pagination a:visited,
.pagination a:hover,
.pagination a:active {
  text-decoration: none;
}

.page-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ======== Modal ======== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.show {
  display: flex;
}

.modal-content {
  background: var(--bg-white);
  border-radius: 10px;
  width: 90%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 16px;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: 4px;
}

.modal-close:hover {
  background: var(--bg-page);
  color: var(--text-primary);
}

.modal-body {
  padding: 20px;
}

.modal-body textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 13px;
  resize: vertical;
  outline: none;
  font-family: inherit;
}

.modal-body textarea:focus {
  border-color: var(--primary);
}

.modal-body textarea::placeholder {
  color: var(--text-muted);
}

.btn-submit {
  margin-top: 12px;
  padding: 8px 22px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s;
}

.btn-submit:hover {
  background: var(--primary-dark);
}

.guestbook-list {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.guestbook-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 20px 0;
}

.guestbook-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.guestbook-item:last-child {
  border-bottom: none;
}

.guestbook-content {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.6;
}

.guestbook-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 5px;
}

/* ======== Responsive ======== */
@media (max-width: 1024px) {
  .intro-section {
    flex-direction: column;
  }
  .intro-cards {
    flex: 1;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  .menu-toggle {
    display: flex;
  }

  .topbar {
    padding: 8px 12px;
    height: auto;
    min-height: 50px;
    gap: 8px;
  }

  .topbar-left {
    min-width: 0;
    flex-shrink: 0;
  }

  .breadcrumb span {
    max-width: 96px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
  }

  .topbar-right {
    gap: 6px;
    min-width: 0;
    flex: 1;
    justify-content: flex-end;
  }

  .search-box {
    width: auto;
    flex: 1;
    min-width: 0;
    max-width: 180px;
  }

  .search-box input {
    width: 100%;
    min-width: 0;
  }

  .btn-outline,
  .btn-primary {
    padding: 6px 10px;
    font-size: 11px;
    flex-shrink: 0;
  }

  .content-body {
    padding: 10px;
    gap: 10px;
  }

  .resource-header {
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 2px;
  }

  .view-toggle {
    display: none;
  }

  /* Card-style list rows on mobile */
  .resource-table-wrapper {
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .resource-table,
  .resource-table tbody {
    display: block;
    width: 100%;
  }

  .resource-table thead {
    display: none;
  }

  .resource-table tbody {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .resource-table tr {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 8px 10px;
    border-bottom: none !important;
  }

  .resource-table td {
    padding: 0 !important;
    border-bottom: none !important;
    display: none !important;
  }

  .resource-table td.col-poster {
    display: block !important;
    flex: 0 0 48px;
    width: 48px;
  }

  .resource-table td.col-poster a {
    display: block;
    width: 48px;
    height: 68px;
    overflow: hidden;
    border-radius: 5px;
  }

  .poster-img,
  .col-poster .poster-placeholder {
    width: 48px !important;
    height: 68px !important;
    border-radius: 5px;
    display: block;
    object-fit: cover;
  }

  .resource-table td.col-name {
    display: block !important;
    flex: 1 1 auto;
    min-width: 0;
  }

  .name-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    width: 100%;
  }

  .name-main {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
  }

  .name-sub {
    display: none !important;
  }

  .name-meta,
  .name-extra {
    display: flex !important;
    width: 100%;
  }

  .name-meta {
    gap: 6px;
  }

  .name-extra {
    gap: 10px;
  }

  .name-year,
  .name-score,
  .name-time {
    flex-shrink: 0;
  }

  .name-time {
    margin-left: auto;
  }

  .status-badge {
    font-size: 11px;
    max-width: 58%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .name-type {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .pagination {
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
  }

  .page-btn {
    padding: 6px 10px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .intro-section {
    flex-direction: column;
  }

  .search-box {
    max-width: none;
    flex: 1;
  }

  .btn-outline,
  .btn-primary {
    padding: 8px;
    font-size: 0;
    line-height: 0;
    gap: 0;
  }

  .btn-outline svg,
  .btn-primary svg {
    width: 16px;
    height: 16px;
  }

  .breadcrumb {
    display: none;
  }

  .resource-section.grid-mode .resource-table tbody {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .resource-section.grid-mode .col-poster .poster-placeholder,
  .resource-section.grid-mode .col-poster img {
    height: 180px !important;
  }
}

/* Grid view */
.resource-section.grid-mode .resource-table thead { display: none; }
.resource-section.grid-mode .resource-table,
.resource-section.grid-mode .resource-table tbody {
  display: block;
  width: 100%;
}
.resource-section.grid-mode .resource-table tbody {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.resource-section.grid-mode .resource-table tr {
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border-bottom: none !important;
}
.resource-section.grid-mode .resource-table td,
.resource-section.grid-mode .resource-table th {
  display: none;
  border: none !important;
  padding: 0 !important;
}
.resource-section.grid-mode .col-poster,
.resource-section.grid-mode td.col-poster {
  display: block !important;
}
.resource-section.grid-mode .col-poster .poster-placeholder,
.resource-section.grid-mode .col-poster img {
  width: 100% !important;
  height: 220px !important;
  border-radius: 0 !important;
  object-fit: cover;
}
.resource-section.grid-mode td.col-name {
  display: block !important;
  padding: 10px 12px !important;
}
.resource-section.grid-mode td:nth-child(2) {
  display: block !important;
  padding: 10px 12px !important;
}
.resource-section.grid-mode .name-sub { display: none; }
.resource-section.grid-mode .name-meta,
.resource-section.grid-mode .name-extra { display: none !important; }
.resource-section.grid-mode .name-main {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.poster-img {
  width: 36px;
  height: 50px;
  border-radius: 4px;
  object-fit: cover;
  display: block;
}
.col-poster a { display: block; }
.empty-cell {
  text-align: center;
  padding: 48px !important;
  color: var(--text-muted);
  font-size: 14px;
}
.page-footer {
  text-align: center;
  padding: 16px 24px 28px;
  font-size: 12px;
  color: var(--text-muted);
}
.btn-outline, .btn-primary { text-decoration: none; }
a.btn-outline, a.btn-primary { display: inline-flex; }
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 90;
}
.sidebar-overlay.show { display: block; }
@media (max-width: 768px) {
  .sidebar-overlay.show { display: block; }
}
