/* ─── Variables ────────────────────────────────────────────────────────────── */
:root {
  --bg: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-card: #ffffff;
  --bg-hover: #f0f0f5;
  --border: #e5e5ea;
  --border-light: #f0f0f0;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-muted: #86868b;
  --accent: #444b8c;
  --accent-hover: #26264f;
  --accent-light: #eae8f4;
  --green: #34c759;
  --orange: #f36f56;
  --red: #ff3b30;
  --yellow: #ffc444;
  --pink: #ff9085;
  --pink-dark: #fb6fbb;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --transition: 0.15s ease;
}

[data-theme="dark"] {
  --bg: #0a0a0f;
  --bg-secondary: #1c1c24;
  --bg-card: #1c1c24;
  --bg-hover: #2c2c36;
  --border: #38383f;
  --border-light: #2c2c34;
  --text: #f5f5f7;
  --text-secondary: #aeaeb2;
  --text-muted: #8e8e93;
  --accent: #6b72b8;
  --accent-hover: #8b90d0;
  --accent-light: #1a1840;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,.4);
}

/* ─── Accessibility ────────────────────────────────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ─── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; }
body > .site-footer { flex-shrink: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; }

/* ─── Layout ───────────────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }

/* ─── Site Header ──────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex; align-items: center; gap: 16px;
  height: 56px;
}
.header-logo { display: flex; align-items: center; flex-shrink: 0; }
.header-logo img { height: 28px; }
.header-search-form {
  flex: 1; max-width: 520px;
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 0 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.header-search-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
  background: var(--bg-card);
}
.header-search-form svg { color: var(--text-muted); flex-shrink: 0; }
.header-search-form input {
  flex: 1; padding: 8px 0; background: none;
  border: none; outline: none; font-size: .9rem; color: var(--text);
}
.header-search-form input::placeholder { color: var(--text-muted); }
.theme-toggle-header {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg-secondary); border: 1px solid var(--border);
  color: var(--text-secondary); transition: background var(--transition);
  margin-left: auto;
}
.theme-toggle-header:hover { background: var(--bg-hover); }

/* ─── Go Top Button ────────────────────────────────────────────────────────── */
.go-top-btn {
  position: fixed; bottom: 32px; right: 32px; z-index: 200;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: white;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(68,75,140,.35), var(--shadow-md);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background var(--transition);
}
.go-top-btn.visible { opacity: 1; pointer-events: auto; }
.go-top-btn:hover { background: var(--accent-hover); transform: translateY(-2px); }

/* ─── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 56px;
  background: linear-gradient(150deg, #f5f3ff 0%, #ede9fe 35%, #e0f2fe 70%, #f0fdf4 100%);
  border-bottom: 1px solid #ddd6fe;
}
[data-theme="dark"] .hero {
  background: linear-gradient(150deg, #0f0e1a 0%, #130f23 40%, #0d1525 70%, #0a1a0f 100%);
  border-bottom-color: #2a2440;
}
.hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; }

/* Top badge */
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 18px; border-radius: 999px;
  background: white; border: 1.5px solid #ddd6fe;
  font-size: .8rem; font-weight: 600; color: var(--accent);
  box-shadow: 0 2px 8px rgba(139,92,246,.1);
}
[data-theme="dark"] .hero-badge { background: #1e1a35; border-color: #4c3d8a; }

/* Hero logo */
.hero-logo-link { display: inline-flex; }
.hero-logo { height: 64px; }
@media (max-width: 600px) { .hero-logo { height: 48px; } }

/* Title */
.hero-title {
  font-size: clamp(1.75rem, 3.75vw, 2.75rem);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.1;
  color: var(--text);
  white-space: nowrap;
  text-shadow: 0 2px 12px rgba(0,0,0,0.10);
}
.hero-title-highlight {
  position: relative; display: inline-block;
  background: rgba(167, 139, 250, 0.3);
  padding: 0 0.1em;
  line-height: 1.0;
  white-space: nowrap;
}
[data-theme="dark"] .hero-title-highlight {
  background: rgba(167, 139, 250, 0.25);
}

/* Subtitle */
.hero-subtitle {
  font-size: 1.05rem; color: var(--text-secondary);
  max-width: 580px; line-height: 1.7;
}

/* Pills */
.hero-pills { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 999px;
  background: white; border: 1.5px solid #ddd6fe;
  font-size: .8rem; font-weight: 600; color: var(--accent);
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
}
[data-theme="dark"] .hero-pill { background: #1e1a35; border-color: #4c3d8a; }
a.hero-pill:hover { background: var(--accent); color: white; border-color: var(--accent); }

/* AI Prompt Module */
.ai-prompt-module {
  width: 100%; max-width: 640px;
  background: white;
  border: 1.5px solid #ddd6fe;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(139,92,246,.12), 0 2px 8px rgba(0,0,0,.05);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
[data-theme="dark"] .ai-prompt-module { background: #1a1730; border-color: #3d3360; }
.ai-prompt-module:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(139,92,246,.15), 0 8px 32px rgba(139,92,246,.15);
}
.ai-prompt-inner { padding: 18px 20px 14px; }
.ai-prompt-textarea {
  width: 100%; resize: none;
  background: none; border: none; outline: none;
  font-size: .975rem; color: var(--text); line-height: 1.6;
  font-family: var(--font);
  min-height: 48px;
}
.ai-prompt-textarea::placeholder { color: var(--text-muted); }
.ai-prompt-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--border-light);
}
.ai-prompt-hint {
  display: flex; align-items: center; gap: 6px;
  font-size: .75rem; color: var(--text-muted);
}
.ai-prompt-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: white;
  border: none; cursor: pointer; flex-shrink: 0;
  transition: background var(--transition), transform var(--transition);
}
.ai-prompt-btn:hover { background: var(--accent-hover); transform: scale(1.05); }
.ai-prompt-btn:disabled { background: var(--text-muted); cursor: not-allowed; transform: none; }

