:root {
  --bg-primary: #070709;
  --bg-card: rgba(26, 26, 30, 0.72);
  --bg-card-hover: rgba(38, 38, 44, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 122, 255, 0.3);
  --text-main: #FFFFFF;
  --text-sub: #8E8E93;
  --text-muted: #636366;
  --accent-blue: #0A84FF;
  --accent-green: #30D158;
  --accent-purple: #BF5AF2;
  --accent-gradient: linear-gradient(135deg, #0A84FF 0%, #5E5CE6 100%);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.45;
  overflow-x: hidden;
  padding-bottom: var(--safe-bottom);
}

.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 16px;
  padding-top: calc(12px + var(--safe-top));
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFF;
  box-shadow: 0 4px 14px rgba(10, 132, 255, 0.35);
}

.logo-mark svg {
  width: 20px;
  height: 20px;
}

.brand-text h1 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-ios {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(10, 132, 255, 0.15);
  color: var(--accent-blue);
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(10, 132, 255, 0.3);
}

.device-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(48, 209, 88, 0.1);
  border: 1px solid rgba(48, 209, 88, 0.25);
  color: var(--accent-green);
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* Hero Section */
.hero-section {
  margin-bottom: 20px;
}

.hero-card {
  background: linear-gradient(145deg, rgba(30, 30, 36, 0.8) 0%, rgba(18, 18, 22, 0.85) 100%);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(10, 132, 255, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.hero-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  margin-bottom: 6px;
}

.hero-content h2 {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 6px;
}

.hero-content p {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.4;
  margin-bottom: 16px;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.25);
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-val {
  font-size: 15px;
  font-weight: 800;
  color: #FFF;
}

.stat-lbl {
  font-size: 10px;
  color: var(--text-sub);
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.1);
}

/* Search Bar */
.search-wrapper {
  margin-bottom: 16px;
}

.search-box {
  display: flex;
  align-items: center;
  background: rgba(28, 28, 32, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px 14px;
  gap: 10px;
  transition: all 0.2s ease;
}

.search-box:focus-within {
  border-color: var(--accent-blue);
  box-shadow: 0 0 12px rgba(10, 132, 255, 0.25);
}

.search-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  color: #FFF;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.clear-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-sub);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  cursor: pointer;
}

/* Category Pills */
.categories-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 14px;
  scrollbar-width: none;
}

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

.cat-pill {
  flex-shrink: 0;
  background: rgba(28, 28, 32, 0.7);
  border: 1px solid var(--border-subtle);
  color: var(--text-sub);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cat-pill.active {
  background: var(--text-main);
  color: #000;
  border-color: #FFF;
  font-weight: 700;
}

.cat-pill:active {
  transform: scale(0.95);
}

/* Catalog Grid */
.catalog-section {
  margin-bottom: 24px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-header h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.counter-badge {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.apps-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* App Card */
.app-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 12px 14px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.app-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.app-card:active {
  transform: scale(0.98);
}

.app-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.app-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #1C1C1E;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.app-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-title {
  font-size: 15px;
  font-weight: 700;
  color: #FFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.app-meta {
  font-size: 12px;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  gap: 6px;
}

.app-dot {
  font-size: 8px;
  color: var(--text-muted);
}

.action-btn {
  background: rgba(10, 132, 255, 0.15);
  border: 1px solid rgba(10, 132, 255, 0.35);
  color: var(--accent-blue);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.app-card:hover .action-btn {
  background: var(--accent-blue);
  color: #FFF;
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.35);
}

/* Info & Benefits */
.info-section h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.benefits-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.benefit-card {
  background: rgba(24, 24, 28, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px;
}

.benefit-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.benefit-card h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 3px;
}

.benefit-card p {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.4;
}

/* Bottom Nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  background: rgba(14, 14, 18, 0.88);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-around;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  z-index: 100;
}

.nav-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.nav-item.active {
  color: var(--accent-blue);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.25s ease;
}

.modal-sheet {
  background: #141418;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px 28px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
  padding-bottom: calc(24px + var(--safe-bottom));
  position: relative;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #FFF;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-app-header {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

.modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #2C2C2E;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.modal-meta h3 {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 2px;
}

.modal-sub {
  font-size: 13px;
  color: var(--text-sub);
  display: block;
  margin-bottom: 8px;
}

.tag-row {
  display: flex;
  gap: 6px;
}

.tag-pill {
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-sub);
  padding: 3px 8px;
  border-radius: 8px;
}

.tag-pill.verified {
  background: rgba(48, 209, 88, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(48, 209, 88, 0.3);
}

.modal-body h4 {
  font-size: 15px;
  font-weight: 700;
  margin-top: 16px;
  margin-bottom: 8px;
}

.modal-body p {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.5;
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 20px;
}

.step-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: #FFF;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.step-text strong {
  font-size: 13px;
  color: #FFF;
}

.step-text span {
  font-size: 11px;
  color: var(--text-sub);
}

.action-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.primary-btn {
  background: var(--accent-gradient);
  border: none;
  color: #FFF;
  font-size: 16px;
  font-weight: 700;
  padding: 15px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(10, 132, 255, 0.35);
  transition: all 0.2s ease;
}

.primary-btn:active {
  transform: scale(0.97);
  opacity: 0.9;
}

.sub-guarantee {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.faq-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px;
}

.faq-item strong {
  display: block;
  font-size: 14px;
  color: #FFF;
  margin-bottom: 4px;
}

.faq-item p {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.4;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
