/* ============================================================
   xdcc.info — Global Stylesheet
   ============================================================ */

:root {
  --bg:          #0d0f14;
  --bg-surface:  #13161d;
  --bg-elevated: #1a1e28;
  --bg-hover:    #1f2433;
  --border:      #252a38;
  --border-light:#2e3547;

  --text:        #e4e8f0;
  --text-muted:  #7a859e;
  --text-faint:  #454e61;

  --accent:      #4f7ef8;
  --accent-hover:#6b93ff;
  --accent-dim:  rgba(79,126,248,0.15);

  --green:       #3ecf8e;
  --yellow:      #f0c060;
  --red:         #e05c5c;

  --radius:      8px;
  --radius-sm:   5px;
  --radius-lg:   12px;

  --font:        'Inter', system-ui, -apple-system, sans-serif;
  --mono:        'JetBrains Mono', 'Fira Mono', monospace;
  --transition:  150ms ease;
}

/* ---- Reset / Base ----------------------------------------- */

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

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background:  var(--bg);
  color:       var(--text);
  line-height: 1.6;
  min-height:  100vh;
  display:     flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

.container {
  max-width: 1200px;
  margin:    0 auto;
  padding:   0 24px;
}

.mono { font-family: var(--mono); font-size: 0.85em; }

/* ---- Corner ribbon ---------------------------------------- */

.corner-ribbon {
  position:       fixed;
  top:            0;
  right:          0;
  width:          170px;
  height:         170px;
  overflow:       hidden;
  z-index:        999;
  pointer-events: none;
}
.corner-ribbon__link {
  display:         block;
  position:        absolute;
  top:             28px;
  right:           -78px;
  width:           310px;
  padding:         8px 10px;
  background:      linear-gradient(135deg, #7c3aed, var(--accent));
  color:           #fff;
  text-align:      center;
  font-size:       0.65rem;
  font-weight:     800;
  text-transform:  uppercase;
  letter-spacing:  1px;
  line-height:     1.45;
  text-decoration: none;
  transform:       rotate(45deg);
  pointer-events:  all;
  box-shadow:      0 3px 14px rgba(99,102,241,0.5), 0 1px 4px rgba(0,0,0,0.35);
  transition:      filter 0.15s, box-shadow 0.15s;
}
.corner-ribbon__link:hover {
  filter:     brightness(1.15);
  box-shadow: 0 5px 20px rgba(99,102,241,0.65), 0 2px 5px rgba(0,0,0,0.4);
}
.corner-ribbon__new {
  display:        block;
  font-size:      0.6rem;
  font-weight:    900;
  letter-spacing: 2px;
  color:          #fde68a;
  animation:      ribbon-pulse 2s ease-in-out infinite;
}
@keyframes ribbon-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.65; }
}
@media (max-width: 768px) { .corner-ribbon { display: none; } }

/* ---- Header ----------------------------------------------- */

.site-header {
  background:    var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position:      sticky;
  top:           0;
  z-index:       100;
  backdrop-filter: blur(8px);
}

.site-header .container {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  height:          60px;
}

.logo {
  display:     flex;
  align-items: center;
  gap:         10px;
  color:       var(--text);
  font-weight: 700;
  font-size:   1.2rem;
  letter-spacing: -0.3px;
}
.logo:hover { color: var(--text); }

.logo-icon { color: var(--accent); font-size: 1.3rem; }
.logo-text  { white-space: nowrap; }
.logo-tld   { color: var(--accent); }

.site-nav { display: flex; gap: 4px; }
.nav-link {
  color:         var(--text-muted);
  font-size:     0.875rem;
  font-weight:   500;
  padding:       6px 14px;
  border-radius: var(--radius-sm);
  transition:    background var(--transition), color var(--transition);
}
.nav-link:hover { background: var(--bg-elevated); color: var(--text); }

/* ---- Hero -------------------------------------------------- */

.hero {
  padding:    80px 0 60px;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(79,126,248,0.08) 0%, transparent 70%);
  border-bottom: 1px solid var(--border);
}

.hero-inner { text-align: center; }

