body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  color: #0f172a;
}

.navbar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.navbar-brand .brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.2);
}

.brand-title {
  font-size: 1rem;
  line-height: 1.05;
}

.brand-subtitle {
  color: #64748b;
  font-size: .7rem;
}

.nav-link {
  color: #334155;
  font-weight: 500;
}

.nav-pill {
  border-color: rgba(15, 23, 42, 0.1);
}

.page-shell {
  background: transparent;
}

.homepage-shell {
  min-height: calc(100vh - 80px);
  background: transparent;
}

.home-sticky-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  padding: 1rem 1rem 0.75rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
  border-bottom: 1px solid rgba(15, 23, 42, .06);
  border-radius: 0 0 24px 24px;
  backdrop-filter: blur(12px);
}

.home-sticky-header .home-header-left,
.home-sticky-header .home-header-center,
.home-sticky-header .home-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.home-header-left {
  min-width: 0;
}

.home-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #E8F5E9;
  box-shadow: 0 12px 30px rgba(76, 175, 80, .12);
}

.home-header-title span {
  display: block;
  font-weight: 700;
  color: #1B5E20;
}

.home-header-title p {
  margin: 0;
  font-size: .85rem;
  color: #6B7280;
}

.home-header-center {
  flex: 1 1 auto;
}

.home-search-box {
  position: relative;
  width: 100%;
}

.home-search-box input {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, .2);
  padding: 1rem 4rem 1rem 1.25rem;
  background: #f8fbff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
  transition: border-color .25s ease, box-shadow .25s ease;
}

.home-search-box input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 12px 30px rgba(37, 99, 235, .16);
}

.search-action-btn {
  position: absolute;
  right: .5rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: #2E7D32;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 25px rgba(46, 125, 50, .18);
}

.home-header-right {
  gap: .75rem;
}

.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border: none;
  background: #F8FAFC;
  display: grid;
  place-items: center;
  color: #1F2937;
  box-shadow: 0 12px 22px rgba(15, 23, 42, .06);
  transition: transform .25s ease, background .25s ease;
}

.icon-button:hover {
  transform: translateY(-1px);
  background: #E7F4E9;
}

.profile-button {
  font-weight: 700;
  letter-spacing: .02em;
  background: #1B5E20;
  color: #fff;
}

.home-tabs-section {
  padding: 0.5rem 1rem 0.5rem;
  background: #f5f7fb;
}

.home-tabs-scroll {
  display: flex;
  overflow-x: auto;
  gap: .75rem;
  padding-bottom: .5rem;
}

.home-tab {
  flex: 0 0 auto;
  border: none;
  background: #fff;
  color: #475569;
  border-radius: 999px;
  padding: .8rem 1.2rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
  transition: background .25s ease, transform .25s ease;
  cursor: pointer;
}

.home-tab.active,
.home-tab:hover {
  background: #E8F5E9;
  color: #1B5E20;
  transform: translateY(-1px);
}

.home-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1rem 3rem;
}

.home-featured-banner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.25rem;
  background: linear-gradient(135deg, #ffffff 0%, #f5f9ff 100%);
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 28px;
  padding: 1.5rem;
  box-shadow: 0 24px 55px rgba(15, 23, 42, .08);
  overflow: hidden;
}

.banner-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: #1d4ed8;
  background: rgba(219, 234, 254, .9);
}

.banner-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.banner-app-icon {
  width: 84px;
  height: 84px;
  min-width: 84px;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .12);
}

.banner-left h2 {
  font-size: 2rem;
  margin: .25rem 0 .35rem;
}

.banner-left p {
  margin: 0;
  color: #475569;
}

.banner-description {
  max-width: 560px;
  color: #64748B;
  line-height: 1.75;
  margin: 0;
}

.banner-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  color: #1F2937;
  font-weight: 600;
}

.metric-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .55rem .85rem;
  border-radius: 999px;
  background: #f8fbff;
  border: 1px solid rgba(148, 163, 184, .16);
}

.banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: .25rem;
}

.banner-right {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 240px;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
  border-radius: 24px;
  overflow: hidden;
}

.banner-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, .65), transparent 45%);
}

.banner-full-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.mini-stat {
  padding: .8rem .95rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 25px rgba(15, 23, 42, .05);
}

.mini-stat span {
  display: block;
  font-size: .75rem;
  color: #64748b;
  margin-bottom: .2rem;
}

