@import url('aurora-core.css?v=20260711-footer-admin-layout');

/* ============================================
   TRACKER STATS GRID (6 cards)
   ============================================ */
.tracker-stats { margin-bottom: 48px; }
.stats-grid-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(139,92,246,0.12);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease forwards;
}
.stat-card:nth-child(1) { animation-delay: 100ms; }
.stat-card:nth-child(2) { animation-delay: 200ms; }
.stat-card:nth-child(3) { animation-delay: 300ms; }
.stat-card:nth-child(4) { animation-delay: 400ms; }
.stat-card:nth-child(5) { animation-delay: 500ms; }
.stat-card:nth-child(6) { animation-delay: 600ms; }

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--card-color), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--card-color);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 20px var(--card-glow);
}
.stat-card:hover::before { opacity: 1; }

.stat-card.users { --card-color: var(--purple); --card-glow: rgba(139,92,246,0.15); }
.stat-card.torrents { --card-color: var(--cyan); --card-glow: rgba(0,212,255,0.15); }
.stat-card.seeds { --card-color: var(--green); --card-glow: rgba(16,185,129,0.15); }
.stat-card.leechers { --card-color: var(--orange); --card-glow: rgba(245,158,11,0.15); }
.stat-card.ratio { --card-color: var(--pink); --card-glow: rgba(255,45,85,0.15); }
.stat-card.online { --card-color: var(--gold); --card-glow: rgba(245,158,11,0.15); }

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.stat-card.users .stat-icon { background: rgba(139,92,246,0.15); color: var(--purple); }
.stat-card.torrents .stat-icon { background: rgba(0,212,255,0.15); color: var(--cyan); }
.stat-card.seeds .stat-icon { background: rgba(16,185,129,0.15); color: var(--green); }
.stat-card.leechers .stat-icon { background: rgba(245,158,11,0.15); color: var(--orange); }
.stat-card.ratio .stat-icon { background: rgba(255,45,85,0.15); color: var(--pink); }
.stat-card.online .stat-icon { background: rgba(245,158,11,0.15); color: var(--gold); }

.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--card-color);
  line-height: 1;
}
.stat-value .unit {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 4px;
}

/* ============================================
   NEWS SECTION
   ============================================ */
.news-section { margin-bottom: 48px; }

/* TASK-0069: reuses the same pill/token language the retired .news-pinned-badge used (JetBrains Mono, rounded, translucent violet). Still the only styling for news_show.php's own <span class="news-category-badge">, unscoped there — kept as-is; TASK-0070's redesigned Home block uses its own home-news-badge classes in page-home-redesign.css instead of this one. */
.news-category-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(139,92,246,0.12);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: 6px;
  padding: 3px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #a78bfa;
  white-space: nowrap;
}

/* Shared, generic helpers — reused by both news_show.php and TASK-0070's redesigned Home news block; keep. */
.news-title-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
.news-title-link:hover {
  color: var(--cyan);
  text-shadow: 0 0 16px rgba(0,212,255,0.18);
}
.news-read-more {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  color: var(--cyan);
  text-decoration: none;
  font-weight: 700;
}
.news-read-more:hover {
  text-decoration: underline;
}
.news-footer-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.news-author-prefix {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.news-identity {
  min-width: 0;
}
.news-identity .user-identity-meta {
  gap: 3px;
}
.news-identity .user-identity-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.news-identity .user-identity-rank {
  min-height: 20px;
  padding: 0 8px;
  font-size: 9px;
}
.news-staff-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.news-staff-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  border: 1px solid transparent;
  transition: all 0.25s ease;
}
.news-staff-btn.edit {
  color: var(--cyan);
  background: rgba(0,212,255,0.1);
  border-color: rgba(0,212,255,0.2);
}
.news-staff-btn.edit:hover {
  background: rgba(0,212,255,0.18);
  border-color: rgba(0,212,255,0.38);
}
.news-staff-btn.delete {
  color: #ff8c98;
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.2);
}
.news-staff-btn.delete:hover {
  background: rgba(239,68,68,0.2);
  border-color: rgba(239,68,68,0.35);
}