.hero-title {
  font-size:      2.8rem;
  font-weight:    700;
  letter-spacing: -1px;
  background:     linear-gradient(135deg, #fff 40%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom:  12px;
}

.hero-sub {
  color:         var(--text-muted);
  font-size:     1.05rem;
  margin-bottom: 40px;
}
.hero-sub strong { color: var(--text); font-weight: 600; }

/* ---- Search Form ------------------------------------------ */

.search-form { width: 100%; max-width: 760px; margin: 0 auto; }

.search-bar {
  display:       flex;
  align-items:   center;
  background:    var(--bg-elevated);
  border:        1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding:       6px 6px 6px 16px;
  gap:           8px;
  transition:    border-color var(--transition), box-shadow var(--transition);
}
.search-bar:focus-within {
  background:   var(--bg-hover);
  border-color: var(--border-light);
}
.search-bar *:focus-visible { outline: none; }

.search-icon {
  width:       18px;
  height:      18px;
  color:       var(--text-faint);
  flex-shrink: 0;
}

.search-input {
  flex:       1;
  background: transparent;
  border:     none;
  outline:    none;
  color:      var(--text);
  font-family: var(--font);
  font-size:  1rem;
  padding:    8px 0;
  min-width:  0;
}
.search-input::placeholder { color: var(--text-faint); }

.search-select {
  background:    var(--bg-surface);
  border:        1px solid var(--border);
  border-radius: var(--radius-sm);
  color:         var(--text-muted);
  font-family:   var(--font);
  font-size:     0.85rem;
  padding:       6px 10px;
  outline:       none;
  cursor:        pointer;
}
.search-select:focus { border-color: var(--accent); }

.search-tips {
  display:         flex;
  justify-content: center;
  gap:             24px;
  margin-top:      14px;
  font-size:       0.8rem;
  color:           var(--text-faint);
}
kbd {
  background:    var(--bg-elevated);
  border:        1px solid var(--border-light);
  border-radius: 4px;
  padding:       1px 5px;
  font-family:   var(--mono);
  font-size:     0.8em;
  color:         var(--text-muted);
}

/* ---- Buttons ---------------------------------------------- */

.btn {
  display:       inline-flex;
  align-items:   center;
  gap:           6px;
  border:        none;
  border-radius: var(--radius-sm);
  font-family:   var(--font);
  font-weight:   600;
  cursor:        pointer;
  transition:    background var(--transition), color var(--transition), box-shadow var(--transition);
  white-space:   nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color:      #fff;
  padding:    10px 22px;
  font-size:  0.9rem;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; box-shadow: 0 0 18px rgba(79,126,248,0.35); }

.btn-outline {
  background:  transparent;
  color:       var(--accent);
  border:      1px solid var(--border-light);
  padding:     6px 14px;
  font-size:   0.85rem;
}
.btn-outline:hover { background: var(--accent-dim); border-color: var(--accent); color: var(--accent-hover); }

.btn-sm { padding: 5px 12px; font-size: 0.8rem; }

/* ---- Stats Bar -------------------------------------------- */

.stats-bar {
  background:    var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding:       20px 0;
}

.stats-inner {
  display:         flex;
  align-items:     center;
  justify-content: center;
  gap:             40px;
}

.stat-item { text-align: center; }
.stat-value { display: block; font-size: 1.6rem; font-weight: 700; color: var(--text); letter-spacing: -0.5px; }
.stat-label { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-top: 2px; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* ---- Search Page Header ----------------------------------- */

.search-header {
  background:    var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding:       20px 0;
}

/* ---- Filter Bar ------------------------------------------- */

.filter-bar {
  display:         flex;
  flex-wrap:       wrap;
  gap:             12px 24px;
  padding:         14px 0 4px;
  border-top:      1px solid var(--border);
  margin-top:      14px;
  justify-content: center;
}

.filter-group {
  display:     flex;
  align-items: center;
  gap:         8px;
  flex-wrap:   wrap;
}

.filter-bar--mobile { display: none; }
.filter-bar--mobile { gap: 8px; flex-wrap: wrap; }
.filter-select {
  flex: 1 1 calc(50% - 4px);
  min-width: 120px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: .83rem;
  padding: 7px 10px;
  color-scheme: dark;
  cursor: pointer;
}
@media (max-width: 768px) {
  .filter-bar--desktop { display: none; }
  .filter-bar--mobile  { display: flex; }
}

.filter-label {
  font-size:      0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color:          var(--text-faint);
  font-weight:    600;
  white-space:    nowrap;
}

.filter-pills {
  display: flex;
  gap:     4px;
  flex-wrap: wrap;
}

.filter-pill {
  display:       inline-flex;
  align-items:   center;
  padding:       4px 11px;
  border-radius: 100px;
  font-size:     0.78rem;
  font-weight:   500;
  border:        1px solid var(--border-light);
  color:         var(--text-muted);
  background:    var(--bg-elevated);
  transition:    all var(--transition);
  white-space:   nowrap;
}
.filter-pill:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.filter-pill.active {
  background:   var(--accent);
  border-color: var(--accent);
  color:        #fff;
  font-weight:  600;
}

/* Category-tinted active pills */
.filter-pill--movie.active   { background: #c49a20; border-color: #c49a20; }
.filter-pill--tv.active      { background: var(--accent); border-color: var(--accent); }
.filter-pill--anime.active   { background: #b8449a; border-color: #b8449a; }
.filter-pill--ebook.active   { background: #29a870; border-color: #29a870; }
.filter-pill--music.active   { background: #7c5cbf; border-color: #7c5cbf; }
.filter-pill--warez.active   { background: #b84040; border-color: #b84040; }

/* ---- Sortable Column Headers ------------------------------ */

.sort-link {
  display:     inline-flex;
  align-items: center;
  gap:         4px;
  color:       var(--text-muted);
  font-weight: 600;
  font-size:   0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  white-space: nowrap;
  transition:  color var(--transition);
}
.sort-link:hover { color: var(--text); }

.sort-icon {
  width:   12px;
  height:  12px;
  opacity: 0.3;
  flex-shrink: 0;
  transition: opacity var(--transition);
}
.sort-icon.active { opacity: 1; color: var(--accent); }
.sort-link:hover .sort-icon { opacity: 0.7; }

/* ---- Section ---------------------------------------------- */

.nav-link--admin {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px !important;
  color: var(--text-muted) !important;
}
.nav-link--admin:hover { border-color: var(--accent); color: var(--accent) !important; }

.nav-link--submit {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: #fff !important;
  border-radius: 6px;
  padding: 4px 12px !important;
  font-weight: 600;
  font-size: 0.82rem !important;
  letter-spacing: 0.01em;
}
.nav-link--submit:hover { background: var(--accent-hover); color: #fff !important; opacity: 1; }

.section        { padding: 48px 0; }
.section-alt    { background: var(--bg-surface); border-top: 1px solid var(--border); padding: 48px 0; }

.section-title {
  font-size:     1.15rem;
  font-weight:   600;
  color:         var(--text);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom:  1px solid var(--border);
  letter-spacing: -0.2px;
  text-align:     center;
}

.page-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.5px; }
.page-sub   { color: var(--text-muted); margin-bottom: 28px; }

/* ---- Table ------------------------------------------------ */

.table-wrap {
  overflow-x: auto;
  border:      1px solid var(--border);
  border-radius: var(--radius);
}

.pack-table {
  width:           100%;
  border-collapse: collapse;
  font-size:       0.875rem;
}

.pack-table thead {
  background:    var(--bg-elevated);
  border-bottom: 1px solid var(--border-light);
}
.pack-table th {
  padding:       11px 14px;
  text-align:    left;
  font-weight:   600;
  font-size:     0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color:          var(--text-muted);
  white-space:    nowrap;
}

.pack-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition:    background var(--transition);
}
.pack-table tbody tr:last-child { border-bottom: none; }
.pack-table tbody tr:hover      { background: var(--bg-hover); }

.pack-table td { padding: 10px 14px; vertical-align: middle; }

.td-file   { max-width: 400px; }
.td-num    { color: var(--text-faint); width: 60px; }
.td-size   { white-space: nowrap; color: var(--text-muted); }
.td-gets   { color: var(--green); }
.td-seen   { color: var(--text-faint); white-space: nowrap; }
.td-addr   { color: var(--text-muted); }
.td-notes  { font-size: 0.85rem; color: var(--text-muted); max-width: 300px; }
.td-topic  { font-size: 0.85rem; color: var(--text-muted); max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-plain { color: inherit; text-decoration: none; }
.link-plain:hover { color: var(--accent); }
.req-badge {
  display:       inline-block;
  font-size:     0.8rem;
  background:    rgba(250,180,0,0.12);
  color:         #c9920a;
  border:        1px solid rgba(250,180,0,0.3);
  border-radius: 4px;
  padding:       2px 7px;
  white-space:   pre-wrap;
}
/* Network channel expand rows */
.ch-expand-row td { padding: 0 !important; }
.ch-expand-wrap {
  background:    var(--bg-elevated);
  border-top:    2px solid var(--accent-dim);
  border-bottom: 1px solid var(--border);
  padding:       4px 0;
}
.ch-strip {
  display:       flex;
  align-items:   center;
  gap:           16px;
  padding:       10px 20px 10px 24px;
  border-left:   3px solid transparent;
  transition:    background 0.15s, border-color 0.15s;
}
.ch-strip:not(:last-child) {
  border-bottom: 1px solid var(--border);
}
.ch-strip:hover {
  background:    var(--bg-hover);
  border-left-color: var(--accent);
}
.ch-strip-left {
  flex:          1;
  min-width:     0;
  display:       flex;
  flex-direction: column;
  gap:           3px;
}
.ch-strip-name {
  font-size:     0.92rem;
  font-weight:   600;
  color:         var(--text);
  white-space:   nowrap;
}
.ch-strip-topic {
  font-size:     0.82rem;
  color:         var(--text-muted);
  overflow:      hidden;
  text-overflow: ellipsis;
  white-space:   nowrap;
  max-width:     600px;
}
.ch-strip-desc {
  font-size:     0.78rem;
  color:         var(--text-faint);
  font-style:    italic;
}
.ch-strip-right {
  display:       flex;
  align-items:   center;
  gap:           10px;
  flex-shrink:   0;
}
.ch-strip-packs {
  font-size:     0.82rem;
  color:         var(--text-muted);
  white-space:   nowrap;
}
.btn-outline-active { background: var(--accent) !important; color: #fff !important; border-color: var(--accent) !important; }

.filename {
  display:       block;
  overflow:      hidden;
  text-overflow: ellipsis;
  white-space:   nowrap;
  color:         var(--text);
  cursor:        pointer;
}
.filename:hover { color: var(--accent); }

mark {
  background:    rgba(79,126,248,0.25);
  color:         var(--accent-hover);
  border-radius: 3px;
  padding:       0 2px;
}

/* ---- Badges ---------------------------------------------- */

.badge {
  display:       inline-block;
  padding:       3px 8px;
  border-radius: 4px;
  font-size:     0.75rem;
  font-weight:   600;
  white-space:   nowrap;
  letter-spacing: 0.2px;
}
.badge-bot { background: rgba(62,207,142,0.12); color: var(--green); }
.badge-net { background: var(--accent-dim); color: var(--accent-hover); }

.btn-filter {
  background: rgba(62,207,142,0.12);
  color:      var(--green);
  border:     none;
  cursor:     pointer;
  font-family: var(--font);
  border-radius: 4px;
  padding:     3px 8px;
  font-size:   0.75rem;
  font-weight: 600;
  white-space: nowrap;
  transition:  background var(--transition);
}
.btn-filter:hover { background: rgba(62,207,142,0.22); }

/* ---- Results meta ---------------------------------------- */

.results-meta {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  margin-bottom:   18px;
  font-size:       0.875rem;
  flex-wrap:       wrap;
  gap:             8px;
}
.results-count          { color: var(--text-muted); }
.results-count strong   { color: var(--text); }
.results-count.zero     { color: var(--red); }
.results-page           { color: var(--text-faint); }

/* ---- Pagination ------------------------------------------ */

.pagination {
  display:         flex;
  align-items:     center;
  justify-content: center;
  gap:             8px;
  margin-top:      32px;
  flex-wrap:       wrap;
}

.page-btn {
  padding:       8px 16px;
  border-radius: var(--radius-sm);
  font-size:     0.85rem;
  font-weight:   600;
  color:         var(--accent);
  border:        1px solid var(--border-light);
  background:    var(--bg-elevated);
  transition:    all var(--transition);
}
.page-btn:hover:not(.disabled) { background: var(--accent-dim); border-color: var(--accent); }
.page-btn.disabled { color: var(--text-faint); cursor: default; pointer-events: none; }

.page-numbers   { display: flex; gap: 4px; align-items: center; }

.page-num {
  width:         34px;
  height:        34px;
  display:       flex;
  align-items:   center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size:     0.85rem;
  font-weight:   500;
  color:         var(--text-muted);
  border:        1px solid transparent;
  transition:    all var(--transition);
}
.page-num:hover   { background: var(--bg-elevated); color: var(--text); border-color: var(--border); }
.page-num.active  { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-ellipsis    { color: var(--text-faint); padding: 0 4px; }

/* ---- No Results ------------------------------------------ */

.no-results {
  text-align:  center;
  padding:     80px 20px;
  color:       var(--text-muted);
}
.no-results-icon { font-size: 5rem; color: var(--text-faint); margin-bottom: 20px; }
.no-results p    { margin-bottom: 8px; }
.no-results .hint { font-size: 0.875rem; color: var(--text-faint); }

/* ---- Network Grid ---------------------------------------- */

.network-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:                   12px;
  justify-content:       center;
}

.network-card {
  background:    var(--bg-elevated);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       20px;
  transition:    border-color var(--transition), background var(--transition), transform var(--transition);
  display:       flex;
  flex-direction: column;
  gap:           8px;
  color:         var(--text);
}
.network-card:hover {
  border-color: var(--accent);
  background:   var(--bg-hover);
  transform:    translateY(-2px);
  color:        var(--text);
}
.network-name { font-weight: 600; font-size: 1rem; }
.network-meta { display: flex; gap: 12px; font-size: 0.8rem; color: var(--text-muted); }

/* ---- Category Grid --------------------------------------- */
.category-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap:                   12px;
  justify-content:       center;
}
.category-card {
  background:     var(--bg-elevated);
  border:         1px solid var(--border);
  border-top:     3px solid var(--border);
  border-radius:  var(--radius);
  padding:        18px 20px;
  display:        flex;
  flex-direction: column;
  gap:            4px;
  color:          var(--text);
  text-decoration: none;
  transition:     border-color var(--transition), background var(--transition), transform var(--transition);
}
.category-card:hover {
  background: var(--bg-hover);
  transform:  translateY(-2px);
  color:      var(--text);
}
.category-card--movie { border-top-color: #f0c060; }
.category-card--tv    { border-top-color: #7ba4fb; }
.category-card--anime { border-top-color: #e05ab4; }
.category-card--ebook { border-top-color: #3ecf8e; }
.category-card--music { border-top-color: #a882ff; }
.category-card--warez { border-top-color: #e05555; }

.category-card-icon { font-size: 1.6rem; line-height: 1; margin-bottom: 6px; }
.category-card-name { font-weight: 700; font-size: 0.95rem; }
.category-card-desc { font-size: 0.78rem; color: var(--text-muted); }

/* ---- Error Pages ----------------------------------------- */

.error-page {
  text-align:  center;
  padding:     100px 20px;
}
.error-code {
  font-size:   7rem;
  font-weight: 800;
  color:       var(--text-faint);
  line-height: 1;
  margin-bottom: 16px;
}
.error-title {
  font-size:     1.8rem;
  font-weight:   700;
  margin-bottom: 12px;
}
.error-page p { color: var(--text-muted); margin-bottom: 28px; }

/* ---- Burger button --------------------------------------- */

.nav-burger {
  display:         none;
  flex-direction:  column;
  justify-content: center;
  gap:             5px;
  width:           36px;
  height:          36px;
  padding:         6px;
  background:      transparent;
  border:          1px solid var(--border);
  border-radius:   var(--radius-sm);
  cursor:          pointer;
  flex-shrink:     0;
}
.nav-burger:hover { background: var(--bg-elevated); border-color: var(--border-light); }
.nav-burger__bar {
  display:          block;
  width:            100%;
  height:           2px;
  background:       var(--text-muted);
  border-radius:    2px;
  transition:       transform .2s, opacity .2s;
  transform-origin: center;
}
/* Animate to × when open */
.nav-burger[aria-expanded="true"] .nav-burger__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] .nav-burger__bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger[aria-expanded="true"] .nav-burger__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Footer ---------------------------------------------- */

.site-footer {
  background:  var(--bg-surface);
  border-top:  1px solid var(--border);
  padding:     16px 0;
  margin-top:  auto;
}
.footer-inner {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  gap:             12px;
  flex-wrap:       nowrap;
}
.footer-copy  { color: var(--text-faint); font-size: 0.82rem; white-space: nowrap; flex-shrink: 0; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.footer-links a { color: var(--text-faint); font-size: 0.82rem; white-space: nowrap; }
.footer-links a:hover { color: var(--text-muted); }

/* ---- Responsive ------------------------------------------ */

@media (max-width: 768px) {
  /* Nav burger */
  .nav-burger { display: flex; }
  .site-nav {
    display:        none;
    position:       fixed;
    top:            61px;
    left:           0;
    right:          0;
    flex-direction: column;
    gap:            2px;
    padding:        8px 12px 12px;
    background:     var(--bg-surface);
    border-bottom:  1px solid var(--border);
    box-shadow:     0 8px 24px rgba(0,0,0,.35);
    z-index:        99;
  }
  .site-nav.is-open { display: flex; }
  .nav-link { padding: 10px 12px; border-radius: var(--radius-sm); font-size: 0.9rem; }
  .nav-link--submit { justify-content: center; }
  .nav-link--admin  { display: inline-flex; justify-content: center; }

  /* Content */
  .hero { padding: 48px 0 36px; }
  .hero-title { font-size: 2rem; }
  .stats-inner { gap: 20px; }
  .stat-value { font-size: 1.2rem; }
  .search-bar { flex-wrap: wrap; border-radius: var(--radius); padding: 10px; }
  .search-select { width: 100%; order: 2; }
  .btn-primary { order: 3; width: 100%; justify-content: center; }
  .td-file { max-width: 200px; }
  .td-seen { display: none; }
  .search-tips { flex-direction: column; align-items: center; gap: 6px; }
  .results-meta { flex-direction: column; align-items: flex-start; }

  /* Footer — stays on one row, just more compact */
  .footer-links { gap: 10px; }
  .footer-links a, .footer-copy { font-size: 0.75rem; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.6rem; }
  .stat-divider { display: none; }
  .stats-inner { flex-wrap: wrap; justify-content: space-around; gap: 16px; }
  .footer-links a { font-size: 0.7rem; }
  .footer-copy    { font-size: 0.7rem; }
  .footer-links   { gap: 8px; }
}

/* ---- Category / Quality / Source Badges ------------------- */

.td-tags {
  white-space: nowrap;
  vertical-align: middle;
}

.td-tags .badge { display: inline-block; margin: 1px 2px 1px 0; }

/* Category colours */
.badge-cat           { font-size: 0.7rem; padding: 2px 7px; border-radius: 3px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.badge-cat--movie    { background: rgba(240,192, 96,0.15); color: #f0c060; border: 1px solid rgba(240,192, 96,0.25); }
.badge-cat--tv       { background: rgba(79,126,248,0.15);  color: #7ba4fb; border: 1px solid rgba(79,126,248,0.25); }
.badge-cat--anime    { background: rgba(224, 90,180,0.15); color: #e05ab4; border: 1px solid rgba(224, 90,180,0.25); }
.badge-cat--ebook    { background: rgba( 62,207,142,0.15); color: #3ecf8e; border: 1px solid rgba( 62,207,142,0.25); }
.badge-cat--music    { background: rgba(168,130,255,0.15); color: #a882ff; border: 1px solid rgba(168,130,255,0.25); }
.badge-cat--warez    { background: rgba(224, 85, 85,0.15); color: #e05555; border: 1px solid rgba(224, 85, 85,0.25); }
.badge-cat--xxx      { background: rgba(255, 80, 80,0.15); color: #ff5050; border: 1px solid rgba(255, 80, 80,0.25); }

/* Quality */
.badge-quality {
  font-size: 0.7rem; padding: 2px 7px; border-radius: 3px; font-weight: 700;
  background: rgba(255,255,255,0.06); color: var(--text-muted);
  border: 1px solid var(--border-light);
  letter-spacing: 0.4px;
}

/* Source */
.badge-source {
  font-size: 0.68rem; padding: 2px 6px; border-radius: 3px; font-weight: 600;
  background: rgba(255,255,255,0.04); color: var(--text-faint);
  border: 1px solid var(--border);
}

/* Language */
.badge-language {
  font-size: 0.68rem; padding: 2px 6px; border-radius: 3px; font-weight: 600;
  text-transform: capitalize;
  background: rgba(99,179,237,0.10); color: #63b3ed;
  border: 1px solid rgba(99,179,237,0.20);
}

/* ---- Action Buttons --------------------------------------- */

.th-actions { width: 72px; }

.td-actions {
  white-space: nowrap;
  padding:     6px 10px !important;
}

.action-btn {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  width:           30px;
  height:          30px;
  border:          1px solid var(--border);
  border-radius:   var(--radius-sm);
  background:      var(--bg-elevated);
  color:           var(--text-faint);
  cursor:          pointer;
  transition:      background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  padding:         0;
}
.action-btn svg { width: 14px; height: 14px; }
.action-btn:hover { transform: translateY(-1px); }

.btn-copy:hover  { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.btn-info:hover  { background: rgba(62,207,142,0.12); border-color: var(--green); color: var(--green); }

.btn-copy.copied { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.btn-delete:hover { background: rgba(255,80,80,0.12); border-color: #f05050; color: #f05050; }
.btn-delete:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ---- Info Modal ------------------------------------------- */

.modal-overlay {
  position:  fixed;
  inset:     0;
  background: rgba(0,0,0,0.65);
  z-index:   900;
  display:   flex;
  align-items: center;
  justify-content: center;
  padding:   20px;
  backdrop-filter: blur(4px);
  animation: fadeIn 150ms ease;
}
.modal-overlay[hidden] { display: none !important; }

@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal {
  background:    var(--bg-elevated);
  border:        1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width:         100%;
  max-width:     640px;
  max-height:    90vh;
  overflow-y:    auto;
  box-shadow:    0 24px 60px rgba(0,0,0,0.6);
  animation:     slideUp 180ms ease;
}

.modal-header {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  padding:         20px 24px 16px;
  border-bottom:   1px solid var(--border);
}
.modal-title { font-size: 1rem; font-weight: 700; color: var(--text); }

.modal-close {
  width:         30px;
  height:        30px;
  display:       flex;
  align-items:   center;
  justify-content: center;
  background:    transparent;
  border:        1px solid var(--border);
  border-radius: var(--radius-sm);
  color:         var(--text-faint);
  cursor:        pointer;
  transition:    all var(--transition);
  padding:       0;
  flex-shrink:   0;
}
.modal-close svg   { width: 14px; height: 14px; }
.modal-close:hover { background: var(--bg-hover); color: var(--text); border-color: var(--border-light); }

.modal-filename {
  padding:        14px 24px 0;
  font-family:    var(--mono);
  font-size:      0.82rem;
  color:          var(--text);
  word-break:     break-all;
  line-height:    1.5;
}

.modal-badges {
  display:    flex;
  flex-wrap:  wrap;
  gap:        6px;
  padding:    10px 24px 0;
}

.modal-grid {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   0;
  padding:               20px 24px;
  border-top:            1px solid var(--border);
  margin-top:            16px;
}

.modal-section { padding: 0 12px 0 0; }
.modal-section + .modal-section { padding: 0 0 0 12px; border-left: 1px solid var(--border); }

.modal-section-title {
  font-size:     0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color:         var(--text-faint);
  font-weight:   600;
  margin-bottom: 10px;
}

.modal-rows { display: flex; flex-direction: column; gap: 8px; }

.modal-row {
  display:     flex;
  flex-direction: column;
  gap:         2px;
}
.modal-row-label {
  font-size:  0.72rem;
  color:      var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.modal-row-value {
  font-size:   0.875rem;
  color:       var(--text);
  font-family: var(--mono);
  word-break:  break-all;
}
.modal-row-value.muted { color: var(--text-muted); font-family: var(--font); }

.modal-dcc {
  margin:        0 24px 24px;
  background:    var(--bg-surface);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       14px 16px;
}
.modal-dcc-label {
  font-size:     0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color:         var(--text-faint);
  margin-bottom: 8px;
}
.modal-dcc-row {
  display:     flex;
  align-items: center;
  gap:         10px;
}
.modal-dcc-cmd {
  flex:        1;
  font-family: var(--mono);
  font-size:   0.875rem;
  color:       var(--accent-hover);
  word-break:  break-all;
  min-width:   0;
}

@media (max-width: 540px) {
  .modal-grid { grid-template-columns: 1fr; }
  .modal-section + .modal-section { border-left: none; border-top: 1px solid var(--border); padding: 12px 0 0; margin-top: 12px; }
}

/* ---- Scrollbar ------------------------------------------- */

::-webkit-scrollbar       { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* ---- Selection / Focus ----------------------------------- */

::selection { background: var(--accent-dim); color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- DMCA / Static content pages ------------------------- */

.container--narrow { max-width: 780px; }

.page-hero {
  text-align:    center;
  padding:       40px 0 32px;
}
.page-hero__title {
  font-size:     2rem;
  font-weight:   700;
  color:         var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.page-hero__sub {
  color:       var(--text-muted);
  font-size:   0.95rem;
}

.content-card {
  background:    var(--bg-surface);
  border:        1px solid var(--border);
  border-radius: 10px;
  padding:       28px 32px;
  margin-bottom: 20px;
}
.content-card h2 {
  font-size:     1.05rem;
  font-weight:   600;
  color:         var(--accent);
  margin-bottom: 14px;
  letter-spacing: -0.2px;
}
.content-card p { color: var(--text-muted); line-height: 1.7; margin-bottom: 12px; }
.content-card p:last-child { margin-bottom: 0; }
.content-card--muted { background: transparent; border-style: dashed; }
.content-card--muted .disclaimer { font-size: 0.82rem; color: var(--text-faint); line-height: 1.65; }

/* DMCA ordered list */
.dmca-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dmca-list li {
  display:     flex;
  gap:         14px;
  align-items: flex-start;
  color:       var(--text-muted);
  line-height: 1.6;
  font-size:   0.9rem;
}
.dmca-list__num {
  flex-shrink:   0;
  width:         26px;
  height:        26px;
  border-radius: 50%;
  background:    var(--accent-dim);
  color:         var(--accent);
  font-size:     0.75rem;
  font-weight:   700;
  display:       flex;
  align-items:   center;
  justify-content: center;
  margin-top:    2px;
}

/* DMCA contact box */
.dmca-contact-box {
  margin-top:    24px;
  background:    var(--bg);
  border:        1px solid var(--accent);
  border-radius: 8px;
  padding:       20px 24px;
  text-align:    center;
}
.dmca-contact-box__label { color: var(--text-faint); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.dmca-contact-box__email { font-size: 1.15rem; font-weight: 600; color: var(--accent); text-decoration: none; display: block; margin-bottom: 10px; }
.dmca-contact-box__email:hover { color: var(--accent-hover); }
.dmca-contact-box__note { color: var(--text-faint); font-size: 0.82rem; margin: 0; }

/* DMCA process steps */
.dmca-steps {
  display:   flex;
  gap:       16px;
  margin-top: 16px;
}
.dmca-step {
  flex:          1;
  background:    var(--bg);
  border:        1px solid var(--border);
  border-radius: 8px;
  padding:       18px;
  display:       flex;
  flex-direction: column;
  gap:           10px;
}
.dmca-step__icon {
  font-size:   1.4rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color:       var(--accent);
  line-height: 1;
}
.dmca-step strong { color: var(--text); font-size: 0.9rem; }
.dmca-step p { color: var(--text-muted); font-size: 0.84rem; line-height: 1.55; margin: 0; }

@media (max-width: 600px) {
  .dmca-steps { flex-direction: column; }
  .content-card { padding: 20px 18px; }
  .page-hero__title { font-size: 1.5rem; }
}

/* ---- What is XDCC page ------------------------------------ */

.xdcc-steps { display: flex; flex-direction: column; gap: 20px; }
.xdcc-step  { display: flex; gap: 16px; align-items: flex-start; }
.xdcc-step__num {
  flex-shrink:     0;
  width:           32px; height: 32px;
  border-radius:   50%;
  background:      rgba(99,102,241,.15);
  border:          1px solid rgba(99,102,241,.3);
  color:           #818cf8;
  font-size:       .82rem; font-weight: 700;
  display:         flex; align-items: center; justify-content: center;
}
.xdcc-step__body { font-size: .875rem; line-height: 1.7; color: var(--text-muted); }
.xdcc-step__body strong { display: block; color: var(--text); font-size: .92rem; margin-bottom: 2px; }
.xdcc-step__body p { margin: 2px 0 0; }
.xdcc-code {
  display:       block;
  background:    var(--surface);
  border:        1px solid var(--border);
  border-radius: 6px;
  padding:       9px 14px;
  margin-top:    8px;
  overflow-x:    auto;
}
.xdcc-code code { font-family: var(--font-mono); font-size: .82rem; color: #818cf8; }
.content-card code {
  font-family:   var(--font-mono); font-size: .82rem;
  background:    var(--surface); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 6px; color: #818cf8;
}
.xdcc-client-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
@media (max-width: 600px) { .xdcc-client-grid { grid-template-columns: 1fr; } }
.xdcc-client {
  background:    var(--bg-elevated);
  border:        1px solid var(--border);
  border-radius: 8px;
  padding:       16px 18px;
}
.xdcc-client__name { font-weight: 700; font-size: .95rem; color: var(--text); margin-bottom: 2px; }
.xdcc-client__meta { font-size: .75rem; color: var(--text-muted); margin-bottom: 8px; }
.xdcc-client__desc { font-size: .82rem; color: var(--text-muted); line-height: 1.6; margin: 0; }
.xdcc-faq         { display: flex; flex-direction: column; }
.xdcc-faq__item   { border-bottom: 1px solid var(--border); }
.xdcc-faq__item:last-child { border-bottom: none; }
.xdcc-faq__q {
  font-size:    .9rem; font-weight: 600; color: var(--text);
  padding:      14px 0; cursor: pointer; list-style: none;
  display:      flex; align-items: center; justify-content: space-between;
  gap:          8px; user-select: none;
}
.xdcc-faq__q::-webkit-details-marker { display: none; }
.xdcc-faq__q::after {
  content:   '+'; font-size: 1.1rem; font-weight: 400;
  color:     var(--text-muted); flex-shrink: 0;
}
.xdcc-faq__item[open] .xdcc-faq__q::after { content: '−'; }
.xdcc-faq__a {
  font-size:  .875rem; line-height: 1.75;
  color:      var(--text-muted);
  padding:    0 0 14px;
  margin:     0;
}
.xdcc-faq__a a    { color: var(--accent); text-decoration: none; }
.xdcc-faq__a a:hover { text-decoration: underline; }
.xdcc-faq__a code {
  font-family: var(--font-mono); font-size: .82rem;
  background:  var(--surface); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 6px; color: #818cf8;
}

/* ---- Submit form ------------------------------------------ */

.submit-success {
  background: var(--bg-surface);
  border: 1px solid rgba(62,207,142,0.35);
  border-radius: 10px;
  padding: 40px 32px;
  text-align: center;
  margin-bottom: 20px;
}
.submit-success__icon { font-size: 2.5rem; color: #3ecf8e; margin-bottom: 12px; }
.submit-success h2 { font-size: 1.2rem; color: var(--text); margin-bottom: 8px; }
.submit-success p  { color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; }
.submit-success__again { color: var(--accent); text-decoration: underline; font-size: 0.9rem; }

.submit-error {
  background: rgba(248,81,73,0.1);
  border: 1px solid rgba(248,81,73,0.3);
  color: #f85149;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.submit-form { padding: 4px 0 0; }
.submit-row  { display: flex; gap: 16px; }
.submit-row .submit-field { flex: 1; }

.submit-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}
.submit-field--actions { margin-top: 8px; }

.submit-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.submit-label .required { color: var(--accent); }

.submit-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9rem;
  padding: 10px 14px;
  font-family: inherit;
  transition: border-color 0.15s;
  outline: none;
  resize: none;
}
.submit-input:focus { border-color: var(--accent); }
.submit-input.mono  { font-family: var(--font-mono); }
.submit-textarea    { min-height: 100px; }

.submit-desc {
  font-size: 0.78rem;
  color: var(--text-faint);
  line-height: 1.4;
}

.submit-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 20px;
  color: var(--text-faint);
  font-size: 0.8rem;
}
.submit-divider::before, .submit-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.submit-optional { color: var(--text-faint); font-weight: 400; }

.submit-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  align-self: flex-start;
}
.submit-btn:hover { background: var(--accent-hover); }

.submit-note {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-top: 10px;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .submit-row { flex-direction: column; gap: 0; }
}

/* ---- Donate page ------------------------------------------ */

.donate-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.donate-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.donate-card__header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.donate-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
}
.donate-icon--btc  { background: rgba(247,147,26,0.12); color: #f7931a; }
.donate-icon--bmc  { background: rgba(255,213,0,0.12);  color: #ffdd00; }
.donate-link-btn--bmc { background: #ffdd00; color: #000; border-color: #ffdd00; }
.donate-link-btn--bmc:hover { background: #f0cf00; border-color: #f0cf00; }

.donate-card__name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.donate-card__tag {
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: 2px;
}

.donate-card__desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

.donate-addr-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  margin-top: auto;
}

.donate-addr {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  word-break: break-all;
  flex: 1;
  line-height: 1.4;
}

.donate-copy {
  flex-shrink: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 5px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: inherit;
  padding: 4px 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.donate-copy:hover       { background: var(--bg-hover); color: var(--text); }
.donate-copy--ok         { color: var(--green) !important; border-color: rgba(62,207,142,0.3); }

.donate-link-btn {
  display: inline-block;
  border-radius: 7px;
  padding: 9px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  transition: opacity 0.15s;
  margin-top: auto;
}
.donate-link-btn:hover { opacity: 0.85; }
.donate-link-btn--pp   { background: #0070d2; color: #fff; }
.donate-link-btn--kofi { background: #ff5e5b; color: #fff; }

@media (max-width: 860px) {
  .donate-grid { grid-template-columns: 1fr; }
}

/* ---- Info button & modal --------------------------------- */
.btn-icon {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  width:           26px;
  height:          26px;
  padding:         0;
  border-radius:   50%;
  border:          1px solid var(--border);
  background:      transparent;
  color:           var(--text-muted);
  cursor:          pointer;
  flex-shrink:     0;
  transition:      background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-icon:hover { background: var(--bg-hover); color: var(--accent); border-color: var(--accent-dim); }

.info-modal-overlay {
  position:        fixed;
  inset:           0;
  background:      rgba(0,0,0,0.55);
  display:         flex;
  align-items:     center;
  justify-content: center;
  z-index:         1000;
}
.info-modal {
  background:    var(--bg-surface);
  border:        1px solid var(--border);
  border-radius: 10px;
  padding:       28px 32px;
  max-width:     480px;
  width:         90%;
  position:      relative;
  max-height:    80vh;
  overflow-y:    auto;
}
.info-modal-close {
  position:      absolute;
  top:           12px;
  right:         14px;
  background:    none;
  border:        none;
  color:         var(--text-muted);
  font-size:     1.4rem;
  cursor:        pointer;
  padding:       2px 7px;
  border-radius: 4px;
  line-height:   1;
}
.info-modal-close:hover   { color: var(--text); background: var(--bg-hover); }
.info-modal-title         { margin: 0 0 20px; font-size: 1.1rem; font-weight: 700; }
.info-modal-row {
  display:       flex;
  gap:           12px;
  padding:       8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size:     0.9rem;
  align-items:   flex-start;
}
.info-modal-row:last-of-type { border-bottom: none; }
.info-modal-label { color: var(--text-muted); min-width: 110px; flex-shrink: 0; font-size: 0.82rem; padding-top: 2px; }
.info-modal-value { color: var(--text); word-break: break-word; }
.info-modal-link  { display: block; margin-top: 18px; text-align: center; font-size: 0.88rem; color: var(--accent); }
.info-modal-link:hover { text-decoration: underline; }

/* ---- Ad slots ------------------------------------------------ */

.ad-slot {
  display:        flex;
  flex-direction: column;
  align-items:    center;
  width:          100%;
  padding:        12px 0;
}

.ad-slot__label {
  font-size:      0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color:          var(--text-muted);
  margin-bottom:  5px;
  opacity:        0.45;
}

.ad-slot__inner {
  display:       block;
  max-width:     100%;
  border-radius: 4px;
  overflow:      hidden;
}

/* Leaderboard: 728×90 desktop, 320×50 mobile */
.ad-slot--leaderboard .ad-slot__inner {
  width:      728px;
  height:     90px;
}
@media (max-width: 750px) {
  .ad-slot--leaderboard .ad-slot__inner {
    width:  320px;
    height: 50px;
  }
}