.mini-stat strong {
  color: #0f172a;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-header h3 {
  margin: 0;
  font-size: 1.4rem;
}

.section-header p {
  margin: 0;
  color: #64748B;
}

.section-header a {
  font-weight: 700;
  color: #16A34A;
  transition: color .25s ease;
}

.section-header a:hover {
  color: #15803D;
}

.home-app-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: .75rem;
  scroll-snap-type: x mandatory;
}

.home-app-carousel::-webkit-scrollbar {
  display: none;
}

.app-card {
  display: block;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 22px;
  padding: 1.25rem;
  min-width: 220px;
  box-shadow: 0 16px 35px rgba(15, 23, 42, .05);
  text-decoration: none;
  color: #111827;
  transition: transform .25s ease, box-shadow .25s ease;
  scroll-snap-align: start;
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, .12);
}

.app-card-large {
  min-width: 240px;
}

.app-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  object-fit: cover;
  background: #F8FAFC;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .1);
}

.app-card-body {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.app-card-body strong {
  font-size: 1rem;
}

.app-card-body span {
  font-size: .9rem;
  color: #64748B;
}

.app-card-rating {
  margin-top: 1rem;
  color: #16A34A;
  font-weight: 700;
}

@media (max-width: 992px) {
  .home-featured-banner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .home-sticky-header {
    padding: 1rem;
  }

  .home-header-left,
  .home-header-right {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .home-header-center {
    order: 3;
    width: 100%;
  }

  .home-tabs-section {
    padding: 1rem;
  }

  .home-content {
    padding: 1rem;
  }

  .home-featured-banner {
    padding: 1.2rem;
  }

  .banner-left h2 {
    font-size: 1.5rem;
  }

  .banner-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .home-app-carousel {
    grid-auto-columns: minmax(200px, 1fr);
  }
}

.auth-page {
  min-height: calc(100vh - 80px);
  background: linear-gradient(180deg, #eef3fd 0%, #f5f7fb 100%);
}

.auth-card {
  border-radius: 24px;
  overflow: hidden;
}

.auth-brand {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 18px;
  background: linear-gradient(135deg, #1a73e8, #00bfa5);
}

.admin-card {
  border-radius: 24px;
  background: #fff;
  transition: transform .25s ease, box-shadow .25s ease;
}

.navbar-brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.admin-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, .06);
}

.app-detail-card {
  border-radius: 24px;
}

.app-logo-lg {
  width: 96px;
  height: 96px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .12);
  background: #fff;
}

.btn-download {
  padding: 1rem 1.5rem;
  border-radius: 28px;
  font-size: 1rem;
  font-weight: 600;
}

.btn-download.btn-loading {
  opacity: 0.85;
}

.stat-card {
  border: 1px solid rgba(15, 23, 42, .08);
  background: #fff;
}

.rating-pill {
  background: rgba(26, 115, 232, .08);
  border-radius: 999px;
  color: #1a73e8;
}

.divider-dot {
  color: rgba(0,0,0,.35);
}

.screenshot-slider {
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.screenshot-gallery { margin-top:12px; }
.data-section { margin-top:18px; }
.section-row { display:flex; justify-content:space-between; align-items:center; padding:14px 0; border-bottom:1px solid #f1f3f4 }

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.78);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  z-index: 1050;
}
.lightbox-content {
  position: relative;
  max-width: 100%;
  max-height: 100%;
}
.lightbox-content img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}
.lightbox-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.screenshot-track {
  display: flex;
  gap: 1rem;
}

.screenshot-card {
  min-width: 220px;
  flex: 0 0 auto;
}

.safety-card {
  border: 1px solid rgba(15, 23, 42, .08);
  background: #fff;
}

.rating-summary {
  background: #f8f9fd;
}

.rating-row .progress {
  background: rgba(15, 23, 42, .08);
}

.review-card {
  background: #fff;
}

.review-avatar {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.review-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.star-rating .star,
.review-card .star {
  color: #d1d5db;
}

.star-rating .star.active,
.review-card .star.active {
  color: #f59e0b;
}

#reviewForm .btn-outline-secondary.active,
#reviewForm .btn-outline-secondary:has(input:checked) {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

.modal-dialog-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  pointer-events: none;
}

.modal-dialog-bottom .modal-content {
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
}

.modal-backdrop.show {
  opacity: 0.45;
}

.list-group-item {
  border-radius: 16px;
  margin-bottom: 0.75rem;
}

