/* ============================================================
   TapAppZone v2 — Dark Theme (Uptodown style)
   Bootstrap 5 + Swiper 11 + custom
   ============================================================ */

@import url('inter.css');

/* ---------- CSS Variables ---------- */
:root {
  --primary:        #00C9D4;
  --primary-dark:   #00A8B5;
  --primary-light:  rgba(0,201,212,0.12);
  --primary-rgb:    0, 201, 212;
  --accent-yellow:  #F0B429;
  --accent-yellow-dark: #D09800;
  --bg-page:        #0C1B2A;
  --bg-card:        #152235;
  --bg-card-2:      #1A2B40;
  --bg-header:      #091624;
  --bg-ticker:      #07111C;
  --bg-sidebar:     #07111C;
  --text-main:      #D4E4F4;
  --text-muted:     #ffffff;
  --text-light:     #bcc3ca;
  --rating:         #FFB400;
  --border:         #1C3050;
  --border-light:   #243D5C;
  --radius-card:    10px;
  --radius-btn:     8px;
  --shadow-card:    0 4px 20px rgba(0,0,0,0.45);
  --shadow-hover:   0 8px 32px rgba(0,0,0,0.65);
  --transition:     0.25s ease;
  --bs-body-bg: var(--bg-card);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-page);
  color: var(--text-main);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

/* Page fade-in */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
main { animation: pageFadeIn 0.35s ease both; }

@media (min-width: 1200px) {
  h2 { font-size: 20px; }
}

/* ============================================================
   TRENDING TICKER STRIP
   ============================================================ */
.ticker-strip {
  background: var(--bg-ticker);
  border-bottom: 1px solid var(--border);
  padding: 0;
  overflow: hidden;
  height: 32px;
  display: flex;
  align-items: center;
}
.ticker-inner {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0 12px;
  white-space: nowrap;
}
.ticker-inner::-webkit-scrollbar { display: none; }
.ticker-fire {
  color: #FF6B35;
  font-size: 13px;
  margin-right: 10px;
  flex-shrink: 0;
}
.ticker-link {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 4px 10px;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
  transition: color var(--transition);
}
.ticker-link:last-child { border-right: none; }
.ticker-link:hover { color: var(--primary); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.5); }

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 58px;
  padding: 0 16px;
  gap: 12px;
}

/* Left: hamburger */
.header-left { display: flex; align-items: center; gap: 8px; }

/* Center: logo */
.header-center { display: flex; justify-content: center; }
.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.site-logo img { height: 32px; width: auto; }

/* Right: icons */
.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

/* Icon buttons */
.btn-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.btn-icon:hover { background: var(--bg-card); color: var(--text-main); }

/* Platform badge */
.platform-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.platform-btn:hover { border-color: var(--primary); color: var(--primary); }
.platform-btn i { font-size: 14px; color: #3DDC84; }

/* Search bar */
.search-bar-wrap {
  max-width: 0;
  overflow: hidden;
  transition: max-width 0.35s ease, opacity 0.3s;
  opacity: 0;
}
.search-bar-wrap.open { max-width: 260px; opacity: 1; }
.search-bar-wrap input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  padding: 6px 14px;
  font-size: 14px;
  width: 240px;
  outline: none;
  transition: border-color var(--transition);
}
.search-bar-wrap input:focus { border-color: var(--primary); }
.search-bar-wrap input::placeholder { color: var(--text-light); }

/* ============================================================
   SIDEBAR NAVIGATION
   ============================================================ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1049;
}
.sidebar-overlay.open { display: block; }

.side-nav {
  position: fixed;
  top: 0;
  left: -300px;
  width: 280px;
  height: 100%;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  z-index: 1050;
  transition: left 0.3s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.side-nav.open { left: 0; }

.side-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.side-nav-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  transition: color var(--transition);
}
.side-nav-close:hover { color: var(--text-main); }

.side-nav-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.side-nav-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  padding: 0 20px 10px;
}
.side-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.side-nav-link i { font-size: 16px; width: 20px; text-align: center; }
.side-nav-link:hover, .side-nav-link.active {
  background: var(--primary-light);
  color: var(--primary);
}
.side-nav-link .badge-new {
  margin-left: auto;
  font-size: 10px;
  background: var(--primary);
  color: #fff;
  padding: 1px 6px;
  border-radius: 10px;
}

/* ============================================================
   HERO SLIDER (cinematic landscape)
   ============================================================ */
