/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', sans-serif;
    overflow: hidden;
    background: #000;
    color: #fff;
}

canvas#background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 25px;
    text-align: center;
}

.logo {
    max-width: 140px;
    border-radius: 20px;
}

.links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    z-index: 3;
}

.links a {
    text-decoration: none;
    background: rgba(255, 255, 255, 0.08);
    padding: 10px 20px;
    border-radius: 12px;
    color: #fff;
    font-weight: 500;
    transition: background 0.3s, box-shadow 0.3s;
}

.links a:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(255,255,255,0.4);
}

footer {
    position: fixed;
    bottom: 10px;
    right: 20px;
    font-size: 0.9rem;
    opacity: 0.8;
}


:root{
  --bg:#050306;
  --accent:#ff3b3b;
  --muted:#bfb8c0;
  --glass: rgba(255,255,255,0.03);
  --vhs-height: 100vh;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* Reset-ish */
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  background:var(--bg);
  color:var(--muted);
  font-family:var(--font-sans);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  overflow:hidden; /* hide page until loaded */
}

/* PRELOADER */
#preloader{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg, rgba(0,0,0,0.85), rgba(0,0,0,0.95));
  z-index:9999;
}

/* container to add VHS overlays */
.vhs-wrap{
  width:min(820px, 92vw);
  height:calc(var(--vhs-height) - 120px);
  max-height:540px;
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:22px;
  padding:28px;
  border-radius:12px;
  overflow:hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  background: linear-gradient(180deg, rgba(16,8,12,0.25), rgba(0,0,0,0.55));
  backdrop-filter: blur(2px);
}

/* grain (subtle) */
.grain{
  pointer-events:none;
  position:absolute; inset:0;
  background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.02), transparent 1px),
                    radial-gradient(circle at 80% 80%, rgba(255,255,255,0.015), transparent 1px);
  mix-blend-mode: overlay;
  animation: grainMove 6s linear infinite;
}
@keyframes grainMove { 
  0% { transform: translate(0,0) }
  50% { transform: translate(3px,-2px) }
  100% { transform: translate(0,0) }
}

/* scanlines */
.scanlines{
  position:absolute; inset:0;
  background-image: linear-gradient(rgba(0,0,0,0.06) 1px, rgba(0,0,0,0) 1px);
  background-size: 100% 4px;
  mix-blend-mode: multiply;
  opacity:0.85;
  pointer-events:none;
  animation: scan 8s linear infinite;
}
@keyframes scan {
  0% { background-position-y: 0 }
  100% { background-position-y: 4px }
}

/* SVG title styling */
svg.title{
  width:100%;
  max-width:780px;
  height:auto;
  filter: drop-shadow(0 14px 28px rgba(0,0,0,0.7));
  pointer-events:none;
}
.title .main{
  font-family: "Times New Roman", Georgia, serif;
  font-weight:800;
  font-size:120px;
  fill: transparent;
  stroke: #fff;
  stroke-width:2.6;
  paint-order: stroke;
  letter-spacing: 4px;
  filter: url(#roughNoise);
  transform-origin:center;
  animation: shake 3s infinite linear, bloodGlow 2.2s infinite ease-in-out;
}

/* worn overlay duplicate to give grimy offset */
.title .overlay{
  font-family: "Times New Roman", Georgia, serif;
  font-weight:800;
  font-size:120px;
  fill: none;
  stroke: var(--accent);
  stroke-width:1.6;
  opacity:0.64;
  transform: translate(6px, -4px) skewX(-6deg);
  mix-blend-mode: screen;
  filter: blur(0.6px);
  animation: jitter 0.9s infinite steps(2);
}

/* small subtitle */
.subtitle{
  font-family: var(--font-sans);
  font-size:14px;
  letter-spacing:4px;
  text-transform:uppercase;
  color: #b8aeb6;
  opacity:0.9;
  transform: translateY(-8px);
  user-select:none;
}

/* progress bar */
.progress{
  width:80%;
  max-width:640px;
  height:8px;
  background: rgba(255,255,255,0.04);
  border-radius:999px;
  overflow:hidden;
  box-shadow: inset 0 0 12px rgba(0,0,0,0.6);
}
.progress .bar{
  height:100%;
  width:0%;
  background: linear-gradient(90deg, var(--accent), #ffb3b3);
  box-shadow: 0 6px 18px rgba(255,0,0,0.06);
  transition: width 300ms linear;
  transform-origin:left center;
  animation: tinyPulse 2.4s infinite ease-in-out;
}

/* animations */
@keyframes jitter {
  0% { transform: translate(6px,-4px) }
  30% { transform: translate(4px,-3px) }
  60% { transform: translate(8px,-5px) }
  100% { transform: translate(6px,-4px) }
}

@keyframes shake {
  0% { transform: translateX(0) }
  5% { transform: translateX(-2px) rotate(-0.6deg) }
  10% { transform: translateX(2px) rotate(0.6deg) }
  15% { transform: translateX(-1px) rotate(-0.3deg) }
  100% { transform: translateX(0) }
}

@keyframes tinyPulse {
  0% { transform: scaleX(1) }
  50% { transform: scaleX(1.03) }
  100% { transform: scaleX(1) }
}

@keyframes bloodGlow {
  0% { filter: drop-shadow(0 6px 18px rgba(255,0,0,0.02)) }
  50% { filter: drop-shadow(0 14px 30px rgba(255,40,40,0.15)) }
  100% { filter: drop-shadow(0 6px 18px rgba(255,0,0,0.02)) }
}

/* tiny CRT color bars glitch */
.title::after{
  content:"";
  pointer-events:none;
  position:absolute;
  inset:0;
  background: linear-gradient(90deg, rgba(255,0,0,0.06) 0, rgba(0,255,0,0.02) 33%, rgba(0,0,255,0.02) 66%, rgba(255,255,255,0.00));
  mix-blend-mode: overlay;
  opacity:0.6;
  animation: barSweep 2.6s linear infinite;
}
@keyframes barSweep {
  0%{ transform: translateX(-6%) }
  100%{ transform: translateX(6%) }
}

/* hide overflow when preloader removed */
body.loaded{ overflow:auto }

/* hide preloader (class added by JS) */
#preloader.hidden{ opacity:0; pointer-events:none; transform:scale(0.995); transition: opacity .6s ease, transform .6s ease; }

/* accessible: prefer-reduced-motion */
@media (prefers-reduced-motion: reduce){
  .title .main, .title .overlay, .grain, .scanlines, .title::after { animation: none !important }
}

/* MAIN (example) */
main#main-content{
position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
