* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
  background: #0a0a1a;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden;
}

.page {
  position: relative;
  width: 100%;
  max-width: 375px;
  min-height: 100vh;
  background: linear-gradient(180deg, #1a0a2e 0%, #0a0a1a 100%);
  padding: 20px 16px 40px;
  overflow: hidden;
}

/* background slideshow */
.bg-slideshow {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 375px;
  height: 100vh;
  z-index: 0;
}

.bg-slideshow .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: fadeCycle 18s infinite;
}

.bg-slideshow .slide:nth-child(1) {
  animation-delay: 0s;
}
.bg-slideshow .slide:nth-child(2) {
  animation-delay: 6s;
}
.bg-slideshow .slide:nth-child(3) {
  animation-delay: 12s;
}

@keyframes fadeCycle {
  0%, 100% { opacity: 0; }
  8% { opacity: 0.3; }
  25% { opacity: 0.35; }
  33% { opacity: 0.3; }
  41% { opacity: 0; }
}

.overlay {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 375px;
  height: 100vh;
  background: linear-gradient(180deg, rgba(10,10,26,0.75) 0%, rgba(10,10,26,0.6) 50%, rgba(10,10,26,0.85) 100%);
  z-index: 1;
  pointer-events: none;
}

/* header */
.header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 0 20px;
}

.app-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
}

.app-name {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #ff6b9d, #c44dff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 2px;
}

/* stories bar (Instagram style) */
.stories-bar {
  position: relative;
  z-index: 10;
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 12px 0 20px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  justify-content: center;
}

.stories-bar::-webkit-scrollbar {
  display: none;
}

.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.story-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b9d, #c44dff, #ff6b9d);
  padding: 3px;
  animation: ringPulse 2s infinite;
}

@keyframes ringPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 157, 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(255, 107, 157, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 157, 0); }
}

.story-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #0a0a1a;
}

.story-label {
  font-size: 11px;
  color: #ddd;
  font-weight: 500;
}

/* match card */
.match-card {
  position: relative;
  z-index: 10;
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 20px 18px;
  margin: 8px 0 20px;
  border: 1px solid rgba(255,255,255,0.12);
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.card-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ff6b9d, #c44dff);
  border-radius: 20px;
  padding: 4px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 14px;
}

.card-users {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.card-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ff6b9d;
}

.heart-icon {
  font-size: 28px;
  animation: heartBeat 1.2s infinite;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.25); }
  30% { transform: scale(1); }
  45% { transform: scale(1.15); }
  60% { transform: scale(1); }
}

.card-info {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 8px;
}

.distance {
  background: rgba(255,107,157,0.2);
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 12px;
  color: #ff9ec4;
}

.verify-badge {
  background: rgba(76,217,100,0.2);
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 12px;
  color: #76d68c;
}

.card-desc {
  font-size: 15px;
  color: #f0e6ff;
  font-weight: 500;
  margin-top: 4px;
}

/* user grid */
.user-grid {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 8px 0 24px;
}

.user-card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: 12px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.2s;
}

.user-card:active {
  transform: scale(0.96);
}

.user-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 8px;
  display: block;
  border: 2px solid rgba(255,107,157,0.4);
}

.user-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 4px;
}

.user-name {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}

.user-status {
  font-size: 10px;
  background: rgba(255,255,255,0.1);
  padding: 2px 8px;
  border-radius: 10px;
  color: #aaa;
}

.user-status.online {
  background: rgba(76,217,100,0.25);
  color: #76d68c;
}

.user-distance {
  font-size: 12px;
  color: #ff9ec4;
}

/* cta section */
.cta-section {
  position: relative;
  z-index: 10;
  text-align: center;
  margin: 12px 0 20px;
}

.cta-text {
  font-size: 15px;
  color: #d0c0e0;
  margin-bottom: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.download-btn {
  display: inline-block;
  background: linear-gradient(135deg, #ff6b9d, #c44dff);
  border: none;
  border-radius: 50px;
  padding: 16px 56px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(196, 77, 255, 0.45);
  transition: all 0.25s;
  letter-spacing: 1px;
  outline: none;
  width: 90%;
  max-width: 300px;
}

.download-btn:active {
  transform: scale(0.94);
  box-shadow: 0 4px 16px rgba(196, 77, 255, 0.35);
}

.trust-badges {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 18px;
  font-size: 12px;
  color: #a090b8;
}

.trust-badges span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* online counter */
.online-counter {
  position: relative;
  z-index: 10;
  text-align: center;
  font-size: 13px;
  color: #a99ec0;
  padding: 12px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #4cd964;
  border-radius: 50%;
  animation: dotPulse 1.5s infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(76,217,100,0.5); }
  50% { opacity: 0.5; box-shadow: 0 0 0 6px rgba(76,217,100,0); }
}

.count-num {
  font-weight: 700;
  color: #ff9ec4;
  font-size: 15px;
}

/* responsive for safety */
@media (max-width: 375px) {
  .page { padding: 16px 12px 30px; }
  .download-btn { padding: 14px 40px; font-size: 18px; }
  .story-ring { width: 56px; height: 56px; }
  .user-photo { width: 64px; height: 64px; }
}

/* additional polish */
* {
  -webkit-tap-highlight-color: transparent;
}

.page > *:not(.bg-slideshow):not(.overlay) {
  position: relative;
  z-index: 10;
}