.hero-section {
  position: relative;
  overflow: hidden;
}

.swiper-hero-cinema {
  width: 100%;
}

.hero-slide {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
}
.hero-slide-img {
  width: 100%;
  aspect-ratio: 16/7;
  background-size: cover;
  background-position: center;
  position: relative;
}
.hero-slide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
@media (max-width: 575px) {
  .hero-slide-img { aspect-ratio: 4/3; }
}

.hero-slide-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 30%,
    rgba(12,27,42,0.6) 65%,
    rgba(12,27,42,0.92) 100%
  );
}
.hero-slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 24px;
  display: flex;
  align-items: flex-end;
  gap: 14px;
}
.hero-slide-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.15);
}
.hero-slide-info { flex: 1; min-width: 0; }
.hero-slide-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--primary);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.hero-slide-badge.badge-update { background: #F0B429; color: #0C1B2A; }
.hero-slide-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.hero-slide-meta {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  margin-top: 2px;
}
@media (max-width: 575px) {
  .hero-slide-content { padding: 14px 16px; }
  .hero-slide-icon { width: 40px; height: 40px; border-radius: 8px; }
  .hero-slide-title { font-size: 15px; }
}

/* Hero swiper pagination */
.swiper-hero-cinema .swiper-pagination-bullet {
  background: rgba(255,255,255,0.4);
  opacity: 1;
}
.swiper-hero-cinema .swiper-pagination-bullet-active {
  background: var(--primary);
  width: 20px;
  border-radius: 3px;
}

/* ============================================================
   GENRE CHIPS (horizontal scroll)
   ============================================================ */
.genre-strip-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.genre-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 16px 0 4px;
  cursor: grab;
}
.genre-strip.is-dragging {
  cursor: grabbing;
  user-select: none;
}
.genre-strip::-webkit-scrollbar { display: none; }
.genre-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  flex: 0 0 auto;
  flex-shrink: 0;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  cursor: pointer;
  -webkit-user-drag: none;
}
.genre-chip:hover, .genre-chip.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 14px;
}
.section-head h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}
.section-head-link {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}
.section-head-link i { font-size: 11px; }

/* ============================================================
   BANNER CARD (landscape screenshot card — primary card type)
   ============================================================ */
.banner-card {
  display: block;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  text-decoration: none;
}
.banner-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-light);
}

.banner-card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
.banner-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.banner-card:hover .banner-card-thumb img { transform: scale(1.04); }

.banner-card-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(12,27,42,0.7) 100%);
}

.banner-card-body {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}
.banner-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  object-fit: cover;
  flex-shrink: 0;
}
.banner-card-info { flex: 1; min-width: 0; }
.banner-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.banner-card-cat {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}
.banner-card-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}
.badge-new-item { background: rgba(0,201,212,0.15); color: var(--primary); }
.badge-update   { background: rgba(240,180,41,0.15); color: var(--accent-yellow); }
.badge-top      { background: rgba(255,80,80,0.15);  color: #FF6060; }

/* ============================================================
   ROW CARD (compact list — search, similar, rankings)
   ============================================================ */
.row-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
}
.row-card:hover { background: var(--bg-card-2); border-color: var(--border-light); }

.row-card-num {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-light);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.row-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.row-card-info { flex: 1; min-width: 0; }
.row-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.row-card-rating { color: var(--rating); }
.row-card-rating i { font-size: 10px; }
.row-card-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border: 1px solid var(--primary);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  transition: background var(--transition), color var(--transition);
}
.row-card:hover .row-card-btn { background: var(--primary); color: #fff; }

/* ============================================================
   DOWNLOAD BUTTONS (single page)
   ============================================================ */
.btn-download-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  min-height: 60px;
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-btn);
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
  border: none;
  cursor: pointer;
  width: 100%;
}
.btn-download-main:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-download-main-text { text-align: left; }
.btn-download-main-label {
  font-size: 14px;
  font-weight: 700;
  color: #062023;
  display: block;
}
.btn-download-main-meta {
  font-size: 11px;
  color: rgba(6,32,35,0.75);
  display: block;
  margin-top: 1px;
}
.btn-download-main i { font-size: 22px; color: #062023; flex-shrink: 0; }

.btn-download-alt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  min-height: 60px;
  height: 100%;
  background: var(--accent-yellow);
  border-radius: var(--radius-btn);
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
  border: none;
  cursor: pointer;
  width: 100%;
}
.btn-download-alt:hover { background: var(--accent-yellow-dark); transform: translateY(-1px); }
.btn-download-alt-label {
  font-size: 14px;
  font-weight: 700;
  color: #0C1B2A;
  display: block;
}
.btn-download-alt-meta {
  font-size: 11px;
  color: rgba(12,27,42,0.6);
  display: block;
  margin-top: 1px;
}
.btn-download-alt i { font-size: 22px; color: rgba(12,27,42,0.7); flex-shrink: 0; }

