/* ==========================================================================
   Стили промо-лендинга «Сказки» (Kids Story Quest)
   Тема: Черничная (нежно-синяя), как Сборник №2 в приложении
   ========================================================================== */

:root {
  /* Фирменная синяя палитра (Черничная тема) */
  --bg-gradient-start: #E1F0FD;
  --bg-gradient-end: #D0E8FC;
  --window-bg: #E8F4FE;
  --window-border: #38B6FF;
  --window-inner-bg: #F4F9FD;
  
  /* Акцентные цвета карточек и кнопок */
  --color-green-btn: #34A853;
  --color-green-btn-hover: #2E974A;
  --color-green-bg: #EAF7EE;
  --color-green-border: #34A853;

  --color-yellow-btn: #F9A825;
  --color-yellow-btn-hover: #F57F17;
  --color-yellow-bg: #FEF9E7;
  --color-yellow-border: #F9A825;

  --color-peach-btn: #FF7043;
  --color-peach-btn-hover: #F4511E;
  --color-peach-bg: #FFF3E0;
  --color-peach-border: #FF7043;

  /* Текстовые цвета */
  --text-main: #2C3E50;
  --text-title: #0D47A1;
  --text-sub: #546E7A;
  --text-white: #FFFFFF;
  
  /* Радиусы и тени */
  --radius-window: 32px;
  --radius-card: 22px;
  --radius-btn: 16px;
  --shadow-window: 0 16px 40px rgba(13, 71, 161, 0.12), 0 4px 12px rgba(13, 71, 161, 0.06);
  --shadow-card: 0 6px 18px rgba(0, 0, 0, 0.05);
  --shadow-btn: 0 4px 12px rgba(0, 0, 0, 0.08);
}

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

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

/* Оболочка */
.app-viewport {
  width: 100%;
  max-width: 520px;
  display: flex;
  justify-content: center;
}

/* Игровое окно-планшет */
.game-window {
  width: 100%;
  background: var(--window-bg);
  border: 4px solid var(--window-border);
  border-radius: var(--radius-window);
  box-shadow: var(--shadow-window);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Шапка окна */
.window-header {
  padding: 18px 20px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-bottom: 2px solid rgba(56, 182, 255, 0.25);
  background: rgba(255, 255, 255, 0.5);
}

.header-title-wrap {
  width: 100%;
  text-align: center;
}

.main-title {
  font-family: 'Comfortaa', cursive, sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-title);
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.subtitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  margin-top: 3px;
}

/* Grid контейнер основного контента */
.grid-container {
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 16px;
}

/* 1. Секция героя */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-avatar-wrap {
  width: 130px;
  height: 130px;
  margin-bottom: 10px;
  filter: drop-shadow(0 6px 12px rgba(13, 71, 161, 0.15));
}

.hero-avatar {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-badge {
  display: inline-block;
  background: #FFFFFF;
  border: 2px solid #FFA726;
  color: #E65100;
  font-size: 14px;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(255, 167, 38, 0.15);
}

/* 2. Карточка промокода */
.promo-card {
  background: #FFFFFF;
  border: 2px solid #48C78E;
  border-radius: var(--radius-card);
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.promo-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gift-icon {
  font-size: 28px;
}

.promo-text-wrap {
  display: flex;
  flex-direction: column;
}

.promo-title {
  font-size: 15px;
  font-weight: 800;
  color: #164E3D;
  line-height: 1.2;
}

.promo-sub {
  font-size: 12px;
  font-weight: 600;
  color: #0E7051;
}

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

.coupon-box {
  flex: 1;
  background: #EDFAF3;
  border: 2px dashed #48C78E;
  border-radius: var(--radius-btn);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.coupon-label {
  font-size: 12px;
  font-weight: 600;
  color: #546E7A;
}

.coupon-code {
  font-family: 'Comfortaa', monospace;
  font-size: 18px;
  font-weight: 700;
  color: #E65100;
  letter-spacing: 1px;
}

.btn-copy {
  background: #48C78E;
  color: #FFFFFF;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-btn);
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(72, 199, 142, 0.3);
  transition: transform 0.15s ease, background-color 0.2s ease;
  white-space: nowrap;
}

.btn-copy:hover {
  background: #3BB57E;
}

.btn-copy:active {
  transform: scale(0.96);
}

.btn-copy.copied {
  background: #164E3D;
}

/* 3. Секция кнопок магазинов */
.stores-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stores-heading {
  font-family: 'Comfortaa', cursive, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-title);
  text-align: center;
}

.stores-grid {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 12px;
}

.store-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-radius: var(--radius-card);
  text-decoration: none;
  border: 3px solid transparent;
  box-shadow: var(--shadow-btn);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

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

.store-icon-wrap {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.store-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.store-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.store-action {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
}

.store-name {
  font-family: 'Comfortaa', cursive, sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.store-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  margin-top: 3px;
  background: rgba(0, 0, 0, 0.08);
  padding: 2px 8px;
  border-radius: 8px;
  align-self: flex-start;
}

.store-arrow {
  font-size: 20px;
  opacity: 0.7;
  font-weight: bold;
}

/* 1. Google Play (Зеленая) */
.store-google {
  background: var(--color-green-bg);
  border-color: var(--color-green-border);
  color: #1B5E20;
}
.store-google:hover {
  background: #E0F2E4;
}

/* 2. RuStore (Фирменная синяя) */
.store-rustore {
  background: #EDF6FF;
  border-color: #0077FF;
  color: #0D47A1;
}
.store-rustore .store-action {
  color: #1976D2;
}
.store-rustore .store-name {
  color: #0055D4;
}
.store-rustore .store-tag {
  background: rgba(0, 85, 212, 0.1);
  color: #0055D4;
}
.store-rustore:hover {
  background: #E1EFFF;
}

/* 3. Huawei AppGallery (Персиковая) */
.store-huawei {
  background: var(--color-peach-bg);
  border-color: var(--color-peach-border);
  color: #BF360C;
}
.store-huawei:hover {
  background: #FFE8CC;
}

/* 4. Мини-буллеты преимуществ */
.features-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  background: #FFFFFF;
  border: 1.5px solid rgba(56, 182, 255, 0.2);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #37474F;
  white-space: nowrap; /* Запрет переноса строк */
}

@media (min-width: 460px) {
  .features-bar {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 12px 14px;
  }
  .feature-item {
    font-size: 12px;
  }
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.green { background: #48C78E; }
.dot.yellow { background: #FBC02D; }
.dot.blue { background: #42A5F5; }
.dot.peach { background: #FF9F43; }

/* Футер */
.window-footer {
  padding: 12px 16px 16px;
  text-align: center;
}

.copyright {
  font-size: 12px;
  font-weight: 600;
  color: #78909C;
}

/* Медиа-запрос для очень маленьких экранов (меньше 360px) */
@media (max-width: 360px) {
  .features-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    row-gap: 6px;
  }
  .main-title {
    font-size: 20px;
  }
}
