/* ==========================================================================
   APATIYM — TAMAGOTCHI / Y2K RETRO GAMING THEME
   Block color zoning inspired by Tamagotchi reference:
   1. Sky Hero: Real Cloud gradient/photo, big pixel font with black outline
   2. Black Space: Pixel stars, pixel planet Earth, neon pink markers
   3. Yellow 8-bit Zone: Pixel formula, retro icons, speech bubbles
   4. Hot Pink Canvas Frame (#e73887)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Space+Grotesk:wght@400;600;700;800&family=VT323&display=swap');

:root {
  --outer-pink: #fed9e5;
  --sky-blue: #6ec0ff;
  --space-black: #0c0d12;
  --yellow-bg: #1e111a;
  --neon-pink: #ff6ca3;
  --pixel-border: #000000;
  --highlight-yellow: #ff6ca3;
  --highlight-pink: #ff85b3;
  
  --font-pixel: 'VT323', monospace;
  --font-arcade: 'Press Start 2P', monospace;
  --font-clean: 'Space Grotesk', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: url('bg_hero.jpg') center/cover fixed no-repeat;
  font-family: var(--font-clean);
  color: #000;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 30px 14px;
  overflow-x: hidden;
}

/* Outer Container: Canvas surrounded by vibrant hot-pink margin */
.site-wrapper {
  width: 100%;
  max-width: 900px;
  background-color: #fff;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.45);
  border: 4px solid #000;
  overflow: hidden;
  position: relative;
}

/* ==========================================================================
   PIXEL DIVIDERS (Step jagged edges between color sections)
   ========================================================================== */
.pixel-stepped-divider {
  width: 100%;
  height: 28px;
  display: block;
  pointer-events: none;
}

/* ==========================================================================
   SECTION 1: BLUE SKY HERO (ТАМАГОЧИ / APATIYM STYLE)
   ========================================================================== */
.section-sky {
  background: url('bg_sky.jpg') center/cover no-repeat;
  position: relative;
  padding: 20px 24px 40px;
  text-align: center;
  overflow: hidden;
}

/* Cloud visuals via SVG */
.sky-cloud {
  position: absolute;
  pointer-events: none;
  opacity: 0.9;
}
.cloud-left { top: 30px; left: -20px; width: 220px; }
.cloud-right { top: 60px; right: -30px; width: 260px; }

/* Top mini nav */
.sky-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 10;
  margin-bottom: 25px;
}

.sky-logo {
  font-family: var(--font-pixel);
  font-size: 36px;
  color: #000;
  text-decoration: none;
  letter-spacing: 1px;
  font-weight: bold;
}

.sky-tg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--neon-pink);
  color: #fff;
  border: 2.5px solid #000;
  box-shadow: 3px 3px 0 #000;
  font-family: var(--font-pixel);
  font-size: 22px;
  padding: 2px 14px;
  text-decoration: none;
  cursor: pointer;
}
.sky-tg:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #000;
}

/* Giant Pixel Headline */
.hero-giant-pixel-title {
  font-family: var(--font-pixel);
  font-size: clamp(65px, 13vw, 130px);
  line-height: 0.82;
  letter-spacing: 4px;
  color: #fff;
  text-shadow: 
    4px 4px 0 #000,
    -4px -4px 0 #000,
    4px -4px 0 #000,
    -4px 4px 0 #000,
    0 5px 0 #000,
    5px 0 0 #000,
    0 -5px 0 #000,
    -5px 0 0 #000;
  position: relative;
  z-index: 5;
  user-select: none;
  margin-top: 10px;
}

/* Yellow Sub-badge over/under title */
.highlight-yellow-badge {
  display: inline-block;
  background-color: #fff;
  color: #000;
  border: 2px solid #000;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.4;
  margin: 15px auto 20px;
  max-width: 520px;
  position: relative;
  z-index: 6;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.15);
}

.mc-font {
  font-family: var(--font-arcade);
  font-size: 10px;
  color: #fff;
  background: #ff6ca3;
  padding: 2px 7px;
  border: 1.5px solid #000;
  border-radius: 3px;
  display: inline-block;
  vertical-align: middle;
  letter-spacing: 0px;
  text-transform: none;
  box-shadow: 1px 1px 0 #000;
}

/* Retro Tamagotchi Bunny/Alien Pet mascot */
.pixel-pet-center {
  margin: 10px auto 20px;
  position: relative;
  z-index: 5;
  animation: petFloat 2s ease-in-out infinite alternate;
}

@keyframes petFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