.btn-versions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-btn);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  transition: border-color var(--transition), color var(--transition);
}
.btn-versions:hover { border-color: var(--primary); color: var(--primary); }

/* ============================================================
   APP STATS ROW
   ============================================================ */
.app-stats {
  display: flex;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 20px 0;
}
.app-stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 8px;
  border-right: 1px solid var(--border);
}
.app-stat-item:last-child { border-right: none; }
.app-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}
.app-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}
.app-stat-icon { font-size: 14px; color: var(--primary); margin-bottom: 4px; }

/* ============================================================
   APP HERO (single page header)
   ============================================================ */
.app-hero {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 20px 0;
}
.app-hero-icon {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
@media (max-width: 575px) {
  .app-hero-icon { width: 64px; height: 64px; border-radius: 14px; }
}
.app-hero-info { flex: 1; min-width: 0; }
.app-hero-name {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 4px;
  line-height: 1.2;
}
@media (max-width: 575px) { .app-hero-name { font-size: 18px; } }
.app-hero-version { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.app-hero-dev {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}
.app-hero-cat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 3px 10px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ============================================================
   SIMILAR APPS SIDEBAR (single page)
   ============================================================ */
.similar-list { display: flex; flex-direction: column; gap: 4px; }
.similar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: opacity var(--transition);
}
.similar-item:last-child { border-bottom: none; }
.similar-item:hover { opacity: 0.75; }
.similar-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  object-fit: cover;
  flex-shrink: 0;
}
.similar-info { flex: 1; min-width: 0; }
.similar-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.similar-desc { font-size: 11px; color: var(--text-muted); }

/* ============================================================
   SCREENSHOTS SWIPER
   ============================================================ */
.screenshots-wrap { margin: 20px 0; }
.screenshot-slide img {
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: zoom-in;
  transition: opacity var(--transition);
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  display: block;
}
.screenshot-slide img:hover { opacity: 0.85; }

/* Swiper buttons shared */
.swiper-btn-next, .swiper-btn-prev {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-card-2);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
  user-select: none;
}
.swiper-btn-next:hover, .swiper-btn-prev:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}
.swiper-wrap { position: relative; }
.swiper-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumb {
  background: none;
  padding: 0;
  margin: 0;
  font-size: 12px;
}
.breadcrumb-item a { color: var(--text-muted); }
.breadcrumb-item a:hover { color: var(--primary); }
.breadcrumb-item.active { color: var(--text-light); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-light); }

/* ============================================================
   CATALOG FILTER SIDEBAR
   ============================================================ */
.filter-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  position: sticky;
  top: 80px;
}
.filter-section { margin-bottom: 20px; }
.filter-section:last-child { margin-bottom: 0; }
.filter-section h6 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 10px;
}
.filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition);
}
.filter-check:hover { color: var(--text-main); }
.filter-check input[type="checkbox"] {
  accent-color: var(--primary);
  width: 14px;
  height: 14px;
}
.sort-btn-group { display: flex; flex-direction: column; gap: 4px; }
.sort-btn {
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: none;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.sort-btn:hover { background: var(--bg-card-2); color: var(--text-main); }
.sort-btn.active { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }

.btn-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg-card);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.btn-filter-toggle:hover { border-color: var(--primary); color: var(--primary); }

