/* Reset + base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow-x: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro", "Inter", system-ui, sans-serif;
  background: #0b0d15;
  color: #e8ebf5;
  font-size: 15px;
  line-height: 1.55;
  padding-bottom: 72px;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  padding: 12px 16px 8px;
  border-bottom: 1px solid #1a1f2e;
  background: rgba(11, 13, 21, 0.95);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}
.app-logo { font-weight: 700; font-size: 16px; color: #fff; }
.app-subtitle { font-size: 12px; color: #7cc4ff; margin-top: 2px; min-height: 14px; }

main#screen-container {
  flex: 1;
  padding: 16px;
}

/* Cards */
.card {
  background: #14182a;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid #1f2538;
}
.card.highlight {
  background: #1a2440;
  border: 2px solid #7cffa6;
}
.card-title { font-weight: 700; color: #fff; margin-bottom: 6px; font-size: 14px; }
.label-tag {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #1f2538;
  color: #7cc4ff;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* Case card */
.case-card { cursor: pointer; transition: transform 0.2s; }
.case-card:active { transform: scale(0.98); }
.case-price-row {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 13px;
}
.price-market { text-decoration: line-through; color: #888; }
.price-club { color: #7cffa6; font-weight: 700; }
.savings-badge {
  background: #7cffa6;
  color: #0b0d15;
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 12px;
  display: inline-block;
}

/* Buttons */
.btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  font-family: inherit;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: #7cffa6; color: #0b0d15; }
.btn-secondary { background: #1f2538; color: #e8ebf5; }
.btn-ghost { background: transparent; color: #7cc4ff; border: 1px solid #1f2538; }

/* Slider rows */
.slider-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0;
  font-size: 13px;
}
.slider-row select {
  background: #1f2538;
  color: #e8ebf5;
  border: 1px solid #2a3147;
  padding: 6px 10px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
}

.calc-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 12px 6px;
  background: #0e1120;
  border-radius: 10px;
  border: 1px solid #1f2538;
}
.compare-col { text-align: center; }
.compare-label {
  font-size: 10px;
  color: #7f8aa8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.compare-amount { font-size: 18px; font-weight: 700; }
.compare-market { color: #ff8a8a; text-decoration: line-through; text-decoration-color: rgba(255,138,138,0.45); }
.compare-club { color: #7cffa6; }
.compare-divider { color: #7cc4ff; font-size: 18px; font-weight: 700; }

.calc-result {
  font-size: 24px;
  font-weight: 800;
  color: #7cffa6;
  text-align: center;
  padding: 10px 0 4px;
  margin-top: 10px;
  letter-spacing: 0.2px;
}
.calc-sub { font-size: 12px; color: #b0b8cf; text-align: center; line-height: 1.45; }

/* Кнопка-переключатель «показать партнёрку» */
.btn-link {
  background: transparent;
  border: 1px solid #2a3147;
  color: #c47cff;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  width: 100%;
  cursor: pointer;
  text-align: left;
  margin-top: 10px;
}
.btn-link:hover { border-color: #c47cff; }

/* Бизнес-блок (Ambassador-доход) */
.calc-business {
  margin-top: 10px;
  padding: 12px;
  background: linear-gradient(135deg, #1a1430, #0f1322);
  border-radius: 10px;
  border: 1px solid #3a2850;
}
.calc-business-title {
  font-weight: 600;
  color: #c47cff;
  font-size: 13px;
  margin-bottom: 8px;
}
.calc-business-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0;
}
.calc-business-scenario {
  background: rgba(196, 124, 255, 0.08);
  border-radius: 8px;
  padding: 8px 10px;
}
.calc-business-scenario-head {
  font-weight: 600;
  color: #e8ebf5;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.calc-business-scenario-note {
  font-size: 11px;
  color: #a8a3bd;
  margin-top: 3px;
  line-height: 1.4;
}
.calc-business-note {
  font-size: 11px;
  color: #888;
  margin-top: 6px;
  font-style: italic;
}

/* ===== Chip-группы (селекторы калькулятора) ===== */

.chip-label {
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.chip {
  flex: 1 1 auto;
  min-width: 70px;
  background: #14182a;
  border: 1.5px solid #2a3147;
  color: #b0b8cf;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.chip:hover {
  border-color: #4a5376;
  color: #e8ebf5;
}

.chip-active {
  background: rgba(124, 255, 166, 0.12);
  border-color: #7cffa6;
  color: #7cffa6;
}

/* ===== Профиль-баннер ===== */

.profile-banner { background: #14182a; }
.profile-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 14px;
}
.profile-ico { font-size: 18px; }
.profile-key { color: #888; flex-shrink: 0; }
.profile-val {
  color: #7cffa6;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ===== Кейсы v2 ===== */

.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 4px 0 14px;
}
.hero-stat {
  background: #14182a;
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
  border: 1px solid #1f2538;
}
.hero-stat-value {
  font-size: 18px;
  font-weight: 800;
  color: #7cffa6;
  line-height: 1.1;
}
.hero-stat-label {
  font-size: 10px;
  color: #888;
  margin-top: 3px;
  line-height: 1.25;
}

.filters-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.filters-row::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0;
  background: #14182a;
  border: 1px solid #1f2538;
  color: #b0b8cf;
  font-family: inherit;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
}
.filter-chip.active {
  background: #7cffa6;
  color: #0b0d15;
  border-color: #7cffa6;
  font-weight: 600;
}

/* Hero-карточка (самый яркий кейс) */
.hero-card {
  padding: 0;
  overflow: hidden;
  background: #14182a;
  border: 1px solid #2a3050;
}
.hero-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}
.hero-img-gradient {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-img-flag { font-size: 64px; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4)); }
.hero-body { padding: 14px; }
.hero-kicker {
  font-size: 10px;
  font-weight: 700;
  color: #ffa94d;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.hero-title { font-size: 17px; font-weight: 700; color: #fff; line-height: 1.3; }
.hero-meta { font-size: 12px; color: #888; margin-top: 4px; }

.hero-prices {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  background: #0e1120;
  border-radius: 10px;
}
.hero-price-block { text-align: center; }
.hero-price-label { font-size: 10px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }
.hero-price-market {
  font-size: 16px;
  font-weight: 700;
  color: #ff7c8a;
  text-decoration: line-through;
  text-decoration-color: rgba(255, 124, 138, 0.45);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.hero-price-club {
  font-size: 20px;
  font-weight: 800;
  color: #7cffa6;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.hero-arrow { font-size: 18px; color: #555; }
.hero-savings-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 12px;
  background: rgba(124, 255, 166, 0.14);
  border-radius: 6px;
  color: #7cffa6;
  font-weight: 700;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.section-label {
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

/* Сетка карточек */
.case-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.case-card-v2 {
  padding: 0;
  overflow: hidden;
  background: #14182a;
  border: 1px solid #1f2538;
  margin: 0;
}
.cc-img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  display: block;
}
.cc-img-gradient {
  display: flex;
  align-items: center;
  justify-content: center;
}
.cc-flag { font-size: 36px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3)); }
.cc-body { padding: 10px; }
.cc-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  min-height: 32px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cc-meta { font-size: 10px; color: #888; margin-top: 4px; line-height: 1.3; }
.cc-prices { display: flex; gap: 8px; align-items: baseline; margin-top: 6px; }
.cc-price-market {
  font-size: 12px;
  color: #ff7c8a;
  text-decoration: line-through;
  text-decoration-color: rgba(255, 124, 138, 0.45);
  font-variant-numeric: tabular-nums;
}
.cc-price-club {
  font-size: 15px;
  font-weight: 800;
  color: #7cffa6;
  font-variant-numeric: tabular-nums;
}
.cc-badge {
  margin-top: 6px;
  padding: 3px 6px;
  background: rgba(124, 255, 166, 0.12);
  border-radius: 4px;
  color: #7cffa6;
  font-size: 10px;
  font-weight: 700;
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  background: #0b0d15;
  border-top: 1px solid #1a1f2e;
  display: flex;
  padding: 6px 4px;
  z-index: 10;
}
.nav-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 6px 2px;
  color: #888;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  gap: 2px;
  transition: color 0.2s;
}
.nav-btn.active { color: #7cffa6; }
.nav-icon { font-size: 20px; }
.nav-label { font-size: 10px; }

/* Filters */
.filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.filters .btn {
  flex-shrink: 0;
  padding: 8px 12px;
  font-size: 12px;
  width: auto;
}
.filters .btn.active {
  background: #7cffa6;
  color: #0b0d15;
  border-color: #7cffa6;
}

/* Instruction steps */
.step-screenshot {
  margin-top: 8px;
  padding: 8px;
  background: #0b0d15;
  border-radius: 6px;
  text-align: center;
  color: #666;
  font-size: 11px;
  border: 1px dashed #2a3147;
}
.tips {
  margin-top: 8px;
  padding-left: 8px;
  border-left: 2px solid #ffca7c;
  font-size: 12px;
  color: #ccc;
}
.tips > div { margin: 3px 0; }

/* Utilities */
.loading { padding: 40px 16px; text-align: center; color: #888; }
.text-muted { color: #888; font-size: 12px; }
.text-accent { color: #7cffa6; }
.mt-sm { margin-top: 6px; }
.mt-md { margin-top: 12px; }
.mt-lg { margin-top: 24px; }

/* Transitions */
.screen { animation: fadeIn 0.2s ease-out; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