/* "Press start" Button */
.btn-press-start {
  display: inline-block;
  background-color: #000;
  color: #fff;
  font-family: var(--font-arcade);
  font-size: 14px;
  padding: 14px 28px;
  border: 3px solid #fff;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.5), inset 0 0 0 2px #000;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  z-index: 6;
  text-transform: uppercase;
  transition: all 0.1s;
}

.btn-press-start:hover {
  background-color: var(--neon-pink);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(0,0,0,0.6);
}

.btn-press-start:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 rgba(0,0,0,0.6);
}

/* Pink Submenu bar inside sky bottom */
.tamagotchi-menu-strip {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 35px;
  position: relative;
  z-index: 10;
  flex-wrap: wrap;
}

.menu-strip-btn {
  background-color: #ff3399;
  color: #fff;
  border: 2px solid #000;
  box-shadow: 2.5px 2.5px 0 #000;
  font-family: var(--font-pixel);
  font-size: 22px;
  padding: 3px 14px 1px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.1s;
}

.menu-strip-btn:hover {
  background-color: #000;
  transform: translateY(-2px);
}

/* ==========================================================================
   SECTION 2: BLACK SPACE / КТО ОНИ ТАКИЕ? (SPACE & EARTH)
   ========================================================================== */
.section-space {
  background-color: var(--space-black);
  color: #fff;
  position: relative;
  padding: 50px 36px 60px;
}

/* Pixel stars scattered */
.pixel-star {
  position: absolute;
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 20px;
  opacity: 0.8;
  pointer-events: none;
  user-select: none;
}

.space-heading {
  font-family: var(--font-pixel);
  font-size: clamp(55px, 10vw, 85px);
  letter-spacing: 3px;
  line-height: 0.9;
  text-transform: uppercase;
  margin-bottom: 30px;
  color: #fff;
}

.space-content-row {
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 5;
}

.space-texts {
  flex: 1;
}

.space-big-quote {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 20px;
}

.highlight-pink-text {
  background-color: var(--highlight-pink);
  color: #fff;
  padding: 2px 6px;
  border-radius: 2px;
  font-weight: 800;
}

.space-detailed-desc {
  font-size: 11.5px;
  line-height: 1.6;
  color: #bbb;
  max-width: 440px;
}

.space-detailed-desc p {
  margin-bottom: 10px;
}

/* Pixel Earth Illustration Container */
.pixel-earth-container {
  width: 220px;
  height: 220px;
  flex-shrink: 0;
  position: relative;
}

/* Filters & Search in Space Area */
.space-catalog-controls {
  margin-top: 45px;
  padding-top: 30px;
  border-top: 2px dashed rgba(255,255,255,0.2);
}

.search-field-space {
  position: relative;
  margin-bottom: 18px;
}

.search-field-space input {
  width: 100%;
  background: #181922;
  border: 3px solid #fff;
  box-shadow: 4px 4px 0 var(--neon-pink);
  color: #fff;
  padding: 12px 16px 10px 45px;
  font-size: 14px;
  font-family: var(--font-clean);
  outline: none;
}

.search-field-space input::placeholder {
  color: #888;
}

.search-ico-space {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-pixel);
  font-size: 26px;
  color: var(--neon-pink);
}

.budget-bar-space {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.budget-title-space {
  font-family: var(--font-pixel);
  font-size: 22px;
  color: #ff3399;
}

.price-btn-space {
  background: #1e1f2b;
  color: #fff;
  border: 2px solid #555;
  font-family: var(--font-pixel);
  font-size: 19px;
  padding: 2px 10px;
  cursor: pointer;
  transition: all 0.1s;
}

.price-btn-space:hover, .price-btn-space.active {
  background: var(--neon-pink);
  border-color: #fff;
  color: #fff;
  box-shadow: 2px 2px 0 #fff;
}

.filter-tab-space {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #000;
  border: 2px solid #000;
  font-family: var(--font-pixel);
  font-size: 22px;
  padding: 3px 14px 1px;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--neon-pink);
  transition: all 0.1s;
}

.filter-tab-space.active {
  background: var(--highlight-yellow);
  color: #000;
  box-shadow: 3px 3px 0 #fff;
  transform: translate(-1px, -1px);
}

.pixel-tab-icon {
  width: 22px;
  height: 22px;
  display: inline-block;
  flex-shrink: 0;
  shape-rendering: crispEdges;
}

.pixel-section-icon {
  width: 36px;
  height: 36px;
  display: inline-block;
  flex-shrink: 0;
  shape-rendering: crispEdges;
}

/* ==========================================================================
   SERVICES GRID (In Space Dark Zone)
   ========================================================================== */
.services-catalog-space {
  margin-top: 35px;
}

.service-section-space {
  margin-bottom: 45px;
}

.service-section-space.hidden {
  display: none !important;
}

