/* =============================================
   THE HORROR CHAMBER | DARKSIDE CHRONICLES
   style.css — Ultra Horror Professional Theme
   By Mehtab Ali | Mian Channu, Pakistan
   AdSense-Ready | SEO Optimized | © 2026
============================================= */

/* Fonts loaded via non-blocking HTML link tags for maximum speed */

/* =============================================
   AUTHOR BANNER
   — Fixed strip, flush below navbar (60px)
   — Single centred line: skull · Curated by Mehtab Ali · skull
============================================= */
.author-banner {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  z-index: 980;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 0, 0, 0.98);
  border-bottom: 1px solid #2a0000;
  box-shadow: 0 2px 18px rgba(100,0,0,0.15);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.author-banner--visible {
  opacity: 1;
  transform: translateY(0);
}

.author-banner-inner--center {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-banner-skull {
  font-size: 13px;
  color: var(--red-bright);
  filter: drop-shadow(0 0 5px red);
  animation: skullBeat 2.8s ease-in-out infinite;
  line-height: 1;
}

.author-banner-curated {
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #888;
  white-space: nowrap;
}

/* =============================================
   HERO — push down by navbar (60px) + banner (36px) = 96px
============================================= */
.hero-section {
  margin-top: 96px;   /* clears navbar + author banner */
  height: calc(100vh - 96px);
  min-height: 520px;
}

/* =============================================
   ROCKET PAGE REVEAL
============================================= */
body.page-loaded .hero-content {
  animation: rocketReveal 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rocketReveal {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =============================================
   PERFORMANCE — GPU COMPOSITE LAYERS
   Only fog/hero-bg get will-change (they actually animate)
   Cards use content-visibility instead (more efficient)
============================================= */
.hero-bg,
.fog {
  will-change: transform;
}

.story-card {
  contain: layout style;
  transform: translateZ(0);
}

/* =============================================
   MOBILE RESPONSIVE — AUTHOR BANNER
============================================= */
@media (max-width: 700px) {
  .navbar { padding: 10px 4%; }

  .author-banner {
    top: 56px;
    height: 32px;
  }

  .hero-section {
    margin-top: 88px;
    height: calc(100vh - 88px);
  }

  .author-banner-curated { font-size: 11px; letter-spacing: 2px; }
}

@media (max-width: 480px) {
  .author-banner { top: 54px; height: 30px; }
  .hero-section  { margin-top: 84px; height: calc(100vh - 84px); }
  .author-banner-curated { font-size: 10px; letter-spacing: 1.5px; }
}

/* === RESET & BASE === */
*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
}

:root {
  --red:        #cc0000;
  --red-dark:   #8a0303;
  --red-bright: #ff2222;
  --black:      #000000;
  --dark:       #050505;
  --dark2:      #0a0a0a;
  --dark3:      #07070d;
  --border:     #1e0000;
  --border2:    #2a0000;
  --text:       #ccc;
  --text-dim:   #888;
  --text-dark:  #555;
  --text-dead:  #333;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* iOS momentum scroll */
  -webkit-overflow-scrolling: touch;
}

body {
  background: var(--black);
  background-image: radial-gradient(ellipse at 50% 0%, #200000 0%, #000 65%);
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Stop iOS rubberbanding / scroll chaining */
  overscroll-behavior: none;
}

/* === SCROLLBAR === */
::-webkit-scrollbar         { width: 5px; }
::-webkit-scrollbar-track   { background: #050505; }
::-webkit-scrollbar-thumb   { background: #8a0303; border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: #cc0000; }
::selection { background: #8a0303; color: white; }

/* === FOG LAYER === */
.fog {
  position: fixed;
  top: 0; left: 0;
  width: 200%; height: 100%;
  pointer-events: none;
  z-index: 1;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(80,0,0,0.05) 25%,
    rgba(100,0,0,0.09) 45%,
    rgba(80,0,0,0.05) 65%,
    transparent 85%,
    rgba(50,0,0,0.04) 100%
  );
  animation: fogMove 70s linear infinite;
}

@keyframes fogMove {
  0%   { transform: translateX(0) translateZ(0); }
  100% { transform: translateX(-50%) translateZ(0); }
}

/* === NAVBAR === */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 5%;
  background: rgba(0,0,0,0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid #2a0000;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(0,0,0,1);
  border-bottom-color: #550000;
  box-shadow: 0 4px 24px rgba(150,0,0,0.18);
}

.logo {
  font-family: 'Creepster', cursive;
  font-size: 26px;
  letter-spacing: 2px;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo span { color: var(--red-bright); text-shadow: 0 0 12px red; }

.skull-glow {
  color: var(--red-bright);
  filter: drop-shadow(0 0 6px red);
  font-size: 20px;
}

/* === CUSTOM SVG LOGO === */
.hc-logo-link {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}

.hc-logo-svg {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 5px rgba(200,0,0,0.6));
  transition: filter 0.3s ease, transform 0.3s ease;
}

.hc-logo-link:hover .hc-logo-svg {
  filter: drop-shadow(0 0 10px rgba(255,0,0,0.9));
  transform: rotate(-5deg) scale(1.08);
}

.hc-logo-text {
  font-family: 'Creepster', cursive;
  font-size: 26px;
  letter-spacing: 2px;
  color: white;
}

.hc-logo-text span {
  color: var(--red-bright);
  text-shadow: 0 0 12px red;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 15px;
}

.creator-badge {
  padding: 5px 13px;
  border: 1px solid #4a0303;
  border-radius: 30px;
  background: rgba(10,0,0,0.8);
  color: #ff5555;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

/* === MUSIC BUTTON === */
.music-btn {
  width: 36px; height: 36px;
  background: rgba(18,18,18,0.9);
  border: 1px solid #2a2a2a;
  border-radius: 50%;
  color: #888;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  flex-shrink: 0;
  outline: none;
}

.music-btn:hover {
  background: #222;
  color: #fff;
  border-color: #444;
  box-shadow: 0 0 12px rgba(255,255,255,0.08);
}

.music-btn.playing {
  background: #1a1a1a;
  color: #fff;
  border-color: #3a3a3a;
  animation: musicPulse 1.8s ease-in-out infinite;
}

@keyframes musicPulse {
  0%,100% { box-shadow: 0 0 4px rgba(255,255,255,0.08); }
  50%      { box-shadow: 0 0 16px rgba(255,255,255,0.18); }
}

.website-share-btn {
  width: 36px; height: 36px;
  padding: 0;
  background: rgba(18,18,18,0.95);
  color: #aaa;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  transition: all 0.3s;
  white-space: nowrap;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.website-share-btn:hover {
  background: #202020;
  color: #fff;
  border-color: #444;
  box-shadow: 0 0 12px rgba(255,255,255,0.06);
  transform: translateY(-1px);
}

#loading-screen {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: opacity 0.18s ease; /* ultra fast: 0.18s */
}

#loading-screen.hide { opacity: 0; pointer-events: none; }

.loading-skull {
  width: 60px;
  height: 60px;
  color: var(--red-bright);
  filter: drop-shadow(0 0 18px red);
  animation: skullBeat 1.2s ease-in-out infinite;
  will-change: transform;
  flex-shrink: 0;
}

@keyframes skullBeat {
  0%,100% { transform: scale(1);    filter: drop-shadow(0 0 10px red); }
  50%     { transform: scale(1.12); filter: drop-shadow(0 0 30px red); }
}

.loading-text {
  font-family: 'Creepster', cursive;
  font-size: 22px;
  letter-spacing: 4px;
  color: #ff4444;
  text-shadow: 0 0 10px red;
}

.loading-bar {
  width: 220px; height: 3px;
  background: #1a0000;
  border-radius: 10px;
  overflow: hidden;
}

#loading-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #8a0303, #ff2222);
  border-radius: 10px;
  box-shadow: 0 0 8px red;
}

/* === HERO SECTION === */
.hero-section {
  /* height & margin-top set in the author-banner block above */
  min-height: 520px;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('hero-bg.jpg') center center / cover no-repeat;
  filter: brightness(0.28) saturate(1.3);
  transform: scale(1.04);
  z-index: 0;
  transition: transform 12s ease;
}

.hero-section:hover .hero-bg {
  transform: scale(1.01);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.15) 50%, rgba(0,0,0,0.95) 100%),
    radial-gradient(ellipse at center, transparent 25%, rgba(80,0,0,0.6) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 20px 5%;
  max-width: 900px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 5px;
  color: #cc0000;
  text-transform: uppercase;
  border: 1px solid #440000;
  padding: 5px 16px;
  border-radius: 20px;
  margin-bottom: 22px;
  background: rgba(10,0,0,0.7);
}

.glitch-text {
  font-family: 'Creepster', cursive;
  font-size: 86px;
  letter-spacing: 4px;
  color: white;
  text-shadow: 0 0 20px red, 0 0 40px rgba(200,0,0,0.5);
  margin-bottom: 6px;
  line-height: 1;
  animation: glitchPulse 5s infinite;
}

.glitch-sub {
  font-family: 'Oswald', sans-serif;
  font-size: 18px;
  letter-spacing: 8px;
  color: var(--red-bright);
  margin-bottom: 22px;
  text-transform: uppercase;
  opacity: 0.85;
}

@keyframes glitchPulse {
  0%,93%,100% { text-shadow: 0 0 18px red, 0 0 35px rgba(200,0,0,0.5); }
  94%  { text-shadow: 0 0 50px red, 0 0 90px red, 4px 0 0 rgba(255,0,0,0.7), -4px 0 0 rgba(120,0,0,0.8); transform: skewX(-1deg); }
  95%  { text-shadow: 0 0 18px red; transform: skewX(0); }
  96%  { text-shadow: 0 0 50px red, -3px 0 0 rgba(255,0,0,0.7); transform: skewX(1deg); }
  97%  { text-shadow: 0 0 18px red; transform: skewX(0); }
}

.hero-desc {
  font-size: 17px;
  color: rgba(200,200,200,0.8);
  margin-bottom: 38px;
  line-height: 1.95;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-desc em { color: #ff5555; font-style: normal; }

/* === HERO STATS BAR === */
.hero-stats {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 0;
  padding: 18px 0;
  background: rgba(0,0,0,0.75);
  border-top: 1px solid #200000;
  backdrop-filter: blur(8px);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 40px;
  border-right: 1px solid #200000;
}
.stat-item:last-child { border-right: none; }

.stat-num {
  font-family: 'Creepster', cursive;
  font-size: 28px;
  color: var(--red-bright);
  text-shadow: 0 0 10px rgba(255,0,0,0.5);
  line-height: 1;
}

.stat-label {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #444;
}

/* === SCROLL HINT === */
.scroll-hint {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: #333;
  font-size: 9px;
  letter-spacing: 4px;
  text-transform: uppercase;
  animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-hint i { font-size: 12px; }

@keyframes scrollBounce {
  0%,100% { transform: translateX(-50%) translateY(0); opacity: 0.5; }
  50%     { transform: translateX(-50%) translateY(6px); opacity: 1; }
}

/* === BLOOD BTN === */
.blood-btn {
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 15px 36px;
  background: linear-gradient(135deg, #8a0303, #6a0202);
  color: white;
  border: 1px solid #cc0000;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 2px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  transition: all 0.35s;
  cursor: pointer;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  outline: none;
}

.blood-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,50,50,0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.blood-btn:hover {
  background: linear-gradient(135deg, #cc0000, #8a0303);
  box-shadow: 0 0 30px rgba(255,0,0,0.6), 0 0 60px rgba(255,0,0,0.2);
  transform: translateY(-2px);
}

.blood-btn:hover::before { opacity: 1; }

/* === SECTION HEADING === */
.section-heading {
  text-align: center;
  margin-bottom: 52px;
}

.section-heading h2 {
  font-family: 'Creepster', cursive;
  font-size: 42px;
  letter-spacing: 4px;
  color: white;
  text-shadow: 0 0 18px red, 0 0 36px rgba(200,0,0,0.4);
}

.section-heading h2 i {
  color: var(--red-bright);
  margin-right: 10px;
  filter: drop-shadow(0 0 6px red);
}

.red-line {
  width: 90px;
  height: 3px;
  background: linear-gradient(90deg, transparent, red, transparent);
  margin: 14px auto;
  box-shadow: 0 0 14px rgba(255,0,0,0.7);
}

.section-sub {
  color: #555;
  font-size: 13px;
  font-style: italic;
  margin-top: 8px;
}

/* === STORIES WRAPPER === */
.stories-wrapper {
  padding: 90px 5% 70px;
  position: relative;
  z-index: 2;
}

/* === GRID === */
.grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 1280px;
  margin: 0 auto;
}

/* === STORY CARD === */
.story-card {
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.38s ease, box-shadow 0.38s ease, border-color 0.38s ease;
  display: flex;
  flex-direction: column;
  /* Instant visibility — no hidden-card delay */
  opacity: 1;
  transform: none;
}

.story-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 50px rgba(180,0,0,0.22), 0 0 0 1px #330000;
  border-color: #330000;
}

/* === IMAGE WRAPPER === */
.image-wrapper {
  position: relative;
  overflow: hidden;
  /* aspect-ratio keeps full image visible without fixed height cropping */
  aspect-ratio: 4 / 3;
  height: auto;
}

.story-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  /* Full brightness always — no dim, no toggle, pure horror */
  filter: brightness(1) saturate(1.15) contrast(1.08);
  /* No transition needed — image stays completely still */
}

/* Image stays static on hover — no zoom, no scale, always full horror */
.story-card:hover .story-image {
  filter: brightness(1) saturate(1.15) contrast(1.08);
}

/* === COMING SOON BADGE === */
.coming-soon-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.9);
  border: 1px solid #550000;
  color: #cc0000;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* === CARD CONTENT === */
.card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.story-title {
  font-family: 'Oswald', sans-serif;
  font-size: 19px;
  color: #ff4444;
  margin-bottom: 10px;
  letter-spacing: 1px;
  line-height: 1.3;
  text-shadow: 0 0 8px rgba(255,0,0,0.2);
}

.story-intro {
  font-size: 13.5px;
  color: #777;
  line-height: 1.85;
  margin-bottom: 16px;
  flex: 1;
}

/* === FULL STORY === */
.full-story {
  display: none;
  margin-top: 18px;
  padding: 22px 20px;
  border-top: 1px solid #1a0000;
  border-radius: 8px;
  background: rgba(4, 0, 0, 0.85);
  font-size: 15px;
  line-height: 2.15;
  color: #c8c8c8;
  white-space: pre-wrap;
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  letter-spacing: 0.02em;
  animation: fadeInStory 0.22s ease;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.6);
  border: 1px solid rgba(60,0,0,0.4);
}

.full-story.coming-soon-text {
  color: #555;
  font-style: italic;
  text-align: center;
  padding: 20px;
  border: 1px dashed #1a0000;
  border-radius: 8px;
  background: rgba(5,0,0,0.5);
}

@keyframes fadeInStory {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === CARD ACTIONS === */
.card-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.read-btn {
  touch-action: manipulation;
  flex: 1;
  padding: 11px 14px;
  background: transparent;
  border: 1px solid #6a0303;
  color: #cc0000;
  cursor: pointer;
  border-radius: 6px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  outline: none;
}

.read-btn:hover {
  background: var(--red-dark);
  color: white;
  box-shadow: 0 0 18px rgba(255,0,0,0.35);
  border-color: var(--red-dark);
}

/* === COMING SOON — LOCKED BUTTON === */
.read-btn-locked {
  flex: 1;
  padding: 11px 14px;
  background: transparent;
  border: 1px solid #220000;
  color: #2e2e2e;
  border-radius: 6px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: not-allowed;
  opacity: 0.5;
  outline: none;
  pointer-events: none;
  user-select: none;
}

.share-btn {
  padding: 11px 15px;
  background: rgba(14,14,14,0.95);
  color: #555;
  border: 1px solid #222;
  cursor: pointer;
  border-radius: 6px;
  font-size: 16px;
  transition: all 0.3s;
  outline: none;
}

.share-btn:hover {
  background: rgba(26,10,10,0.95);
  color: #cc0000;
  border-color: #3a0000;
  box-shadow: 0 0 12px rgba(200,0,0,0.18);
}

/* ============================================================
   SHARE MENU DROPDOWN — Multi-platform
============================================================ */
.hc-share-menu {
  position: fixed;
  z-index: 9999;
  background: #0a0000;
  border: 1px solid #2a0000;
  border-radius: 12px;
  padding: 8px;
  min-width: 190px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.85), 0 0 20px rgba(200,0,0,0.15);
  opacity: 0;
  transform: scale(0.92) translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}

.hc-share-menu--open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: all;
}

.hc-share-label {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  color: #3a0000;
  text-transform: uppercase;
  padding: 4px 10px 8px;
  border-bottom: 1px solid #180000;
  margin-bottom: 6px;
}

.hc-share-option {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  font-family: 'Poppins', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: #888;
  text-align: left;
}

.hc-share-option:hover {
  background: var(--sp-bg, rgba(204,0,0,0.1));
  color: var(--sp-color, #cc0000);
}

.hc-share-icon {
  display: flex;
  align-items: center;
  color: var(--sp-color, #888);
  flex-shrink: 0;
  width: 22px;
  transition: color 0.18s;
}

.hc-share-name {
  flex: 1;
}

/* === JUMPSCARE OVERLAY === */
#jumpscare-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9997;
  background: #000;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
}

#jumpscare-overlay.active { display: flex; }

/* Flash effect on the background when scare triggers */
#jumpscare-overlay.active::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #000;
  animation: scareFlashBg 0.18s ease-out forwards;
  z-index: 0;
}

@keyframes scareFlashBg {
  0%   { background: #fff; }
  15%  { background: #ff0000; }
  40%  { background: #1a0000; }
  100% { background: #000; }
}

/* Character image — raw horror burst — works with normal photos too */
#jumpscare-img {
  position: absolute;
  z-index: 1;
  /* Fixed size — character stays inside screen, no overflow */
  width: 65vmin;
  height: 80vmin;
  object-fit: contain;
  object-position: center center;
  /* Anchor the box itself to the exact center of the screen */
  top: 50%;
  left: 50%;
  /* No border, no border-radius — raw horror */
  border: none;
  border-radius: 0;
  box-shadow: none;
  /* The burst-out animation: starts small at center, grows toward viewer, stays fixed on screen */
  animation: characterBurstOut 0.95s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  transform-origin: center center;
  /* Heavy horror treatment: desaturate + red tint + high contrast = any photo looks terrifying */
  filter:
    saturate(0.15)
    sepia(1)
    hue-rotate(300deg)
    contrast(2.2)
    brightness(0.65)
    drop-shadow(0 0 60px rgba(255, 0, 0, 1))
    drop-shadow(0 0 120px rgba(200, 0, 0, 0.9))
    drop-shadow(0 -30px 80px rgba(255,0,0,0.7));
  pointer-events: none;
}

/* Dark vignette overlay on top of image — makes edges pitch black, center reveals horror */
#jumpscare-overlay.active::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(ellipse at center,
    transparent 20%,
    rgba(0,0,0,0.5) 55%,
    rgba(0,0,0,0.92) 80%,
    #000 100%
  );
  pointer-events: none;
  animation: vignetteFlash 0.95s ease-out forwards;
}

@keyframes vignetteFlash {
  0%   { opacity: 0; }
  15%  { opacity: 1; }
  100% { opacity: 1; }
}

/* 
  THE MAIN ANIMATION:
  Character appears at center, RUSHES toward viewer (scale grows),
  stays FIXED on screen — no translateY drift — just pure scale zoom.
  "Bahar nikalne" ka illusion scale 1 → 1.35 se aata hai, image screen pe tiki rehti hai.
*/
@keyframes characterBurstOut {
  0%   {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.08);
    filter:
      saturate(0.15) sepia(1) hue-rotate(300deg)
      contrast(2.2) brightness(0.3)
      drop-shadow(0 0 10px rgba(255,0,0,0.3));
  }
  10%  {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.35);
    filter:
      saturate(0.15) sepia(1) hue-rotate(300deg)
      contrast(2.2) brightness(0.55)
      drop-shadow(0 0 30px rgba(255,0,0,0.8));
  }
  42%  {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.0);
    filter:
      saturate(0.15) sepia(1) hue-rotate(300deg)
      contrast(2.2) brightness(0.65)
      drop-shadow(0 0 60px rgba(255,0,0,1))
      drop-shadow(0 0 120px rgba(200,0,0,0.8));
  }
  70%  {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.22);
    filter:
      saturate(0.15) sepia(1) hue-rotate(300deg)
      contrast(2.3) brightness(0.75)
      drop-shadow(0 0 80px rgba(255,0,0,1))
      drop-shadow(0 0 160px rgba(255,0,0,0.9));
  }
  88%  {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1.38);
    filter:
      saturate(0.1) sepia(1) hue-rotate(300deg)
      contrast(2.5) brightness(1.1)
      drop-shadow(0 0 100px rgba(255,0,0,1));
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.55);
    filter:
      saturate(0) sepia(1) hue-rotate(300deg)
      contrast(3) brightness(2)
      drop-shadow(0 0 120px rgba(255,255,255,0.5));
  }
}

