/*
 * ══════════════════════════════════════════════════════════════
 *  INSANE MODE — Психоделический безумный стиль
 *  Глитчи • Морфинг • Кислота • Хаос • Анти-гравитация
 * ══════════════════════════════════════════════════════════════
 */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Bebas+Neue&family=Major+Mono+Display&display=swap');

:root {
  --insane-bg: #0a0014;
  --insane-purple: #b537ff;
  --insane-pink: #ff006e;
  --insane-cyan: #00fff5;
  --insane-yellow: #ffea00;
  --insane-green: #00ff88;
  --insane-orange: #ff6b35;

  --glitch-duration: 0.3s;
}

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

body {
  background: var(--insane-bg);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  overflow-x: hidden;
  cursor: none;
}

::selection {
  background: var(--insane-pink);
  color: #000;
}

/* ══════════ ПСИХОДЕЛИЧЕСКИЙ КУРСОР ══════════ */
#custom-cursor {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 2px solid var(--insane-cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: difference;
  transition: transform 0.15s ease, border-color 0.2s;
  animation: cursor-pulse 2s ease-in-out infinite;
}

#custom-cursor::before {
  content: '';
  position: absolute;
  inset: -10px;
  border: 1px solid var(--insane-pink);
  border-radius: 50%;
  opacity: 0.3;
  animation: cursor-ring 1.5s ease-out infinite;
}

@keyframes cursor-pulse {
  0%, 100% { transform: scale(1); border-color: var(--insane-cyan); }
  50% { transform: scale(1.2); border-color: var(--insane-pink); }
}

@keyframes cursor-ring {
  0% { transform: scale(0.5); opacity: 0.5; }
  100% { transform: scale(2); opacity: 0; }
}

#cursor-trail {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
}

.trail-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--insane-cyan);
  border-radius: 50%;
  opacity: 0.7;
  animation: trail-fade 0.8s ease-out forwards;
}

@keyframes trail-fade {
  to { transform: scale(0); opacity: 0; }
}

/* ══════════ ЖИВОЙ ГРАДИЕНТНЫЙ ФОН ══════════ */
.insane-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 50%, rgba(181, 55, 255, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 0, 110, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(0, 255, 245, 0.1) 0%, transparent 50%);
  animation: bg-shift 15s ease-in-out infinite;
}

@keyframes bg-shift {
  0%, 100% { filter: hue-rotate(0deg); }
  50% { filter: hue-rotate(90deg); }
}

/* ══════════ ГЛИТЧ ЭФФЕКТ ══════════ */
.glitch {
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch::before {
  animation: glitch-1 var(--glitch-duration) infinite;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  color: var(--insane-cyan);
  text-shadow: 2px 0 var(--insane-pink);
}

.glitch::after {
  animation: glitch-2 var(--glitch-duration) infinite reverse;
  clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
  color: var(--insane-pink);
  text-shadow: -2px 0 var(--insane-cyan);
}

@keyframes glitch-1 {
  0% { transform: translate(0); }
  20% { transform: translate(-3px, 3px); }
  40% { transform: translate(-3px, -3px); }
  60% { transform: translate(3px, 3px); }
  80% { transform: translate(3px, -3px); }
  100% { transform: translate(0); }
}

@keyframes glitch-2 {
  0% { transform: translate(0); }
  20% { transform: translate(3px, -3px); }
  40% { transform: translate(-3px, 3px); }
  60% { transform: translate(3px, 3px); }
  80% { transform: translate(-3px, -3px); }
  100% { transform: translate(0); }
}

.glitch:hover {
  --glitch-duration: 0.1s;
}

/* ══════════ БЕЗУМНАЯ ТИПОГРАФИКА ══════════ */
.insane-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 12vw, 10rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.03em;
  background: linear-gradient(45deg, var(--insane-purple), var(--insane-pink), var(--insane-cyan), var(--insane-yellow));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 8s ease infinite;
  transform: skewY(-2deg);
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.insane-subtitle {
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--insane-cyan);
  text-transform: uppercase;
  animation: flicker 3s ease-in-out infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
  51% { opacity: 1; }
  52% { opacity: 0.9; }
  53% { opacity: 1; }
}

/* ══════════ ДИАГОНАЛЬНЫЕ СЕКЦИИ ══════════ */
.diagonal-section {
  position: relative;
  padding: 10rem 2rem;
  overflow: hidden;
  transform: skewY(-3deg);
  margin: 5rem 0;
}

