*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0a0a;
  --gold: #c4a000;
  --gold-dim: #8a7000;
  --text: #e0e0e0;
  --text-dim: #666;
  --red: #cc0000;
}

body {
  font-family: 'Courier New', Courier, monospace;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  background-image: var(--bg-image, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Camera frame overlay */
.camera-frame {
  position: absolute;
  inset: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  pointer-events: none;
  z-index: 3;
}

.rec-indicator {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--red);
  letter-spacing: 0.1em;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
  animation: rec-pulse 2s ease-in-out infinite;
}

.rec-dot {
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
}

@keyframes rec-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.timestamp {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.05em;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

/* Content */
.content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 600px;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 8px;
  backdrop-filter: blur(2px);
}

.title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.3em;
  margin-bottom: 0.25rem;
}

.subtitle {
  font-size: 0.85rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}

.typewriter {
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 2rem;
  min-height: 2.2rem;
  font-family: 'Courier New', Courier, monospace;
  text-shadow: 0 0 6px rgba(196, 160, 0, 0.4);
}

.cursor {
  animation: cursor-blink 0.8s step-end infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.description {
  font-size: 0.9rem;
  line-height: 2;
  color: var(--text-dim);
  margin-bottom: 2.5rem;
}

/* Buttons */
.links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: var(--text);
  text-decoration: none;
  font-family: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  transition: all 0.3s;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 20px rgba(196, 160, 0, 0.1);
}

.btn-primary {
  background: rgba(255, 255, 255, 0.05);
}

.btn-support {
  background: rgba(196, 160, 0, 0.1);
  border-color: var(--gold);
  color: var(--gold);
}

.btn-support:hover {
  background: rgba(196, 160, 0, 0.2);
  color: #e0c030;
  border-color: #e0c030;
  box-shadow: 0 0 16px rgba(196, 160, 0, 0.2);
}

/* Language switcher */
.lang-switcher {
  position: fixed;
  top: 3.5rem;
  right: 1rem;
  z-index: 100;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

.lang-switcher a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.3s;
}

.lang-switcher a:hover {
  color: var(--gold);
}

.lang-active {
  color: var(--text);
}

/* Security camera noise overlays */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  overflow: hidden;
  animation: noise-flicker 4s steps(1) infinite;
}

/* Glitch: periodic horizontal tear / tracking error */
@keyframes noise-flicker {
  0%, 100% { transform: none; }
  7% { transform: none; }
  7.5% { transform: translateX(8px); }
  8% { transform: translateX(-3px); }
  8.5% { transform: none; }
  42% { transform: none; }
  42.3% { transform: translateX(-12px) skewX(-1deg); }
  42.8% { transform: translateX(5px); }
  43.2% { transform: none; }
  78% { transform: none; }
  78.2% { transform: translateX(6px) skewX(0.5deg); }
  78.6% { transform: none; }
}

/* Grain / static noise */
.noise::before {
  content: '';
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  opacity: 0.1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px;
  animation: noise-shift 0.08s steps(5) infinite;
}

/* Horizontal scanlines + sweep */
.noise::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.5) 2px,
      rgba(0, 0, 0, 0.5) 4px
    ),
    linear-gradient(
      to bottom,
      transparent 0%,
      rgba(255, 255, 255, 0.03) 45%,
      rgba(255, 255, 255, 0.08) 50%,
      rgba(255, 255, 255, 0.03) 55%,
      transparent 100%
    );
  background-size: 100% 100%, 100% 100%;
  animation: scanline-sweep 8s linear infinite;
}

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

@keyframes scanline-sweep {
  0% { background-position: 0 0, 0 -100vh; }
  100% { background-position: 0 0, 0 100vh; }
}

/* Dark vignette around edges (security cam lens effect) */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.6) 100%);
  z-index: 2;
}

/* Mobile */
@media (max-width: 600px) {
  .hero {
    padding: 1rem;
    background-size: auto 100%;
    animation: camera-pan 25s ease-in-out infinite alternate;
  }

  .camera-frame {
    inset: 0.75rem;
  }

  .description {
    font-size: 0.8rem;
  }

  .links {
    flex-direction: column;
    align-items: center;
  }

  .content {
    padding: 1.5rem;
  }
}

@keyframes camera-pan {
  0% { background-position: 30% center; }
  100% { background-position: 70% center; }
}
