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

:root {
  --bg-dark: #0A0A0F;
  --bg-card: #12121A;
  --bg-card-hover: #1A1A25;
  --text: #E0E0E8;
  --text-dim: #8888A0;
  --accent-red: #C62828;
  --accent-red-glow: #FF1744;
  --accent-green: #00E676;
  --accent-green-glow: #69F0AE;
  --accent-purple: #7C4DFF;
  --accent-blue: #448AFF;
  --border: #222233;
  --font-main: 'Inter', system-ui, sans-serif;
  --font-creepy: 'Creepster', cursive;
  --font-mono: 'Fira Code', monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: var(--accent-green);
  text-decoration: none;
  transition: color 0.3s;
}
a:hover {
  color: var(--accent-green-glow);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== GLITCH EFFECT ===== */
.glitch {
  position: relative;
  display: inline-block;
  font-family: var(--font-creepy);
  font-size: clamp(3rem, 10vw, 7rem);
  color: #fff;
  letter-spacing: 0.05em;
  /* Neon glow layers */
  text-shadow:
    0 0 7px  #fff,
    0 0 10px #fff,
    0 0 21px #fff,
    0 0 42px var(--accent-red-glow),
    0 0 82px var(--accent-red-glow),
    0 0 92px var(--accent-red-glow),
    0 0 102px var(--accent-red-glow),
    0 0 151px var(--accent-red-glow);
  animation: neon-flicker 3s infinite alternate;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.glitch::before {
  color: var(--accent-red-glow);
  animation: neon-flicker-shadow 4s infinite alternate;
  clip-path: inset(0 0 65% 0);
  text-shadow:
    0 0 7px  #fff,
    0 0 10px #fff,
    0 0 21px #fff,
    0 0 42px var(--accent-red-glow),
    0 0 82px var(--accent-red-glow),
    0 0 92px var(--accent-red-glow);
}
.glitch::after {
  color: var(--accent-blue);
  animation: neon-flicker-shadow 3.5s infinite alternate;
  clip-path: inset(60% 0 0 0);
  text-shadow:
    0 0 7px  #fff,
    0 0 10px #fff,
    0 0 21px #fff,
    0 0 42px var(--accent-blue),
    0 0 82px var(--accent-blue);
}

@keyframes glitch-1 {
  0% { transform: translate(0); }
  20% { transform: translate(-3px, 2px); }
  40% { transform: translate(3px, -1px); }
  60% { transform: translate(-1px, 1px); }
  80% { transform: translate(2px, -2px); }
  100% { transform: translate(0); }
}
@keyframes glitch-2 {
  0% { transform: translate(0); }
  20% { transform: translate(2px, -1px); }
  40% { transform: translate(-2px, 2px); }
  60% { transform: translate(1px, -1px); }
  80% { transform: translate(-3px, 1px); }
  100% { transform: translate(0); }
}

/* ===== FLICKER ===== */
.flicker {
  animation: flicker-anim 5s infinite;
}
@keyframes flicker-anim {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.4; }
  94% { opacity: 1; }
  96% { opacity: 0.7; }
  97% { opacity: 1; }
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(ellipse at center, #1A0A0A 0%, #0A0A0F 70%);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.03) 2px,
      rgba(0,0,0,0.03) 4px
    );
  pointer-events: none;
  z-index: 2;
}

.hero__particles {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 3;
  text-align: center;
}

.hero__subtitle {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 2vw, 1.3rem);
  color: var(--text-dim);
  margin-top: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero__btn {
  display: inline-block;
  margin-top: 2.5rem;
  padding: 0.9rem 2.5rem;
  border: 2px solid var(--accent-red);
  color: var(--accent-red-glow);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 4px;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.hero__btn:hover {
  background: var(--accent-red);
  color: #fff;
  box-shadow: 0 0 30px var(--accent-red), 0 0 60px rgba(198,40,40,0.3);
}

.hero__scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: var(--text-dim);
  font-size: 1.5rem;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* ===== SECTION ===== */
.section {
  padding: 6rem 0;
}
.section__title {
  font-family: var(--font-creepy);
  font-size: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  margin-bottom: 1rem;
  color: #fff;
  text-shadow:
    0 0 7px  #fff,
    0 0 10px #fff,
    0 0 21px #fff,
    0 0 42px var(--accent-red-glow),
    0 0 82px var(--accent-red-glow);
}
.section__desc {
  text-align: center;
  color: var(--text-dim);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* ===== STORY ===== */
.story {
  background: linear-gradient(180deg, var(--bg-dark) 0%, #0D0D15 100%);
}
.story__timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 700px;
  margin: 3rem auto 0;
  position: relative;
}
.story__timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #FFD700, var(--accent-purple), var(--accent-green), #FFB6C1, #8D6E63, var(--accent-red));
}

.story__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1.5rem 1.5rem 4rem;
  position: relative;
  transition: all 0.3s;
}
.story__card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-red);
  transform: translateX(5px);
}