.diagonal-section > * {
  transform: skewY(3deg);
}

.diagonal-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(181, 55, 255, 0.05), rgba(255, 0, 110, 0.05));
  clip-path: polygon(0 10%, 100% 0%, 100% 90%, 0% 100%);
}

/* ══════════ МОРФИНГ КАРТОЧКИ ══════════ */
.morph-card {
  position: relative;
  padding: 3rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  overflow: hidden;
}

.morph-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--insane-purple), var(--insane-pink));
  opacity: 0;
  transition: opacity 0.4s;
}

.morph-card:hover {
  border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
  transform: rotate(2deg) scale(1.05);
  border-color: var(--insane-pink);
  box-shadow: 0 20px 60px rgba(255, 0, 110, 0.3);
}

.morph-card:hover::before {
  opacity: 0.05;
}

.morph-card > * {
  position: relative;
  z-index: 1;
}

/* ══════════ КИСЛОТНАЯ КНОПКА ══════════ */
.acid-btn {
  position: relative;
  padding: 1.2rem 3rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  color: #000;
  background: linear-gradient(45deg, var(--insane-yellow), var(--insane-green), var(--insane-cyan));
  background-size: 200% 200%;
  border: none;
  border-radius: 50px;
  cursor: none;
  overflow: hidden;
  transition: all 0.3s;
  animation: acid-pulse 3s ease infinite;
  box-shadow: 0 0 30px rgba(0, 255, 245, 0.5);
  z-index: 10000;
}

.acid-btn::before {
  content: '';
  position: absolute;
  inset: -3px;
  background: linear-gradient(45deg, var(--insane-pink), var(--insane-purple), var(--insane-cyan));
  border-radius: 50px;
  z-index: -1;
  filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s;
}

.acid-btn:hover {
  transform: scale(1.1) rotate(-2deg);
  box-shadow: 0 0 50px rgba(255, 234, 0, 0.8);
}

.acid-btn:hover::before {
  opacity: 1;
}

@keyframes acid-pulse {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ══════════ НАВИГАЦИЯ БЕЗУМНАЯ ══════════ */
.insane-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10001;
  padding: 1.5rem 3rem;
  background: rgba(10, 0, 20, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.insane-nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1600px;
  margin: 0 auto;
}

.insane-logo {
  font-family: 'Major Mono Display', monospace;
  font-size: 1.8rem;
  background: linear-gradient(45deg, var(--insane-cyan), var(--insane-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: logo-glitch 5s infinite;
}

@keyframes logo-glitch {
  0%, 90%, 100% { transform: translate(0); }
  91% { transform: translate(-2px, 2px); }
  92% { transform: translate(2px, -2px); }
  93% { transform: translate(-2px, -2px); }
  94% { transform: translate(2px, 2px); }
  95% { transform: translate(0); }
}

.insane-nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.insane-nav-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  transition: color 0.3s;
}

.insane-nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--insane-cyan), var(--insane-pink));
  transition: width 0.3s;
}

.insane-nav-links a:hover {
  color: #fff;
}

.insane-nav-links a:hover::after {
  width: 100%;
}

/* ══════════ HERO БЕЗУМНЫЙ ══════════ */
.insane-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 8rem 2rem;
  overflow: hidden;
}

.insane-hero-content {
  text-align: center;
  position: relative;
  z-index: 10;
}

.insane-hero-badge {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background: rgba(0, 255, 245, 0.1);
  border: 1px solid var(--insane-cyan);
  border-radius: 50px;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  animation: badge-float 3s ease-in-out infinite;
}

@keyframes badge-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ══════════ ЯЩЕРИЦЫ ПОЛЗАЮТ ПО САЙТУ ══════════ */
.crawling-lizard {
  position: fixed;
  width: 80px;
  height: 80px;
  font-size: 60px;
  pointer-events: none;
  z-index: 9998;
  transition: transform 0.1s linear;
  filter: drop-shadow(0 0 10px var(--insane-green));
  animation: lizard-crawl 0.5s steps(2) infinite;
}

@keyframes lizard-crawl {
  0%, 100% { transform: scaleX(1); }
  50% { transform: scaleX(0.95) scaleY(1.05); }
}