/* Screen crack/shake effect */
#jumpscare-overlay.active {
  animation: screenShake 0.5s ease-in-out;
}

@keyframes screenShake {
  0%   { transform: translate(0,0) rotate(0); }
  10%  { transform: translate(-6px, -3px) rotate(-0.5deg); }
  20%  { transform: translate(8px, 4px) rotate(0.3deg); }
  30%  { transform: translate(-5px, 2px) rotate(-0.2deg); }
  40%  { transform: translate(6px, -4px) rotate(0.4deg); }
  50%  { transform: translate(-4px, 3px) rotate(-0.1deg); }
  60%  { transform: translate(5px, -2px) rotate(0.2deg); }
  70%  { transform: translate(-3px, 1px) rotate(0); }
  85%  { transform: translate(2px, -1px) rotate(0); }
  100% { transform: translate(0,0) rotate(0); }
}

/* Hint text hidden during character burst, shown only briefly after */
.jumpscare-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-family: 'Creepster', cursive;
  color: rgba(255, 60, 60, 0.75);
  font-size: 14px;
  letter-spacing: 5px;
  text-transform: uppercase;
  text-shadow: 0 0 10px red;
  animation: hintAppear 0.95s ease-out forwards;
  pointer-events: none;
  white-space: nowrap;
}

