/* ============================================================
   Any Spot · Short Links
   Hi-tech neon futuristic — single hero with logo + form
   ============================================================ */

:root {
  --bg: #02030a;
  --bg-2: #060814;
  --neon-cyan: #00e5ff;
  --neon-cyan-dim: rgba(0, 229, 255, 0.5);
  --neon-magenta: #ff2d9c;
  --neon-violet: #8b5cf6;
  --neon-blue: #3b82f6;

  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.72);
  --text-muted: rgba(255, 255, 255, 0.42);

  --surface: rgba(10, 14, 30, 0.6);
  --border: rgba(0, 229, 255, 0.15);
  --border-strong: rgba(0, 229, 255, 0.35);

  --error: #ff5577;
  --success: #4ade80;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html, body { height: 100%; overflow-x: hidden; }

body {
  font-family: 'Inter', 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ============================================================
   Layered Hi-Tech Background
   - Layer 1: deep gradient mesh
   - Layer 2: animated grid (flat)
   - Layer 3: perspective grid floor
   - Layer 4: glowing orbs
   - Layer 5: scanline
   ============================================================ */

.bg-deep {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(139, 92, 246, 0.25), transparent 60%),
    radial-gradient(ellipse 60% 40% at 20% 100%, rgba(0, 229, 255, 0.18), transparent 65%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(255, 45, 156, 0.15), transparent 65%),
    var(--bg);
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.07) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 30%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 100% 80% at 50% 30%, black 30%, transparent 80%);
  animation: grid-pan 30s linear infinite;
}

@keyframes grid-pan {
  0%   { background-position: 0 0; }
  100% { background-position: 60px 60px; }
}

/* Perspective grid floor at bottom (Tron/synthwave style) */
.bg-floor {
  position: fixed;
  bottom: -10vh;
  left: 50%;
  transform: translateX(-50%) perspective(500px) rotateX(60deg);
  width: 250vw;
  height: 70vh;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.4) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 70%, transparent 100%);
  animation: floor-pan 12s linear infinite;
}

@keyframes floor-pan {
  0%   { background-position: 0 0; }
  100% { background-position: 0 80px; }
}

/* Floating glow orbs */
.bg-orb {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.45;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
}

.orb-1 {
  top: -10%;
  left: 10%;
  background: radial-gradient(circle, var(--neon-cyan) 0%, transparent 65%);
  animation: orb-float-1 18s ease-in-out infinite alternate;
}

.orb-2 {
  top: 20%;
  right: -5%;
  background: radial-gradient(circle, var(--neon-magenta) 0%, transparent 65%);
  animation: orb-float-2 22s ease-in-out infinite alternate;
}

.orb-3 {
  bottom: 5%;
  left: 30%;
  background: radial-gradient(circle, var(--neon-violet) 0%, transparent 65%);
  animation: orb-float-3 26s ease-in-out infinite alternate;
}

@keyframes orb-float-1 {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(15vw, 12vh); }
}
@keyframes orb-float-2 {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(-12vw, 18vh); }
}
@keyframes orb-float-3 {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(8vw, -10vh); }
}

/* Subtle scan lines */
.bg-scan {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    transparent 0,
    transparent 3px,
    rgba(0, 229, 255, 0.015) 3px,
    rgba(0, 229, 255, 0.015) 4px
  );
}

/* ============================================================
   Layout
   ============================================================ */

.app {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   Top Nav (minimal)
   ============================================================ */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  position: relative;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-mini-logo {
  flex-shrink: 0;
  width: 110px;
  height: 36px;
  padding: 4px 8px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 16px -4px var(--neon-cyan-dim);
}

.brand-mini-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
}

.brand-text { color: var(--text-soft); }
.brand-text strong { color: var(--text); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--neon-cyan);
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.status-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============================================================
   Hero — single section: logo + title + subtitle + form
   ============================================================ */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 3rem;
  text-align: center;
  gap: 1.75rem;
}

/* Logo (wide format, glowing neon frame) */
.hero-logo {
  position: relative;
  width: 100%;
  max-width: 360px;
  height: 144px;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo::before {
  content: '';
  position: absolute;
  inset: -16px;
  border-radius: 28px;
  background:
    conic-gradient(from 0deg, var(--neon-cyan), var(--neon-violet), var(--neon-magenta), var(--neon-cyan));
  filter: blur(24px);
  opacity: 0.5;
  animation: spin 10s linear infinite;
  z-index: 0;
}

.hero-logo::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  box-shadow:
    0 20px 60px -15px rgba(0, 229, 255, 0.5),
    inset 0 0 0 1px rgba(0, 229, 255, 0.3);
  z-index: 1;
}

.hero-logo img {
  position: relative;
  z-index: 2;
  max-width: 86%;
  max-height: 80%;
  width: auto;
  height: auto;
  display: block;
}

