:root {
    --bg-dark: #07090e;
    --neon-cyan: #00f0ff;
    --neon-pink: #ff2a6d;
    --neon-green: #05ffa1;
    --neon-amber: #ffbe0b;
    --glass-bg: rgba(16, 22, 34, 0.78);
    --glass-border: rgba(0, 240, 255, 0.25);
}

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

body {
    background-color: var(--bg-dark);
    color: #e5e9f0;
    font-family: 'JetBrains Mono', monospace;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Фоновый канвас и сетка радара */
#networkCanvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.45;
}

.radar-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.04) 1px, transparent 1px);
    background-size: 45px 45px;
    radial-gradient(circle at center, transparent 30%, #05070b 95%);
    z-index: 2;
    pointer-events: none;
}

/* Центральная карточка */
.center-stage {
    position: relative;
    z-index: 10;
    max-width: 720px;
    width: 90%;
    padding: 42px 36px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    text-align: center;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.75),
        0 0 40px rgba(0, 240, 255, 0.08);
    transition: transform 0.3s ease;
}

.cert-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px;
    background: rgba(5, 255, 161, 0.1);
    border: 1px solid rgba(5, 255, 161, 0.4);
    border-radius: 999px;
    color: var(--neon-green);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 22px;
}

.pulse-green {
    width: 8px;
    height: 8px;
    background: var(--neon-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-green);
    animation: pulse 1.5s infinite;
}

/* Глитч-заголовок "ЭТО ПРОСТО ОБЫЧНЫЙ САЙТ" */
.glitch-title {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(1.7rem, 3.8vw, 3rem);
    font-weight: 900;
    line-height: 1.15;
    color: #ffffff;
    text-transform: uppercase;
    position: relative;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.35);
}

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

.glitch-title::before {
    color: var(--neon-cyan);
    z-index: -1;
    animation: glitch-anim-1 3.5s infinite linear alternate-reverse;
}

.glitch-title::after {
    color: var(--neon-pink);
    z-index: -2;
    animation: glitch-anim-2 2.8s infinite linear alternate-reverse;
}

/* Плашка "Это точно не здесь" */
.subtitle-box {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(90deg, rgba(255, 42, 109, 0.18), rgba(255, 190, 11, 0.18));
    border: 1px dashed var(--neon-amber);
    padding: 10px 26px;
    border-radius: 12px;
    margin-bottom: 22px;
    transform: rotate(-1deg);
    animation: floatSlow 4s ease-in-out infinite;
}

.warning-icon {
    font-size: 1.5rem;
}

.subtitle-text {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(1.05rem, 2vw, 1.45rem);
    font-weight: 800;
    color: var(--neon-amber);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 0 0 12px rgba(255, 190, 11, 0.5);
}

.description {
    font-size: 0.92rem;
    color: #9aa5ce;
    line-height: 1.6;
    margin-bottom: 26px;
}

/* Кнопка сканера */
.cyber-btn {
    background: linear-gradient(135deg, #00f0ff 0%, #0077ff 100%);
    color: #05070b;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 0.9rem;
    padding: 13px 26px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
    transition: all 0.2s ease;
}

.cyber-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.75);
}

.cyber-btn:active {
    transform: translateY(1px);
}

.scan-log {
    margin-top: 14px;
    font-size: 0.8rem;
    color: var(--neon-cyan);
    min-height: 20px;
}

/* Плавающие блоки VLESS Reality / VLESS xHTTP по сторонам */
.protocol-arena {
    position: absolute;
    inset: 0;
    z-index: 6;
    pointer-events: none;
}

.proto-node {
    position: absolute;
    background: rgba(13, 18, 30, 0.88);
    border: 1.5px solid var(--neon-cyan);
    padding: 12px 18px;
    border-radius: 14px;
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.25);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), 
                border-color 0.25s ease, 
                background 0.25s ease,
                box-shadow 0.25s ease;
    animation: nodeFloat 5s ease-in-out infinite alternate;
}

.proto-node:nth-child(even) {
    border-color: var(--neon-pink);
    box-shadow: 0 0 25px rgba(255, 42, 109, 0.25);
    animation-duration: 6.5s;
}

.status-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--neon-cyan);
    box-shadow: 0 0 8px var(--neon-cyan);
    margin-right: 8px;
}

.proto-node:nth-child(even) .status-dot {
    background: var(--neon-pink);
    box-shadow: 0 0 8px var(--neon-pink);
}

.node-text {
    font-weight: 800;
    font-size: 0.95rem;
    color: #fff;
    letter-spacing: 0.5px;
}

.node-meta {
    font-size: 0.72rem;
    color: #7c88b0;
    margin-top: 5px;
}

