/* ===== tunnel.css — анимация туннельного перехода ===== */

.tunnel-overlay {
    position:absolute; inset:0; z-index:40;
    display:flex; align-items:center; justify-content:center;
    overflow:hidden;
    opacity:0; pointer-events:none;
    background: radial-gradient(circle at 50% 50%, rgba(124,92,252,0) 0%, var(--bg) 78%);
    transition: opacity 0.25s ease;
  }

.tunnel-overlay.active { opacity:1; pointer-events:all; }

.tunnel-svg { width:140%; height:140%; overflow:visible; }

.tunnel-ring { fill:none; stroke-width:3; opacity:0; }

.tunnel-overlay.active .tunnel-ring {
    animation: tunnel-fly 1.05s cubic-bezier(0.2,0.7,0.3,1) forwards;
  }

.tunnel-ring:nth-child(1) { animation-delay: 0s !important; }

.tunnel-ring:nth-child(2) { animation-delay: 0.09s !important; }

.tunnel-ring:nth-child(3) { animation-delay: 0.18s !important; }

.tunnel-ring:nth-child(4) { animation-delay: 0.27s !important; }

.tunnel-ring:nth-child(5) { animation-delay: 0.36s !important; }

.tunnel-ring:nth-child(6) { animation-delay: 0.45s !important; }

@keyframes tunnel-fly {
    0%{ transform: scale(0.1); opacity:0; }
    18%{ opacity:1; }
    100%{ transform: scale(7.5); opacity:0; }
  }

.tunnel-core {
    position:absolute; left:50%; top:50%; width:14px; height:14px; border-radius:50%;
    transform: translate(-50%,-50%) scale(0.4);
    background: radial-gradient(circle, #fff 0%, var(--accent-neon) 45%, transparent 75%);
    opacity:0;
    filter: blur(1px);
  }

.tunnel-overlay.active .tunnel-core {
    animation: tunnel-core-grow 1.05s cubic-bezier(0.3,0.6,0.3,1) forwards;
  }

@keyframes tunnel-core-grow {
    0%{ transform: translate(-50%,-50%) scale(0.4); opacity:0.4; }
    70%{ opacity:1; }
    100%{ transform: translate(-50%,-50%) scale(38); opacity:0; }
  }

.tunnel-flash {
    position:absolute; inset:0;
    background: radial-gradient(circle, #f2fffb 0%, var(--accent-neon) 32%, var(--accent-1) 60%, transparent 78%);
    opacity:0;
  }

.tunnel-overlay.flash .tunnel-flash {
    animation: tunnel-flash-anim 0.5s ease-out forwards;
  }

@keyframes tunnel-flash-anim {
    0%{ opacity:0; }
    45%{ opacity:1; }
    100%{ opacity:0; }
  }