@media (max-width: 480px) {
  .hero-logo { max-width: 280px; height: 112px; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Title — massive neon */
.hero-title-wrap {
  position: relative;
}

.hero-title {
  font-family: 'Orbitron', 'Inter', sans-serif;
  font-size: clamp(3.5rem, 11vw, 7.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--text);
  position: relative;

  background: linear-gradient(180deg, #ffffff 0%, #5fcdff 50%, #00e5ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 0 30px rgba(0, 229, 255, 0.4),
    0 0 60px rgba(0, 229, 255, 0.25);
  filter: drop-shadow(0 0 14px rgba(0, 229, 255, 0.4));

  animation: title-glow 4s ease-in-out infinite alternate;
}

@keyframes title-glow {
  0%   { filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.35)); }
  100% { filter: drop-shadow(0 0 24px rgba(0, 229, 255, 0.65)); }
}

/* Title underline accent */
.hero-title-wrap::after {
  content: '';
  display: block;
  width: 60%;
  max-width: 320px;
  height: 2px;
  margin: 1.25rem auto 0;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
  box-shadow: 0 0 12px var(--neon-cyan-dim);
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  font-weight: 500;
  color: var(--text-soft);
  max-width: 600px;
  letter-spacing: 0.01em;
}

.hero-subtitle .accent {
  color: var(--neon-cyan);
  font-weight: 600;
  text-shadow: 0 0 12px var(--neon-cyan-dim);
}

/* ============================================================
   Form — glassmorphic with neon borders
   ============================================================ */

.form {
  position: relative;
  width: 100%;
  max-width: 580px;
  margin-top: 1rem;
  padding: 1.75rem;
  background: linear-gradient(180deg, rgba(10, 14, 30, 0.7), rgba(6, 8, 20, 0.85));
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.7),
    0 0 60px -10px rgba(0, 229, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: start;
}

/* Animated neon border accent */
.form::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
    var(--neon-cyan) 0%,
    transparent 30%,
    transparent 70%,
    var(--neon-magenta) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0.6;
}

/* HUD corner brackets */
.form::after {
  content: '';
  position: absolute;
  top: 12px; right: 12px;
  width: 14px; height: 14px;
  border-top: 2px solid var(--neon-cyan);
  border-right: 2px solid var(--neon-cyan);
  opacity: 0.7;
}

.field {
  margin-bottom: 1rem;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  margin-bottom: 0.5rem;
}

.field-label .opt {
  color: var(--text-muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.input {
  width: 100%;
  padding: 0.95rem 1rem;
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: all 0.2s var(--ease);
}

.input::placeholder { color: var(--text-muted); }

.input:hover {
  border-color: var(--border-strong);
  background: rgba(0, 0, 0, 0.65);
}

.input:focus {
  outline: none;
  border-color: var(--neon-cyan);
  background: rgba(0, 0, 0, 0.75);
  box-shadow:
    0 0 0 3px rgba(0, 229, 255, 0.18),
    0 0 24px -8px var(--neon-cyan);
}

.input[type="url"],
.input[name="custom_slug"] {
  direction: ltr;
  text-align: left;
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 0.93rem;
}

/* Submit button — neon */
.submit-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.75rem;
  padding: 1.05rem 1.5rem;
  font-family: 'Orbitron', 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #02030a;
  background: linear-gradient(135deg, #00e5ff 0%, #5fcdff 100%);
  border: 0;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 0.3s var(--ease);
  box-shadow:
    0 10px 30px -8px rgba(0, 229, 255, 0.6),
    0 0 0 1px rgba(0, 229, 255, 0.4) inset;
  overflow: hidden;
}

.submit-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.4) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.7s var(--ease);
  pointer-events: none;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 14px 36px -8px rgba(0, 229, 255, 0.85),
    0 0 0 1px rgba(0, 229, 255, 0.6) inset;
}

.submit-btn:hover::after { transform: translateX(100%); }
.submit-btn:active { transform: translateY(0); }

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.submit-btn:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 4px;
}

/* ============================================================
   Error
   ============================================================ */

.error {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  color: var(--error);
  background: rgba(255, 85, 119, 0.08);
  border: 1px solid rgba(255, 85, 119, 0.3);
  border-radius: var(--r-md);
  text-align: center;
}

/* ============================================================
   Result
   ============================================================ */

.result {
  margin-top: 1.25rem;
  padding: 1.5rem;
  background: linear-gradient(180deg, rgba(10, 14, 30, 0.7), rgba(6, 8, 20, 0.85));
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: var(--r-lg);
  backdrop-filter: blur(20px);
  text-align: start;
  animation: rise 0.5s var(--ease) backwards;
  box-shadow: 0 20px 60px -20px rgba(74, 222, 128, 0.2);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--success);
  margin-bottom: 1rem;
}

.result-title .check {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.18);
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.5);
}

.short-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.short-link {
  flex: 1;
  min-width: 0;
  padding: 0.85rem 1rem;
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 0.9rem;
  color: var(--neon-cyan);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  word-break: break-all;
  direction: ltr;
  text-align: left;
  transition: all 0.2s var(--ease);
}

.short-link:hover {
  border-color: var(--neon-cyan);
  background: rgba(0, 229, 255, 0.05);
}

.copy-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}

.copy-btn:hover {
  background: rgba(0, 229, 255, 0.18);
  border-color: var(--neon-cyan);
}

.copy-btn.copied {
  background: rgba(74, 222, 128, 0.15);
  border-color: rgba(74, 222, 128, 0.5);
  color: var(--success);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  color: var(--text-soft);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.meta-pill .num {
  color: var(--neon-cyan);
  font-weight: 700;
}

.stats-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-soft);
  transition: all 0.2s var(--ease);
}

.stats-link:hover { color: var(--neon-cyan); gap: 0.6rem; }
.stats-link svg { transform: scaleX(-1); }

/* ============================================================
   Footer
   ============================================================ */

.footer {
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.footer a {
  color: var(--neon-cyan);
  font-weight: 500;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 640px) {
  .topbar { padding: 1rem 1.25rem; }
  .hero { padding: 1.5rem 1rem 3rem; gap: 1.25rem; }
  .hero-logo { width: 140px; height: 140px; }
  .form { padding: 1.25rem; }
  .short-row { flex-direction: column; }
  .copy-btn { width: 100%; padding: 0.75rem; justify-content: center; }
}

/* ============================================================
   Reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