/* Состояние маскировки, когда человечек с лупой близко */
.proto-node.camouflaged {
    border-color: var(--neon-green) !important;
    background: rgba(10, 35, 25, 0.92) !important;
    box-shadow: 0 0 30px rgba(5, 255, 161, 0.35) !important;
}

.proto-node.camouflaged .status-dot {
    background: var(--neon-green) !important;
    box-shadow: 0 0 10px var(--neon-green) !important;
}

.proto-node.camouflaged .node-text {
    color: var(--neon-green);
}

.proto-node.camouflaged .node-meta {
    color: #a3f7bf;
}

/* Человечек в костюме с лупой */
.inspector-wrapper {
    position: fixed;
    top: 20%;
    left: 15%;
    width: 170px;
    height: 190px;
    z-index: 25;
    pointer-events: none;
    will-change: transform;
}

.inspector-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.7));
}

/* Анимация шагов агента */
.leg-left {
    animation: walkLeft 0.6s infinite alternate ease-in-out;
    transform-origin: top center;
}

.leg-right {
    animation: walkRight 0.6s infinite alternate ease-in-out;
    transform-origin: top center;
}

/* Световой ореол от лупы */
.magnifying-beam {
    position: absolute;
    top: -35px;
    right: -45px;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.28) 0%, rgba(0, 240, 255, 0.08) 50%, transparent 72%);
    border: 1px dashed rgba(0, 240, 255, 0.35);
    pointer-events: none;
    animation: rotateBeam 8s linear infinite;
}

/* Облачко мыслей инспектора */
.speech-bubble {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    color: #0b0e17;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 8px 25px rgba(0, 240, 255, 0.35);
    margin-bottom: 6px;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 7px;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
}

/* Подпись в правом нижнем углу: Link Of Freedom with respect to YOU */
.signature-badge {
    position: fixed;
    bottom: 22px;
    right: 26px;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(12, 17, 28, 0.88);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 240, 255, 0.4);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 240, 255, 0.15);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.signature-badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(0, 240, 255, 0.35);
    border-color: var(--neon-cyan);
}

.sig-icon {
    font-size: 1.4rem;
    filter: drop-shadow(0 0 8px var(--neon-cyan));
}

.sig-content {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.sig-brand {
    font-family: 'Unbounded', sans-serif;
    font-size: 0.92rem;
    font-weight: 800;
    background: linear-gradient(90deg, #00f0ff, #ff2a6d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.sig-sub {
    font-size: 0.72rem;
    color: #a5b4fc;
}

.sig-sub strong {
    color: var(--neon-green);
    text-shadow: 0 0 8px rgba(5, 255, 161, 0.5);
}

/* Ключевые кадры анимаций */
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.5; }
}

@keyframes floatSlow {
    0%, 100% { transform: rotate(-1deg) translateY(0); }
    50% { transform: rotate(1deg) translateY(-5px); }
}

@keyframes nodeFloat {
    0% { margin-top: 0px; }
    100% { margin-top: -12px; }
}

@keyframes walkLeft {
    0% { transform: rotate(-12deg); }
    100% { transform: rotate(12deg); }
}

@keyframes walkRight {
    0% { transform: rotate(12deg); }
    100% { transform: rotate(-12deg); }
}

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

@keyframes glitch-anim-1 {
    0% { clip-path: inset(20% 0 80% 0); transform: translate(-2px, 1px); }
    20% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -1px); }
    40% { clip-path: inset(40% 0 50% 0); transform: translate(-2px, 2px); }
    60% { clip-path: inset(80% 0 5% 0); transform: translate(2px, -2px); }
    80% { clip-path: inset(10% 0 70% 0); transform: translate(-1px, 1px); }
    100% { clip-path: inset(30% 0 30% 0); transform: translate(1px, -1px); }
}

@keyframes glitch-anim-2 {
    0% { clip-path: inset(15% 0 65% 0); transform: translate(2px, -1px); }
    25% { clip-path: inset(75% 0 10% 0); transform: translate(-2px, 2px); }
    50% { clip-path: inset(35% 0 40% 0); transform: translate(1px, -2px); }
    75% { clip-path: inset(5% 0 80% 0); transform: translate(-2px, 1px); }
    100% { clip-path: inset(50% 0 25% 0); transform: translate(2px, 1px); }
}

/* Адаптив для мобильных экранов */
@media (max-width: 768px) {
    .proto-node {
        font-size: 0.75rem;
        padding: 8px 12px;
    }
    .node-meta {
        display: none;
    }
    .center-stage {
        padding: 28px 20px;
    }
    .signature-badge {
        bottom: 12px;
        right: 12px;
        padding: 8px 14px;
    }
}