/* ═══════════════════════════════════════
   RehanApps — Light Theme (Play Store)
═══════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg:        #f1f3f4;
  --surface:   #ffffff;
  --card:      #ffffff;
  --card-hover:#f8fffe;
  --border:    #e0e0e0;
  --border-md: #dadce0;
  --primary:   #01875f;
  --primary-dk:#006e4e;
  --primary-lt:#00a878;
  --primary-bg:#e8f5e9;
  --primary-bg2:#d0f0e6;
  --text:      #202124;
  --text-md:   #3c4043;
  --text-muted:#5f6368;
  --text-dim:  #9aa0a6;
  --red:       #d93025;
  --yellow:    #f9ab00;
  --blue:      #1a73e8;
  --orange:    #e8710a;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.06);
  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f3f4; }
::-webkit-scrollbar-thumb { background: #dadce0; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ══════ NAVBAR ══════ */
.site-nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #00c878);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(1,135,95,0.3);
  transition: box-shadow 0.2s;
  flex-shrink: 0;
}
.nav-logo-icon:hover { box-shadow: 0 4px 14px rgba(1,135,95,0.4); }

.nav-search {
  background: var(--bg);
  border: 1.5px solid var(--border-md);
  border-radius: 99px;
  transition: all 0.2s;
}
.nav-search:focus-within {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(1,135,95,0.1);
}

/* ══════ HERO ══════ */
.hero-section {
  background: linear-gradient(135deg, #f0fdf9 0%, #e8f5e9 40%, #f0fdf9 100%);
  border-bottom: 1px solid #c8e6c9;
  padding: 28px 0 24px;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 100% 50%, rgba(1,135,95,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 99px;
  background: var(--primary-bg); border: 1px solid #a5d6a7;
  color: var(--primary); font-size: 11px; font-weight: 600;
}
.hero-stat-num  { font-size: 22px; font-weight: 800; color: var(--text); line-height: 1; }
.hero-stat-label { font-size: 10px; color: var(--text-muted); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.05em; }

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, #009966 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ══════ BUTTONS ══════ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 26px; border-radius: var(--radius);
  background: var(--primary); color: #fff;
  font-weight: 700; font-size: 14px; border: none; cursor: pointer;
  text-decoration: none; transition: all 0.2s;
  box-shadow: 0 3px 12px rgba(1,135,95,0.3);
}
.btn-primary:hover {
  background: var(--primary-dk); transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(1,135,95,0.35);
}

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 26px; border-radius: var(--radius);
  background: #fff; color: var(--primary);
  font-weight: 600; font-size: 14px;
  border: 1.5px solid var(--primary); cursor: pointer;
  text-decoration: none; transition: all 0.2s;
}
.btn-secondary:hover {
  background: var(--primary-bg); transform: translateY(-1px);
}

.btn-danger {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius);
  background: #fce8e6; color: var(--red);
  font-weight: 600; font-size: 14px;
  border: 1.5px solid #f5c6c2; cursor: pointer;
  text-decoration: none; transition: all 0.2s;
}
.btn-danger:hover { background: #fad2cf; transform: translateY(-1px); }

.btn-download {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 32px; border-radius: var(--radius-lg);
  background: var(--primary); color: #fff;
  font-weight: 800; font-size: 15px;
  border: none; cursor: pointer; text-decoration: none;
  transition: all 0.2s; box-shadow: 0 4px 16px rgba(1,135,95,0.35);
}
.btn-download:hover { background: var(--primary-dk); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(1,135,95,0.4); }

.btn-sm { padding: 7px 16px !important; font-size: 12px !important; border-radius: var(--radius-sm) !important; }

/* ══════ CATEGORIES ══════ */
.categories-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: var(--shadow-sm);
}
.categories-bar::-webkit-scrollbar { display: none; }

