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

:root {
    --bg-primary: #1a0b14;
    --bg-secondary: #2b1021;
    --ice-light: #ffb3d9;
    --ice-medium: #e35a8b;
    --ice-dark: #a83264;
    --ice-bright: #ff4f9d;
    --ice-brutal: #d7266c;
    --ice-glow: rgba(227, 90, 139, 0.2);
    --ice-glow-intense: rgba(227, 90, 139, 0.4);
    --text-primary: #ffeef4;
    --text-secondary: #d88ca3;
    --accent: #ff2e74;
    --frost-white: #ffe6ee;

    --profile-card-bg: rgba(43, 16, 33, 0.9);
    --profile-card-border: rgba(227, 90, 139, 0.2);
    --profile-card-shadow1: rgba(0, 0, 0, 0.4);
    --profile-card-shadow2: rgba(227, 90, 139, 0.1);

    --profile-card-before-bg: rgba(255, 0, 162, 0.15);

    --skill-tag-bg: rgba(227, 90, 139, 0.1);
    --skill-tag-shadow: rgba(227, 90, 139, 0.2);

    --skill-tag-before-bg: rgba(227, 90, 139, 0.4);

    --cp-border: rgba(227, 90, 139, 0.2);
}

.theme-btn {
    width: 100px;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    cursor: pointer;
}

.theme-btn:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

body {
    font-family: 'Maple Mono', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

li {
    color: var(--text-secondary);
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.bg-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--ice-light);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    opacity: 0.4;
    box-shadow: 0 0 6px var(--ice-glow);
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Главный контейнер */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* Заголовок */
.header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out;
}

.glitch {
    font-size: 3rem;
    font-weight: 700;
    color: var(--ice-light);
    text-shadow: 0 0 20px var(--ice-glow-intense), 0 0 40px var(--ice-brutal);
    position: relative;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { 
        text-shadow: 0 0 20px var(--ice-glow-intense), 0 0 40px var(--ice-brutal);
        color: var(--ice-light);
    }
    to { 
        text-shadow: 0 0 30px var(--ice-glow-intense), 0 0 50px var(--ice-brutal), 0 0 70px var(--ice-bright);
        color: var(--ice-bright);
    }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-weight: 300;
}

/* Карточка профиля */
.profile-card {
    background: var(--profile-card-bg);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid var(--profile-card-border);
    box-shadow: 0 20px 40px var(--profile-card-shadow1), 0 0 30px var(--profile-card-shadow2);
    animation: slideInUp 1s ease-out 0.3s both;
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--profile-card-before-bg), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.profile-info {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: center;
}

.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ice-medium), var(--ice-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--frost-white);
    box-shadow: 0 0 40px var(--ice-glow-intense), 0 0 60px var(--ice-brutal);
    animation: pulse 2s ease-in-out infinite;
    transition: transform 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    position: relative;
/*    border: 2px solid var(--ice-light);*/
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    pointer-events: none;
    filter: drop-shadow(0 0 10px var(--ice-glow));
}

.avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 60px var(--ice-glow-intense), 0 0 80px var(--ice-brutal);
}

@keyframes pulse {
    0%, 100% { 
        box-shadow: 0 0 40px var(--ice-glow-intense), 0 0 60px var(--ice-brutal);
        border-color: var(--ice-light);
    }
    50% { 
        box-shadow: 0 0 60px var(--ice-glow-intense), 0 0 80px var(--ice-brutal), 0 0 100px var(--ice-bright);
        border-color: var(--ice-bright);
    }
}

.bio-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.bio-text h2 {
    color: var(--ice-light);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    text-shadow: 0 0 10px var(--ice-glow);
}

.bio-text p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Секции */
.skills, .contacts {
    margin-top: 2rem;
    text-align: center;
    animation: fadeIn 1s ease-out 0.6s both;
}

.skills-grid, .friends-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.skill-tag, .friend-tag {
    background: var(--skill-tag-bg);
    border: 2px solid var(--ice-light);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    color: var(--ice-light);
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: inline-block;
    white-space: nowrap;
    min-width: fit-content;
    box-shadow: 0 0 15px var(--skill-tag-shadow);
}

.skill-tag:hover, .friend-tag:hover {
    background: var(--ice-light);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 25px var(--ice-glow-intense), 0 0 30px var(--ice-brutal);
    border-color: var(--ice-bright);
}

.skill-tag::before, .friend-tag::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--skill-tag-before-bg) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: -1;
    left: var(--mouse-x, 50%);
    top: var(--mouse-y, 50%);
    transform: translate(-50%, -50%);
}

.skill-tag:hover::before, .friend-tag:hover::before {
    opacity: 1;
}

.friend-tag {
    text-decoration: none;
    display: inline-block;
}

.friend-tag:hover {
    text-decoration: none;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.contact-btn {
    padding: 0.8rem 1.5rem;
    background: transparent;
    border: 2px solid var(--ice-light);
    color: var(--ice-light);
    text-decoration: none;
    border-radius: 30px;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: inline-block;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

.contact-btn:hover {
    color: var(--bg-primary);
    box-shadow: 0 0 25px var(--ice-glow-intense), 0 0 35px var(--ice-brutal);
    transform: translateY(-2px);
    border-color: var(--ice-bright);
}

.contact-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--ice-light), var(--ice-bright));
    transition: left 0.3s ease;
    z-index: -1;
}

.contact-btn:hover::before {
    left: 0;
}

/* Copyright */
.copyright {
    margin-top: 3rem;
    padding: 1.5rem 0;
    text-align: center;
    border-top: 1px solid var(--cp-border);
    animation: fadeIn 1s ease-out 1.2s both;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.copyright-text {
    margin-bottom: 0.5rem;
}

.copyright-emoji {
    display: inline-block;
    animation: heartbeat 2s ease-in-out infinite;
    color: var(--ice-light);
    margin: 0 0.3rem;
    font-size: 1.1rem;
    text-shadow: 0 0 10px var(--ice-glow);
}

@keyframes heartbeat {
    0%, 50%, 100% { transform: scale(1); }
    25%, 75% { transform: scale(1.1); }
}

.copyright-link {
    color: var(--ice-light);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.copyright-link:hover {
    color: var(--ice-bright);
    text-shadow: 0 0 15px var(--ice-glow-intense);
}

.copyright-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, var(--ice-light), var(--ice-bright));
    transition: width 0.3s ease;
    box-shadow: 0 0 5px var(--ice-glow);
}

.copyright-link:hover::after {
    width: 100%;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Адаптивность */
@media (max-width: 768px) {
    .theme-btn {
        width: 70px;
        top: 5px;
        right: 10px;
    }

    .container {
        padding: 1rem;
    }

    .glitch {
        font-size: 2rem;
    }

    .profile-info {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }

    .avatar {
        width: 120px;
        height: 120px;
        font-size: 3rem;
        margin: 0 auto;
    }

    .contact-links {
        flex-direction: column;
        gap: 1rem;
    }

    .skills-grid, .friends-grid {
        gap: 0.8rem;
    }
    
    .skill-tag, .friend-tag {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .contact-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .theme-btn {
        width: 70px;
        top: 5px;
        right: 5px;
    }

    .skills-grid, .friends-grid {
        justify-content: center;
    }
    
    .skill-tag, .friend-tag {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}