@keyframes hintAppear {
  0%,75% { opacity: 0; }
  100%   { opacity: 0.85; }
}

@keyframes blinkText {
  0%,100% { opacity: 0.5; }
  50%     { opacity: 0.08; }
}

/* === REVIEW SECTION === */
.review-section {
  background: #030305;
  border-top: 1px solid #150000;
  border-bottom: 1px solid #150000;
  padding: 90px 5%;
  position: relative;
  z-index: 2;
}

.review-inner {
  max-width: 800px;
  margin: 0 auto;
}

.review-form-box {
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 40px;
}

.review-name-row {
  display: flex;
  gap: 12px;
}

.review-input {
  background: #080808;
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 13px 16px;
  border-radius: 7px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  -webkit-appearance: none;
  width: 100%;
}

.review-input option { background: #0f0000; color: #ccc; }

.review-input:focus {
  border-color: var(--red-dark);
  box-shadow: 0 0 12px rgba(138,3,3,0.3);
}

.review-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.7;
}

.review-submit-btn {
  align-self: flex-start;
  padding: 12px 28px;
  letter-spacing: 1px;
  font-size: 14px;
}

/* === REVIEW LIST === */
.review-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
}

.review-item {
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  animation: fadeInStory 0.4s ease;
  transition: border-color 0.3s;
}

