@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500&display=swap');

@keyframes gradientShift {
    0% {
        background-position: 0 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}

/* Анимация плавного появления и подъема элементов */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    background: linear-gradient(270deg, #667eea, #764ba2, #6c63ff, #9a6dff);
    background-size: 800% 800%;
    animation: gradientShift 15s ease infinite;
    position: relative;
}

h1 {
    font-weight: 600;
    font-size: 2.2rem;
    margin-bottom: 60px;
    letter-spacing: 0.005em;
    text-shadow: 0 2px 12px rgba(108, 99, 255, 0.7);
    animation: fadeInUp 1.5s ease forwards;
    opacity: 0;
    transform: translateY(30px);
    animation-delay: 0.3s;
}

.container {
    background: rgba(255 255 255 / 0.15);
    padding: 2% 3%;
    border-radius: 25px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255 255 255 / 0.22);
    text-align: center;
    max-width: 340px;
    animation: fadeInUp 1.2s ease forwards;
    opacity: 1;
    position: relative;
    transform: translateY(40px);
}

/* Кнопки - базовые стили */
button {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(45deg, #6c63ff, #9a6dff);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 16px 48px;
    margin: 15px 0;
    font-size: 1.15rem;
    color: white;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(155, 109, 255, 0.7);
    transition: box-shadow 0.3s ease,
    transform 0.3s ease;
    background-size: 200% 200%;
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    transform: translateY(30px);
    box-sizing: border-box;
    white-space: normal;
    word-break: break-word;
    max-width: 100%;
    text-align: center;
    width: 350px;
}

button:hover {
    background-position: 100% 0;
    box-shadow: 0 0 25px rgba(155, 109, 255, 1);
    transform: scale(1.08);
}

button:active {
    transform: scale(0.96);
    transition: transform 0.1s ease;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.6);
}

/* Отступ и фиксированный размер иконок в кнопках */
button > img {
    margin-right: 10px;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

/* Последовательные задержки для кнопок */
#download_btn {
    animation-delay: 0.3s;
}

#connect_vpn {
    animation-delay: 0.6s;
}

#connect_proxy {
    animation-delay: 0.9s;
}

#open_telegram_channel {
    animation-delay: 1.2s;
}

/* Кнопка копирования в углу */
.copy-btn {
    position: fixed;
    top: -7px;
    right: 8px;
    background: rgba(255 255 255 / 0.15);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    user-select: none;
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    transform: translateY(30px);
    animation-delay: 0.1s;
}

.copy-btn:hover {
    background: rgba(255 255 255 / 0.3);
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(108, 99, 255, 0.8);
}

.copy-btn:active {
    transform: scale(0.95);
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.6);
}

/* Всплывающее уведомление о копировании */
.copy-notice {
    position: fixed;
    top: 70px;
    right: 16px;
    background: rgba(108, 99, 255, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    user-select: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.copy-notice.show {
    opacity: 1;
    pointer-events: auto;
}

/* Контейнер выпадающего списка */
.dropdown {
    position: relative;
    display: inline-block;
    margin: 0;
}

.dropdown > button[aria-expanded="true"] + .dropdown-content {
    display: block !important;
}

/* Контент выпадающего меню — скрыт по умолчанию */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 280px;
    max-width: 320px;
    background: linear-gradient(270deg, #667eea, #764ba2, #6c63ff, #9a6dff);
    background-size: 800% 800%;
    animation: gradientShift 15s ease infinite;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255 255 255 / 0.22);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.4);
    padding: 10px;
    z-index: 10;
    animation-fill-mode: forwards;
}

.dropdown-content.show {
    display: block;
}

/* Кнопки внутри dropdown */
.dropdown-content button {
    white-space: nowrap;
    width: auto;
    min-width: 260px;
    max-width: 300px;
    background: linear-gradient(45deg, #6c63ff, #9a6dff);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 14px 20px;
    margin: 6px 0;
    color: white;
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.5),
    0 0 10px rgba(155, 109, 255, 0.7);
    background-size: 200% 200%;
    text-align: left;
    user-select: none;
    transition: background-position 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.2s ease;
    position: relative;
}

.dropdown-content button:hover,
.dropdown-content button:focus {
    max-width: 400px;
    background-position: 100% 0;
    box-shadow: 0 8px 30px rgba(108, 99, 255, 0.8),
    0 0 25px rgba(155, 109, 255, 1);
    transform: scale(1.05);
    outline: none;
}

.dropdown-content button:active {
    transform: scale(0.96);
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.6);
}

/* Показ содержимого dropdown при взаимодействии */
.dropdown > button:hover + .dropdown-content,
.dropdown > button:focus + .dropdown-content,
.dropdown > .dropdown-content:hover {
    display: block;
}