/* ══════════ ТЕКСТ С НЕОНОВЫМ СВЕЧЕНИЕМ ══════════ */
.neon-text {
  color: var(--insane-cyan);
  text-shadow:
    0 0 10px var(--insane-cyan),
    0 0 20px var(--insane-cyan),
    0 0 40px var(--insane-cyan),
    0 0 80px rgba(0, 255, 245, 0.5);
  animation: neon-flicker 1.5s infinite alternate;
}

@keyframes neon-flicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% {
    text-shadow:
      0 0 10px var(--insane-cyan),
      0 0 20px var(--insane-cyan),
      0 0 40px var(--insane-cyan),
      0 0 80px rgba(0, 255, 245, 0.5);
  }
  20%, 24%, 55% {
    text-shadow: none;
  }
}

/* ══════════ ЛОМАНАЯ GRID ══════════ */
.broken-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  padding: 4rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.broken-grid > *:nth-child(odd) {
  transform: rotate(-2deg) translateY(-20px);
}

.broken-grid > *:nth-child(even) {
  transform: rotate(2deg) translateY(20px);
}

/* ══════════ SCROLLBAR БЕЗУМНЫЙ ══════════ */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--insane-bg);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--insane-purple), var(--insane-pink), var(--insane-cyan));
  border-radius: 10px;
  border: 2px solid var(--insane-bg);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--insane-cyan), var(--insane-yellow), var(--insane-orange));
}

/* ══════════ FOOTER ПЕРЕВЁРНУТЫЙ ══════════ */
.insane-footer {
  background: linear-gradient(180deg, transparent, rgba(181, 55, 255, 0.05));
  padding: 5rem 2rem;
  transform: perspective(500px) rotateX(5deg);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ══════════ АДАПТИВ ══════════ */
@media (max-width: 768px) {
  .insane-title {
    font-size: clamp(2rem, 10vw, 5rem);
  }

  .diagonal-section {
    transform: skewY(-1deg);
    padding: 5rem 1rem;
  }

  .broken-grid {
    grid-template-columns: 1fr;
  }

  .insane-nav {
    padding: 1rem 1.5rem;
  }

  .insane-nav-links {
    display: none;
  }
}

/* ══════════ АНИМАЦИЯ ПОЯВЛЕНИЯ ══════════ */
.reveal-insane {
  opacity: 0;
  transform: translateY(50px) rotate(-5deg);
  transition: all 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.reveal-insane.revealed {
  opacity: 1;
  transform: translateY(0) rotate(0);
}

/* ══════════ HOLOGRAPHIC ЭФФЕКТ ══════════ */
.holographic {
  position: relative;
  background: linear-gradient(135deg,
    rgba(255, 0, 110, 0.1) 0%,
    rgba(0, 255, 245, 0.1) 25%,
    rgba(181, 55, 255, 0.1) 50%,
    rgba(255, 234, 0, 0.1) 75%,
    rgba(255, 0, 110, 0.1) 100%
  );
  background-size: 400% 400%;
  animation: holographic-shift 10s ease infinite;
}

@keyframes holographic-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ══════════ ЖИДКИЕ БЛОБЫ ══════════ */
.liquid-blob {
  position: absolute;
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  background: radial-gradient(circle, var(--insane-pink), var(--insane-purple));
  opacity: 0.15;
  filter: blur(40px);
  animation: blob-morph 20s ease-in-out infinite;
}

@keyframes blob-morph {
  0%, 100% {
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%;
    transform: translate(30px, -50px) rotate(120deg);
  }
  66% {
    border-radius: 50% 50% 30% 70% / 60% 40% 60% 40%;
    transform: translate(-20px, 20px) rotate(240deg);
  }
}

/* ══════════ СТАТИЧНЫЙ ШУМОВОЙ ОВЕРЛЕЙ ══════════ */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' /%3E%3C/svg%3E");
  animation: noise-move 0.1s infinite;
}

@keyframes noise-move {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5%, -5%); }
  20% { transform: translate(-10%, 5%); }
  30% { transform: translate(5%, -10%); }
  40% { transform: translate(-5%, 15%); }
  50% { transform: translate(-10%, 5%); }
  60% { transform: translate(15%, 0); }
  70% { transform: translate(0, 10%); }
  80% { transform: translate(-15%, 0); }
  90% { transform: translate(10%, 5%); }
}
