/* 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&family=Exo+2:wght@600&display=swap");

/* Variables for easy customization */
:root {
  --primary-font: "Exo 2", sans-serif;
  --secondary-font: "Inter", sans-serif;
  --primary-color: #e0e0e0;
  --secondary-color: rgba(255, 255, 255, 0.5);
  --quote-size: clamp(2rem, 7.5vw, 9rem);
  --author-size: clamp(0.75rem, 1vw, 1.125rem);
  --cursor-size: 11px;
  --ghost-color: #000000;
  --eye-glow-color: #ffff00;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: auto;
  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: clamp(16px, 4vw, 48px);
  text-align: center;
  color: var(--primary-color);
}

.quote-container {
  width: 100%;
  max-width: 100%;
}

.quote {
  font-family: var(--primary-font);
  font-size: var(--quote-size);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: clamp(16px, 3vh, 32px);
  opacity: 1;
  text-transform: uppercase;
}

.author {
  font-family: var(--secondary-font);
  font-size: var(--author-size);
  font-style: italic;
  opacity: 0.7;
  margin: 0 auto;
  width: max-content;
  max-width: 90vw;
}

.author span {
  white-space: nowrap;
}

.powered-by {
  margin-top: 12px;
  font-family: "Exo 2", sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.powered-by a {
  color: inherit;
}

.book {
  font-family: var(--secondary-font);
  font-size: var(--author-size);
  opacity: 0.5;
  margin-top: 1vh;
}

/* Custom cursor */
.custom-cursor {
  display: none;
  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 */
}

@media (hover: hover) and (pointer: fine) {
  html,
  body {
    cursor: none;
  }

  .custom-cursor {
    display: block;
  }
}

@media (max-width: 768px) {
  :root {
    --quote-size: clamp(2rem, 10vw, 4rem);
    --author-size: clamp(0.75rem, 3.5vw, 0.95rem);
  }

  .content {
    padding: 20px 16px;
  }

  .quote {
    line-height: 1.1;
    margin-bottom: 20px;
  }

  .author {
    width: 100%;
    max-width: 36rem;
    line-height: 1.35;
  }

  .author span {
    white-space: normal;
  }

  .author br {
    display: none;
  }

  .author span + span::before {
    content: " ";
  }
}