.news-show-shell {
  margin-bottom: 48px;
}
.news-show-card {
  background: var(--bg-card);
  border: 1px solid rgba(0,212,255,0.12);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0,0,0,0.24);
}
.news-show-cover {
  height: 280px;
  overflow: hidden;
}
.news-show-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.news-show-content {
  padding: 28px 32px 32px;
}
.news-show-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.news-show-meta-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.news-show-back {
  color: var(--cyan);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.news-show-back:hover {
  text-decoration: underline;
}
.news-show-title {
  font-size: 34px;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--text);
}
.news-show-author {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 0 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.news-avatar-large {
    --user-avatar-size: 48px;
    --user-avatar-font-size: 18px;
    --user-avatar-ring-width: 1.2px;
  }
.news-show-author-label {
  color: var(--text-muted);
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
}
.news-show-identity .user-identity-name {
  font-size: 14px;
}
.news-show-identity .user-identity-rank {
  min-height: 22px;
  font-size: 9px;
}
.news-show-body {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 15px;
}
.news-show-body a {
  color: var(--cyan);
}
.news-show-body img {
  max-width: 100%;
  height: auto;
}

/* ============================================
   BROWSE / FILTERS / TABLES
   ============================================ */
.browse-section { margin-bottom: 48px; }
.browse-hero-rail {
  margin-bottom: 28px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(0, 212, 255, 0.10);
  background:
    radial-gradient(circle at top left, rgba(0, 212, 255, 0.08), transparent 34%),
    radial-gradient(circle at top right, rgba(139, 92, 246, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(14, 20, 34, 0.96), rgba(10, 15, 27, 0.98));
  box-shadow:
    0 28px 48px rgba(2, 8, 23, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.browse-hero-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 16px;
}
.browse-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.browse-hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 212, 255, 0.10);
  border: 1px solid rgba(0, 212, 255, 0.16);
  color: #88ecff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.browse-hero-title {
  margin: 0;
  color: #f6f8fc;
  font-size: 24px;
  line-height: 1.1;
}
.browse-hero-toggle {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid rgba(0, 212, 255, 0.22);
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.14), rgba(139, 92, 246, 0.14));
  color: #d8f8ff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.browse-hero-toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 212, 255, 0.34);
  box-shadow: 0 12px 24px rgba(0, 212, 255, 0.12);
}
.browse-hero-panels {
  position: relative;
}
.browse-hero-panel {
  display: none;
}
.browse-hero-panel.is-active {
  display: block;
}
.browse-hero-track {
  position: relative;
  overflow: hidden;
  padding: 6px 0 10px;
  mask-image: linear-gradient(to right, transparent 0, #000 4%, #000 96%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 4%, #000 96%, transparent 100%);
}
.browse-hero-lane {
  display: flex;
  align-items: stretch;
  gap: 14px;
  width: max-content;
  animation: browseHeroMarquee 42s linear infinite;
}
.browse-hero-track:hover .browse-hero-lane {
  animation-play-state: paused;
}
.browse-hero-card {
  display: block;
  flex: 0 0 168px;
  text-decoration: none;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(13, 18, 30, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 32px rgba(2, 8, 23, 0.28);
  transform: translateY(calc(var(--rail-index, 0) * 2px));
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.browse-hero-card:hover {
  transform: translateY(calc(var(--rail-index, 0) * 2px - 4px));
  border-color: rgba(0, 212, 255, 0.30);
  box-shadow: 0 20px 36px rgba(2, 8, 23, 0.36);
}
.browse-hero-media {
  position: relative;
  aspect-ratio: 2 / 3;
  background: linear-gradient(180deg, rgba(11, 16, 28, 0.95), rgba(18, 25, 40, 0.98));
}
.browse-hero-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.browse-hero-body {
  padding: 12px 12px 13px;
  background: linear-gradient(180deg, rgba(24, 27, 38, 0.98), rgba(18, 20, 29, 1));
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.browse-hero-card-title {
  margin: 0;
  color: #f2f4f8;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.browse-hero-empty {
  padding: 18px;
  border-radius: 16px;
  background: rgba(10, 14, 24, 0.72);
  border: 1px dashed rgba(255, 255, 255, 0.10);
  color: var(--text-muted);
}

@keyframes browseHeroMarquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-50% - 7px));
  }
}
.browse-filters {
  background: var(--bg-card);
  border: 1px solid rgba(0,212,255,0.08);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}
