@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

@keyframes fall {
    to {
        transform: translateY(105vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes sway {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(30px);
    }
}

@keyframes sway-alt {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(-25px);
    }
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: #fffaf4;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #143211;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto; /* Обеспечиваем вертикальную прокрутку */
}

.container {
    width: 100%;
    max-width: 500px;
}

.profile-card {
    background: white;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    color: #143211;
}

.profile-header {
    padding: 40px 30px 20px;
    background: #fffaf4; /* Цвет фона из оригинального legacy дизайна */
    color: #143211; /* Цвет текста из оригинального дизайна */
    position: relative;
    border-bottom: 1px solid rgba(227, 218, 201, 0.5);
}

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

.avatar {
    width: 95px;
    height: 95px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #5d755d;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ddd;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes textGlow {
    0%, 100% { text-shadow: 0 0 5px rgba(166, 30, 77, 0.3); }
    50% { text-shadow: 0 0 15px rgba(166, 30, 77, 0.6); }
}

/* Стили для оригинального заголовка */
.profile-title {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 700;
    color: white; /* Новый цвет для контраста с фоном шапки */
    font-family: 'Caveat', cursive;
    text-align: center;
    font-style: normal;
    letter-spacing: 0.5px;
}

/* Альтернативные стили для Yani_Montagenik - убедимся, что все стили сохраняются */
.profile-title-great-vibes {
    font-family: 'Great Vibes', cursive !important;
    font-size: 18px !important;
    margin-bottom: 10px !important;
    font-weight: 700 !important;
    color: white !important; /* Белый цвет для контраста с фоном шапки */
    text-align: center !important;
    font-style: normal !important;
    letter-spacing: 1px !important;
}

.profile-title-alex-brush {
    font-family: 'Alex Brush', cursive !important;
    font-size: 18px !important;
    margin-bottom: 10px !important;
    font-weight: 700 !important;
    color: white !important; /* Белый цвет для контраста с фоном шапки */
    text-align: center !important;
    font-style: normal !important;
    letter-spacing: 1px !important;
}

.profile-title-allura {
    font-family: 'Allura', cursive !important;
    font-size: 18px !important;
    margin-bottom: 10px !important;
    font-weight: 700 !important;
    color: white !important; /* Белый цвет для контраста с фоном шапки */
    text-align: center !important;
    font-style: normal !important;
    letter-spacing: 1px !important;
}

.profile-title-mr-de-haviland {
    font-family: 'Mr De Haviland', cursive !important;
    font-size: 18px !important;
    margin-bottom: 10px !important;
    font-weight: 700 !important;
    color: white !important; /* Белый цвет для контраста с фоном шапки */
    text-align: center !important;
    font-style: normal !important;
    letter-spacing: 1px !important;
}

/* Шрифт для основного заголовка */
.profile-title-caveat {
    font-family: 'Caveat', cursive !important;
    font-size: 18px !important;
    margin-bottom: 10px !important;
    font-weight: 700 !important;
    color: white !important; /* Белый цвет для контраста с фоном шапки */
    text-align: center !important;
    font-style: normal !important;
    letter-spacing: 0.5px !important;
}

/* Шрифт для основного заголовка */
.profile-title-caveat {
    font-family: 'Caveat', cursive !important;
    font-size: 18px !important;
    margin-bottom: 10px !important;
    font-weight: 400 !important;
    color: white !important; /* Белый цвет для контраста с фоном шапки */
    text-align: center !important;
    font-style: normal !important;
    letter-spacing: 0.5px !important;
}

.bio {
    font-size: 15px;
    opacity: 0.9;
    color: white; /* Новый цвет для контраста с фоном шапки */
    text-align: center;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    animation: textGlow 4s ease-in-out infinite;
    animation-delay: 0.5s;
}

.links-section {
    padding: 20px;
}

.link-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin: 8px 0; /* Увеличенные отступы между кнопками */
    border-radius: 10px;
    text-decoration: none;
    background: linear-gradient(135deg, #6d8d6d, #5d755d);
    color: white;
    transition: all 0.3s ease;
    text-align: left;
    border: none;
    box-shadow: 0 4px 15px rgba(43, 65, 44, 0.4);
    position: relative;
    overflow: hidden;
}

.link-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.link-item:hover::before {
    left: 100%;
}

.link-item:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(43, 65, 44, 0.6);
    background: linear-gradient(135deg, #7da07d, #6d8d6d);
}

.content {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.content h3 {
    text-align: center;
    width: 100%;
    margin: 0;
}

.content p {
    text-align: center;
    width: 100%;
    margin: 0;
}

/* Убраны постоянные анимации с кнопок */

.telegram {
    background: linear-gradient(135deg, #d66e8c, #c2255c) !important;
}

.vk {
    background: linear-gradient(135deg, #ff7aa8, #ff4d89) !important;
}

.instagram {
    background: linear-gradient(135deg, #c05a7c, #a61e4d) !important;
}

.fbsl {
    background: linear-gradient(135deg, #fdd86c, #fcc419) !important;
}

.telegram-fbsl {
    background: linear-gradient(135deg, #ffe285, #ffd43b) !important;
}

.spb-snowboard {
    background: linear-gradient(135deg, #9bb4fc, #748ffc) !important;
}

.icon {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px; /* Увеличенный размер значка */
    margin-right: 15px;
    flex-shrink: 0;
    color: white;
}

.content h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
    color: white;
}

.content p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
    color: white;
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.divider i {
    color: #c2255c;
    font-size: 24px;
}

.text-block {
    margin: 20px 0;
    text-align: center;
    padding: 10px;
    background: transparent; /* Прозрачный фон, чтобы не выделялось как кнопка */
    border-radius: 0;
    box-shadow: none;
    font-size: 16px;
}

.text-block p {
    color: #143211; /* Цвет текста из оригинального дизайна */
    font-size: 16px;
    line-height: 1.5;
    font-weight: 500;
    margin: 0;
    text-align: center;
}

.text-block strong {
    color: #c2255c;
    font-size: 18px;
    display: block;
    margin-bottom: 5px;
}

.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/* Индивидуальные анимации для разных снежинок */
.snowflake:nth-child(4n) {
    animation: fall 12s linear infinite, sway 4s ease-in-out infinite;
    animation-delay: 0s, 0s;
}

.snowflake:nth-child(4n+1) {
    animation: fall 10s linear infinite, sway-alt 3s ease-in-out infinite;
    animation-delay: 0.1s, 0.2s;
}

.snowflake:nth-child(4n+2) {
    animation: fall 14s linear infinite, sway 5s ease-in-out infinite;
    animation-delay: 0.2s, 0.1s;
}

.snowflake:nth-child(4n+3) {
    animation: fall 11s linear infinite, sway-alt 3.5s ease-in-out infinite;
    animation-delay: 0.3s, 0.3s;
}

.snowflake {
    position: absolute;
    top: -10vh;
    color: #c2255c; /* Более яркий цвет, чтобы было видно */
    user-select: none;
    pointer-events: none;
    will-change: transform;
    font-size: 1.5em !important; /* Увеличим размер */
    text-shadow: 0 0 5px rgba(194, 37, 92, 0.7); /* Добавим свечение */
    z-index: 0; /* Понизим z-index, чтобы не перекрывать контент */
}

@media (max-width: 520px) {
    .container {
        max-width: 100%;
    }

    .profile-header {
        padding: 30px 20px 15px;
    }

    .avatar {
        width: 85px;
        height: 85px;
    }

    .profile-title {
        font-size: 16px;
    }

    .link-item {
        padding: 10px 15px; /* Уменьшенные отступы для мобильного */
        margin: 4px 0; /* Меньше отступов между кнопками */
    }

    .icon {
        width: 45px;
        height: 45px;
        font-size: 20px; /* Уменьшенный, но не слишком маленький размер для мобильных */
    }

    .content h3 {
        font-size: 14px;
        line-height: 1.3;
    }

    .content p {
        font-size: 13px;
    }

    /* Обеспечиваем прокрутку для мобильных устройств */
    body {
        overflow-x: hidden;
    }

    .profile-card {
        min-height: auto;
    }
}