/* AI Results */
.ai-results-section { padding: 32px 0; background: var(--bg-secondary); border-bottom: 1px solid var(--border); }
.ai-results-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.ai-results-message { font-size: .95rem; font-weight: 600; color: var(--text); }
.ai-results-close {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-secondary);
  cursor: pointer; transition: background var(--transition);
}
.ai-results-close:hover { background: var(--bg-hover); }

/* Stats */
.hero-stats { display: flex; align-items: center; justify-content: center; gap: 16px; font-size: .875rem; color: var(--text-muted); }
.hero-stats strong { color: var(--text); }
.separator { color: var(--border); }

/* Search form (used in header/search page) */
.search-form {
  display: flex; align-items: center;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light), var(--shadow-md); }
.search-form input { flex: 1; padding: 14px 20px; background: none; border: none; outline: none; font-size: 1rem; color: var(--text); }
.search-form button { padding: 12px 18px; color: var(--text-secondary); transition: color var(--transition); }
.search-form button:hover { color: var(--accent); }

/* ─── Filter Bar ───────────────────────────────────────────────────────────── */
.filter-bar {
  padding: 12px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 90;
}
.filter-pills { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.pill {
  padding: 6px 16px; border-radius: 999px; font-size: .875rem; font-weight: 500;
  background: var(--bg-secondary); color: var(--text-secondary);
  border: 1px solid var(--border);
  white-space: nowrap; transition: all var(--transition);
}
.pill:hover { background: var(--bg-hover); color: var(--text); }
.pill.active { background: var(--accent); color: white; border-color: var(--accent); }

/* ─── A-Z Letter Bar ───────────────────────────────────────────────────────── */
.letter-bar { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; flex-wrap: wrap; }
.letter-pill {
  padding: 4px 8px; border-radius: 6px; font-size: .8rem; font-weight: 600;
  background: var(--bg-secondary); color: var(--text-secondary);
  border: 1px solid var(--border);
  white-space: nowrap; transition: all var(--transition); cursor: pointer;
  display: inline-flex; align-items: center; gap: 3px;
}
.letter-pill:hover { background: var(--bg-hover); color: var(--text); }
.letter-pill.active { background: var(--accent); color: white; border-color: var(--accent); }
.letter-count { font-size: .65rem; opacity: .7; font-weight: 400; }
.letter-pill.active .letter-count { opacity: .9; }
@media (max-width: 768px) {
  .letter-bar { flex-wrap: nowrap; }
  .letter-pill { padding: 4px 6px; font-size: .75rem; }
}

/* ─── Trending ─────────────────────────────────────────────────────────────── */
.trending-section { padding: 32px 0; border-bottom: 1px solid var(--border); }
.section-header { margin-bottom: 20px; }
.section-header h2 { font-size: 1.25rem; font-weight: 600; }
.section-subtitle { font-size: .875rem; color: var(--text-muted); margin-top: 4px; }
.trending-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.trending-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
  width: 200px; min-width: 200px; max-width: 200px; flex-shrink: 0;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.trending-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.trending-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.trending-info .app-name {
  font-size: .875rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.trending-info .pricing-badge { align-self: flex-start; width: fit-content; }

/* ─── Categories Section ───────────────────────────────────────────────────── */
.categories-section { padding: 24px 0 16px; }
.section-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 28px; }
.categories-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 768px) { .categories-grid { grid-template-columns: 1fr; } }

.category-block { }
.category-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.category-meta { display: flex; align-items: center; gap: 8px; }
.category-icon { font-size: 1.25rem; }
.category-name { font-size: 1.05rem; font-weight: 600; }
.category-count {
  font-size: .75rem; font-weight: 600; color: var(--text-muted);
  background: var(--bg-secondary); padding: 2px 8px; border-radius: 999px;
}
.see-all { font-size: .875rem; color: var(--accent); font-weight: 500; }
.see-all:hover { text-decoration: underline; }