.filter-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.filter-search { flex: 1; min-width: 220px; }
.filter-search input,
.filter-select {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  background: rgba(10,14,20,0.8);
  border: 1px solid rgba(0,212,255,0.12);
  border-radius: 10px;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  outline: none;
}
.filter-search input:focus,
.filter-select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 15px rgba(0,212,255,0.1);
}
.filter-select { width: auto; min-width: 180px; }
.filter-btn {
  height: 44px;
  padding: 0 24px;
  background: linear-gradient(135deg, rgba(0,212,255,0.15), rgba(139,92,246,0.15));
  border: 1px solid rgba(0,212,255,0.25);
  border-radius: 10px;
  color: var(--cyan);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}
.filter-btn:hover {
  background: linear-gradient(135deg, rgba(0,212,255,0.25), rgba(139,92,246,0.25));
  box-shadow: 0 0 20px rgba(0,212,255,0.1);
}
.filter-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  overflow-x: hidden;
  padding: 6px 2px 2px;
  max-height: 132px;
}
.filter-cat {
  display: inline-flex;
  position: relative;
  flex: 0 0 auto;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.filter-cat:hover {
  transform: translateY(-2px);
}
.filter-cat input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.filter-cat-rich .filter-cat-ui {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 11px 16px 11px 14px;
  background: linear-gradient(180deg, rgba(14, 20, 33, 0.96), rgba(10, 14, 24, 0.98));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(2, 8, 23, 0.2), inset 0 1px 0 rgba(255,255,255,0.02);
  color: var(--text-muted);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
.filter-cat-rich:hover .filter-cat-ui,
.filter-cat-rich input:checked + .filter-cat-ui {
  border-color: rgba(0, 212, 255, 0.28);
  color: #f3f8ff;
  background: linear-gradient(180deg, rgba(16, 29, 49, 0.98), rgba(10, 17, 29, 1));
  box-shadow: 0 14px 30px rgba(2, 8, 23, 0.28), inset 0 1px 0 rgba(255,255,255,0.04);
}
.filter-cat-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7de6ff;
  flex: 0 0 22px;
}
.filter-cat-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}
.filter-cat-text {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.filter-cat-rich input:checked + .filter-cat-ui .filter-cat-icon {
  color: #ffd86b;
}
.filter-cat-peliculas .filter-cat-icon { color: #ff7f8f; }
.filter-cat-series .filter-cat-icon { color: #8de1ff; }
.filter-cat-juegos-pc .filter-cat-icon { color: #72f7c7; }
.filter-cat-juegos-consola .filter-cat-icon { color: #b992ff; }
.filter-cat-sistemas-operativos .filter-cat-icon { color: #7ec8ff; }
.filter-cat-musica .filter-cat-icon { color: #ffd66b; }
.filter-cat-libros .filter-cat-icon { color: #ffb86d; }
.filter-cat-audiolibros .filter-cat-icon { color: #9fd0ff; }
.filter-cat-cursos-formacion .filter-cat-icon { color: #6ee7b7; }
.filter-cat-documentales .filter-cat-icon { color: #82f3ff; }
.filter-cat-anime .filter-cat-icon { color: #ff9ae6; }
.filter-cat-manga-comics .filter-cat-icon { color: #f9a8d4; }
.filter-cat-deportes .filter-cat-icon { color: #fcae65; }
.filter-cat-infantil-familiar .filter-cat-icon { color: #ffe17a; }
.filter-cat-recursos-creativos .filter-cat-icon { color: #c4b5fd; }

.browse-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.browse-results-shell {
  margin-bottom: 20px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(19, 28, 46, 0.94), rgba(11, 18, 32, 0.96));
  border: 1px solid rgba(0, 212, 255, 0.10);
  border-radius: 24px;
  box-shadow:
    0 24px 48px rgba(2, 8, 23, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.browse-poster-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}
.browse-poster-card {
  display: block;
  text-decoration: none;
  background: rgba(14, 18, 28, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 32px rgba(2, 8, 23, 0.28);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.browse-poster-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 255, 0.28);
  box-shadow: 0 22px 40px rgba(2, 8, 23, 0.38);
}
.browse-poster-media {
  position: relative;
  aspect-ratio: 2 / 3;
  background: linear-gradient(180deg, rgba(11, 16, 28, 0.95), rgba(18, 25, 40, 0.98));
}
.browse-poster-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.browse-poster-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.82);
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.browse-poster-fallback .cat-icon {
  width: 104px;
  height: 104px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(0, 212, 255, 0.18));
}
.browse-card-year,
.browse-card-rating {
  position: absolute;
  top: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 9px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.browse-card-year {
  left: 10px;
  background: linear-gradient(135deg, #ff6d8d, #ff8d72);
  color: #fff;
  box-shadow: 0 8px 18px rgba(255, 109, 141, 0.28);
}
.browse-card-rating {
  right: 10px;
  background: rgba(18, 18, 24, 0.82);
  color: #f6f7fb;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.browse-card-star {
  color: #ffd256;
  font-size: 13px;
}
.browse-poster-body {
  padding: 14px 14px 15px;
  background: linear-gradient(180deg, rgba(24, 27, 38, 0.98), rgba(18, 20, 29, 1));
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.browse-poster-title {
  margin: 0;
  color: #f2f4f8;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.pager {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 16px 0;
  flex-wrap: wrap;
}
.pager a, .pager b {
  padding: 6px 12px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-decoration: none;
}
.pager a {
  background: rgba(10,14,20,0.6);
  border: 1px solid rgba(0,212,255,0.12);
  color: var(--text-muted);
}
.pager a:hover { border-color: var(--cyan); color: var(--cyan); }
.pager b {
  background: rgba(0,212,255,0.15);
  border: 1px solid rgba(0,212,255,0.3);
  color: var(--cyan);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid rgba(0,212,255,0.08);
  border-radius: 16px;
}

/* Responsive */
@media (max-width: 1100px) {
  .stats-grid-6 { grid-template-columns: repeat(2, 1fr); }
  .browse-poster-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .filter-categories { max-height: 160px; }
  .browse-hero-card { flex-basis: 156px; }
}

@media (max-width: 768px) {
  .stats-grid-6 { grid-template-columns: 1fr; }
  .browse-hero-rail { padding: 16px; border-radius: 20px; }
  .browse-hero-header { flex-direction: column; align-items: stretch; }
  .browse-hero-title { font-size: 20px; }
  .browse-hero-toggle { width: 100%; }
  .browse-hero-card { flex-basis: 148px; }
  .browse-hero-lane { animation-duration: 34s; }
  .browse-results-shell { padding: 14px; border-radius: 20px; }
  .browse-poster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .filter-cat-rich .filter-cat-ui { min-height: 48px; padding: 10px 14px 10px 12px; }
  .filter-cat-text { font-size: 13px; }
}

@media (max-width: 480px) {
  .browse-hero-card { flex-basis: 140px; }
  .browse-hero-lane { animation-duration: 30s; }
  .browse-poster-grid { grid-template-columns: 1fr; }
}
