:root {
  --bg-primary: #f6f8fd;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  
  --violet-gradient: linear-gradient(135deg, #a855f7, #6366f1);
  --pink-btn: #f43f5e;
  --dark-btn: #374151;
  
  --font-main: 'Nunito', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
button { border: none; background: none; font-family: inherit; cursor: pointer; outline: none; }
.v5-wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.v5-text-center { text-align: center; margin-left: auto; margin-right: auto; }
.v5-mt-4 { margin-top: 24px; }

/* Vibrant Hero Background */
.v5-bg {
  position: absolute; top: 0; left: 0; right: 0; height: 100vh; min-height: 700px;
  background: var(--violet-gradient);
  z-index: -1; overflow: hidden;
}
.v5-bg-orb {
  position: absolute; border-radius: 50%; filter: blur(80px);
}
.v5-bg-orb--1 { width: 60vh; height: 60vh; background: rgba(255,255,255,0.15); top: -10vh; left: -10vw; }
.v5-bg-orb--2 { width: 50vh; height: 50vh; background: rgba(59,130,246,0.4); bottom: -10vh; right: -5vw; }

.v5-floating-heart {
  position: absolute; fill: rgba(255,255,255,0.2); 
  animation: floatUp 8s infinite linear;
}
.v5-floating-heart svg { width: 40px; height: 40px; }
.v5-floating-heart--1 { left: 10%; bottom: -50px; animation-duration: 12s; }
.v5-floating-heart--2 { right: 15%; bottom: -50px; animation-delay: 4s; svg { width: 60px; height: 60px; } }

@keyframes floatUp {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(-800px) rotate(45deg); opacity: 0; }
}

/* 1. Hero / App Frame Layout */
.v5-hero {
  padding: 60px 0 100px;
  min-height: 80vh;
  display: flex; align-items: center; justify-content: center;
}

.v5-app-frame {
  margin: 0 auto;
  max-width: 440px; width: 100%;
  background: #ffffff;
  border-radius: 40px;
  padding: 24px 20px 32px;
  box-shadow: 0 40px 100px rgba(79, 70, 229, 0.4), inset 0 4px 10px rgba(255,255,255,0.8);
  position: relative;
  display: flex; flex-direction: column; gap: 20px;
}

/* App Header inside Frame */
.v5-app-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 12px;
}
.v5-app-title {
  font-size: 20px; font-weight: 900; letter-spacing: -0.5px; line-height: 1;
}
.v5-app-title span { color: #8b5cf6; }

.v5-app-icons { display: flex; gap: 12px; }
.v5-icon-box {
  width: 40px; height: 40px;
  display: flex; justify-content: center; align-items: center;
  border-radius: 14px; background: #f3f4f6; color: #9ca3af;
}
.v5-icon-box--active { background: #8b5cf6; color: #fff; box-shadow: 0 8px 16px rgba(139,92,246,0.3); }
.v5-icon-box svg { width: 20px; height: 20px; }

.v5-app-subtitle {
  text-align: center; color: var(--text-muted); font-size: 15px; font-weight: 600;
  margin: -10px 0 10px;
}

/* App Deck (The Listalka) */
.v5-deck-wrapper {
  position: relative;
  height: 480px; width: 100%;
  display: flex; justify-content: center; align-items: center;
}
#lp-hero-sizer {
  width: 100%; height: 100%; position: relative;
}
.v5-deck-inner { position: absolute; inset: 0; }
.v5-deck-link { position: absolute; inset: 0; z-index: 20; }
.v5-showcase { position: absolute; inset: 0; z-index: 1; }

.heart {
  position: absolute; inset: 0;
  border-radius: 32px; overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  will-change: transform, opacity;
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.6s;
  background: var(--violet-gradient);
}
.heart__img { width: 100%; height: 100%; object-fit: cover; }
.heart--empty { opacity: 0.5; }

/* Rotating cards to replicate 'Dating app swipe' look */
.heart[data-pos="front"] { transform: translate3d(0, 0, 0) scale(1) rotate(0); opacity: 1; z-index: 5; }
.heart[data-pos="back"] { transform: translate3d(-20px, 30px, 0) scale(0.92) rotate(-5deg); opacity: 0.8; z-index: 4; transform-origin: top right; }
.heart[data-pos="left1"] { transform: translate3d(-35px, 50px, 0) scale(0.85) rotate(-10deg); opacity: 0.4; z-index: 3; }
.heart[data-pos="left2"], .heart[data-pos="left3"] { opacity: 0; }
.heart[data-pos="next"] { transform: translate3d(40px, -20px, 0) scale(0.9) rotate(5deg); opacity: 0; z-index: 0; }

/* Deck UI overlaid on front card */
.v5-deck-ui {
  position: absolute; inset: 0; pointer-events: none; z-index: 6;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.v5-deck-buttons {
  position: absolute; bottom: 90px; right: 16px;
  display: flex; gap: 12px;
}
.v5-btn-circle {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; justify-content: center; align-items: center;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15); pointer-events: auto;
}
.v5-btn-circle--dark { background: var(--dark-btn); color: #fff; }
.v5-btn-circle--dark svg { width: 22px; height: 22px; }
.v5-btn-circle--pink { background: var(--pink-btn); color: #fff; box-shadow: 0 12px 24px rgba(244,63,94,0.4); }
.v5-btn-circle--pink svg { width: 26px; height: 26px; }

.v5-deck-info {
  background: #fff; margin: 16px; padding: 20px;
  border-radius: 24px; box-shadow: 0 15px 30px rgba(0,0,0,0.1);
  pointer-events: auto;
}
.v5-deck-name {
  font-size: 20px; font-weight: 800; color: var(--text-main); margin-bottom: 4px;
}
.v5-deck-city {
  font-size: 14px; font-weight: 600; color: var(--text-muted);
}
.v5-pin { color: #8b5cf6; margin-right: 4px; }

.v5-app-actions { margin-top: 10px; }
.v5-btn-full {
  display: block; width: 100%; text-align: center;
  background: var(--violet-gradient); color: #fff;
  font-size: 18px; font-weight: 800; padding: 18px;
  border-radius: 20px; box-shadow: 0 12px 24px rgba(139,92,246,0.3);
  transition: transform 0.2s;
}
.v5-btn-full:hover { transform: translateY(-2px); }

/* Main Content Wrapper */
.v5-main-content {
  background: var(--bg-primary);
  border-top-left-radius: 40px;
  border-top-right-radius: 40px;
  padding-top: 60px;
  margin-top: -60px;
  position: relative; z-index: 10;
}

/* Typography for sections */
.v5-h2 { font-size: 36px; font-weight: 900; letter-spacing: -1px; margin-bottom: 12px; }
.v5-lead { font-size: 16px; color: var(--text-muted); font-weight: 600; max-width: 500px; margin-bottom: 40px; }

/* 2. Profiles Grid */
.v5-profiles { padding: 40px 0 80px; }
.v5-p-label { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: #9ca3af; margin-bottom: 24px; font-weight: 800; }
.v5-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px; }

/* Pcard modified for V5 (White card style) */
.pcard {
  display: block; background: #fff; border-radius: 24px;
  padding: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.03);
  transition: transform 0.3s, box-shadow 0.3s;
}
.pcard:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(139,92,246,0.15); }
.pcard__media {
  aspect-ratio: 3/4; border-radius: 16px; overflow: hidden; position: relative;
  background: #f3f4f6;
}
.pcard__img { width: 100%; height: 100%; object-fit: cover; }
.pcard__img--empty { background: rgba(139,92,246,0.05); }

.pcard__heart {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px; background: rgba(255,255,255,0.9);
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.pcard__heart svg { width: 16px; height: 16px; fill: var(--pink-btn); }

.pcard__age {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(0,0,0,0.6); color: #fff; backdrop-filter: blur(4px);
  padding: 4px 10px; border-radius: 10px; font-size: 12px; font-weight: 800;
}
.pcard__body { padding: 16px 4px 4px; text-align: center; }
.pcard__name { font-size: 16px; font-weight: 800; color: var(--text-main); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard__meta { font-size: 13px; color: var(--text-muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard__pin { display: none; }
.v5-error { color: var(--pink-btn); background: #ffe4e6; padding: 16px; border-radius: 16px; font-weight: 700; text-align: center; margin-top: 20px; }

/* 3. Search Form */
.v5-search { padding: 80px 0; background: #fff; }
.v5-form-box {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: center;
}
.v5-form { background: #fbfbfe; padding: 40px; border-radius: 32px; box-shadow: 0 20px 60px rgba(0,0,0,0.03); border: 1px solid #f3f4f6; }
.v5-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.v5-label { display: block; font-size: 13px; font-weight: 800; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.v5-select {
  width: 100%; border: 2px solid #e5e7eb; border-radius: 16px; background: #fff;
  padding: 16px 20px; font-family: inherit; font-size: 15px; font-weight: 700; color: var(--text-main);
  outline: none; transition: border-color 0.2s;
}
.v5-select:focus { border-color: #8b5cf6; }

.v5-label-flex { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 12px; }
.v5-val-display { font-size: 16px; font-weight: 900; color: #8b5cf6; }

.v5-range { position: relative; height: 32px; display: flex; align-items: center; }
.v5-range__track { position: absolute; left: 0; right: 0; height: 6px; background: #e5e7eb; border-radius: 3px; }
.v5-range__track::after {
  content: ''; position: absolute; top: 0; bottom: 0; background: var(--violet-gradient); border-radius: 3px;
  left: calc(var(--min-p, 0) * 1%); width: calc((var(--max-p, 100) - var(--min-p, 0)) * 1%);
}
.v5-range__input { position: absolute; width: 100%; appearance: none; background: transparent; outline: none; pointer-events: none; }
.v5-range__input::-webkit-slider-thumb {
  appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 4px solid #8b5cf6; box-shadow: 0 4px 10px rgba(139,92,246,0.3); pointer-events: auto; cursor: pointer;
}

.v5-btn-solid {
  width: 100%; text-align: center; background: var(--violet-gradient); color: #fff;
  font-size: 16px; font-weight: 800; padding: 18px; border-radius: 16px;
  box-shadow: 0 10px 20px rgba(139,92,246,0.2); transition: transform 0.2s; display: block;
}
.v5-btn-solid:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(139,92,246,0.3); }

/* 4. About / Stories */
.v5-about { padding: 80px 0 100px; }
.v5-feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-bottom: 80px; }
.v5-feat-card { display: block; color: inherit; text-decoration: none; cursor: pointer; background: #fff; padding: 32px; border-radius: 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.03); text-align: center; }
.v5-feat-icon { font-size: 40px; margin-bottom: 20px; }
.v5-feat-title { font-size: 20px; font-weight: 900; margin-bottom: 12px; }
.v5-feat-desc { color: var(--text-muted); font-size: 15px; }

.v5-stories-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.v5-h3 { font-size: 28px; font-weight: 900; }
.v5-stories-nav { display: flex; gap: 12px; }
.v5-nav-btn {
  width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--text-main); fill: currentColor;
  display: flex; justify-content: center; align-items: center; box-shadow: 0 6px 15px rgba(0,0,0,0.05); font-size: 24px; font-weight: bold; padding-bottom: 4px;
}
.v5-nav-btn:hover { color: #8b5cf6; }

.v5-story-scroller {
  display: flex; gap: 24px; overflow-x: auto; padding-bottom: 20px;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.v5-story-scroller::-webkit-scrollbar { display: none; }
.v5-story { flex: 0 0 clamp(280px, 60vw, 400px); background: #fff; border-radius: 32px; padding: 32px; box-shadow: 0 10px 30px rgba(0,0,0,0.03); scroll-snap-align: start; }
.v5-story-who { font-size: 18px; font-weight: 900; margin-bottom: 4px; }
.v5-story-where { font-size: 12px; font-weight: 800; color: #8b5cf6; text-transform: uppercase; margin-bottom: 16px; letter-spacing: 0.5px; }
.v5-story-text { font-size: 15px; color: var(--text-muted); line-height: 1.6; }

/* Footer */
.v5-footer { background: #fff; padding: 60px 0; border-top: 1px solid #f3f4f6; }
.v5-foot-inner { text-align: center; }
.v5-foot-brand { font-size: 18px; font-weight: 900; margin-bottom: 16px; }
.v5-foot-copy { font-size: 14px; color: #9ca3af; max-width: 500px; margin: 0 auto 32px; }
.v5-foot-links { display: flex; justify-content: center; gap: 24px; }
.v5-foot-links a { font-size: 14px; font-weight: 700; color: var(--text-muted); transition: color 0.2s; }
.v5-foot-links a:hover { color: #8b5cf6; }

@media (max-width: 900px) {
  .v5-form-box { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .v5-form-box__left .v5-lead { margin: 0 auto 20px; }
  .v5-form__row { grid-template-columns: 1fr; }
  .v5-feat-grid { grid-template-columns: 1fr; }
  .v5-deck-wrapper { height: 400px; }
}

@media (max-width: 500px) {
  .v5-app-frame { border-radius: 0; padding: 20px 16px; box-shadow: none; border-bottom-left-radius: 40px; border-bottom-right-radius: 40px; }
  .v5-bg { height: 100vh; }
  .v5-hero { padding: 0 0 60px; align-items: flex-start; }
  .v5-main-content { margin-top: -30px; border-radius: 30px 30px 0 0; }
  .v5-deck-wrapper { height: 420px; }
}
