/* =============================================
   AndroeeD — Premium Android Catalog
   ============================================= */

:root {
  --bg: #080810;
  --bg-2: #0d0d1a;
  --bg-card: #111120;
  --bg-card-h: #161628;
  --bg-dark: #060610;
  --border: #1c1c32;
  --border-l: #262642;
  --accent: #7c6aff;
  --accent-dim: rgba(124,106,255,0.15);
  --accent-h: #9580ff;
  --teal: #00d4aa;
  --teal-dim: rgba(0,212,170,0.12);
  --text: #e2e2f0;
  --text-2: #a0a0c0;
  --text-3: #666680;
  --text-4: #3a3a58;
  --danger: #ff4f60;
  --success: #00c878;
  --warn: #ffaa20;
  --r: 12px;
  --r-sm: 8px;
  --r-lg: 16px;
  --r-xl: 20px;
  --shadow: 0 2px 20px rgba(0,0,0,0.4);
  --shadow-l: 0 6px 40px rgba(0,0,0,0.6);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --max-w: 1200px;
}

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

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }
input, select, textarea { font-family: var(--font); }

/* ── Container ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8,8,16,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: 24px;
  height: 64px;
}
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo:hover { opacity: .85; }
.header-nav { display: flex; gap: 6px; }
.header-nav a {
  padding: 6px 14px; border-radius: var(--r-sm);
  color: var(--text-2); font-size: 14px; font-weight: 500;
  transition: all .2s;
}
.header-nav a:hover { color: var(--text); background: var(--bg-card); }
.header-actions { margin-left: auto; }
.header-search {
  display: flex; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 50px; overflow: hidden;
  transition: border-color .2s;
}
.header-search:focus-within { border-color: var(--accent); }
.header-search input {
  background: none; border: none; outline: none;
  color: var(--text); padding: 8px 16px;
  font-size: 14px; width: 220px;
}
.header-search input::placeholder { color: var(--text-3); }
.header-search button {
  padding: 8px 14px; color: var(--text-3);
  transition: color .2s;
}
.header-search button:hover { color: var(--accent); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text-2); border-radius: 2px; transition: .2s; }

/* ── Telegram Banner ── */
.tg-banner-global {
  background: linear-gradient(90deg, rgba(42,171,238,0.08) 0%, rgba(42,171,238,0.04) 100%);
  border-bottom: 1px solid rgba(42,171,238,0.12);
}
.tg-banner-inner {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 0;
}
.tg-banner-icon { flex-shrink: 0; }
.tg-banner-text { flex: 1; }
.tg-banner-text strong { display: block; font-size: 13px; font-weight: 700; color: var(--text); }
.tg-banner-text span { font-size: 12px; color: var(--text-2); }
.tg-banner-btn {
  display: flex; align-items: center; gap: 6px;
  background: rgba(42,171,238,0.15); border: 1px solid rgba(42,171,238,0.3);
  color: #2AABEE; padding: 7px 16px; border-radius: 50px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: all .2s;
}
.tg-banner-btn:hover { background: rgba(42,171,238,0.25); color: #2AABEE; }

/* ── Hero ── */
.hero-section {
  padding: 80px 0 60px;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(124,106,255,0.08) 0%, transparent 70%);
}
.hero-content { text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-dim); border: 1px solid rgba(124,106,255,0.3);
  color: var(--accent); padding: 5px 14px; border-radius: 50px;
  font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  margin-bottom: 20px;
}
.hero-content h1 {
  font-size: clamp(32px, 5vw, 52px); font-weight: 800;
  line-height: 1.18; letter-spacing: -.02em; color: var(--text);
  margin-bottom: 16px;
}
.gradient-text {
  background: linear-gradient(120deg, var(--accent), var(--teal));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-content p {
  font-size: 17px; color: var(--text-2); max-width: 600px; margin: 0 auto 32px;
}
.hero-stats {
  display: inline-flex; gap: 0; border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden; background: var(--bg-card);
}
.stat-item {
  padding: 14px 28px; text-align: center;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-item strong { display: block; font-size: 22px; font-weight: 800; color: var(--accent); }
.stat-item span { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }

/* ── Sections ── */
.section { padding: 60px 0; }
.section-dark { background: var(--bg-dark); }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 22px; font-weight: 700; color: var(--text);
}
.section-more {
  font-size: 13px; font-weight: 600; color: var(--accent);
  padding: 6px 16px; border: 1px solid var(--accent-dim);
  border-radius: 50px; transition: all .2s;
}
.section-more:hover { background: var(--accent-dim); color: var(--accent); }

/* ── App Grid ── */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.apps-grid-featured {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* ── App Card ── */
.app-card {
  display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px;
  transition: all .25s; position: relative; overflow: hidden;
}
.app-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(124,106,255,0) 0%, rgba(124,106,255,0.04) 100%);
  opacity: 0; transition: opacity .25s;
}
.app-card:hover { border-color: var(--border-l); transform: translateY(-2px); box-shadow: var(--shadow-l); }
.app-card:hover::before { opacity: 1; }
.app-card-mod { border-color: rgba(124,106,255,0.2); }
.app-card-vpn::before { background: linear-gradient(135deg, rgba(0,212,170,0) 0%, rgba(0,212,170,0.04) 100%); }
.app-card-vpn:hover { border-color: rgba(0,212,170,0.25); }

