/* ============================================================
   FLLY.DEV.BR  —  Based on rulio.wtf source
   Accent color: RED (#ff2200) replacing original green (#00ff41)
   ============================================================ */

/* ===== Fonts / Variables ===== */
:root {
  --red:          #ff2200;
  --red-dim:      rgba(255, 34, 0, 0.15);
  --red-faint:    rgba(255, 34, 0, 0.04);
  --red-glow:     rgba(255, 34, 0, 0.6);
  --black:        #000000;
  --white:        #ffffff;
  --dim:          #555555;
  --ghost:        #b0b0b0;
  --neutral-500:  #888888;
}

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

html, body, #app {
  width: 100%;
  height: 100%;
  background: var(--black);
  color: var(--white);
  font-family: 'Azeret Mono', monospace;
}

html { scroll-behavior: smooth; }

::selection { background: var(--red); color: var(--black); }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--dim); }

/* ===== Home wrapper ===== */
.home {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: crosshair;
}

/* ===== Grain texture ===== */
.grain {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}

/* ===== CRT scanlines ===== */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 49;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255,255,255,0.008) 2px,
    rgba(255,255,255,0.008) 4px
  );
}

/* ===== Grid background (red tint instead of green) ===== */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.025;
  background-image:
    linear-gradient(rgba(255, 34, 0, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 34, 0, 0.3) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ===== Mouse glow ===== */
.glow {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  transition: background 0.3s ease;
}

/* ===== Content ===== */
.content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding-bottom: 4vh;
}

/* ===== Title ===== */
.title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(4rem, 12vw, 11rem);
  letter-spacing: 0.2em;
  color: var(--white);
  margin: 0;
  line-height: 1;
  display: flex;
  overflow: hidden;
  text-shadow:
    0 0 40px rgba(255, 255, 255, 0.06),
    0 0 80px rgba(255, 34, 0, 0.03);
}

/* Each character enters from below */
.title-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%) scaleY(0.6);
  filter: blur(8px);
}

.title.visible .title-char {
  animation: charReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes charReveal {
  0%   { opacity: 0; transform: translateY(100%) scaleY(0.6); filter: blur(8px); }
  60%  { filter: blur(0px); }
  100% { opacity: 1; transform: translateY(0) scaleY(1); filter: blur(0px); }
}

/* ===== Divider ===== */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1.8rem 0 2rem;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.divider.visible { opacity: 1; }

.divider-line {
  display: block;
  width: 40px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 34, 0, 0.4),
    transparent
  );
  transform: scaleX(0);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.divider.visible .divider-line { transform: scaleX(1); }

.divider-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 34, 0, 0.6);
  box-shadow: 0 0 6px rgba(255, 34, 0, 0.4);
}

/* ===== Navigation ===== */
.nav {
  display: flex;
  gap: 2rem;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav.visible {
  opacity: 1;
  transform: translateY(0);
}

.nav-link {
  font-family: 'Azeret Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: #999;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.25s ease;
  position: relative;
}

.nav-prefix {
  color: transparent;
  font-size: 0.65rem;
  transition: color 0.25s ease;
}

.nav-link:hover { color: var(--white); }
.nav-link:hover .nav-prefix { color: rgba(255, 34, 0, 0.7); }

/* Underline on hover */
.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: rgba(255, 34, 0, 0.4);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-link:hover::after { width: 100%; }



/* ===== Footer / coords ===== */
.coords {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  font-family: 'Azeret Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: #777;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.coords.visible { opacity: 1; }

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .nav {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  .title {
    letter-spacing: 0.12em;
  }
}