.category-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 99px;
  font-size: 13px; font-weight: 500;
  background: #fff; border: 1.5px solid var(--border-md);
  color: var(--text-muted); cursor: pointer;
  text-decoration: none; white-space: nowrap;
  transition: all 0.18s;
}
.category-pill:hover {
  background: var(--primary-bg); border-color: #81c784;
  color: var(--primary); transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(1,135,95,0.1);
}
.category-pill.active {
  background: var(--primary); border-color: var(--primary);
  color: #fff; font-weight: 600;
  box-shadow: 0 2px 10px rgba(1,135,95,0.25);
}

/* ══════ APP CARDS ══════ */
.app-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden; display: flex; flex-direction: column;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #b2dfdb;
}
.app-card-featured {
  background: linear-gradient(135deg, #fff 0%, #f8fffe 100%);
}

.app-icon {
  width: 62px; height: 62px;
  border-radius: 14px; object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  flex-shrink: 0; background: var(--bg);
}

/* ══════ SECTION TITLE ══════ */
.section-title {
  font-size: 18px; font-weight: 800; color: var(--text);
  display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
}
.title-line { flex: 1; height: 1px; background: var(--border); margin-left: 8px; }

/* ══════ STAT CARDS ══════ */
.stat-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  transition: all 0.2s; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; border-radius: 3px 3px 0 0;
}
.stat-card.green::after  { background: linear-gradient(90deg, var(--primary), #00c878); }
.stat-card.blue::after   { background: linear-gradient(90deg, var(--blue), #6ba8f7); }
.stat-card.yellow::after { background: linear-gradient(90deg, var(--yellow), #ffcc02); }
.stat-card.orange::after { background: linear-gradient(90deg, var(--orange), #f4a942); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ══════ FORM ══════ */
.form-input {
  width: 100%; background: #fff;
  border: 1.5px solid var(--border-md);
  border-radius: var(--radius); padding: 11px 14px;
  color: var(--text); font-size: 14px; font-family: inherit;
  transition: all 0.2s; outline: none;
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(1,135,95,0.1); }
.form-input::placeholder { color: var(--text-dim); }
textarea.form-input { resize: vertical; min-height: 110px; }
select.form-input option { background: #fff; color: var(--text); }

.form-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-md); margin-bottom: 6px;
}

/* ══════ BADGES ══════ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 700;
}
.badge-green  { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.badge-yellow { background: #fff8e1; color: #f57f17; border: 1px solid #ffe082; }
.badge-red    { background: #fce8e6; color: #c62828; border: 1px solid #ef9a9a; }
.badge-blue   { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
.badge-gray   { background: #f1f3f4; color: var(--text-muted); border: 1px solid var(--border); }

/* ══════ TABLE ══════ */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  background: #f8f9fa; color: var(--text-muted);
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 12px 16px;
  text-align: left; border-bottom: 1.5px solid var(--border);
}
.data-table td {
  padding: 13px 16px; border-bottom: 1px solid #f1f3f4;
  color: var(--text-md); font-size: 13.5px;
}
.data-table tr:hover td { background: #f8fffe; }
.data-table tr:last-child td { border-bottom: none; }

/* ══════ SIDEBAR ══════ */
.sidebar-link, .admin-sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 14px;
  text-decoration: none; font-weight: 500; transition: all 0.15s;
}
.sidebar-link:hover, .admin-sidebar-link:hover { background: #f1f3f4; color: var(--text); }
.sidebar-link.active, .admin-sidebar-link.active {
  background: var(--primary-bg); color: var(--primary); font-weight: 600;
  border: 1px solid #a5d6a7;
}

/* ══════ UPLOAD ZONE ══════ */
.upload-zone {
  border: 2px dashed var(--border-md); border-radius: var(--radius-lg);
  padding: 40px 20px; text-align: center; cursor: pointer;
  transition: all 0.2s; background: #fafafa;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--primary); background: var(--primary-bg);
  box-shadow: 0 0 20px rgba(1,135,95,0.06) inset;
}

/* ══════ LIGHTBOX ══════ */
#lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.88); z-index: 9999;
  align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
}
#lightbox.active { display: flex; }
#lightbox img {
  max-width: 90vw; max-height: 90vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}

/* ══════ SCREENSHOTS ══════ */
.screenshot-thumb {
  width: 110px; height: 196px; object-fit: cover;
  border-radius: var(--radius); cursor: pointer;
  border: 2px solid var(--border); transition: all 0.2s; flex-shrink: 0;
}
.screenshot-thumb:hover { border-color: var(--primary); transform: scale(1.04); box-shadow: var(--shadow-md); }

/* ══════ PAGE HEADER ══════ */
.page-header {
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 32px 0; box-shadow: var(--shadow-sm);
}

/* ══════ GLASS CARD ══════ */
.glass-card {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* ══════ EMPTY STATE ══════ */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-state-icon {
  width: 80px; height: 80px; background: var(--bg);
  border: 2px dashed var(--border-md); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; font-size: 28px; color: var(--text-dim);
}

/* ══════ HERO APP GRID ══════ */
.hero-app-grid { display: grid; grid-template-columns: repeat(3, 72px); gap: 12px; }
.hero-app-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-decoration: none; transition: transform 0.2s;
}
.hero-app-item:hover { transform: translateY(-3px); }
.hero-app-icon {
  width: 64px; height: 64px; border-radius: 16px; overflow: hidden;
  border: 1.5px solid var(--border); background: #fff;
  box-shadow: var(--shadow-md); transition: all 0.2s;
}
.hero-app-item:hover .hero-app-icon { border-color: var(--primary); box-shadow: 0 4px 16px rgba(1,135,95,0.2); }
.hero-app-icon img { width: 100%; height: 100%; object-fit: cover; }
.hero-app-name { font-size: 10px; color: var(--text-muted); text-align: center; max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ══════ STARS ══════ */
.stars { color: var(--yellow); }
.stars .empty { color: var(--border-md); }

/* ══════ STATUS DOT ══════ */
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-dot.approved { background: var(--primary); }
.status-dot.pending  { background: var(--yellow); }
.status-dot.rejected { background: var(--red); }

/* ══════ CAT BANNER ══════ */
.cat-banner { background: #fff; border-bottom: 1px solid var(--border); padding: 24px 0; }

/* ══════ PAGINATION ══════ */
.page-btn {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; font-size: 13px; font-weight: 600;
  transition: all 0.18s; text-decoration: none;
}
.page-btn.active { background: var(--primary); color: #fff; box-shadow: 0 3px 10px rgba(1,135,95,0.3); }
.page-btn:not(.active) { background: #fff; color: var(--text-muted); border: 1px solid var(--border); }
.page-btn:not(.active):hover { background: var(--primary-bg); border-color: #81c784; color: var(--primary); }

/* ══════ SKELETON ══════ */
.skeleton {
  background: linear-gradient(90deg, #f1f3f4 25%, #e8eaed 50%, #f1f3f4 75%);
  background-size: 1000px 100%; animation: shimmer 1.5s infinite; border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: -1000px 0; } 100% { background-position: 1000px 0; } }

/* ══════ ANIMATIONS ══════ */
@keyframes fadeInUp { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
.fade-in { animation: fadeInUp 0.3s ease forwards; }

/* ══════ DIVIDER ══════ */
.glow-divider { height: 1px; background: var(--border); }

/* ══════ APP DETAIL ══════ */
.app-large-icon {
  width: 96px; height: 96px; border-radius: 22px; object-fit: cover;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border); flex-shrink: 0; background: var(--bg);
}

/* ══════ RESPONSIVE ══════ */
@media (max-width: 640px) {
  .hero-title { font-size: 1.9rem; }
  .app-icon { width: 52px; height: 52px; }
}