/* ─── App Card ─────────────────────────────────────────────────────────────── */
.apps-grid { display: flex; flex-direction: column; gap: 8px; }
.app-card {
  display: flex; align-items: center; gap: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.app-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.app-card-link {
  display: flex; align-items: center; gap: 12px;
  flex: 1; padding: 12px 14px; min-width: 0;
}
.app-logo { width: 48px; height: 48px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--bg-secondary); }
.app-logo img { width: 100%; height: 100%; object-fit: cover; }
.app-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.app-title-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.app-name {
  font-size: .9rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex-shrink: 1; min-width: 0;
}
.app-badges { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; flex-shrink: 0; }
.app-desc { font-size: .8rem; color: var(--text-secondary); margin-top: 2px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.app-tags { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }

.visit-btn {
  padding: 8px 14px; margin: 0 12px;
  border-radius: var(--radius-sm); font-size: .8rem; font-weight: 600;
  background: #F1F1F1; color: var(--accent);
  white-space: nowrap; transition: background var(--transition), color var(--transition);
  flex-shrink: 0; align-self: center;
}
.visit-btn:hover { background: var(--accent); color: white; }
[data-theme="dark"] .visit-btn { background: #2c2c36; color: #F1F1F1; }
[data-theme="dark"] .visit-btn:hover { background: var(--accent); color: white; }

/* 2-column grid for category/search pages */
.apps-grid-2col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
@media (max-width: 768px) { .apps-grid-2col { grid-template-columns: 1fr; } }

/* Rating badge */
.rating-badge {
  font-size: .7rem; font-weight: 600; padding: 2px 7px; border-radius: 999px;
  background: #fef9c3; color: #854d0e; flex-shrink: 0;
}
[data-theme="dark"] .rating-badge { background: #422006; color: #fde68a; }

/* ─── Logo Avatar ──────────────────────────────────────────────────────────── */
.logo-avatar {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; color: white;
  border-radius: inherit;
}
.logo-avatar-lg { font-size: 2rem; border-radius: var(--radius); }
.logo-avatar-sm { font-size: .75rem; }

/* ─── Pricing Badges ───────────────────────────────────────────────────────── */
.pricing-badge {
  font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .04em; flex-shrink: 0;
}
.pricing-badge.free { background: #dcfce7; color: #166534; }
.pricing-badge.freemium { background: #fef3c7; color: #92400e; }
.pricing-badge.paid { background: #fee2e2; color: #991b1b; }
[data-theme="dark"] .pricing-badge.free { background: #14532d; color: #86efac; }
[data-theme="dark"] .pricing-badge.freemium { background: #451a03; color: #fcd34d; }
[data-theme="dark"] .pricing-badge.paid { background: #450a0a; color: #fca5a5; }

.tag {
  font-size: .7rem; padding: 2px 6px; border-radius: 4px;
  background: var(--bg-secondary); color: var(--text-muted);
  border: 1px solid var(--border);
}
.tag.api-tag, .tag.os-tag {
  font-size: .65rem; font-weight: 600; padding: 1px 6px;
  background: var(--bg-secondary); color: var(--text-muted);
  flex-shrink: 0;
}
.app-tags:empty { display: none; }

/* ─── Page Hero ────────────────────────────────────────────────────────────── */
.page-hero { padding: 40px 0 32px; border-bottom: 1px solid var(--border); }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--text-muted); margin-bottom: 16px; }
.breadcrumb a:hover { color: var(--accent); }
.page-hero-inner { display: flex; align-items: center; gap: 16px; }
.page-icon { font-size: 2.5rem; }
.page-hero-inner h1 { font-size: 2rem; font-weight: 700; display: flex; align-items: baseline; gap: 12px; }
.hero-count { font-size: 1rem; color: var(--text-muted); font-weight: 500; }
.page-subtitle { color: var(--text-secondary); margin-top: 6px; }

/* ─── App Detail Page ──────────────────────────────────────────────────────── */
.app-detail-page { padding: 32px 0 80px; }
.app-header { display: flex; gap: 24px; align-items: flex-start; margin: 24px 0 40px; }
.app-logo-large { width: 96px; height: 96px; border-radius: 20px; overflow: hidden; flex-shrink: 0; background: var(--bg-secondary); box-shadow: var(--shadow-sm); }
.app-logo-large img { width: 100%; height: 100%; object-fit: cover; }
.btn-visit {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm); font-size: .8rem; font-weight: 600;
  background: #ec4899; color: white; white-space: nowrap;
  transition: background var(--transition), transform var(--transition);
}
.btn-visit:hover { background: #db2777; transform: translateY(-1px); }
[data-theme="dark"] .btn-visit { background: #be185d; }
[data-theme="dark"] .btn-visit:hover { background: #ec4899; }
.app-title { font-size: 2rem; font-weight: 700; line-height: 1.2; }
.app-short-desc { color: var(--text-secondary); margin-top: 6px; font-size: 1rem; }
.app-meta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.category-tag { font-size: .8rem; padding: 3px 10px; border-radius: 999px; background: var(--accent-light); color: var(--accent); }
.app-actions { margin-top: 16px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm); font-size: .9rem; font-weight: 600;
  background: var(--accent); color: white; transition: background var(--transition), transform var(--transition);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-full { width: 100%; justify-content: center; }
.btn-secondary { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: var(--radius-sm); font-size: .9rem; font-weight: 600; background: var(--bg-secondary); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-hover); }

.app-detail-body { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }
@media (max-width: 900px) { .app-detail-body { grid-template-columns: 1fr; } }
.detail-section { margin-bottom: 40px; }
.detail-section h2 { font-size: 1.15rem; font-weight: 600; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.app-long-desc { color: var(--text-secondary); line-height: 1.7; white-space: pre-wrap; }
.features-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.features-list li { display: flex; align-items: flex-start; gap: 10px; font-size: .95rem; }
.features-list svg { color: var(--green); flex-shrink: 0; margin-top: 3px; }

/* App title line with rating */
.app-title-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rating-badge-lg { font-size: .85rem; padding: 4px 12px; }

/* Screenshots carousel */
.screenshots-carousel { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--bg-secondary); }
.screenshot-item { display: none; position: relative; }
.screenshot-item.active { display: block; }
.screenshot-item img { width: 100%; height: auto; object-fit: contain; }
.screenshot-zoom-btn {
  position: absolute; top: 10px; right: 10px;
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(0,0,0,.45); color: white;
  opacity: 0; transition: opacity var(--transition);
  cursor: pointer;
}
.screenshot-item:hover .screenshot-zoom-btn { opacity: 1; }
.carousel-dots { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: background var(--transition); }
.dot.active { background: var(--accent); }

/* Screenshot modal */
.screenshot-modal {
  border: none; padding: 0; background: transparent;
  max-width: 100vw; max-height: 100vh; width: 100%; height: 100%;
}
.screenshot-modal::backdrop { background: rgba(0,0,0,.85); }
.screenshot-modal-inner {
  display: flex; align-items: center; justify-content: center;
  width: 100vw; height: 100vh; position: relative;
}
.screenshot-modal-img {
  max-width: 90vw; max-height: 85vh;
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  object-fit: contain;
}
.screenshot-modal-close {
  position: absolute; top: 20px; right: 20px;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.15); color: white;
  cursor: pointer; transition: background var(--transition);
}
.screenshot-modal-close:hover { background: rgba(255,255,255,.3); }
.screenshot-modal-prev, .screenshot-modal-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.15); color: white;
  cursor: pointer; transition: background var(--transition);
}
.screenshot-modal-prev { left: 20px; }
.screenshot-modal-next { right: 20px; }
.screenshot-modal-prev:hover, .screenshot-modal-next:hover { background: rgba(255,255,255,.3); }
.screenshot-modal-counter {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.5); color: white;
  font-size: .8rem; padding: 4px 14px; border-radius: 999px;
}

/* Pros & Cons */
.pros-cons-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.cons-title { margin-top: 20px; }
.pros-tag {
  display: inline-flex; align-items: center;
  padding: 5px 14px; border-radius: 999px; font-size: .82rem;
  background: #f0fdf4; color: #166534;
  border: 1px solid #86efac;
}
.cons-tag {
  display: inline-flex; align-items: center;
  padding: 5px 14px; border-radius: 999px; font-size: .82rem;
  background: #fff1f2; color: #9f1239;
  border: 1px solid #fca5a5;
}
[data-theme="dark"] .pros-tag { background: #052e16; color: #86efac; border-color: #166534; }
[data-theme="dark"] .cons-tag { background: #2d0a0a; color: #fca5a5; border-color: #9f1239; }

/* Sidebar */
.sidebar-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; position: sticky; top: 20px; }
.sidebar-card h3 { font-size: .9rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 16px; }
.info-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.info-list dt { font-size: .8rem; color: var(--text-muted); font-weight: 500; }
.info-list dd { font-size: .9rem; color: var(--text); margin-top: 2px; }
.category-link { color: var(--accent); }
.category-link:hover { text-decoration: underline; }

/* ─── Static Content Pages ─────────────────────────────────────────────────── */
.static-content-section { padding: 32px 0 48px; }
.static-content { max-width: 100%; font-size: 1rem; line-height: 1.8; color: var(--text-secondary); }
.static-content h2 { font-size: 1.5rem; font-weight: 700; color: var(--text); margin: 32px 0 12px; }
.static-content h3 { font-size: 1.2rem; font-weight: 600; color: var(--text); margin: 24px 0 8px; }
.static-content p { margin-bottom: 16px; }
.static-content a { color: var(--accent); }
.static-content a:hover { text-decoration: underline; }
.static-content ul, .static-content ol { margin: 0 0 16px 24px; }
.static-content li { margin-bottom: 6px; }
.static-content strong { color: var(--text); }
.static-content blockquote { border-left: 3px solid var(--accent); padding-left: 16px; margin: 16px 0; color: var(--text-muted); }
.static-content img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 16px 0; }

/* ─── Infinite Scroll ──────────────────────────────────────────────────────── */
.scroll-sentinel { padding: 32px 0; display: flex; justify-content: center; }
.loading-spinner { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: .9rem; }
.spinner { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: 12px;
  background: linear-gradient(160deg, #f5f3ff 0%, #ede9fe 40%, #f0f4ff 100%);
  border-top: 1px solid #ddd6fe;
  padding: 56px 0 0;
}
[data-theme="dark"] .site-footer {
  background: linear-gradient(160deg, #0f0e1a 0%, #130f23 50%, #0d1020 100%);
  border-top-color: #2a2440;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}
@media (max-width: 1024px) { .footer-grid { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 640px)  { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* Brand col */
.footer-brand-col { display: flex; flex-direction: column; gap: 16px; }
.footer-logo { display: inline-flex; align-items: center; }
.footer-logo img { height: 26px; }
.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }
.footer-tagline { font-size: .82rem; color: var(--text-secondary); line-height: 1.6; max-width: 260px; }
.footer-partners { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-partner-link { text-decoration: none; }
.footer-partner-badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: .75rem; font-weight: 700;
  background: white; color: var(--accent);
  border: 1.5px solid #c4b5fd;
  transition: background var(--transition), color var(--transition);
}
[data-theme="dark"] .footer-partner-badge { background: #1e1a35; border-color: #4c3d8a; }
.footer-partner-link:hover .footer-partner-badge { background: var(--accent); color: white; border-color: var(--accent); }
.footer-socials { display: flex; gap: 8px; }
.footer-social-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: white; border: 1px solid #ddd6fe;
  color: var(--accent); transition: background var(--transition), color var(--transition);
}
[data-theme="dark"] .footer-social-icon { background: #1e1a35; border-color: #3d3360; }
.footer-social-icon:hover { background: var(--accent); color: white; border-color: var(--accent); }

/* Nav cols */
.footer-nav-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col-title {
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-muted);
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: .875rem; color: var(--text-secondary); transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-theme-toggle { margin-top: 8px; }
.theme-toggle-footer {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: white; border: 1px solid #ddd6fe;
  color: var(--text-secondary); font-size: .8rem;
  transition: background var(--transition), color var(--transition);
}
[data-theme="dark"] .theme-toggle-footer { background: #1e1a35; border-color: #3d3360; }
.theme-toggle-footer:hover { background: var(--accent-light); color: var(--accent); }

/* Bottom bar */
.footer-bottom {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 16px 0;
  border-top: 1px solid #ddd6fe;
  font-size: .78rem; color: var(--text-muted);
}
[data-theme="dark"] .footer-bottom { border-top-color: #2a2440; }
.footer-bottom a { color: var(--accent); }
.footer-bottom a:hover { text-decoration: underline; }
.footer-sep { color: #c4b5fd; }
[data-theme="dark"] .footer-sep { color: #4c3d8a; }

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

/* ─── Search results page ──────────────────────────────────────────────────── */
.search-results-section { padding: 32px 0 80px; }
.search-form-page { max-width: 600px; margin: 20px auto 0; }
.search-prompt-module { max-width: 640px; margin: 24px auto 0; }
.turnstile-container { display: flex; justify-content: center; margin-top: 20px; }
.category-apps-section { padding: 32px 0 80px; }

/* ─── Info Banner ──────────────────────────────────────────────────────────── */
.info-banner {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--accent-light); color: var(--accent);
  font-size: .875rem; margin-bottom: 20px;
}

/* ─── Social Links ─────────────────────────────────────────────────────────── */
.social-links {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 12px 0; border-top: 1px solid var(--border); margin-top: 12px;
}
.social-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  color: var(--text-secondary); transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.social-icon:hover { background: var(--accent-light); color: var(--accent); border-color: var(--accent); }

/* ─── Error Page ───────────────────────────────────────────────────────────── */
.error-page {
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  min-height: calc(100vh - 56px - 200px); text-align: center; padding: 80px 24px;
  position: relative; overflow: hidden;
}
.error-page-inner { position: relative; z-index: 1; animation: errorFadeIn 0.6s ease-out; }
.error-code {
  font-size: clamp(8rem, 20vw, 14rem); font-weight: 800; line-height: 1;
  background: linear-gradient(135deg, var(--accent), var(--pink), var(--orange));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; animation: errorFloat 3s ease-in-out infinite;
  margin-bottom: 16px; letter-spacing: -4px;
}
.error-message {
  font-size: clamp(1rem, 2.5vw, 1.25rem); color: var(--text-secondary);
  max-width: 460px; margin: 0 auto 40px; line-height: 1.6;
}
.error-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.error-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px;
  border-radius: var(--radius); font-size: 0.95rem; font-weight: 600;
  text-decoration: none; transition: all var(--transition);
}
.error-btn-primary {
  background: var(--accent); color: #fff;
}
.error-btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.error-btn-secondary {
  background: var(--bg-secondary); color: var(--text); border: 1px solid var(--border);
}
.error-btn-secondary:hover { background: var(--bg-hover); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.error-decoration { position: absolute; inset: 0; pointer-events: none; }
.error-dot {
  position: absolute; border-radius: 50%; opacity: 0.15;
}
.error-dot-1 {
  width: 300px; height: 300px; top: 10%; left: -5%;
  background: var(--accent); animation: errorFloat 4s ease-in-out infinite;
}
.error-dot-2 {
  width: 200px; height: 200px; bottom: 15%; right: -3%;
  background: var(--pink); animation: errorFloat 5s ease-in-out infinite 1s;
}
.error-dot-3 {
  width: 120px; height: 120px; top: 20%; right: 15%;
  background: var(--orange); animation: errorFloat 3.5s ease-in-out infinite 0.5s;
}

@keyframes errorFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}
@keyframes errorFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Listing Application ──────────────────────────────────────────────────── */

/* Step 1: Info page */
.listing-hero { padding: 80px 0 48px; text-align: center; background: linear-gradient(150deg, #f5f3ff 0%, #ede9fe 35%, #e0f2fe 70%, #f0fdf4 100%); border-bottom: 1px solid #ddd6fe; }
[data-theme="dark"] .listing-hero { background: linear-gradient(150deg, #0f0e1a 0%, #130f23 40%, #0d1525 70%, #0a1a0f 100%); border-bottom-color: #2a2440; }
.listing-hero .hero-title { margin-bottom: 16px; }
.listing-hero .hero-subtitle { margin: 0 auto; }

.listing-process { padding: 32px 0 64px; }

/* Flow chart */
.flow-chart { display: flex; align-items: stretch; justify-content: center; gap: 0; margin-bottom: 48px; }

.flow-card { position: relative; flex: 0 0 260px; max-width: 260px; padding: 28px 24px 24px; border-radius: 16px; background: var(--bg-card); border: 1.5px solid var(--border); transition: transform .2s, box-shadow .2s; }
.flow-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.flow-card--accent { border-color: var(--accent); }
.flow-card--yellow { border-color: var(--yellow); }
.flow-card--green  { border-color: var(--green); }

.flow-card__header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.flow-card__icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.flow-card--accent .flow-card__icon { background: var(--accent-light); color: var(--accent); }
.flow-card--yellow .flow-card__icon { background: rgba(255,196,68,.12); color: var(--yellow); }
.flow-card--green  .flow-card__icon { background: rgba(52,199,89,.12); color: var(--green); }
[data-theme="dark"] .flow-card--accent .flow-card__icon { background: rgba(68,75,140,.2); }
[data-theme="dark"] .flow-card--yellow .flow-card__icon { background: rgba(255,196,68,.15); }
[data-theme="dark"] .flow-card--green  .flow-card__icon { background: rgba(52,199,89,.15); }

.flow-card__title { font-size: 1.1rem; font-weight: 700; margin: 0; }
.flow-card__desc { font-size: .85rem; color: var(--text-secondary); line-height: 1.55; }

.flow-card__badge { position: absolute; top: 14px; right: 14px; padding: 2px 10px; border-radius: 4px; font-size: .65rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.flow-card__badge--live { background: var(--green); color: #fff; }
.flow-card__badge--soon { background: var(--text-muted); color: #fff; }

/* Connectors */
.flow-connector { display: flex; align-items: center; width: 80px; flex-shrink: 0; padding: 0; }
.flow-connector svg { width: 80px; height: 24px; display: block; }

.listing-info-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 20px 28px; max-width: 640px; margin: 0 auto 32px; text-align: center; color: var(--text-secondary); font-size: .95rem; line-height: 1.6; }
.listing-cta { text-align: center; }

/* Step 2: Form page */
.listing-form-section { padding: 40px 0 64px; }
.listing-form-section h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 6px; }
.listing-form-subtitle { color: var(--text-secondary); margin-bottom: 32px; }

.form-grid { display: grid; grid-template-columns: 1fr 340px; gap: 40px; }
.form-main, .form-sidebar { display: flex; flex-direction: column; gap: 20px; }

.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-weight: 600; font-size: .9rem; }
.form-hint { font-size: .78rem; color: var(--text-tertiary); }
.required { color: var(--danger, #e53e3e); }
.char-count { font-size: .75rem; color: var(--text-tertiary); text-align: right; }

.listing-form input[type="text"],
.listing-form input[type="url"],
.listing-form input[type="email"],
.listing-form textarea {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .9rem;
  background: var(--bg-card);
  color: var(--text-primary);
  transition: border-color .15s;
  height: auto;
  line-height: 1.4;
}
.listing-form input[type="text"],
.listing-form input[type="url"],
.listing-form input[type="email"] {
  height: 44px;
}
.listing-form input::placeholder,
.listing-form textarea::placeholder { color: #9ca3af !important; font-style: italic; opacity: 1; }
.listing-form .ql-editor.ql-blank::before { color: #9ca3af !important; font-style: italic !important; }
.listing-form input:focus,
.listing-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(68,75,140,.12);
}

/* Dynamic list items */
.dynamic-list { display: flex; flex-direction: column; gap: 6px; }
.dynamic-item { display: flex; gap: 6px; align-items: center; }
.dynamic-item input { flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: .85rem; background: var(--bg-card); color: var(--text-primary); }
.dynamic-item input:focus { outline: none; border-color: var(--accent); }
.btn-icon { background: none; border: none; cursor: pointer; color: var(--text-tertiary); padding: 4px; border-radius: 4px; display: flex; }
.btn-icon:hover { color: var(--danger, #e53e3e); background: rgba(229,62,62,.08); }

/* Upload zones */
.upload-zone { border: 2px dashed var(--border); border-radius: 12px; padding: 24px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--accent); background: rgba(68,75,140,.04); }
.upload-placeholder { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-tertiary); font-size: .85rem; }
.upload-preview { max-width: 120px; max-height: 120px; border-radius: 8px; object-fit: contain; margin: 0 auto; display: block; }

.upload-zone-sm { width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; padding: 0; color: var(--text-tertiary); }
.screenshot-zones { display: flex; flex-wrap: wrap; gap: 8px; }
.screenshot-thumb { position: relative; width: 80px; height: 80px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.screenshot-thumb img { width: 100%; height: 100%; object-fit: cover; }
.btn-remove-screenshot { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,.6); color: #fff; border: none; border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }

/* Pill selectors */
.pill-group { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { padding: 6px 14px; border: 1px solid var(--border); border-radius: 20px; background: var(--bg-card); color: var(--text-secondary); font-size: .82rem; cursor: pointer; transition: all .15s; }
.pill:hover { border-color: var(--accent); color: var(--accent); }
.pill.selected { background: var(--accent); color: #fff; border-color: var(--accent); }
.pill-sm { padding: 4px 10px; font-size: .78rem; }

/* Checkbox */
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.form-divider { border: none; border-top: 1px solid var(--border); margin: 8px 0; }

/* Two-column row inside form */
.form-row-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Quill wrapper */
#quillEditorWrap { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
#quillEditorWrap .ql-toolbar { border: none; border-bottom: 1px solid var(--border); background: var(--bg-page); }
#quillEditorWrap .ql-container { border: none; font-size: .9rem; }
#quillEditorWrap .ql-editor { min-height: 160px; color: var(--text-primary); }
#quillEditorWrap .ql-editor.ql-blank::before { color: var(--text-tertiary); font-style: normal; }

/* Form actions */
.form-actions { display: flex; justify-content: flex-start; gap: 12px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 20px; border-radius: 8px; font-size: .9rem; font-weight: 600; cursor: pointer; border: none; transition: all .15s; text-decoration: none; height: 44px; box-sizing: border-box; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { opacity: .9; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-primary); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 14px 32px; font-size: 1rem; height: 48px; }
.btn-sm { padding: 6px 14px; font-size: .82rem; border-radius: 6px; }
.btn-success { background: #22c55e; color: #fff; border: none; cursor: pointer; }
.btn-success:hover { background: #16a34a; }
.btn-danger { background: #ef4444; color: #fff; border: none; cursor: pointer; }
.btn-danger:hover { background: #dc2626; }

/* Step 3: Status page */
.listing-status-section { padding: 40px 0 64px; }

.status-banner { display: flex; gap: 16px; align-items: flex-start; padding: 24px; border-radius: 12px; margin-bottom: 24px; }
.status-banner.status-pending { background: #fef9c3; border: 1px solid #fde047; color: #854d0e; }
.status-banner.status-approved { background: #dcfce7; border: 1px solid #86efac; color: #166534; }
.status-banner.status-rejected { background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; }
[data-theme="dark"] .status-banner.status-pending { background: rgba(254,249,195,.1); border-color: rgba(253,224,71,.3); color: #fde047; }
[data-theme="dark"] .status-banner.status-approved { background: rgba(220,252,231,.1); border-color: rgba(134,239,172,.3); color: #86efac; }
[data-theme="dark"] .status-banner.status-rejected { background: rgba(254,226,226,.1); border-color: rgba(252,165,165,.3); color: #fca5a5; }
.status-icon { flex-shrink: 0; padding-top: 2px; }
.status-info { flex: 1; }
.status-info p { margin: 8px 0; line-height: 1.5; }

.status-badge, .badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: .8rem; font-weight: 600; }
.badge-pending { background: #fde047; color: #854d0e; }
.badge-approved { background: #86efac; color: #166534; }
.badge-rejected { background: #fca5a5; color: #991b1b; }

.app-url-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; margin-bottom: 32px; }
.app-url-box label { font-weight: 600; font-size: .85rem; display: block; margin-bottom: 8px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-page); color: var(--text-primary); font-size: .85rem; }

/* Listing preview (app detail mirror) */
.listing-preview { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 32px; }
.app-header-row { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 32px; }
.app-logo-lg { width: 80px; height: 80px; border-radius: 16px; object-fit: contain; border: 1px solid var(--border); }
.app-avatar-lg { width: 80px; height: 80px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--accent), #8b5cf6); }
.app-header-info h1 { font-size: 1.5rem; margin-bottom: 6px; }
.app-short-desc { color: var(--text-secondary); margin-bottom: 10px; }
.app-meta-row { display: flex; flex-wrap: wrap; gap: 6px; }

.badge-free { background: #dcfce7; color: #166534; }
.badge-freemium { background: #dbeafe; color: #1e40af; }
.badge-paid { background: #fef3c7; color: #92400e; }
.badge-oss { background: #e0e7ff; color: #3730a3; }
.badge-api { background: #f3e8ff; color: #6b21a8; }
.badge-category { background: var(--bg-page); color: var(--text-secondary); border: 1px solid var(--border); }

.app-detail-grid { display: grid; grid-template-columns: 1fr 280px; gap: 32px; }
.app-detail-main { display: flex; flex-direction: column; gap: 24px; }
.app-detail-main h2 { font-size: 1.1rem; margin-bottom: 8px; }

.screenshot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.screenshot-img { width: 100%; border-radius: 8px; border: 1px solid var(--border); }

.feature-list { list-style: none; padding: 0; }
.feature-list li { padding: 6px 0; padding-left: 20px; position: relative; font-size: .9rem; }
.feature-list li::before { content: "\2713"; position: absolute; left: 0; color: #22c55e; font-weight: 700; }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 4px 12px; border-radius: 16px; font-size: .8rem; }
.tag-pro { background: #dcfce7; color: #166534; }
.tag-con { background: #fee2e2; color: #991b1b; }
[data-theme="dark"] .tag-pro { background: rgba(34,197,94,.15); color: #86efac; }
[data-theme="dark"] .tag-con { background: rgba(239,68,68,.15); color: #fca5a5; }

.app-detail-sidebar { display: flex; flex-direction: column; gap: 16px; }
.info-card { background: var(--bg-page); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.info-card h3 { font-size: .95rem; margin-bottom: 12px; }
.info-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: .85rem; border-bottom: 1px solid var(--border); }
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-tertiary); }

.admin-notes { background: var(--bg-page); padding: 12px; border-radius: 8px; margin-top: 8px; font-size: .9rem; }

/* Info tooltip */
.info-tip { position: relative; cursor: help; color: var(--text-tertiary); font-size: .95em; margin-left: 3px; vertical-align: middle; }
.info-tip:hover { color: var(--primary); }
.info-tip::after { content: attr(data-tip); position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: #1a1a2e; color: #fff; padding: 10px 14px; border-radius: 8px; font-size: .78rem; font-weight: 400; max-width: 280px; min-width: 160px; white-space: normal; line-height: 1.5; pointer-events: none; opacity: 0; transition: opacity .15s; z-index: 100; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.info-tip:hover::after { opacity: 1; }

/* Screenshot drop zone */
.screenshot-drop-zone { min-height: 100px; }
.screenshot-drop-zone .upload-placeholder small { display: block; margin-top: 4px; font-size: .75rem; color: var(--text-muted); }


/* Listing status mini (sidebar badge) */
.listing-status-mini { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; font-size: .85rem; font-weight: 600; }
.listing-status-mini--pending { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }
.listing-status-mini--approved { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.listing-status-mini--rejected { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
[data-theme="dark"] .listing-status-mini--pending { background: rgba(254,249,195,.1); border-color: rgba(253,224,71,.3); color: #fde047; }
[data-theme="dark"] .listing-status-mini--approved { background: rgba(220,252,231,.1); border-color: rgba(134,239,172,.3); color: #86efac; }
[data-theme="dark"] .listing-status-mini--rejected { background: rgba(254,226,226,.1); border-color: rgba(252,165,165,.3); color: #fca5a5; }

.listing-status-note { font-size: .82rem; color: var(--text-secondary); line-height: 1.5; padding: 0; margin: 0; }
.listing-status-note--reject { color: #991b1b; }
[data-theme="dark"] .listing-status-note--reject { color: #fca5a5; }

.listing-url-mini { background: var(--bg-page); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.listing-url-mini label { font-size: .75rem; font-weight: 600; color: var(--text-tertiary); display: block; margin-bottom: 4px; }
.copy-row-mini { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.copy-row-mini code { font-size: .8rem; color: var(--text-secondary); word-break: break-all; }
.listing-url-link { font-size: .78rem; color: var(--primary); word-break: break-all; text-decoration: none; line-height: 1.4; }
.listing-url-link:hover { text-decoration: underline; }

/* Pros/Cons one per line */
.pros-list, .cons-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.pros-list li, .cons-list li { display: flex; align-items: flex-start; gap: 8px; font-size: .9rem; line-height: 1.5; padding: 8px 12px; border-radius: 8px; }
.pros-list li { background: rgba(34,197,94,.06); }
.cons-list li { background: rgba(239,68,68,.06); }
[data-theme="dark"] .pros-list li { background: rgba(34,197,94,.1); }
[data-theme="dark"] .cons-list li { background: rgba(239,68,68,.1); }
.pros-icon, .cons-icon { flex-shrink: 0; }
.btn-copy-mini { background: none; border: none; cursor: pointer; color: var(--text-tertiary); padding: 4px; border-radius: 4px; display: flex; }
.btn-copy-mini:hover { color: var(--primary); background: rgba(99,102,241,.08); }

/* Toast */
.listing-toast { position: fixed; bottom: 24px; right: 24px; padding: 14px 24px; border-radius: 10px; font-size: .9rem; z-index: 9999; animation: toastIn .3s ease; }
.listing-toast-error { background: #ef4444; color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Clickable table rows */
.clickable-row { cursor: pointer; }
.clickable-row:hover { background: rgba(99,102,241,.04); }
[data-theme="dark"] .clickable-row:hover { background: rgba(99,102,241,.08); }

/* Admin listing detail */
.screenshot-grid-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.meta-table { width: 100%; font-size: .85rem; }
.meta-table td { padding: 6px 0; vertical-align: top; }
.meta-table td:first-child { color: var(--text-tertiary); width: 100px; font-weight: 500; }

/* Admin listing detail modal */
.detail-grid { display: grid; grid-template-columns: 1fr 260px; gap: 24px; }
.detail-main { display: flex; flex-direction: column; gap: 16px; }
.detail-row label { font-weight: 600; font-size: .85rem; display: block; margin-bottom: 4px; color: var(--text-secondary); }
.detail-longdesc { font-size: .9rem; line-height: 1.6; max-height: 200px; overflow-y: auto; }
.detail-sidebar { display: flex; flex-direction: column; gap: 12px; }
.detail-logo { width: 100px; height: 100px; border-radius: 12px; object-fit: contain; border: 1px solid var(--border); }
.detail-meta { font-size: .85rem; display: flex; flex-direction: column; gap: 6px; }
.screenshot-thumb-img { width: 100%; border-radius: 6px; border: 1px solid var(--border); }

.status-badge-sm { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: .75rem; font-weight: 600; text-transform: capitalize; }
.status-badge-sm.badge-pending { background: #fde047; color: #854d0e; }
.status-badge-sm.badge-approved { background: #86efac; color: #166534; }
.status-badge-sm.badge-rejected { background: #fca5a5; color: #991b1b; }

/* ─── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero { padding: 48px 0 32px; }
  .hero-title { font-size: clamp(1.1rem, 5vw, 1.6rem); white-space: normal; }
  .app-header { flex-direction: column; }
  .app-detail-body { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-row-2col { grid-template-columns: 1fr; }
  .flow-chart { flex-direction: column; align-items: center; gap: 0; }
  .flow-card { flex: 0 0 auto; max-width: 100%; width: 100%; }
  .flow-connector { width: 24px; height: 60px; transform: rotate(90deg); }
  .flow-connector svg { width: 100%; height: 24px; }
  .app-detail-grid { grid-template-columns: 1fr; }
  .app-header-row { flex-direction: column; align-items: center; text-align: center; }
  .detail-grid { grid-template-columns: 1fr; }
}
