body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(
        150deg,
        #000000 0%,
        #21306a 30%,
        #0b0c10 70%,
        #000000 100%
    );
    color: #ffffff;
    overflow-x: hidden;
    position: relative;
}

header {
    padding: 100px 20px 10px;
    text-align: center;
    opacity: 0;
    animation: fadeInDown 1.5s ease-out forwards; /* Анимация появления заголовка сверху */
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header h1 {
    font-size: 48px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 18px;
    animation: glowPulse 2s infinite alternate; /* Пульсирующий glow для заголовка */
}

@keyframes glowPulse {
    0% {
        text-shadow: 0 0 10px rgba(50, 100, 255, 0.5);
    }
    100% {
        text-shadow: 0 0 30px rgba(50, 100, 255, 1);
    }
}

header p {
    font-size: 20px;
    color: #cfcfcf;
    max-width: 700px;
    margin: 0 auto 38px;
    line-height: 1.55;
}

.left-text {
    font-size: 20px;
    color: #cfcfcf;
    max-width: 700px;
    margin: 0 0 38px 0;
    line-height: 1.55;
    text-align: left;
    font-family: 'Poppins', sans-serif;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 18px;
    font-weight: 600;
    background: linear-gradient(135deg, #3a7bff, #295bff);
    border-radius: 15px;
    box-shadow: 0 0 22px rgba(50, 100, 255, 0.45);
    color: white;
    text-decoration: none;
    transition: 0.25s ease;
}

@keyframes buttonPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 22px rgba(50, 100, 255, 0.45);
    }
    100% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(50, 100, 255, 0.8);
    }
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(60, 120, 255, 0.6);
    animation: none; 
}


.features, .seo, .devices, .qr {
    padding: 50px 20px;
    max-width: 900px;
    margin: 0 auto;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards; /* Появление секций снизу с задержкой */
}

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

.features ul {
    list-style: none;
    padding: 0;
}

.features li {
    padding: 10px 0;
    font-size: 1.1rem;
    opacity: 0;
    animation: slideInLeft 0.5s ease-out forwards; /* Скольжение пунктов списка слева, по очереди */
}

.features li:nth-child(1) { animation-delay: 0.2s; }
.features li:nth-child(2) { animation-delay: 0.4s; }
.features li:nth-child(3) { animation-delay: 0.6s; }
.features li:nth-child(4) { animation-delay: 0.8s; }
.features li:nth-child(5) { animation-delay: 1.0s; }
.features li:nth-child(6) { animation-delay: 1.2s; }
.features li:nth-child(7) { animation-delay: 1.4s; }
.features li:nth-child(8) { animation-delay: 1.6s; }
.features li:nth-child(9) { animation-delay: 1.8s; }
.features li:nth-child(10) { animation-delay: 2.0s; }

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.device-icons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.device-icons img {
    width: 70px;
    height: 70px;
}

.device-icons img:nth-child(1) { animation-delay: 0.2s; }
.device-icons img:nth-child(2) { animation-delay: 0.4s; }
.device-icons img:nth-child(3) { animation-delay: 0.6s; }
.device-icons img:nth-child(4) { animation-delay: 0.8s; }
.device-icons img:nth-child(5) { animation-delay: 1.0s; }
.device-icons img:nth-child(6) { animation-delay: 1.2s; }

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

footer {
    text-align: center;
    padding: 70px;
    font-size: 0.9rem;
    color: #888;
    background: #000000;
    position: relative;
    overflow: hidden;
}

.qr {
    text-align: center;
    margin: 60px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px; /* равномерные отступы между элементами */
}

.qr img {
    width: 300px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 0 20px rgb(0, 0, 0);
    animation: qrGlow 2s infinite alternate; /* Glow для QR-кода */
}

@keyframes qrGlow {
    0% {
        box-shadow: 0 0 20px rgba(50, 100, 255, 0.3);
    }
    100% {
        box-shadow: 0 0 40px rgba(50, 100, 255, 0.8);
    }
}

.qr .btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 20px;
    font-weight: 600;
    background: linear-gradient(135deg, #3a7bff, #295bff);
    border-radius: 15px;
    box-shadow: 0 0 22px rgba(50, 100, 255, 0.45);
    color: white;
    text-decoration: none;
    transition: 0.25s ease;
}

.qr .btn:hover {
    background-color: #0016d9;
    transform: scale(1.05);
}

.qr-min {
    text-align: center;
    padding: 10px 0; 
    margin: 0;       
}

footer {
    background: #0b0c10;
    padding: 60px 20px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #d0d0d0;
    font-size: 18px;
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s ease;
}

.footer-links a:hover {
    color: #4c8dff;
}

.footer-copy {
    color: #888;
    font-size: 15px;
    opacity: 0.8;
}

.vpn-container {
    display: flex;
    justify-content: center; /* блоки по центру */
    gap: 25px; /* расстояние между блоками */
    margin-bottom: 20px;
    margin-top: 100px;
}

.vpn-block {
    background: #1e2028; /* тёмный блок под фон */
    color: #fff;
    border-radius: 12px;
    padding: 20px 10px;
    text-align: center;
    width: 80px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    opacity: 0;
    animation: fadeInScale 1s ease-out forwards; /* Появление с масштабированием для VPN-блоков */
}

