/*
Based on the https://www.shadertoy.com/view/MtVBzG
*/

/* Single font import instead of multiple */
@import url("https://fonts.googleapis.com/css2?family=Boldonse&family=Bodoni+Moda:ital,opsz,wght@0,6..96,400;0,6..96,700;1,6..96,400&display=swap");

/* Variables for easy customization */
:root {
  --primary-font: "Boldonse", sans-serif;
  --secondary-font: "Bodoni Moda", serif;
  --primary-color: #e0e0e0;
  --secondary-color: rgba(255, 255, 255, 0.5);
  --quote-size: 8vw;
  --author-size: 1vw;
  --cursor-size: 16px;
  --ghost-color: #000000;
  --eye-glow-color: #ffff00;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: none;
  background-color: #111;
  letter-spacing: -0.03em;
  position: relative;
}

/* Background noise effect with will-change optimization */
body::before {
  content: "";
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: transparent
    url("http://assets.iceable.com/img/noise-transparent.png") repeat 0 0;
  background-size: 300px 300px;
  animation: noise-animation 0.3s steps(5) infinite;
  opacity: 1;
  will-change: transform;
  z-index: 100;
  pointer-events: none;
}

@keyframes noise-animation {
  0% {
    transform: translate(0, 0);
  }
  10% {
    transform: translate(-2%, -3%);
  }
  20% {
    transform: translate(-4%, 2%);
  }
  30% {
    transform: translate(2%, -4%);
  }
  40% {
    transform: translate(-2%, 5%);
  }
  50% {
    transform: translate(-4%, 2%);
  }
  60% {
    transform: translate(3%, 0);
  }
  70% {
    transform: translate(0, 3%);
  }
  80% {
    transform: translate(-3%, 0);
  }
  90% {
    transform: translate(2%, 2%);
  }
  100% {
    transform: translate(1%, 0);
  }
}

/* Content to be revealed */
.content {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 20;
  padding: 20px;
  text-align: center;
  color: var(--primary-color);
}

.quote-container {
  max-width: 90%;
  overflow: hidden;
}

.quote {
  font-family: var(--primary-font);
  font-size: var(--quote-size);
  line-height: 1.3;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 5vh;
  opacity: 1;
  text-transform: uppercase;
}

.author {
  font-family: var(--secondary-font);
  font-size: var(--author-size);
  font-style: italic;
  opacity: 0.7;
  margin-top: 2vh;
  margin-bottom: 2vh;
}

.caption {
  font-family: var(--secondary-font);
  font-size: var(--author-size);
  margin-bottom: 2vh;
}

.book {
  font-family: var(--secondary-font);
  font-size: var(--author-size);
  opacity: 0.5;
  margin-top: 1vh;
}

/* Custom cursor */
.custom-cursor {
  position: fixed;
  width: var(--cursor-size);
  height: var(--cursor-size);
  border-radius: 50%;
  background-color: var(--secondary-color);
  transform: translate(-50%, -50%);
  pointer-events: none;
  mix-blend-mode: difference;
  z-index: 9999;
  transition: width 0.2s, height 0.2s;
  will-change: transform;
}

/* Canvas overlay - Fixed to be below noise effect */
canvas {
  display: block;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 2; /* Above content but below noise */
  pointer-events: none; /* Allow clicking through to content */
}

.info {
  position: fixed;
  bottom: 10px;
  left: 10px;
  color: white;
  font-family: monospace;
  font-size: 12px;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 5px 10px;
  border-radius: 3px;
  pointer-events: none;
  z-index: 10;
}

/* Controls panel */
.dg.ac {
  z-index: 101 !important; /* Make sure GUI is on top of noise */
}

#container {
  position: relative;
  width: 100vw;
  height: 100vh;
}

#controls {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 100;
  display: flex;
  gap: 20px;
  align-items: center;
}

#playButton {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

#playButton:hover {
  background: rgba(255, 255, 255, 0.3);
}

#fps {
  position: fixed;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 100;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  max-width: 300px;
  width: 100%;
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 999;
  color: var(--primary-color);
  line-height: inherit;
}

.profile-image {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-name {
  font-size: 14px;
  font-weight: 500;
}

.profile-twitter {
  font-size: 12px;
  color: #71717a;
}

.profile-twitter a {
  text-decoration: none;
  color: inherit;
}

.profile-twitter a:hover {
  text-decoration: underline;
}