@media (max-width: 992px) {
  .hero-card {
    margin-top: 1rem;
  }
}

/* Admin dashboard styles */
.admin-shell {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  background: linear-gradient(180deg, #effaf1 0%, #f8fff9 100%);
}

.admin-sidebar {
  width: 220px;
  background: #fff;
  border: 1px solid rgba(148,163,184,.08);
  border-radius: 12px;
  padding: 1rem;
  height: calc(100vh - 40px);
  position: sticky;
  top: 20px;
}

.admin-brand .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #fff;
  font-weight: 700;
}

.admin-nav .nav-link {
  color: #475569;
  padding: .55rem .6rem;
  border-radius: 8px;
  margin-bottom: .35rem;
}

.admin-nav .nav-link.active,
.admin-nav .nav-link:hover {
  background: rgba(16,185,129,.06);
  color: #065f46;
}

.admin-main {
  flex: 1 1 auto;
  background: transparent;
}

.admin-top .admin-search input {
  width: 220px;
}

.stat-card {
  border-radius: 12px;
  background: linear-gradient(180deg,#fff,#fbfdff);
  border: 1px solid rgba(148,163,184,.06);
}

.app-table thead th {
  border-bottom: 0;
  color: #6b7280;
  font-weight: 600;
}

.app-list-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 12px;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 10px 30px rgba(15,23,42,.06);
  background: #f8fafc;
}

.app-col strong {
  display: block;
}

.app-table tbody tr {
  background: #fff;
  border: 1px solid rgba(148,163,184,.06);
  border-radius: 12px;
}

.app-table tbody tr td {
  vertical-align: middle;
}

@media (max-width: 992px) {
  .admin-shell { padding: 1rem; flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: relative; }
  .admin-top { flex-direction: column; }
}

/* Global Material-style variables and resets */
:root{
  --primary-500: #16a34a; /* green */
  --primary-600: #15803d;
  --surface: #ffffff;
  --muted: #6b7280;
}

