/* ============================================================
   HOME — hero, stories, categories, live section
   ============================================================ */

/* ---- Hero banner ---- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 30px 32px;
  margin-top: 6px;
  background:
    radial-gradient(520px 220px at 8% -20%,  rgba(255,92,138,.4),  transparent 60%),
    radial-gradient(520px 240px at 100% -10%, rgba(67,232,216,.32), transparent 60%),
    linear-gradient(135deg, #2A1B52, #3A1D54 55%, #5B2350);
  border: 1px solid var(--line-soft);
}

.hero__dots {
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image: radial-gradient(rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000, transparent);
  pointer-events: none;
}

.hero__title {
  font-size: 27px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -.4px;
  position: relative;
}

.hero__desc {
  color: #E8DEFB;
  font-size: 14.5px;
  margin: 7px 0 18px;
  position: relative;
  max-width: 560px;
}

.hero__cta {
  display: flex;
  gap: 11px;
  position: relative;
  flex-wrap: wrap;
}

.hero__search-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(18,15,38,.5);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 13px;
  padding: 12px 16px;
  min-width: 280px;
  flex: 1;
  max-width: 440px;
  backdrop-filter: blur(6px);
}
.hero__search-bar input {
  border: 0;
  background: transparent;
  color: #fff;
  width: 100%;
  outline: none;
  font-size: 14.5px;
}
.hero__search-bar input::placeholder { color: #C9BEEA; }

.hero__stats {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  position: relative;
  color: #E8DEFB;
  font-size: 13px;
  flex-wrap: wrap;
}
.hero__stats b  { color: #fff; font-family: var(--font-mono); }

.hero__dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
}

/* ---- Stories ---- */
.stories {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: none;
}
.stories::-webkit-scrollbar { display: none; }

.story {
  flex: none;
  width: 78px;
  text-align: center;
  cursor: pointer;
}

.story__ring {
  width: 74px; height: 74px;
  border-radius: 50%;
  padding: 3px;
  margin: 0 auto 7px;
  background: conic-gradient(from 210deg, var(--pink), var(--gold), var(--cyan), var(--violet), var(--pink));
  transition: transform var(--ease);
}
.story:hover .story__ring { transform: scale(1.06); }

.story__ring--muted { background: var(--line); }

.story__inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 3px solid var(--bg);
  display: grid;
  place-items: center;
  font-size: 30px;
  background: linear-gradient(135deg, #2A2456, #3A2160);
}

.story--add .story__inner {
  font-size: 26px;
  color: var(--pink);
}

.story--seen .story__ring { background: var(--line); }

.story__name {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Category row ---- */
.cat-row { display: flex; gap: 10px; flex-wrap: wrap; }

.cat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 13px;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  font-weight: 600;
  font-size: 13.5px;
  transition: border-color var(--ease), transform var(--ease);
}
.cat:hover { border-color: var(--cyan); transform: translateY(-2px); }
.cat__icon  { font-size: 18px; }

/* ---- Story modal ---- */
.story-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(8,6,20,.86);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
}
.story-modal[hidden] { display: none; }

.story-modal__close {
  position: fixed;
  top: 18px; right: 18px;
  z-index: 5;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 18px;
  display: grid;
  place-items: center;
}

.story-view {
  width: 330px;
  max-width: 92vw;
  height: 580px;
  max-height: 86vh;
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(160deg, #3A2160, #5B2350);
  border: 1px solid var(--line);
}

.story-progress {
  position: absolute;
  top: 12px; left: 12px; right: 12px;
  display: flex;
  gap: 5px;
  z-index: 3;
}
.story-progress i {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: rgba(255,255,255,.3);
  overflow: hidden;
}
.story-progress i b {
  display: block;
  height: 100%;
  width: 0;
  background: #fff;
  animation: story-bar 5s linear forwards;
}
@keyframes story-bar { to { width: 100%; } }

.story-header {
  position: absolute;
  top: 26px; left: 14px; right: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 3;
}
.story-header__av {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 18px;
  background: rgba(0,0,0,.3);
  border: 2px solid #fff;
}
.story-header__name { font-weight: 700; font-size: 14px; color: #fff; }
.story-header__time { font-size: 11px; color: #E0D6F5; }

.story-content {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 120px;
  pointer-events: none;
}

.story-caption {
  position: absolute;
  bottom: 74px; left: 0; right: 0;
  text-align: center;
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  padding: 0 24px;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
}

.story-footer {
  position: absolute;
  bottom: 16px; left: 14px; right: 14px;
  display: flex;
  gap: 10px;
  z-index: 3;
}
.story-footer__input {
  flex: 1;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 22px;
  padding: 10px 16px;
  color: #E0D6F5;
  font-size: 13px;
  outline: none;
}
.story-footer__gift {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  font-size: 18px;
  display: grid; place-items: center;
}
