#tg-bounties-app { font-family: sans-serif; max-width: 1100px; margin: 0 auto; }
#tgb-search-bar { margin-bottom: 20px; display: flex; gap: 8px; }
#tgb-search-bar input { flex: 1; padding: 8px 12px; border: 1px solid #ccc; border-radius: 4px; font-size: 14px; }
#tgb-search-btn { padding: 8px 18px; background: #a60c29; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; }
#tgb-search-btn:hover { background: #850a21; }
#tgb-status { color: #c00; margin-bottom: 10px; }
.tgb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.tgb-card { border: 1px solid #ddd; border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.07); }
.tgb-card img { width: 100%; height: 180px; object-fit: cover; }
.tgb-card-body { padding: 14px; }
.tgb-card-body h4 { margin: 0 0 8px; font-size: 16px; }
.tgb-card-body p { margin: 4px 0; font-size: 13px; color: #555; }
.tgb-badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 11px; background: #4fbb48; color: #fff; margin-right: 4px; }
.tgb-claims { margin: 4px 0; padding-left: 18px; font-size: 12px; }
.tgb-submit-btn { display: inline-block; margin-top: 10px; padding: 6px 14px; background: #a60c29; color: #fff; border-radius: 4px; text-decoration: none; font-size: 13px; }
.tgb-submit-btn:hover { background: #850a21; }
.tgb-loader { text-align: center; padding: 30px; color: #888; }
.tgb-empty { color: #888; padding: 20px 0; }
#tgb-pagination { margin-top: 16px; }
.tgb-pagination-btn { padding: 6px 14px; margin: 0 4px; border: 1px solid #ccc; border-radius: 4px; cursor: pointer; background: #fff; }
.tgb-pagination-btn.active { background: #a60c29; color: #fff; border-color: #a60c29; cursor: default; }

/* Claims/leaderboard pagination */
#tgb-claims-pagination { margin-top: 10px; }
#tgb-claims-pagination .tgb-pagination-btn { background: #fff; border: 1px solid #ccc; color: #333; border-radius: 4px; }
#tgb-claims-pagination .tgb-pagination-btn.active { background: linear-gradient(135deg, #6a1fc2 0%, #c0185a 100%); color: #fff; border-color: transparent; cursor: default; }

/* Detail Page */
.tgb-title-link { color: inherit; text-decoration: none; }
.tgb-title-link:hover { color: #a60c29; text-decoration: underline; }
.tgb-back-link { display: inline-block; margin-bottom: 20px; color: #a60c29; text-decoration: none; font-size: 14px; }
.tgb-back-link:hover { text-decoration: underline; }
.tgb-detail-hero { display: flex; gap: 24px; margin-bottom: 30px; flex-wrap: wrap; }
.tgb-detail-hero img { width: 280px; height: 200px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.tgb-detail-hero-info { flex: 1; min-width: 200px; }
.tgb-detail-hero-info h1 { margin: 0 0 10px; font-size: 24px; }
.tgb-detail-meta { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 12px 0; font-size: 13px; }
.tgb-detail-meta span { background: #f5f5f5; padding: 4px 10px; border-radius: 4px; }
.tgb-detail-section { margin: 28px 0; }
.tgb-detail-section h3 { font-size: 18px; border-bottom: 2px solid #a60c29; padding-bottom: 6px; margin-bottom: 12px; }
.tgb-prose { font-size: 14px; line-height: 1.7; color: #333; }
.tgb-video-wrap { margin: 20px 0; }
.tgb-video-wrap iframe, .tgb-video-wrap video { width: 100%; max-width: 720px; height: 400px; border-radius: 6px; }
.tgb-claims-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tgb-claims-table th { background: #a60c29; color: #fff; padding: 8px 12px; text-align: left; }
.tgb-claims-table td { padding: 8px 12px; border-bottom: 1px solid #eee; }
.tgb-claims-table tr:hover td { background: #fafafa; }

.tgb-video-link { display: inline-block; padding: 3px 10px; background: #222; color: #fff; border-radius: 4px; text-decoration: none; font-size: 12px; }
.tgb-video-link:hover { background: #a60c29; }
.tgb-claims-table a { color: #a60c29; text-decoration: none; }
.tgb-claims-table a:hover { text-decoration: underline; }

:root{
    --wp--style--global--content-size:1000px;
}

/* ── Leaderboard Section ── */
.tgb-lb-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 8px;
  margin-bottom: 0;
}
.tgb-lb-title-row h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  border: none;
  padding: 0;
}
.tgb-lb-collapse-btn {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #555;
  line-height: 1;
  padding: 0 4px;
}
.tgb-lb-collapse-btn:hover { color: #a60c29; }

/* Column layout shared by header + rows */
.tgb-lb-header,
.tgb-lb-row {
  display: grid;
  grid-template-columns: 44px 1fr 80px 110px 130px 140px 80px;
  align-items: center;
  gap: 0 10px;
  padding: 10px 14px;
  box-sizing: border-box;
  width: 100%;
}

/* Header */
.tgb-lb-header {
  background: #f5f5f5;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  border-radius: 0;
}

/* Data row — gradient background */
.tgb-lb-row {
  background: linear-gradient(135deg, #6a1fc2 0%, #c0185a 100%);
  color: #fff;
  border-radius: 10px;
  margin-top: 6px;
  min-height: 220px;
  box-sizing: border-box;
}

/* Rank badge */
.tgb-lb-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}
.tgb-lb-rank-gold   { background: #e05c00; }
.tgb-lb-rank-silver { background: #888; }
.tgb-lb-rank-bronze { background: #a0522d; }
.tgb-lb-rank-default { background: rgba(255,255,255,.25); }

/* Avatar */
.tgb-lb-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.5);
  flex-shrink: 0;
}
.tgb-lb-avatar-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}
.tgb-lb-col-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
}
.tgb-lb-username { word-break: break-word;}
.tgb-lb-username-link {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}
.tgb-lb-username-link:hover {
  text-decoration: none;
}

/* Score box */
.tgb-lb-score-box {
  display: inline-block;
  padding: 4px 10px;
  border: 2px solid #fff;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  background: transparent;
  color: #fff;
  min-width: 40px;
  text-align: center;
}
.tgb-lb-score-box a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}
.tgb-lb-score-box a:hover { text-decoration: underline; }

/* Video thumbnail */
.tgb-lb-video-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 280px;
  height: 200px;
  background: #111;
  border-radius: 10px;
  text-decoration: none;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tgb-lb-video-thumb:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.tgb-lb-play-btn {
  font-size: 64px;
  color: #fff;
  opacity: .9;
  pointer-events: none;
  transition: transform 0.2s ease;
}
.tgb-lb-video-thumb:hover .tgb-lb-play-btn { 
  opacity: 1;
  transform: scale(1.15);
}

/* Vote button */
.tgb-lb-vote-btn {
  padding: 7px 12px;
  background: #2ecc71;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  width: 100%;
  box-sizing: border-box;
}
.tgb-lb-vote-btn:hover { background: #27ae60; }

/* Column alignment helpers */
.tgb-lb-col-rank   { text-align: center; }
.tgb-lb-col-score  { text-align: center; }
.tgb-lb-col-date,
.tgb-lb-col-method { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tgb-lb-col-video  { display: flex; align-items: center; overflow: hidden; }
.tgb-lb-col-status { display: flex; align-items: center; justify-content: flex-end; overflow: hidden; }

/* Responsive: stack on small screens */
@media (max-width: 768px) {
  .tgb-lb-header { display: none; }
  .tgb-lb-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
  }
  .tgb-lb-col-video,
  .tgb-lb-col-status { justify-content: flex-start; }
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 10px;
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
}
.leaderboard-table thead tr th:first-child{
    border-radius: 10px 0 0 10px
}
.leaderboard-table thead tr th:last-child{
    border-radius: 0px 10px 10px 0px
}

table thead tr th {
        background-color: #f2f4ff;
        font-weight: 600;
        color: #888;
        text-align: left;
}
.leaderboard-table thead tr th, .leaderboard-table tbody tr td{
    padding: 12px;
}
.leaderboard-table tbody tr td{
    color: #fff;
    font-weight: 600;
}

.leaderboard-table tbody tr td:first-child{
    border-radius: 10px 0 0 10px
}
.leaderboard-table tbody tr td:last-child{
    border-radius: 0px 10px 10px 0px
}
.leaderboard-table tbody tr {
        background: linear-gradient(135deg, #6a1fc2 0%, #c0185a 100%);
}

/* Button classes */
.btn { display: inline-block; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; font-family: inherit; text-align: center; text-decoration: none; transition: background-color 0.15s ease-in-out; }
.btn-red { background: #a60c29; color: #fff; }
.btn-red:hover { background: #850a21; }
.px-2 { padding-left: 8px; padding-right: 8px; }
.py-1 { padding-top: 4px; padding-bottom: 4px; }

/* Per-page selector in pagination */
.tgb-perpage-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  font-size: 13px;
  color: #555;
}
.tgb-perpage-select {
  padding: 4px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  background: #fff;
}
.tgb-perpage-select:focus { outline: none; border-color: #6a1fc2; }

#tgb-claims-list{
  overflow: auto;
}

.video-col iframe{
  outline: 0;
  border-radius: 10px;
  width: 350px !important;
    height: 197px !important;
}