.section-head-space {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 3px solid #fff;
  padding-bottom: 6px;
  margin-bottom: 20px;
}

.section-head-space h2 {
  font-family: var(--font-pixel);
  font-size: 38px;
  letter-spacing: 2px;
  color: var(--highlight-yellow);
  text-transform: uppercase;
}

.section-head-space p {
  font-size: 11px;
  color: #aaa;
  font-weight: 600;
}

.cards-grid-space {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}

/* Retro Space Card */
.card {
  background-color: #161722;
  border: 3px solid #fff;
  box-shadow: 4px 4px 0 var(--neon-pink);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s, box-shadow 0.15s;
  color: #fff;
  position: relative;
}

.card:hover {
  transform: translate(-2px, -3px);
  box-shadow: 6px 6px 0 var(--highlight-yellow);
}

.card.hidden {
  display: none !important;
}

.card-status-bar {
  display: flex;
  gap: 6px;
  min-height: 24px;
  margin-bottom: 8px;
}

.promo-badge, .soon-badge, .pixel-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-pixel);
  font-size: 15px;
  padding: 3px 8px 2px;
  border: 1.5px solid #000;
  box-shadow: 2px 2px 0 #000;
  line-height: 1;
  border-radius: 2px;
}

.promo-badge svg, .soon-badge svg, .pixel-card-badge svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  shape-rendering: crispEdges;
}

.promo-badge {
  background: #ff6ca3;
  color: #fff;
  font-weight: bold;
}

/* Darkened state for 'SOON' / 'В разработке' cards */
.card.soon {
  background-color: #0e0f17;
  border-color: #3a3d52;
  box-shadow: 4px 4px 0 #1b1d2a;
  opacity: 0.75;
}

.card.soon:hover {
  transform: none;
  box-shadow: 4px 4px 0 #ff6ca3;
  opacity: 0.9;
}

.card.soon h3 {
  color: #8a8d9e;
}

.card.soon p {
  color: #616475;
}

.soon-badge {
  background: #252836;
  color: #ff85b3;
  border: 1.5px solid #ff6ca3;
  box-shadow: 2px 2px 0 #000;
  font-weight: bold;
}

.badge-mc {
  background: #ff6ca3;
  color: #fff;
  font-weight: bold;
}

.badge-bundle {
  background: #ff85b3;
  color: #000;
  font-weight: bold;
}

.badge-discord {
  background: #e91e63;
  color: #fff;
  font-weight: bold;
}

.badge-web {
  background: #ff6ca3;
  color: #fff;
  font-weight: bold;
}

.badge-design {
  background: #ff85b3;
  color: #000;
  font-weight: bold;
}

.badge-license {
  background: #d81b60;
  color: #fff;
  font-weight: bold;
}

.badge-default {
  background: #ff6ca3;
  color: #fff;
}

.card h3 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 8px;
  color: #fff;
}

.card p {
  font-size: 11px;
  color: #bbb;
  line-height: 1.4;
  margin-bottom: 16px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
}

.price-stack {
  display: flex;
  flex-direction: column;
}

.old-price {
  font-size: 11px;
  text-decoration: line-through;
  color: #888;
}

.price {
  font-family: var(--font-pixel);
  font-size: 30px;
  line-height: 1;
  color: var(--highlight-yellow);
}

.prepay-tag {
  font-size: 9px;
  color: #999;
  margin-top: 2px;
}

/* Card Action Buttons */
.pay-btn, .discuss-btn, .disabled-soon-btn {
  font-family: var(--font-pixel);
  font-size: 22px;
  padding: 4px 12px 1px;
  border: 2px solid #fff;
  box-shadow: 2px 2px 0 #000;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all 0.1s;
}

.pay-btn {
  background: var(--neon-pink);
  color: #fff;
}

.pay-btn:hover {
  background: #ff55aa;
  box-shadow: 3px 3px 0 #fff;
}

.discuss-btn {
  background: #fed9e5;
  color: #000;
  border-color: #ff6ca3;
}

.discuss-btn:hover {
  background: #ff6ca3;
  color: #fff;
  box-shadow: 3px 3px 0 #fff;
}

.disabled-soon-btn {
  background: #333;
  color: #777;
  border-color: #555;
  cursor: not-allowed;
}

/* ==========================================================================
   SECTION 3: YELLOW 8-BIT ZONE (ЭТИМОЛОГИЯ / FAQ & RULES)
   ========================================================================== */
.section-yellow {
  background-color: #1c0e18;
  color: #fff;
  padding: 50px 36px 60px;
  position: relative;
  border-top: 3px solid #ff6ca3;
}