.app-card-icon { position: relative; width: 64px; height: 64px; margin-bottom: 12px; }
.app-card-icon img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; }
.app-icon-placeholder {
  width: 64px; height: 64px; border-radius: 14px;
  background: var(--accent-dim); border: 1px solid rgba(124,106,255,0.2);
  display: flex; align-items: center; justify-content: center;
}
.app-icon-vpn { background: var(--teal-dim); border-color: rgba(0,212,170,0.2); }

.mod-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 6px;
  border-radius: 6px; letter-spacing: .04em;
}

.app-card-info { flex: 1; }
.app-card-name {
  font-size: 14px; font-weight: 600; color: var(--text);
  margin-bottom: 4px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.app-card-category {
  font-size: 11px; color: var(--text-3); text-transform: uppercase;
  letter-spacing: .06em; display: block; margin-bottom: 8px;
}
.app-card-category-vpn { color: var(--teal); }
.app-card-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.app-downloads { font-size: 12px; color: var(--text-3); }

.app-card-action { margin-top: auto; }
.btn-dl-mini {
  display: block; text-align: center;
  background: var(--accent-dim); border: 1px solid rgba(124,106,255,0.25);
  color: var(--accent); padding: 7px; border-radius: var(--r-sm);
  font-size: 12px; font-weight: 700; letter-spacing: .06em;
  transition: all .2s;
}
.app-card:hover .btn-dl-mini {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.btn-dl-mini-vpn {
  background: var(--teal-dim); border-color: rgba(0,212,170,0.25); color: var(--teal);
}
.app-card:hover .btn-dl-mini-vpn {
  background: var(--teal); color: #fff; border-color: var(--teal);
}

/* ── Rating Stars ── */
.app-rating { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); }
.star { display: inline-block; width: 12px; height: 12px; position: relative; }
.star-full::before { content: ''; display: block; width: 0; height: 0; border-style: solid;
  border-width: 0 5px 10px 5px; /* simple triangle as star */
  /* Use clip-path for actual star */
  width: 12px; height: 12px;
  background: var(--warn);
  clip-path: polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);
}
.star-half::before { content: ''; display: block; width: 12px; height: 12px;
  background: linear-gradient(90deg, var(--warn) 50%, var(--text-4) 50%);
  clip-path: polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);
}
.star-empty::before { content: ''; display: block; width: 12px; height: 12px;
  background: var(--text-4);
  clip-path: polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);
}

/* ── Page Hero ── */
.page-hero {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(124,106,255,0.06) 0%, transparent 70%);
}
.page-hero h1 { font-size: 32px; font-weight: 800; margin: 12px 0 10px; }
.page-hero p { color: var(--text-2); }