/* Offcanvas dark */
.offcanvas {
  background: var(--bg-sidebar) !important;
  color: var(--text-main);
  border-right-color: var(--border) !important;
}
.offcanvas-header { border-bottom: 1px solid var(--border); }
.offcanvas-title { color: var(--text-main); }
.btn-close { filter: invert(1) brightness(0.7); }

/* Pagination */
.pagination-wrap { padding: 28px 0 8px; display: flex; justify-content: center; }
.pagination .page-link {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.pagination .page-link:hover:not(.disabled) {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}
.pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff !important;
}
.pagination .page-item.disabled .page-link { color: var(--text-light); }

/* ============================================================
   ARTICLE / STATIC PAGE
   ============================================================ */
.article-sidebar-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.article-sidebar-box h6 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 12px;
}
.article-nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}
.article-nav-link:last-child { border-bottom: none; }
.article-nav-link:hover, .article-nav-link.active { color: var(--primary); }
.article-nav-link i { font-size: 14px; }

.article-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px 32px;
}
@media (max-width: 575px) { .article-content { padding: 20px 18px; } }
.article-content h1 { font-size: 22px; font-weight: 800; color: var(--text-main); margin-bottom: 16px; }
.article-content h2 { font-size: 17px; font-weight: 700; color: var(--text-main); margin: 24px 0 10px; }
.article-content p { color: var(--text-muted); font-size: 14px; line-height: 1.75; }
.article-content a { color: var(--primary); }

/* Contact form */
.contact-form .form-label { font-size: 13px; color: var(--text-muted); margin-bottom: 5px; }
.contact-form .form-control {
  background: var(--bg-page);
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color var(--transition);
}
.contact-form .form-control:focus {
  background: var(--bg-page);
  border-color: var(--primary);
  color: var(--text-main);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.contact-form .form-control::placeholder { color: var(--text-light); }

/* ============================================================
   DEVELOPER PAGE
   ============================================================ */
.developer-hero {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 0 24px;
}
.developer-avatar {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.developer-name { font-size: 22px; font-weight: 800; color: var(--text-main); margin: 0 0 6px; }
.developer-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin: 0 0 8px; }
.developer-meta { font-size: 12px; color: var(--text-light); }
.developer-meta span { color: var(--primary); font-weight: 600; }

/* ============================================================
   SEARCH PAGE
   ============================================================ */
.search-hero {
  padding: 32px 0 24px;
  text-align: center;
}
.search-hero h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 20px;
}
.search-form-main {
  display: flex;
  max-width: 560px;
  margin: 0 auto;
  gap: 0;
}
.search-form-main input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 10px 0 0 10px;
  color: var(--text-main);
  padding: 13px 18px;
  font-size: 15px;
  outline: none;
}
.search-form-main input::placeholder { color: var(--text-light); }
.search-form-main input:focus { border-color: var(--primary); }
.search-form-main button {
  padding: 0 22px;
  background: var(--primary);
  border: none;
  border-radius: 0 10px 10px 0;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: background var(--transition);
}
.search-form-main button:hover { background: var(--primary-dark); }

.popular-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 14px 0 0; }
.popular-tag {
  padding: 5px 14px;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  font-size: 12px;
  color: var(--text-muted);
  transition: border-color var(--transition), color var(--transition);
}
.popular-tag:hover { border-color: var(--primary); color: var(--primary); }

/* Bootstrap Tabs dark override */
.nav-tabs {
  border-bottom-color: var(--border);
}
.nav-tabs .nav-link {
  color: var(--text-muted);
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 14px;
  transition: color var(--transition);
}
.nav-tabs .nav-link:hover { color: var(--text-main); border-bottom-color: var(--border-light); }
.nav-tabs .nav-link.active {
  background: none;
  border-bottom-color: var(--primary);
  color: var(--primary);
}

/* ============================================================
   404 PAGE
   ============================================================ */
.page-404 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  min-height: 60vh;
}
.page-404-num {
  font-size: clamp(80px, 18vw, 160px);
  font-weight: 900;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px var(--border-light);
  text-stroke: 2px var(--border-light);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-yellow) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pulse404 2.5s ease-in-out infinite;
}
@keyframes pulse404 {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.page-404-msg { font-size: 18px; font-weight: 700; color: var(--text-main); margin: 16px 0 8px; }
.page-404-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }

/* ============================================================
   VERSION HISTORY
   ============================================================ */
