/* ==========================================================================
   piCloud Modern Light Theme Design System
   Sky Blue, Crisp White & High-Converting UI/UX
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg-main: #f8fafc;
  --bg-gradient: linear-gradient(180deg, #e0f2fe 0%, #f0f9ff 120px, #f8fafc 350px, #ffffff 100%);
  --bg-card: #ffffff;
  --bg-card-hover: #f0f9ff;
  --bg-subtle: #f1f5f9;
  --border-color: #e2e8f0;
  --border-active: #38bdf8;

  /* Sky Blue Primary */
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-glow: rgba(2, 132, 199, 0.25);
  --sky-light: #e0f2fe;
  --sky-accent: #0ea5e9;

  --accent-cyan: #06b6d4;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;

  /* MFS Brand Colors */
  --bkash-color: #e2136e;
  --nagad-color: #f7941d;
  --rocket-color: #8c3494;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 25px -3px rgba(14, 165, 233, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 20px 35px -5px rgba(14, 165, 233, 0.12), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px var(--primary-glow);

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-main);
  background-image: var(--bg-gradient);
  background-repeat: no-repeat;
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 75px; /* space for mobile bottom nav */
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

button, input, select, textarea {
  font-family: inherit;
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 24px;
  }
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #0284c7;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.brand-badge {
  background: #e0f2fe;
  color: #0284c7;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 24px;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: #f0f9ff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 999;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}

@media (min-width: 768px) {
  .mobile-bottom-nav {
    display: none;
  }
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  gap: 4px;
  flex: 1;
}

.bottom-nav-item.active, .bottom-nav-item:hover {
  color: var(--primary);
}

.bottom-nav-item svg {
  width: 20px;
  height: 20px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-fast);
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.4);
}

.btn-emerald {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-emerald:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}

.btn-outline {
  background: #ffffff;
  color: var(--text-main);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  background: #f0f9ff;
  border-color: #38bdf8;
  color: var(--primary);
}

.btn-lg {
  padding: 13px 26px;
  font-size: 15px;
}

.btn-block {
  width: 100%;
}

/* Hero Section */
.hero-section {
  padding: 40px 0 30px;
  text-align: center;
}

@media (min-width: 768px) {
  .hero-section {
    padding: 60px 0 45px;
  }
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: #0284c7;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 30px;
  line-height: 1.2;
  margin-bottom: 16px;
  color: #0f172a;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 46px;
  }
}

.gradient-text {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 50%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 680px;
  margin: 0 auto 28px;
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: 17px;
  }
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Quick Category Badges */
.quick-categories {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 0 20px;
  scrollbar-width: none;
}

.quick-categories::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.cat-chip:hover, .cat-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* Grid Sections */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
}

.section-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.app-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .app-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .app-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* App Card */
.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  gap: 16px;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.app-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: var(--bg-card-hover);
}

.app-icon-wrap {
  position: relative;
  flex-shrink: 0;
}

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.app-info {
  flex: 1;
  min-width: 0;
}

.app-name {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.app-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.app-rating {
  color: var(--accent-amber);
  display: flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
}

.app-badge {
  background: #e0f2fe;
  color: #0284c7;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
}

.app-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.app-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0f9ff;
  color: var(--primary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #bae6fd;
}

.app-card:hover .app-download-btn {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Product Card */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.product-card:hover {
  border-color: var(--border-active);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.product-img-wrap {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: #e2e8f0;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-img {
  transform: scale(1.05);
}

.product-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  color: #0284c7;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.product-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-title {
  font-size: 17px;
  margin-bottom: 8px;
  color: #0f172a;
}

.product-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.product-price-box {
  display: flex;
  flex-direction: column;
}

.product-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-emerald);
  font-family: 'Outfit', sans-serif;
}

.product-reg-price {
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: line-through;
}

/* Monetized Download Station */
.download-station {
  background: #ffffff;
  border: 2px solid #bae6fd;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 30px 0;
  text-align: center;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.station-title {
  font-size: 20px;
  margin-bottom: 10px;
  color: #0f172a;
}

.timer-circle-wrap {
  width: 140px;
  height: 140px;
  margin: 20px auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.timer-circle-bg {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 8;
}

.timer-circle-progress {
  fill: none;
  stroke: #0284c7;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 377;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
  filter: drop-shadow(0 0 6px rgba(2, 132, 199, 0.4));
}

.timer-number {
  position: absolute;
  font-size: 36px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: #0284c7;
}

/* High-Revenue Ad Containers */
.ad-slot {
  margin: 20px 0;
  padding: 10px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  text-align: center;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ad-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

/* Sticky Floating High-Revenue Bottom Banner */
.sticky-bottom-ad {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.97);
  border-top: 2px solid #38bdf8;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 998;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
}

.sticky-ad-close {
  position: absolute;
  top: -12px;
  right: 12px;
  background: #0f172a;
  color: #fff;
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Checkout & Dashboard Cards */
.checkout-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 620px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}

.mfs-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.mfs-opt {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  background: #f8fafc;
  transition: var(--transition-fast);
}

.mfs-opt.active[data-method="bkash"], .mfs-opt:hover[data-method="bkash"] {
  border-color: var(--bkash-color);
  background: #fdf2f8;
}

.mfs-opt.active[data-method="nagad"], .mfs-opt:hover[data-method="nagad"] {
  border-color: var(--nagad-color);
  background: #fff7ed;
}

.mfs-opt.active[data-method="rocket"], .mfs-opt:hover[data-method="rocket"] {
  border-color: var(--rocket-color);
  background: #faf5ff;
}

.mfs-logo {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.mfs-opt[data-method="bkash"] .mfs-logo { color: var(--bkash-color); }
.mfs-opt[data-method="nagad"] .mfs-logo { color: var(--nagad-color); }
.mfs-opt[data-method="rocket"] .mfs-logo { color: var(--rocket-color); }

.mfs-instruction-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.number-copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin: 10px 0;
}

.copy-val {
  font-family: monospace;
  font-size: 18px;
  font-weight: bold;
  color: #0284c7;
}

.btn-copy {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
  text-align: left;
}

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

.form-control {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #0f172a;
  font-size: 14px;
  outline: none;
  transition: var(--transition-fast);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Footer */
.footer {
  margin-top: auto;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 40px 0 20px;
  font-size: 13px;
  color: var(--text-dim);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-col h4 {
  color: #0f172a;
  font-size: 15px;
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