/* ── Breadcrumb ── */
.breadcrumb ol { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.breadcrumb li { font-size: 13px; color: var(--text-3); }
.breadcrumb li::after { content: '/'; margin-left: 8px; }
.breadcrumb li:last-child::after { content: ''; }
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-section { padding: 20px 0; }

/* ── App Hero ── */
.app-hero {
  padding: 40px 0;
  background: radial-gradient(ellipse 60% 60% at 20% 50%, rgba(124,106,255,0.06) 0%, transparent 70%);
  border-bottom: 1px solid var(--border);
}
.app-hero-inner {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 28px; align-items: start;
}
.app-hero-icon { position: relative; flex-shrink: 0; }
.app-hero-icon img { width: 96px; height: 96px; border-radius: 20px; object-fit: cover; box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
.app-icon-lg-placeholder {
  width: 96px; height: 96px; border-radius: 20px;
  background: var(--accent-dim); border: 2px solid rgba(124,106,255,0.2);
  display: flex; align-items: center; justify-content: center;
}
.mod-badge-lg {
  position: absolute; bottom: -6px; right: -6px;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 8px;
  border-radius: 8px;
}

.app-hero-badges { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.cat-badge {
  background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(124,106,255,0.25);
  padding: 3px 10px; border-radius: 50px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
}
.cat-badge-vpn { background: var(--teal-dim); color: var(--teal); border-color: rgba(0,212,170,0.25); }
.mod-badge-inline {
  background: rgba(124,106,255,0.15); color: var(--accent);
  border: 1px solid rgba(124,106,255,0.3);
  padding: 3px 10px; border-radius: 50px; font-size: 11px; font-weight: 600;
}
.app-hero-title { font-size: clamp(22px, 3vw, 28px); font-weight: 800; line-height: 1.2; margin-bottom: 6px; }
.app-hero-sub { color: var(--text-3); font-size: 14px; margin-bottom: 14px; }
.app-hero-rating { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.stars-row { display: flex; gap: 3px; }
.rating-val { font-size: 16px; font-weight: 700; }
.rating-cnt { font-size: 13px; color: var(--text-3); }
.app-hero-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.stat-chip {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 6px 12px; border-radius: var(--r-sm);
  font-size: 13px; color: var(--text-2);
}

/* ── Download Button ── */
.app-hero-cta { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.btn-download {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, var(--accent), #5e4fff);
  color: #fff; padding: 16px 28px; border-radius: var(--r-lg);
  font-size: 15px; font-weight: 700;
  transition: all .25s; box-shadow: 0 4px 24px rgba(124,106,255,0.35);
  white-space: nowrap;
}
.btn-download:hover { transform: translateY(-2px); box-shadow: 0 8px 40px rgba(124,106,255,0.5); background: linear-gradient(135deg, var(--accent-h), #7060ff); }
.btn-download:active { transform: translateY(0); }
.btn-download-ready {
  background: linear-gradient(135deg, var(--success), #00a066) !important;
  box-shadow: 0 4px 24px rgba(0,200,120,0.3) !important;
}
.btn-download-text { text-align: left; }
.btn-main-text { display: block; font-size: 16px; font-weight: 700; }
.btn-sub-text { display: block; font-size: 12px; font-weight: 400; opacity: .8; }
.download-info {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--teal);
}
.app-file-info {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-3); font-family: monospace;
}

/* ── App Content ── */
.app-content-section { padding: 48px 0; }
.app-content-grid { display: grid; grid-template-columns: 1fr 320px; gap: 28px; }
.content-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
}
.mt-24 { margin-top: 24px; }
.card-title { font-size: 17px; font-weight: 700; padding: 20px 24px; border-bottom: 1px solid var(--border); }

/* ── Tabs ── */
.content-tabs { display: flex; border-bottom: 1px solid var(--border); }
.tab-btn {
  padding: 14px 24px; font-size: 14px; font-weight: 600;
  color: var(--text-3); border-bottom: 2px solid transparent;
  transition: all .2s; margin-bottom: -1px;
}
.tab-btn.tab-active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-content { display: none; padding: 24px; }
.tab-content.tab-active { display: block; }
.app-description { font-size: 15px; line-height: 1.75; color: var(--text-2); white-space: pre-line; }

/* ── Details Table ── */
.details-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.details-table tr { border-bottom: 1px solid var(--border); }
.details-table tr:last-child { border-bottom: none; }
.details-table th { width: 40%; padding: 12px 0; color: var(--text-3); font-weight: 500; text-align: left; }
.details-table td { padding: 12px 0; color: var(--text); text-align: right; }
.details-table a { color: var(--accent); }

/* ── Install Steps ── */
.install-steps { padding: 20px 24px; counter-reset: step; }
.install-steps li {
  padding: 12px 0 12px 40px; position: relative;
  font-size: 14px; color: var(--text-2);
  border-bottom: 1px solid var(--border);
  counter-increment: step;
}
.install-steps li:last-child { border-bottom: none; }
.install-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 10px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-dim); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}

/* ── Related Apps ── */
.related-list { padding: 8px 16px; }
.related-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 8px; border-radius: var(--r-sm);
  transition: background .2s;
}
.related-item:hover { background: var(--bg-card-h); }
.related-icon { flex-shrink: 0; }
.related-icon img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.app-icon-sm-placeholder {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--accent-dim); display: flex; align-items: center; justify-content: center;
}
.related-info { flex: 1; }
.related-name { display: block; font-size: 13px; font-weight: 600; }
.related-cat { font-size: 11px; color: var(--text-3); }

/* ── TG Promo ── */
.tg-promo-card { background: linear-gradient(135deg, rgba(42,171,238,0.08), rgba(42,171,238,0.04)) !important; border-color: rgba(42,171,238,0.15) !important; }
.tg-promo-inner { padding: 24px; text-align: center; }
.tg-promo-inner h4 { font-size: 16px; font-weight: 700; margin: 12px 0 8px; }
.tg-promo-inner p { font-size: 13px; color: var(--text-2); margin-bottom: 16px; }
.btn-tg {
  display: inline-flex; align-items: center; gap: 8px;
  background: #2AABEE; color: #fff; padding: 10px 20px;
  border-radius: 50px; font-size: 14px; font-weight: 700;
  transition: all .2s;
}
.btn-tg:hover { background: #1c9fd9; color: #fff; }

/* ── SEO Section ── */
.seo-section { padding: 48px 0; border-top: 1px solid var(--border); }
.seo-block h2 { font-size: 20px; font-weight: 700; margin-bottom: 16px; }
.seo-content p { font-size: 14px; color: var(--text-2); margin-bottom: 12px; line-height: 1.75; }
.seo-content strong { color: var(--text); }

/* ── Search Page ── */
.search-big { display: flex; gap: 12px; margin-top: 20px; }
.search-big input {
  flex: 1; background: var(--bg-card); border: 2px solid var(--border);
  border-radius: var(--r-lg); padding: 14px 20px;
  font-size: 16px; color: var(--text); outline: none;
  transition: border-color .2s;
}
.search-big input:focus { border-color: var(--accent); }
.search-big input::placeholder { color: var(--text-3); }
.search-big button {
  background: var(--accent); color: #fff; padding: 14px 28px;
  border-radius: var(--r-lg); font-size: 15px; font-weight: 700;
  transition: background .2s;
}
.search-big button:hover { background: var(--accent-h); }
.results-count { margin-bottom: 24px; color: var(--text-2); font-size: 14px; }
.results-count strong { color: var(--text); }

/* ── Pagination ── */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.page-btn {
  min-width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-sm); font-size: 14px; font-weight: 500;
  transition: all .2s;
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-active { background: var(--accent); border-color: var(--accent); color: #fff !important; }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 80px 20px; color: var(--text-3); }

/* ── Footer ── */
.site-footer {
  background: var(--bg-dark); border-top: 1px solid var(--border);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}
.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p { font-size: 13px; color: var(--text-3); line-height: 1.65; }
.footer-links h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: 14px; }
.footer-links ul li { margin-bottom: 10px; }
.footer-links ul a { font-size: 14px; color: var(--text-2); transition: color .2s; }
.footer-links ul a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; }
.footer-bottom p { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.footer-disclaimer { font-style: italic; }

/* ═══════════════════════════════════
   ADMIN PANEL
═══════════════════════════════════ */
.admin-body { background: #080810; }
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px; flex-shrink: 0; background: var(--bg-card);
  border-right: 1px solid var(--border); position: fixed;
  top: 0; left: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.admin-sidebar-logo { padding: 20px; border-bottom: 1px solid var(--border); }
.admin-nav { padding: 12px 0; flex: 1; }
.admin-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; font-size: 14px; font-weight: 500;
  color: var(--text-2); transition: all .2s; border-radius: 0;
}
.admin-nav-item:hover { background: rgba(124,106,255,0.08); color: var(--text); }
.admin-nav-item.active { background: var(--accent-dim); color: var(--accent); border-right: 2px solid var(--accent); }
.admin-nav-sep { height: 1px; background: var(--border); margin: 8px 12px; }
.admin-main { flex: 1; margin-left: 240px; padding: 32px; min-height: 100vh; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.admin-title { font-size: 24px; font-weight: 800; }

.admin-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px; margin-bottom: 24px;
}
.admin-card-title {
  font-size: 16px; font-weight: 700; margin-bottom: 20px;
  padding-bottom: 14px; border-bottom: 1px solid var(--border);
}

.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th {
  padding: 10px 14px; text-align: left; font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: .06em; color: var(--text-3);
  border-bottom: 2px solid var(--border);
}
.admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text-2); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }
.admin-table .app-icon-sm img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }

/* Admin Forms */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.form-hint { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.form-input, .form-select, .form-textarea {
  width: 100%; background: var(--bg); border: 2px solid var(--border);
  border-radius: var(--r-sm); padding: 10px 14px;
  font-size: 14px; color: var(--text); outline: none;
  transition: border-color .2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent); }
.form-textarea { min-height: 120px; resize: vertical; }
.form-select { cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-check input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.form-check span { font-size: 14px; color: var(--text-2); }

.btn-primary {
  background: var(--accent); color: #fff;
  padding: 10px 24px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 700; transition: background .2s;
}
.btn-primary:hover { background: var(--accent-h); }
.btn-secondary {
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text-2); padding: 10px 20px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600; transition: all .2s;
}
.btn-secondary:hover { border-color: var(--border-l); color: var(--text); }
.btn-danger {
  background: rgba(255,79,96,0.12); border: 1px solid rgba(255,79,96,0.25);
  color: var(--danger); padding: 7px 14px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600; transition: all .2s;
}
.btn-danger:hover { background: rgba(255,79,96,0.2); }
.btn-edit {
  background: var(--accent-dim); color: var(--accent);
  border: 1px solid rgba(124,106,255,0.25);
  padding: 7px 14px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600; transition: all .2s;
}
.btn-edit:hover { background: rgba(124,106,255,0.25); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

.alert { padding: 12px 16px; border-radius: var(--r-sm); margin-bottom: 20px; font-size: 14px; }
.alert-success { background: rgba(0,200,120,0.1); border: 1px solid rgba(0,200,120,0.25); color: var(--success); }
.alert-error { background: rgba(255,79,96,0.1); border: 1px solid rgba(255,79,96,0.25); color: var(--danger); }

.admin-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.admin-stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px;
}
.admin-stat-val { font-size: 28px; font-weight: 800; color: var(--accent); }
.admin-stat-lbl { font-size: 12px; color: var(--text-3); margin-top: 4px; text-transform: uppercase; letter-spacing: .06em; }

