@charset "UTF-8";

/* =====================
   ROOT VARIABLES
===================== */
:root {
  --bg: #050505;
  --card: #0d0d0d;
  --accent: #ff003c;
  --accent-soft: rgba(255,0,60,.15);
  --text: #eaeaea;
  --muted: #777;
  --glow: 0 0 25px rgba(255,0,60,.35);
}

/* =====================
   RESET / BASE
===================== */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  background-color: transparent;
  color: var(--text);
  color-scheme: dark;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* =====================
   OVERLAY
===================== */
#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  cursor: pointer;
  transition: opacity 1s ease;
  overflow: hidden;
}

#overlay.fade-out {
  opacity: 0;
}

/* Animated grain overlay */
#overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.03'/></svg>");
  mix-blend-mode: overlay;
  animation: grainMove 0.5s infinite linear;
}

/* Grain animation */
@keyframes grainMove {
  0% { transform: translate(0,0); }
  10% { transform: translate(-2%, -1%); }
  20% { transform: translate(-1%, 2%); }
  30% { transform: translate(2%, -1%); }
  40% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  60% { transform: translate(-1%, 1%); }
  70% { transform: translate(2%, 0); }
  80% { transform: translate(0,2%); }
  90% { transform: translate(-2%, -2%); }
  100% { transform: translate(0,0); }
}

/* Overlay text glitch/pulse */
#overlay-text {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 0 20px rgba(255,0,60,.5);
  position: relative;
  animation: pulse-glitch 1.5s infinite;
}

#overlay-text::before,
#overlay-text::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

#overlay-text::before {
  color: rgba(255, 0, 60, 0.35);
  transform: translate(-1px, 0);
  animation: glitch-soft 1.5s infinite;
}

#overlay-text::after {
  color: rgba(0, 255, 240, 0.25);
  transform: translate(1px, 0);
  animation: glitch-soft 1.5s infinite reverse;
}

@keyframes pulse-glitch {
  0%, 100% { text-shadow: 0 0 20px rgba(255,0,60,.5); }
  50% { text-shadow: 0 0 35px rgba(255,0,60,.8); }
}

@keyframes glitch-soft {
  0%, 70%, 100% { opacity: 0; clip-path: inset(0 0 0 0); transform: translate(0, 0); }
  72% { opacity: 1; clip-path: inset(10% 0 70% 0); transform: translate(-1px, -1px); }
  74% { clip-path: inset(40% 0 30% 0); transform: translate(1px, 1px); }
  76% { clip-path: inset(70% 0 10% 0); transform: translate(-1px, 0); }
  78% { opacity: 0; transform: translate(0, 0); }
}

/* =====================
   BACKGROUND VIDEO
===================== */
#bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;

  /* VHS / retro effect */
  filter: contrast(1.2) brightness(0.8) saturate(1.3) hue-rotate(-2deg);
  transform: scale(1.02);
  animation: vhsScanlines 0.1s infinite, chromaShift 0.3s infinite alternate;
}

/* VHS scanline effect */
#bg-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.02),
    rgba(255,255,255,0.02) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
}

/* Slight vertical shift for chromatic effect */
@keyframes chromaShift {
  0% { transform: translateX(0) scale(1.02); }
  50% { transform: translateX(-1px) scale(1.02); }
  100% { transform: translateX(1px) scale(1.02); }
}

/* Quick scanline flicker */
@keyframes vhsScanlines {
  0% { opacity: 0.95; }
  50% { opacity: 1; }
  100% { opacity: 0.95; }
}

/* =====================
   BACKGROUND AUDIO
===================== */
#bg-audio {
  display: none;
}

/* =====================
   GRAIN OVERLAY
===================== */
.grain::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.05'/></svg>");
  mix-blend-mode: overlay;
  z-index: -1;
}

/* =====================
   LAYOUT (card, profile, etc.)
===================== */
.container { width: 100%; max-width: 420px; padding: 24px; }

.card {
  background: linear-gradient(180deg, #0f0f0f, #090909);
  border: 1px solid #1a1a1a;
  border-radius: 22px;
  padding: 28px 22px 30px;
  box-shadow: 0 30px 80px rgba(0,0,0,.85);
  z-index: 0;
  position: relative;
}

.profile { text-align: center; margin-bottom: 26px; }

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 0 auto 14px;
  border: 2px solid var(--accent);
  background: url('pfp.jpg') center/cover no-repeat;
  box-shadow: var(--glow);
  animation: pulse 3s infinite;
}

@keyframes pulse { 0% { box-shadow:0 0 12px rgba(255,0,60,.4); } 50% { box-shadow:0 0 28px rgba(255,0,60,.8); } 100% { box-shadow:0 0 12px rgba(255,0,60,.4); } }

.username {
  position: relative; font-size:1.7rem; font-weight:800; letter-spacing:-0.03em; color:#eaeaea;
}
.username::before,.username::after{ content:attr(data-text); position:absolute; inset:0; pointer-events:none; opacity:0;}
.username::before{ color:rgba(255,0,60,0.35); transform:translate(-1px,0); animation:glitch-soft 2.2s infinite;}
.username::after{ color:rgba(0,255,240,0.25); transform:translate(1px,0); animation:glitch-soft 2.2s infinite reverse;}
.bio{ font-size:.9rem; color:var(--muted); margin-top:6px; }
.links { display:grid; gap:14px; margin-top:28px; }
.link {
  height:56px; border-radius:14px; display:flex; align-items:center; justify-content:center;
  text-decoration:none; color:var(--text); background:linear-gradient(180deg,#121212,#0a0a0a);
  border:1px solid #1c1c1c; font-weight:600; transition:all .25s cubic-bezier(.2,.8,.2,1);
}
.link:hover { transform:translateY(-3px) scale(1.01); border-color:var(--accent); box-shadow:0 0 20px rgba(255,0,60,.35), inset 0 0 12px rgba(255,0,60,.25);}
.footer { margin-top:26px; text-align:center; font-size:.75rem; color:#555; }