.vpn-block:nth-child(1) { animation-delay: 0.3s; }
.vpn-block:nth-child(2) { animation-delay: 0.6s; }
.vpn-block:nth-child(3) { animation-delay: 0.9s; }

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.vpn-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
}

.vpn-block .flag {
    width: 50px;
    height: 50px;
    border-radius: 50%; /* круглый флаг */
    margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    object-fit: cover; /* чтобы не растягивался */
}

.vpn-block .country {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}

.vpn-block .latency {
    font-size: 1.2em;
    font-weight: 600;
    transition: color 0.5s ease, transform 0.5s ease;
}

.low-ping {
    color: #66c729 !important; 
}

.medium-ping {
    color: #ffd700 !important;
}

.high-ping {
    color: #ff4500 !important;
}

.latency.updated, #latency-median.updated {
    animation: pingUpdate 0.5s ease-out;
}

@keyframes pingUpdate {
    0% {
        transform: scale(1.5);
    }
    100% {
        transform: scale(1);
    }
}

/* Медианный блок */
.median-block {
    background: #1e2028;
    color: rgb(255, 255, 255);
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 1.2em;
    font-weight: bold;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    text-align: center;
    width: 330px; /* три блока вместе */
    margin: 0 auto 5px; /* центрирование + отступ снизу */
}

@keyframes medianPulse {
    0% {
        box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    }
    100% {
        box-shadow: 0 5px 30px rgba(50, 100, 255, 0.8);
    }
}
/* подпись */
.median-block-alert {
    color: rgba(255, 255, 255, 0.216);
    text-align: center;
    font-size: 0.8em;
}

/* Media Queries for Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 3rem; }
    .hero p { font-size: 1.2rem; }
    .btn { padding: 0.8rem 2rem; font-size: 1rem; margin-top: 0.5rem; }
    .vpn-block { min-width: auto; width: 100%; }
    .flag { width: 28px; height: 20px; }
    .benefits { font-size: 1.1rem; }
    .instructions h2, .description h2, .cta h2 { font-size: 2rem; }
    .instructions p, .description p, .cta p { font-size: 1.1rem; }
    .qr-code { width: 120px; height: 120px; }
}

/* ===== Snow layer ===== */
.snow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -10px;
    color: rgba(255, 255, 255, 0.9);
    user-select: none;
    pointer-events: none;
    font-size: 12px;
    will-change: transform;
    animation-timing-function: ease-in-out;
}

@keyframes fallSway {
    0% {
        transform: translateY(-10px) translateX(0) rotate(0deg);
    }
    25% {
        transform: translateY(25vh) translateX(20px) rotate(90deg);
    }
    50% {
        transform: translateY(50vh) translateX(-20px) rotate(180deg);
    }
    75% {
        transform: translateY(75vh) translateX(20px) rotate(270deg);
    }
    100% {
        transform: translateY(110vh) translateX(0) rotate(360deg);
    }
}

@keyframes fallSwayReverse {
    0% {
        transform: translateY(-10px) translateX(0) rotate(0deg);
    }
    25% {
        transform: translateY(25vh) translateX(20px) rotate(-90deg);
    }
    50% {
        transform: translateY(50vh) translateX(-20px) rotate(-180deg);
    }
    75% {
        transform: translateY(75vh) translateX(20px) rotate(-270deg);
    }
    100% {
        transform: translateY(110vh) translateX(0) rotate(-360deg);
    }
}


.promo-container {
    background: #1e2028; /* Темный фон, как у VPN-блоков */
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 50px; /* Отступ между промокодом и кнопкой */
    max-width: 330px; /* Как у медианного блока */
    margin: 20px auto; /* Центрирование */
    opacity: 0;
    animation: fadeInScale 1s ease-out 1.2s forwards; /* Анимация появления, как у VPN-блоков */
}

.promo-code-text {
    font-size: 20px;
    font-weight: bold;
    color: #ffffff; /* Светлый текст */
    background-image: linear-gradient(90deg, #454545,#212121);
    padding: 8px 12px;
    border-radius: 8px;
    user-select: none; /* Предотвращает выделение текста при случайном клике */
    cursor: default; /* Иконка руки при наведении */;
}

.copy-button {
    padding: 10px 20px;
    font-size: 16px;
    color: #fff;
    background: linear-gradient(90deg, #000000,#3533cd);
    border: none;
    border-radius: 15px;
    box-shadow: 0 0 22px rgba(50, 100, 255, 0.45);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.copy-button:hover {
    background: linear-gradient(90deg, #000000,#3533cd);
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0,255,0, 0.4);
}

.copy-button:active {
    background: linear-gradient(90deg, #000000,#3533cd);
    transform: scale(0.95);
}

.p_promo {
    text-align: center;
    font-size: 18px;
     background-image: linear-gradient(90deg, #000000,#3533cd);
    margin: 0 auto -10px auto; /* Negative margin-bottom to lift it above the block */
    max-width: 330px; /* Match promo width */
    padding: 10px 0;
}

.promo-section {
    margin-top: 0px;
    margin-bottom: 200px;
}

.promo-container {
    animation: fadeInScale 1s ease-out 1.2s forwards, pulse 3s infinite;
}

.copy-button.copy-success {
    background: linear-gradient(135deg, #66c729, #4caf50);
    box-shadow: 0 0 25px rgba(102, 199, 41, 0.7);
}