.icon-upload-area {
  border: 2px dashed var(--border); border-radius: var(--r);
  padding: 24px; text-align: center; cursor: pointer;
  transition: border-color .2s;
}
.icon-upload-area:hover { border-color: var(--accent); }
.icon-preview img { width: 80px; height: 80px; border-radius: var(--r); object-fit: cover; margin: 0 auto 12px; }

/* Login page */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse 50% 50% at 50% 0%, rgba(124,106,255,0.07) 0%, transparent 70%);
}
.login-card {
  width: 100%; max-width: 400px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 40px;
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-title { font-size: 20px; font-weight: 700; text-align: center; margin-bottom: 24px; }
.badge-count {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; border-radius: 50px;
  font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px;
}
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.status-active { background: var(--success); }
.status-inactive { background: var(--text-3); }
.slug-display { font-family: monospace; font-size: 12px; color: var(--accent); }

/* ── Installer ── */
.install-wrap {
  min-height: 100vh; background: var(--bg);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 20px;
}
.install-card {
  width: 100%; max-width: 620px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-xl);
}
.install-card-header { padding: 32px 40px; border-bottom: 1px solid var(--border); }
.install-steps-bar {
  display: flex; gap: 8px; margin-top: 20px;
}
.install-step-dot {
  flex: 1; height: 4px; border-radius: 4px; background: var(--border);
  transition: background .3s;
}
.install-step-dot.done { background: var(--success); }
.install-step-dot.active { background: var(--accent); }
.install-card-body { padding: 32px 40px; }
.install-req-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.install-req-item:last-child { border-bottom: none; }
.req-ok { color: var(--success); font-weight: 600; }
.req-fail { color: var(--danger); font-weight: 600; }
.install-section-title { font-size: 15px; font-weight: 700; margin: 20px 0 14px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .app-content-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .admin-stats-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .header-nav { display: none; }
  .header-nav.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 12px; z-index: 99; }
  .nav-toggle { display: flex; }
  .header-search input { width: 160px; }
  .app-hero-inner { grid-template-columns: 72px 1fr; gap: 16px; }
  .app-hero-cta { grid-column: 1 / -1; align-items: stretch; }
  .btn-download { justify-content: center; }
  .apps-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: relative; }
  .admin-main { margin-left: 0; padding: 20px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-stats { flex-direction: column; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--border); }
  .apps-grid { grid-template-columns: 1fr 1fr; }
  .tg-banner-text span { display: none; }
  .admin-stats-row { grid-template-columns: 1fr 1fr; }
}