.version-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.version-item:last-child { border-bottom: none; }
.version-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  min-width: 90px;
}
.version-date { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.version-size { font-size: 11px; color: var(--text-light); }
.btn-version-dl {
  margin-left: auto;
  flex-shrink: 0;
  padding: 5px 14px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.btn-version-dl:hover { border-color: var(--primary); color: var(--primary); }
.btn-version-dl.unavailable {
  pointer-events: none;
  opacity: 0.55;
  cursor: default;
}
.btn-version-dl.unavailable:hover {
  border-color: var(--border-light);
  color: var(--text-muted);
}

/* ============================================================
   DESCRIPTION
   ============================================================ */
.desc-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  margin-bottom: 16px;
}
.desc-block h5, .desc-block .h5 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}
.desc-collapse {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.75;
  max-height: 100px;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.desc-collapse.expanded { max-height: 1000px; }
.btn-read-more {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================================
   STAR RATING INPUT
   ============================================================ */
.star-rating-input {
  display: flex;
  flex-direction: row-reverse;
  gap: 4px;
}
.star-rating-input input { display: none; }
.star-rating-input label {
  font-size: 22px;
  color: var(--border-light);
  cursor: pointer;
  transition: color var(--transition);
}
.star-rating-input label:hover,
.star-rating-input label:hover ~ label,
.star-rating-input input:checked ~ label {
  color: var(--rating);
}

/* ============================================================
   REVIEW FORM
   ============================================================ */
.review-form .form-control {
  background: var(--bg-page);
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: 8px;
  font-size: 14px;
}
.review-form .form-control:focus {
  background: var(--bg-page);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  color: var(--text-main);
}
.review-form .form-control::placeholder { color: var(--text-light); }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.lightbox-overlay.open { display: flex; }
.lightbox-img { max-width: 90vw; max-height: 88vh; border-radius: 8px; }
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 28px;
  cursor: pointer;
}
.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-sidebar);
  border-top: 1px solid var(--border);
  margin-top: 48px;
}
.footer-top { padding: 40px 0 32px; }
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 12px;
}
.footer-logo img { height: 28px; }
.footer-logo-name { font-weight: 700; font-size: 15px; color: var(--text-main); }
.footer-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.footer-col h2 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin-bottom: 12px;
}
.footer-col-links { display: flex; flex-direction: column; gap: 6px; }
.footer-col-links a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-col-links a:hover { color: var(--primary); }

/* Footer accordion mobile */
.footer-col-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding-bottom: 10px;
}
.footer-toggle-icon {
  font-size: 16px;
  color: var(--text-light);
  font-weight: 700;
}
@media (min-width: 768px) {
  .footer-toggle-icon { display: none; }
  .footer-col-links { display: flex !important; }
}
@media (max-width: 767px) {
  .footer-col-links { display: none; }
  .footer-col-links.open { display: flex; }
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-light);
}

/* ============================================================
   SCROLL-TO-TOP
   ============================================================ */
.btn-scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 900;
  box-shadow: 0 4px 16px rgba(0,201,212,0.4);
}
.btn-scroll-top.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.05s; }
.reveal-delay-2 { transition-delay: 0.10s; }
.reveal-delay-3 { transition-delay: 0.15s; }
.reveal-delay-4 { transition-delay: 0.20s; }

/* ============================================================
   SKELETON LOADER
   ============================================================ */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-2) 50%, var(--bg-card) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.6s infinite;
  border-radius: 6px;
}

/* ============================================================
   BOOTSTRAP DARK OVERRIDES
   ============================================================ */
/* Accordion */
.accordion-item {
  background: var(--bg-card);
  border-color: var(--border);
}
.accordion-button {
  background: var(--bg-card);
  color: var(--text-main);
  font-weight: 600;
}
.accordion-button:not(.collapsed) {
  background: var(--bg-card-2);
  color: var(--primary);
  box-shadow: none;
}
.accordion-button::after { filter: invert(1) brightness(0.6); }
.accordion-body { background: var(--bg-card); color: var(--text-muted); font-size: 14px; }

/* Tab content */
.tab-content { padding-top: 16px; }

/* Breadcrumb */
.breadcrumb-wrap { padding: 12px 0 8px; }
