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

:root {
    --primary-light: #a78bfa;
    --primary-medium: #8b5cf6;
    --primary-dark: #7c3aed;
    --accent-light: #c084fc;
    --accent-dark: #6d28d9;
    --gradient-overlay: linear-gradient(135deg, rgba(167, 139, 250, 0.75) 0%, rgba(139, 92, 246, 0.75) 50%, rgba(124, 58, 237, 0.75) 100%);
    --text-white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.2);
    --glass-border: rgba(255, 255, 255, 0.35);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.page {
    position: relative;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 50%, #7c3aed 100%);
    overflow: hidden;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.95) 0%, rgba(139, 92, 246, 0.95) 50%, rgba(124, 58, 237, 0.95) 100%);
    z-index: 0;
}

.background-overlay::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(192, 132, 252, 0.2) 0%, transparent 60%);
    animation: float 25s ease-in-out infinite;
}

.background-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 10% 20%, rgba(192, 132, 252, 0.15) 0%, transparent 35%),
        radial-gradient(circle at 90% 80%, rgba(167, 139, 250, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    animation: floatReverse 30s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    33% {
        transform: translate(50px, 30px) rotate(120deg) scale(1.1);
    }

    66% {
        transform: translate(-30px, 50px) rotate(240deg) scale(0.9);
    }
}

@keyframes floatReverse {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    33% {
        transform: translate(-40px, -20px) rotate(-120deg) scale(1.15);
    }

    66% {
        transform: translate(30px, -40px) rotate(-240deg) scale(0.95);
    }
}

/* Плавающие частицы */
.page::before,
.page::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    z-index: 0;
    pointer-events: none;
}

.page::before {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    animation: particleFloat1 20s ease-in-out infinite;
    filter: blur(40px);
}

.page::after {
    width: 250px;
    height: 250px;
    bottom: -80px;
    right: -80px;
    animation: particleFloat2 25s ease-in-out infinite;
    filter: blur(35px);
}

@keyframes particleFloat1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }

    50% {
        transform: translate(150px, 200px) scale(1.3);
        opacity: 0.5;
    }
}

@keyframes particleFloat2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }

    50% {
        transform: translate(-120px, -180px) scale(1.2);
        opacity: 0.5;
    }
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    text-align: center;
    color: var(--text-white);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Фотография в рамке */
.avatar-frame {
    width: 180px;
    height: 180px;
    margin: 0 auto 32px;
    border-radius: 50%;
    padding: 6px;
    background: var(--text-white);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* Имя */
.name {
    font-family: 'Dancing Script', cursive;
    font-size: 58px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 0.03em;
    color: var(--text-white);
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    margin-top: 0;
}

/* Подзаголовок */
.subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 24px;
    color: var(--text-white);
    letter-spacing: 0.1em;
    opacity: 0.9;
    text-transform: uppercase;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.15);
}

/* Описание */
.bio {
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    color: var(--text-white);
    margin-bottom: 40px;
    line-height: 1.6;
    padding: 0 20px;
    font-weight: 400;
    opacity: 0.9;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.15);
}

/* Ссылки */
.links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.link-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 28px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-white);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid rgba(255, 255, 255, 0.25);
    position: relative;
    overflow: hidden;
    min-height: 60px;
    cursor: pointer;
}

.link-button::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: left 0.5s ease;
}

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

.link-button::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.link-button:hover::after {
    opacity: 1;
}

.link-button:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.2),
        0 0 20px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.18);
}

.link-button:active {
    transform: translateY(-2px) scale(1);
    transition: all 0.2s ease;
}

.link-text {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-white);
    letter-spacing: 0.05em;
    position: relative;
    z-index: 2;
    text-transform: uppercase;
    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.2),
        0 0 20px rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.link-button:hover .link-text {
    transform: scale(1.05);
}

/* Адаптивность для планшетов */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }

    .avatar-frame {
        width: 160px;
        height: 160px;
        margin-bottom: 28px;
    }

    .name {
        font-size: 52px;
    }

    .subtitle {
        font-size: 14px;
    }

    .bio {
        font-size: 16px;
        padding: 0 15px;
    }

    .link-button {
        padding: 18px 24px;
        border-radius: 18px;
        min-height: 58px;
    }

    .link-text {
        font-size: 15px;
    }

    .page {
        padding: 35px 15px;
    }
}

/* Адаптивность для мобильных */
@media (max-width: 480px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }

    .avatar-frame {
        width: 160px;
        height: 160px;
        margin-bottom: 28px;
    }

    .name {
        font-size: 44px;
        margin-bottom: 10px;
    }

    .subtitle {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .bio {
        font-size: 15px;
        padding: 0 10px;
        margin-bottom: 32px;
        line-height: 1.5;
    }

    .link-button {
        padding: 18px 22px;
        border-radius: 18px;
        min-height: 56px;
    }

    .link-button:hover {
        transform: translateY(-3px) scale(1.01);
    }

    .link-text {
        font-size: 14px;
    }

    .links {
        gap: 12px;
        margin-bottom: 24px;
    }

    .page {
        padding: 20px 10px;
        min-height: 100vh;
        align-items: center;
    }

    /* Оптимизация анимаций для мобильных - делаем их более плавными */
    .background-overlay::before {
        animation: float 30s ease-in-out infinite;
    }

    .background-overlay::after {
        animation: floatReverse 35s ease-in-out infinite;
    }

    .page::before {
        animation: particleFloat1 25s ease-in-out infinite;
        width: 250px;
        height: 250px;
        filter: blur(35px);
    }

    .page::after {
        animation: particleFloat2 30s ease-in-out infinite;
        width: 200px;
        height: 200px;
        filter: blur(30px);
    }
}

/* Адаптивность для очень маленьких экранов */
@media (max-width: 360px) {
    .avatar-frame {
        width: 120px;
        height: 120px;
        margin-bottom: 20px;
        padding: 4px;
    }

    .name {
        font-size: 38px;
    }

    .subtitle {
        font-size: 12px;
    }

    .bio {
        font-size: 14px;
        padding: 0 8px;
    }

    .link-button {
        padding: 14px 16px;
    }

    .link-text {
        font-size: 13px;
    }

    .page {
        padding: 15px 8px;
        align-items: center;
    }
}

/* Ландшафтная ориентация на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
    .page {
        padding: 20px 15px;
        align-items: center;
        min-height: 100vh;
    }

    .name {
        font-size: 38px;
        margin-bottom: 8px;
    }

    .subtitle {
        font-size: 15px;
        margin-bottom: 16px;
    }

    .bio {
        font-size: 17px;
        margin-bottom: 24px;
    }

    .links {
        gap: 10px;
    }
}

/* Дополнительные эффекты для глубины */
.container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
    z-index: -1;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Оптимизация производительности */
.background-overlay,
.background-overlay::before,
.background-overlay::after,
.page::before,
.page::after,
.container::before {
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Дополнительная оптимизация для мобильных */
@media (max-width: 768px) {

    .background-overlay::before,
    .background-overlay::after,
    .page::before,
    .page::after {
        will-change: transform;
        transform: translateZ(0);
    }
}