.review-item:hover { border-color: #330000; }

.review-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.review-name-tag {
  font-family: 'Oswald', sans-serif;
  color: #ff4444;
  font-size: 15px;
  flex: 1;
  letter-spacing: 0.5px;
}

.review-story-tag {
  color: var(--text-dark);
  font-size: 11px;
  font-style: italic;
  border: 1px solid #1a0000;
  padding: 2px 8px;
  border-radius: 4px;
}

.review-stars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.review-star-filled {
  color: #c8920a;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.review-star-empty {
  color: #282828;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.review-rating-num {
  font-family: 'Poppins', sans-serif;
  font-size: 9px;
  font-weight: 600;
  color: #555;
  margin-left: 3px;
  background: rgba(200,160,0,0.07);
  border: 1px solid #1e1e00;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0;
  white-space: nowrap;
}

.review-text {
  color: #999;
  font-size: 14px;
  line-height: 1.85;
}

.no-reviews {
  color: #333;
  text-align: center;
  padding: 30px;
  font-style: italic;
  font-size: 14px;
  border: 1px dashed #1a0000;
  border-radius: 8px;
}

.review-rejected {
  color: #880000;
  font-size: 13px;
  padding: 12px 14px;
  border: 1px solid #330000;
  border-radius: 6px;
  background: rgba(10,0,0,0.7);
}

/* === TOAST === */
.hc-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(10,0,0,0.97);
  border: 1px solid #6a0303;
  color: #ff7777;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.35s, transform 0.35s;
  white-space: nowrap;
  box-shadow: 0 4px 24px rgba(255,0,0,0.2);
  pointer-events: none;
}

