/* ── Base ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

body {
  margin: 0;
  overflow: hidden;
  background: #020202;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-family: 'Inter', sans-serif;
}

/* ── Water GIF Background (high quality rendering) ── */
#water-bg {
  position: fixed;
  top: 50%;
  left: 50%;
  min-width: 100vw;
  min-height: 100vh;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%) scale(1.05);
  z-index: 0;
  object-fit: cover;
  pointer-events: none;
  image-rendering: auto;
  -webkit-image-rendering: auto;
  filter: contrast(1.08) saturate(1.2) brightness(0.85);
}

/* Soft overlay to smooth out gif compression artifacts */
#water-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(0, 5, 15, 0.5) 100%),
    linear-gradient(180deg, rgba(0, 8, 20, 0.15) 0%, transparent 30%, transparent 70%, rgba(0, 5, 15, 0.3) 100%);
}

/* ── WebGL Canvas (red fractal, sits behind gif) ── */
#glcanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
}

/* ── Popup Permission Screen ── */
#popup-check {
  position: relative;
  z-index: 3;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  animation: fadeInUp 1.2s ease-out both;
}

#popup-check p {
  font-size: 1.15rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.65);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
  max-width: 340px;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

#popup-check .check-btn {
  padding: 0.5rem 1.8rem;
  font-size: 0.75rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

#popup-check .check-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.1);
}

/* ── Landing Screen ── */
#landing {
  position: relative;
  z-index: 3;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  animation: fadeInUp 1.2s ease-out both;
}

#landing h1 {
  font-size: 2.6rem;
  font-weight: 300;
  color: #fff;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.7),
               0 0 60px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.02em;
  line-height: 1.4;
}

#landing .start-btn {
  padding: 0.45rem 1.6rem;
  font-size: 0.75rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

#landing .start-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.1);
}

/* ── "hydrating you..." screen ── */
#hydrating {
  display: none;
  position: relative;
  z-index: 3;
  text-align: center;
  animation: fadeInUp 1s ease-out both;
}

#hydrating h1 {
  font-size: 2.4rem;
  font-weight: 300;
  color: #fff;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.7),
               0 0 60px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.04em;
  animation: breathe 3s ease-in-out infinite;
}

/* ── Footer links ── */
#footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 1.2rem 1.6rem;
  pointer-events: none;
}

#footer a,
#footer span {
  pointer-events: auto;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.45);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
  transition: color 0.3s ease;
}

#footer a:hover {
  color: rgba(255, 255, 255, 0.85);
}

#footer .footer-left,
#footer .footer-center,
#footer .footer-right {
  flex: 1;
}

#footer .footer-left {
  text-align: left;
}

#footer .footer-center {
  text-align: center;
}

#footer .footer-right {
  text-align: right;
}

/* ── Animations ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes breathe {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}