/* ── 404 Error Page ── */
.error-page { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 200px); padding: 60px 20px; }
.error-container { text-align: center; max-width: 520px; }
.error-icon { margin-bottom: 2rem; }
.error-title { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; margin-bottom: 1rem; }
.error-text { color: var(--text-muted, #888); font-size: 1rem; line-height: 1.7; margin-bottom: 2rem; }
.error-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Settings tabs ── */
.settings-tabs { display: flex; gap: .5rem; margin-bottom: 1.5rem; background: var(--bg-card, #111120); border-radius: 10px; padding: .4rem; }
.stab { flex: 1; padding: .6rem 1rem; border-radius: 8px; border: none; background: transparent; color: var(--text-muted, #888); font-weight: 500; cursor: pointer; font-size: .9rem; font-family: inherit; transition: all .2s; }
.stab.active { background: var(--accent, #7c6aff); color: #fff; }
.stab:hover:not(.active) { color: var(--text, #e2e2f0); }
.stab-content { display: none; }
.stab-content.active { display: block; }

/* ── Alert messages ── */
.alert { padding: 1rem 1.25rem; border-radius: 10px; margin-bottom: 1.5rem; font-size: .9rem; }
.alert-success { background: rgba(0,212,170,.1); border: 1px solid rgba(0,212,170,.3); color: #00d4aa; }
.alert-error   { background: rgba(255,85,119,.1); border: 1px solid rgba(255,85,119,.3); color: #ff5577; }

/* ── Redirect table extras ── */
.row-inactive td { opacity: .5; }
.badge { display: inline-block; padding: .2rem .55rem; border-radius: 5px; font-size: .78rem; font-weight: 600; }
.badge-purple   { background: rgba(124,106,255,.15); color: #7c6aff; }
.badge-teal     { background: rgba(0,212,170,.15);   color: #00d4aa; }
.badge-success  { background: rgba(0,212,170,.15);   color: #00d4aa; }
.badge-inactive { background: rgba(255,255,255,.05); color: #888; }

/* ── Admin card section title ── */
.card-section-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 1.25rem; padding-bottom: .75rem; border-bottom: 1px solid var(--border, #1e1e35); }

/* ── Btn secondary ── */
.btn-secondary { display: inline-flex; align-items: center; gap: .4rem; padding: .65rem 1.25rem; border-radius: 8px; background: transparent; border: 1.5px solid var(--border, #1e1e35); color: var(--text, #e2e2f0); font-size: .9rem; font-weight: 500; text-decoration: none; cursor: pointer; font-family: inherit; transition: border-color .2s; }
.btn-secondary:hover { border-color: var(--accent, #7c6aff); color: var(--accent, #7c6aff); }

/* ── App description HTML content ── */
.app-description h2,
.app-description h3 { font-size: 1.05rem; font-weight: 700; margin: 1.5rem 0 .6rem; color: var(--text); }
.app-description h3 { font-size: .95rem; color: var(--text-2, #c8c8e0); }
.app-description p  { margin: 0 0 .9rem; line-height: 1.75; color: var(--text-2, #c8c8e0); }
.app-description ul,
.app-description ol  { margin: 0 0 .9rem 1.4rem; color: var(--text-2, #c8c8e0); }
.app-description li  { margin-bottom: .35rem; line-height: 1.65; }
.app-description strong { color: var(--text); font-weight: 600; }
.app-description a   { color: var(--accent, #7c6aff); text-decoration: none; }
.app-description a:hover { text-decoration: underline; }

/* ── SEO section ── */
.seo-section { padding: 60px 0; border-top: 1px solid var(--border, #1e1e35); }
.seo-block   { max-width: 900px; }
.seo-block h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 1.5rem; }
.seo-content h3 { font-size: 1rem; font-weight: 700; margin: 1.75rem 0 .65rem; color: var(--text); }
.seo-content p  { margin: 0 0 1rem; line-height: 1.8; color: var(--text-2, #aaa8c8); font-size: .93rem; }
.seo-content strong { color: var(--text); }
.seo-content a  { color: var(--accent, #7c6aff); text-decoration: none; }
.seo-content a:hover { text-decoration: underline; }

/* ── SVG Stars ── */
.stars-svg { display: inline-flex; gap: 2px; align-items: center; }
.stars-svg svg { flex-shrink: 0; }

/* ── Vote block ── */
.vote-block {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--border, #1e1e35);
}
.vote-label { font-size: .8rem; color: var(--text-3, #666680); white-space: nowrap; }
.vote-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px; border: 1.5px solid var(--border, #1e1e35);
  background: transparent; color: var(--text-2, #a0a0c0); font-size: .85rem;
  font-weight: 600; cursor: pointer; font-family: inherit; transition: all .2s;
}
.vote-btn:hover:not(:disabled) { border-color: var(--accent, #7c6aff); color: var(--text); }
.vote-btn:disabled { cursor: default; opacity: .7; }
.vote-btn.vote-active.vote-like    { border-color: #00d4aa; color: #00d4aa; background: rgba(0,212,170,.08); }
.vote-btn.vote-active.vote-dislike { border-color: #ff5577; color: #ff5577; background: rgba(255,85,119,.08); }
.vote-like:hover:not(:disabled)    { border-color: #00d4aa !important; color: #00d4aa !important; }
.vote-dislike:hover:not(:disabled) { border-color: #ff5577 !important; color: #ff5577 !important; }

/* ── Download button disabled/countdown state ── */
.btn-download:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none !important;
}
.btn-download:disabled .btn-sub-text {
  color: #ffaa20;
  font-weight: 600;
}