.story__card::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid var(--bg-dark);
}
.story__card--night::before { background: #FFD700; box-shadow: 0 0 10px #FFD700; }
.story__card--portal::before { background: var(--accent-green); box-shadow: 0 0 10px var(--accent-green); }
.story__card--apartment::before { background: #8D6E63; box-shadow: 0 0 10px #8D6E63; }
.story__card--girl::before { background: #FFB6C1; box-shadow: 0 0 10px #FFB6C1; }
.story__card--cocoa::before { background: #8D6E63; box-shadow: 0 0 10px #6D4C41; }
.story__card--girl-dark::before { background: var(--accent-red); box-shadow: 0 0 10px var(--accent-red); }

.story__icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.story__card h3 {
  font-family: var(--font-creepy);
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  color: #fff;
}
.story__card p {
  color: var(--text-dim);
  line-height: 1.8;
}
.story__card strong {
  color: #fff;
}

/* ===== GAMEPLAY ===== */
.gameplay {
  background: linear-gradient(180deg, #0D0D15 0%, #100A0A 100%);
}
.gameplay__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.gameplay__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.35s;
  position: relative;
  overflow: hidden;
}
.gameplay__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-red), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.gameplay__card:hover {
  border-color: var(--accent-red);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(198,40,40,0.15);
}
.gameplay__card:hover::before {
  opacity: 1;
}
.gameplay__card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.gameplay__card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
}
.gameplay__card p {
  color: var(--text-dim);
  line-height: 1.7;
}

/* ===== MAP ===== */
.map {
  background: linear-gradient(180deg, #100A0A 0%, #0A0A12 100%);
}
.map__wrapper {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}
.map__layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 700px;
  width: 100%;
}
.map__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.map__room {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}
.map__room:hover {
  transform: scale(1.03);
}
.map__room-icon {
  font-size: 2rem;
}
.map__room small {
  color: var(--text-dim);
  font-size: 0.8rem;
}

.map__room--corridor {
  border-color: var(--accent-purple);
  background: linear-gradient(135deg, #15102A, var(--bg-card));
}
.map__room--living {
  border-color: #FFAB91;
  background: linear-gradient(135deg, #1A1208, var(--bg-card));
}
.map__room--kitchen {
  border-color: #C8E6C9;
  background: linear-gradient(135deg, #0A150A, var(--bg-card));
}
.map__room--bedroom {
  border-color: #F8BBD0;
  background: linear-gradient(135deg, #1A0A15, var(--bg-card));
}
.map__room--bathroom {
  border-color: #448AFF;
  background: linear-gradient(135deg, #0A1520, var(--bg-card));
}

/* ===== COLORS ===== */
.colors {
  background: linear-gradient(180deg, #0A0A12 0%, #0D0D18 100%);
}
.colors__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.colors__group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}
.colors__group h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #fff;
}
.colors__swatches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.colors__swatch {
  aspect-ratio: 1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #000;
  transition: transform 0.2s;
  border: 2px solid rgba(255,255,255,0.1);
  cursor: default;
}
.colors__swatch:hover {
  transform: scale(1.08);
}
.colors__swatch small {
  display: block;
  font-weight: 400;
  font-size: 0.65rem;
  margin-top: 2px;
}

/* ===== GALLERY ===== */
.gallery {
  background: linear-gradient(180deg, #0D0D18 0%, #0A0A0F 100%);
}
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.gallery__item--wide {
  grid-column: span 2;
}
@media (max-width: 640px) {
  .gallery__item--wide {
    grid-column: span 1;
  }
}

.gallery__placeholder {
  aspect-ratio: 16/9;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  cursor: default;
}
.gallery__placeholder:hover {
  border-color: var(--accent-red);
  transform: scale(1.02);
}

.gallery__placeholder--box {
  background: radial-gradient(ellipse at center, #2D1B0E 0%, #0A0A0F 70%);
}
.gallery__placeholder--portal-green {
  background: radial-gradient(ellipse at center, #0A3D0A 0%, #0A0A0F 70%);
}
.gallery__placeholder--cozy {
  background: linear-gradient(180deg, #FFF3E0 0%, #FFE0B2 40%, #8D6E63 100%);
}
.gallery__placeholder--cocoa {
  background: linear-gradient(180deg, #6D4C41 0%, #4E342E 50%, #3E2723 100%);
}
.gallery__placeholder--sleeping {
  background: linear-gradient(180deg, #E8F5E9 0%, #F8BBD0 40%, #FFCDD2 100%);
}
.gallery__placeholder--chase {
  background: linear-gradient(180deg, #1A0000 0%, #300000 50%, #0A0A0F 100%);
}

.gallery__placeholder-portal {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--accent-purple);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  animation: portal-pulse 2s infinite ease-in-out;
  box-shadow: 0 0 40px var(--accent-purple), inset 0 0 40px rgba(124,77,255,0.2);
}
@keyframes portal-pulse {
  0%, 100% { transform: translate(-50%, -60%) scale(1); opacity: 1; }
  50% { transform: translate(-50%, -60%) scale(1.1); opacity: 0.7; }
}

.gallery__placeholder-text {
  position: relative;
  z-index: 2;
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
  padding: 0.5rem 1rem;
  background: rgba(0,0,0,0.4);
  border-radius: 8px;
  backdrop-filter: blur(4px);
}

/* ===== VIDEO ===== */
.video {
  background: linear-gradient(180deg, #0A0A0F 0%, #0D0D15 100%);
}
.video__wrapper {
  max-width: 800px;
  margin: 0 auto 3rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.video__wrapper iframe {
  width: 100%;
  aspect-ratio: 16/9;
  display: block;
}

.video__placeholder {
  aspect-ratio: 16/9;
  background: radial-gradient(ellipse at center, #1A0A0A 0%, #0A0A0F 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}
.video__placeholder:hover {
  background: radial-gradient(ellipse at center, #250F0F 0%, #0A0A0F 70%);
}

.video__play-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--accent-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--accent-red-glow);
  transition: all 0.3s;
  box-shadow: 0 0 30px rgba(198,40,40,0.3);
}
.video__play-btn:hover {
  background: var(--accent-red);
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 50px var(--accent-red);
}

.video__placeholder-text {
  color: var(--text-dim);
  font-size: 1rem;
}
.video__placeholder-sub {
  color: #555;
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

.video__features {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}
.video__feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 1rem;
}
.video__feature span {
  font-size: 1.5rem;
}

/* ===== ABOUT ===== */
.about {
  background: linear-gradient(180deg, #0D0D15 0%, #0A0A0F 100%);
}
.about__content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 768px) {
  .about__content {
    grid-template-columns: 1fr;
  }
}

.about__text p {
  color: var(--text-dim);
  margin-bottom: 1rem;
  line-height: 1.8;
}
.about__text strong {
  color: #fff;
}

.about__list {
  list-style: none;
  margin-top: 1.5rem;
}
.about__list li {
  padding: 0.4rem 0;
  color: var(--text-dim);
  font-size: 1rem;
}

.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.about__stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s;
}
.about__stat:hover {
  border-color: var(--accent-red);
  transform: translateY(-3px);
}
.about__stat-num {
  display: block;
  font-family: var(--font-creepy);
  font-size: 3rem;
  color: var(--accent-red-glow);
  text-shadow: 0 0 20px var(--accent-red);
}
.about__stat-label {
  color: var(--text-dim);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ===== FOOTER ===== */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer__logo {
  font-family: var(--font-creepy);
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--accent-red);
  text-shadow: 0 0 15px var(--accent-red);
}
.footer__text {
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}
.footer__copy {
  color: #444;
  font-size: 0.8rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .section { padding: 4rem 0; }
  .gameplay__grid { grid-template-columns: 1fr; }
  .colors__grid { grid-template-columns: 1fr; }
  .map__row { grid-template-columns: 1fr; }
  .story__timeline::before { left: 16px; }
  .story__card { padding-left: 3rem; }
  .story__card::before { left: 8px; width: 16px; height: 16px; }
  .about__stats { grid-template-columns: 1fr 1fr; }
}