body, button, input, select, textarea {
  font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

/* App navbar / search */
.app-navbar{background:var(--surface);border-bottom:1px solid rgba(15,23,42,.04);backdrop-filter:blur(6px)}
.nav-brand .navbar-brand-logo{width:36px;height:36px;object-fit:contain;border-radius:8px}
.search-input-wrapper{display:flex;align-items:center;background:#f3f4f6;border-radius:28px;padding:.5rem .6rem;gap:.5rem;box-shadow:0 6px 18px rgba(15,23,42,.04)}
.search-input-wrapper .search-icon{color:rgba(15,23,42,.45)}
.search-input{border:0;background:transparent;outline:none;padding:.45rem .25rem;width:100%;font-size:.95rem}
.search-submit{border:0;background:transparent;color:var(--primary-600);display:grid;place-items:center;padding:.25rem;border-radius:999px}

/* Header inside homepage */
.home-sticky-header{padding:.75rem 1rem;border-radius:0 0 18px 18px}
.home-header-title span{font-weight:700;color:var(--primary-600);font-size:1rem}
.home-search-box .search-action-btn{background:var(--primary-500)}

/* Tabs like Play Store */
.home-tabs-scroll{padding:.5rem 1rem;gap:.6rem}
.home-tab{background:transparent;border:0;padding:.6rem .9rem;border-radius:999px;color:var(--muted);font-weight:600}
.home-tab.active{background:linear-gradient(90deg,rgba(16,185,129,.12),rgba(16,185,129,.08));color:var(--primary-600);box-shadow:0 8px 28px rgba(16,185,129,.06);transform:translateY(-2px)}

/* Featured banner polished */
.home-featured-banner{align-items:center}
.badge-soft{background:linear-gradient(90deg,#e6f9f0,#eaf8ff);color:var(--primary-600);font-weight:700}
.banner-description{color:var(--muted)}
.banner-actions .btn-primary{background:var(--primary-500);border-color:transparent}

/* App cards horizontal list - minimal rounded look */
.home-app-carousel{padding:1rem 0}
.app-card{background:linear-gradient(180deg,#fff,#fbfff8);border-radius:18px;padding:1rem;min-width:210px;box-shadow:0 10px 30px rgba(15,23,42,.06)}
.app-card-icon{width:64px;height:64px;border-radius:16px}
.app-card-body strong{font-weight:600}
.app-card-rating{color:var(--primary-500);font-weight:700}

/* Ripple & hover */
.icon-btn{background:transparent;border:0;width:44px;height:44px;border-radius:12px;display:grid;place-items:center;color:rgba(15,23,42,.7);transition:background .18s,transform .18s}
.icon-btn:hover{background:rgba(16,185,129,.06);transform:translateY(-2px)}
.app-card:hover{transform:translateY(-6px);box-shadow:0 20px 45px rgba(15,23,42,.12)}

/* Smooth transitions */
*{transition:all .18s cubic-bezier(.2,.8,.2,1)}

/* Lazy loading helper */
img[loading="lazy"]{opacity:0;transform:translateY(6px);transition:opacity .4s ease,transform .4s ease}
img[loading="lazy"].loaded{opacity:1;transform:none}

/* Mobile first tweaks */
@media(min-width:768px){
  .search-form.d-none.d-sm-flex{display:flex!important}
}

/* App detail page styles to mimic Play Store */
.app-detail-shell{max-width:760px;margin:0 auto}
.app-detail-top .icon-btn{width:40px;height:40px;border-radius:10px}
.app-detail-top .d-flex.align-items-center.gap-3 > a.btn.btn-sm.btn-outline-secondary.rounded-circle {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  border-radius: 50%;
  padding: 0;
  display: grid;
  place-items: center;
}
.app-detail-top .d-flex.align-items-center.gap-3 > a.btn.btn-sm.btn-outline-secondary.rounded-circle .material-icons {
  font-size: 18px;
}
.app-main-row{gap:1rem}
.app-detail-icon{width:88px;height:88px;border-radius:18px;object-fit:cover;box-shadow:0 12px 30px rgba(15,23,42,.08)}
.app-title{font-size:1.25rem;margin:0;font-weight:700}
.app-developer a{text-decoration:none}
.app-subinfo{font-size:.85rem}
.info-row{background:transparent;border-radius:12px;padding:.35rem .25rem;justify-content:space-between}
.info-item{flex:1}
.info-item .info-main{font-size:1rem}

/* Top area layout for app icon + meta (Play Store style) */
.app-top-info{display:flex;align-items:flex-start;gap:1rem}
.app-top-info .app-detail-icon{width:88px;height:88px;min-width:88px;border-radius:18px}
.app-meta-top .app-title{font-size:1.25rem;margin:0}
.app-meta-top .app-developer{margin-top:.25rem}
.app-meta-top .app-subinfo{margin-top:.25rem}
.app-detail-top{padding-top:.25rem;padding-bottom:.25rem}
.app-main-row{display:block}
.divider-vert{width:1px;height:36px;background:rgba(15,23,42,.06);margin:0 .5rem}
.install-btn{border-radius:999px;padding:0.85rem 1rem;font-weight:700}
.screenshots-row{display:flex;gap:.5rem;overflow:hidden}
.screenshot-thumb{flex:0 0 120px;width:120px;height:210px}
.screenshot-thumb img{width:100%;height:100%;object-fit:contain;background:#f8fafc}
.about-section h3{font-size:1rem}
.chip{background:#f3f4f6;padding:.4rem .6rem;border-radius:999px;font-size:.85rem}

@media(max-width:420px){
  .app-detail-icon{width:72px;height:72px}
  .screenshot-thumb{flex:0 0 120px;width:120px;height:210px}
}

/* Override mobile layout shifts to preserve desktop layout on small screens */
@media (max-width: 992px) {
  .home-featured-banner {
    grid-template-columns: 1.2fr 0.8fr !important;
  }

  .banner-actions {
    flex-direction: row !important;
    align-items: center !important;
  }

  .home-app-carousel {
    grid-auto-columns: minmax(210px, 1fr) !important;
  }

  .home-sticky-header .home-header-left,
  .home-sticky-header .home-header-center,
  .home-sticky-header .home-header-right {
    flex-wrap: nowrap !important;
  }

  .home-header-center {
    order: 0 !important;
    width: auto !important;
  }

  .home-content,
  .home-tabs-section {
    padding: 1rem !important;
  }

  .app-card {
    min-width: 210px !important;
  }

  .app-card-large {
    min-width: 240px !important;
  }
}

@media (max-width: 768px) {
  .home-featured-banner {
    padding: 1.5rem !important;
  }

  .banner-left h2 {
    font-size: 2rem !important;
  }
}

@media (max-width: 420px) {
  .home-featured-banner {
    padding: 1.5rem !important;
  }

  .banner-left h2 {
    font-size: 2rem !important;
  }
}