.hc-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* === FOOTER === */
footer {
  padding: 60px 5% 40px;
  text-align: center;
  background: #010101;
  border-top: 1px solid #150000;
  position: relative;
  z-index: 2;
}

.footer-skull {
  font-size: 36px;
  color: var(--red-bright);
  filter: drop-shadow(0 0 10px red);
  margin-bottom: 14px;
  display: block;
}

.footer-title {
  font-family: 'Creepster', cursive;
  font-size: 24px;
  letter-spacing: 2px;
  margin-bottom: 6px;
  color: white;
}

.verified-footer {
  color: #00cc77;
  font-size: 12px;
  margin-bottom: 14px;
}

.footer-quote {
  color: #444;
  font-style: italic;
  font-size: 13px;
  max-width: 440px;
  margin: 0 auto 16px;
  line-height: 1.75;
}

.warning-text {
  font-family: 'Creepster', cursive;
  color: var(--red-bright);
  letter-spacing: 3px;
  font-size: 16px;
  margin: 10px 0 24px;
  text-shadow: 0 0 12px rgba(255,0,0,0.5);
  animation: glitchPulse 3s infinite;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  font-size: 13px;
  margin-top: 10px;
}

.footer-link {
  color: #3a0000;
  text-decoration: none;
  padding: 4px 10px;
  transition: color 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.footer-link:hover { color: var(--red); }
.footer-sep { color: #1a0000; }
.footer-copy { color: #1e1e1e; padding: 4px 10px; font-size: 12px; }

/* === REVIEW MSG === */
#review-msg { min-height: 24px; }

/* ===========================
   RESPONSIVE / MOBILE
=========================== */
@media (max-width: 1100px) {
  .grid-container { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .glitch-text { font-size: 58px; }
}

@media (max-width: 700px) {
  .glitch-text  { font-size: 42px; }
  .glitch-sub   { font-size: 14px; letter-spacing: 5px; }
  .hero-desc    { font-size: 15px; }
  .navbar       { padding: 11px 4%; }
  .logo         { font-size: 21px; }
  .creator-badge { display: none; }
  .hero-stats   { gap: 0; }
  .stat-item    { padding: 0 20px; }
  .stat-num     { font-size: 22px; }
  .grid-container { grid-template-columns: 1fr; }
  .review-name-row { flex-direction: column; }
  .review-submit-btn { width: 100%; justify-content: center; }
  #jumpscare-img { width: 85vw; height: 85vh; }
}

@media (max-width: 480px) {
  .glitch-text   { font-size: 34px; letter-spacing: 2px; }
  .blood-btn     { padding: 12px 22px; font-size: 12px; }
  .website-share-btn { width: 30px; height: 30px; }
  .music-btn     { width: 35px; height: 35px; font-size: 13px; }
  .section-heading h2 { font-size: 28px; letter-spacing: 2px; }
}

/* =============================================
   GLOBAL GPU & PAINT OPTIMISATIONS
   — Fixed elements on own compositor layers
   — Zero scroll-triggered repaints
============================================= */
.navbar,
.author-banner,
#loading-screen {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Story cards — content-visibility for off-screen skip + GPU layer */
.story-card {
  transform: translateZ(0);
  backface-visibility: hidden;
  /* ROCKET SPEED: skip rendering until near viewport */
  content-visibility: auto;
  contain-intrinsic-size: 0 480px;
}

/* Images — never block scroll thread, smooth decode */
img {
  decoding: async;
  content-visibility: auto;
}

/* Grid — own stacking context */
.grid-container {
  isolation: isolate;
}

/* =============================================
   SCROLL PERFORMANCE — paint containment
   Prevents expensive repaints during scroll
============================================= */
.stories-wrapper,
.review-section,
footer {
  contain: layout;
}

/* Hero stays GPU-composited always */
.hero-section {
  will-change: auto; /* don't over-hint the GPU */
  contain: layout style;
}

/* Fog animation: force GPU layer, never repaint on scroll */
.fog {
  contain: strict;
}

/* Review list items — contain paint */
.review-item {
  contain: layout style;
  content-visibility: auto;
  contain-intrinsic-size: 0 120px;
}

/* =============================================
   PASSIVE SCROLL — Smooth momentum on mobile
============================================= */
.stories-wrapper,
.review-section {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

/* Cards visible state — NO animation, instant display */
.story-card.revealed {
  opacity: 1;
  transform: translateZ(0);
}

/* Pre-hidden cards — NOT USED anymore, kept for backwards compat */
.story-card.hidden-card {
  opacity: 1;
  transform: translateZ(0);
}

/* =============================================
   REDUCED MOTION — accessibility
============================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}


/* =============================================
   PROFESSIONAL PERFORMANCE — v3 FINAL
   Creepsy.com-style ultra smooth scroll
   All content pre-loaded, zero pop-in
============================================= */

/* === NATIVE SMOOTH SCROLL — OS-level momentum === */
html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  /* Critical: browser-native scroll = smoother than JS */
}

/* === BODY SCROLL — glass smooth === */
body {
  touch-action: pan-y pinch-zoom;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  background-attachment: fixed;
}

/* === STORY CARDS — always visible, no pop-in ===
   Cards are pre-revealed: no animation trigger on scroll */
.story-card.revealed {
  opacity: 1;
  transform: none;
  will-change: auto; /* GPU layer freed after render */
}

/* Static base state — no hidden cards */
.story-card.hidden-card {
  opacity: 1;
  transform: none;
}

/* === IMAGE LOADING — reserve space prevents layout shift === */
.story-image {
  image-rendering: auto;
  min-height: 1px;
  /* Fade in gracefully when image loads from cache */
  transition: opacity 0.15s ease;
}

/* === GRID — no overflow repaint on scroll === */
.grid-container {
  overflow: clip;
  contain: layout style;
  scroll-behavior: smooth;
}

/* === TOUCH SCROLL — buttery on mobile === */
.stories-wrapper,
.review-section {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

/* === NAVBAR — minimal cost fixed element === */
.navbar {
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
  contain: layout style;
}

/* === FOG — GPU layer only, zero scroll repaint === */
.fog {
  transform: translateZ(0);
  will-change: transform;
  contain: strict;
  opacity: 0.85;
}

/* === LOADING SCREEN — GPU composited === */
#loading-screen {
  will-change: opacity;
  contain: strict;
}

/* === FULL STORY — instant open, no delay === */
.full-story {
  animation: fadeInStoryFast 0.18s ease both;
}

@keyframes fadeInStoryFast {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === JUMPSCARE — GPU ready === */
#jumpscare-overlay {
  will-change: transform;
  contain: layout style paint;
}

/* === REVIEW SECTION — lazy paint === */
.review-section {
  content-visibility: auto;
  contain-intrinsic-size: 0 600px;
  contain: layout;
}

/* === REVIEW ITEMS — paint contained === */
.review-item {
  contain: layout style;
  content-visibility: auto;
  contain-intrinsic-size: 0 120px;
}

/* === LOADING BAR — JS controlled === */
#loading-fill {
  will-change: width;
  transition: none;
}

/* === BUTTON TAP — instant feedback === */
.read-btn:active,
.share-btn:active,
.blood-btn:active,
.music-btn:active {
  transform: scale(0.97);
  transition: transform 0.07s ease;
}

/* === POINTER EVENTS — remove 300ms tap delay === */
a, button, .read-btn, .share-btn, .blood-btn {
  touch-action: manipulation;
  cursor: pointer;
}

/* === CLS PREVENTION — reserve image space === */
img {
  width: 100%;
  height: auto;
}

/* === PAINT CONTAINMENT — zero scroll jank === */
.stories-wrapper  { contain: layout; }
footer            { contain: layout; }
.hero-section     { contain: layout style; will-change: auto; }

/* Story card: paint contained */
.story-card {
  contain: layout style;
  overflow: hidden;
  will-change: transform; /* GPU layer for hover lift */
}

/* =============================================
   MOBILE — Low-end phone optimizations
============================================= */
@media (max-width: 768px) {
  /* Fog: lighter on mobile */
  .fog {
    opacity: 0.45;
    animation-duration: 100s;
  }

  /* Cards: no hover transform on touch */
  .story-card {
    transition: none;
    will-change: auto;
  }

  /* Simpler hover shadow on mobile */
  .story-card:hover {
    box-shadow: 0 8px 24px rgba(180,0,0,0.12);
  }

  /* Hero bg: minimal transform */
  .hero-bg {
    transform: scale(1.01);
    transition: none;
  }
  .hero-section:hover .hero-bg {
    transform: scale(1.01);
  }

  /* Reduce backdrop filter cost */
  .navbar {
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }

  .author-banner {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(6, 0, 0, 0.99);
  }

  /* Story images: no filter on mobile */
  .story-image {
    filter: brightness(1) saturate(1.1);
  }

  /* Glitch: off on mobile (expensive) */
  .glitch-text {
    animation: none;
    text-shadow: 0 0 18px red;
  }

  /* Card reveal: instant on mobile */
  .story-card.revealed {
    animation: none;
  }
}

/* =============================================
   CRITICAL: Google PageSpeed / Core Web Vitals
============================================= */

/* Prevent FOUT */
body {
  font-display: swap;
}

/* Overscroll: no white flash at end */
body {
  overscroll-behavior-y: none;
}

/* =============================================
   PREFERS-REDUCED-MOTION
============================================= */
@media (prefers-reduced-motion: reduce) {
  .fog { animation: none; }
  .glitch-text { animation: none; }
  .story-card.revealed { animation: none; opacity: 1; }
}