.yellow-heading {
  font-family: var(--font-pixel);
  font-size: clamp(50px, 9vw, 80px);
  letter-spacing: 3px;
  line-height: 0.95;
  text-transform: uppercase;
  margin-bottom: 24px;
  text-align: center;
  color: #ff6ca3;
}

/* Retro formula: Egg + Watch = Tamagotchi */
.formula-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin: 35px 0 45px;
  flex-wrap: wrap;
}

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

.formula-plus {
  font-family: var(--font-pixel);
  font-size: 55px;
  font-weight: bold;
  color: #ff6ca3;
}

.formula-label {
  font-family: var(--font-pixel);
  font-size: 20px;
  margin-top: 8px;
  color: #fed9e5;
}

.japanese-side-text {
  font-family: var(--font-pixel);
  font-size: 32px;
  writing-mode: vertical-rl;
  letter-spacing: 4px;
  font-weight: bold;
  color: #ff6ca3;
}

/* Retro Speech Bubble with Mascot */
.speech-bubble-wrapper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  margin-top: 30px;
}

.formula-item svg {
  fill: #ff6ca3 !important;
}

.pixel-speech-bubble {
  background: #140a12;
  border: 2.5px solid #ff6ca3;
  box-shadow: 4px 4px 0 #000;
  color: #fff;
  padding: 14px 18px;
  max-width: 480px;
  font-size: 13px;
  font-weight: 700;
  position: relative;
}

.pixel-speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 30px;
  border-width: 12px 12px 0;
  border-style: solid;
  border-color: #ff6ca3 transparent;
  display: block;
  width: 0;
}

/* Yellow Zone Accordion (FAQ & Rules) */
.yellow-accordion-box {
  margin-top: 50px;
}

.accordion-item-yellow {
  background: #140a12;
  border: 2px solid #ff6ca3;
  box-shadow: 4px 4px 0 #000;
  margin-bottom: 14px;
  color: #fff;
}

.accordion-trigger-yellow {
  width: 100%;
  padding: 14px 18px;
  background: none;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-clean);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
}

.accordion-icon-yellow {
  font-family: var(--font-pixel);
  font-size: 28px;
  line-height: 1;
}

.accordion-item-yellow.active .accordion-icon-yellow {
  transform: rotate(45deg);
}

.accordion-content-yellow {
  display: none;
  padding: 0 18px 18px;
  font-size: 12px;
  line-height: 1.55;
  border-top: 2px dashed #000;
  margin-top: 4px;
  padding-top: 12px;
}

.accordion-item-yellow.active .accordion-content-yellow {
  display: block;
}

/* Footer inside yellow zone */
.site-footer-retro {
  margin-top: 45px;
  padding-top: 20px;
  border-top: 2px solid #ff6ca3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-clean);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.site-footer-retro a {
  color: #ff6ca3;
  text-decoration: underline;
  font-weight: bold;
}

/* ==========================================================================
   MODAL & TOAST
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #fff;
  border: 4px solid #000;
  box-shadow: 8px 8px 0 var(--neon-pink);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
}

.modal-header {
  background: #000;
  color: #fff;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-family: var(--font-arcade);
  font-size: 14px;
  letter-spacing: 1px;
}

.modal-close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

.modal-body {
  padding: 20px;
}

.modal-product-info {
  background: var(--highlight-yellow);
  border: 2px solid #000;
  padding: 12px;
  margin-bottom: 16px;
}

.modal-product-title {
  font-weight: 800;
  font-size: 15px;
}

.modal-product-desc {
  font-size: 11px;
  color: #444;
  margin: 4px 0 8px;
}

.modal-price-line {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-pixel);
  font-size: 28px;
  font-weight: bold;
}

.modal-form-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  margin-bottom: 6px;
}

.modal-input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #000;
  font-family: var(--font-clean);
  font-weight: 700;
  font-size: 14px;
  outline: none;
  margin-bottom: 12px;
}

.btn-primary {
  width: 100%;
  background: var(--neon-pink);
  color: #fff;
  font-family: var(--font-arcade);
  font-size: 12px;
  padding: 12px;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;
  cursor: pointer;
  transition: all 0.1s;
}

.btn-primary:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 #000;
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #000;
  color: var(--highlight-yellow);
  padding: 12px 18px;
  border: 2px solid #fff;
  box-shadow: 4px 4px 0 var(--neon-pink);
  font-family: var(--font-pixel);
  font-size: 22px;
}

@media (max-width: 680px) {
  .space-content-row { flex-direction: column; text-align: center; }
  .pixel-earth-container { margin: 0 auto; }
  .tamagotchi-menu-strip { display: none; }
  .hero-giant-pixel-title { font-size: 65px; }
}
