:root {
  color-scheme: light;
  --bg: #f7f7f9;
  --panel: #ffffff;
  --text: #1c1c28;
  --muted: #6b6f76;
  --accent: #276ef1;
  --border: #e0e3e8;
  --shadow: 0 8px 20px rgba(19, 33, 68, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
}

header {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 24px 32px;
}

header h1 {
  margin: 0 0 8px;
  font-size: 26px;
}

header p {
  margin: 0;
  color: var(--muted);
}

main {
  padding: 24px 32px 64px;
  max-width: 1200px;
  margin: 0 auto;
}

.table-wrapper {
  background: var(--panel);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.table-wrapper th,
.table-wrapper td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
}

.table-wrapper th {
  background: #f1f3f7;
  font-weight: 600;
}

.table-wrapper tr:hover td {
  background: #f9fafc;
}

.table-wrapper a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.status {
  margin: 16px 0;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  background: #eef2ff;
  color: #2c3b62;
}

.status[data-tone="error"] {
  background: #ffe8e8;
  color: #8a1f1f;
}

.status.is-hidden {
  display: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: var(--panel);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e6e8ee;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-weight: 700;
  color: var(--muted);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-page-name {
  font-weight: 600;
  font-size: 14px;
}

.card-caption {
  font-size: 12px;
  color: var(--muted);
}

.card-title {
  margin: 0;
  font-size: 16px;
}

.card-body {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.card-media {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #f0f1f5;
  min-height: 160px;
}

.card-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.media-placeholder {
  padding: 48px 16px;
  text-align: center;
  color: var(--muted);
}

.play-button {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(39, 110, 241, 0.9);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}

.play-button:hover {
  background: rgba(39, 110, 241, 1);
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.cta-button.is-disabled {
  background: #cdd3df;
  color: #6d7485;
  pointer-events: none;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-pill {
  background: #f1f3f7;
  color: #515868;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
}

.actions {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

#load-more {
  padding: 12px 20px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: white;
  font-size: 14px;
  cursor: pointer;
}

#load-more.is-hidden {
  display: none;
}

#load-more:disabled {
  opacity: 0.6;
  cursor: progress;
}

.footer-note {
  margin-top: 32px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.back-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

@media (max-width: 720px) {
  header,
  main {
    padding: 20px;
  }

  .table-wrapper table {
    min-width: 560px;
  }
}
