* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0e27;
    position: relative;
    overflow: hidden;
}

/* Fondo animado con partículas */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0f1729 100%);
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}



/* Cometas Optimizados */
.comet {
    position: absolute;
    pointer-events: none;
    z-index: 6;
    will-change: transform, opacity;
}

/* Núcleo del cometa - optimizado */
.comet-head {
    width: 10px;
    height: 10px;
    background: radial-gradient(circle at 35% 35%, 
        #fff 0%,
        #fffacd 30%,
        rgba(200, 220, 255, 0.7) 70%,
        transparent 100%
    );
    border-radius: 50%;
    box-shadow: 
        0 0 15px 3px rgba(255, 255, 255, 0.9),
        0 0 30px 6px rgba(255, 255, 200, 0.6);
    position: relative;
    z-index: 3;
    will-change: box-shadow;
    animation: cometNucleusFlicker 0.4s ease-in-out infinite;
}

/* Coma - atmósfera gaseosa simplificada */
.comet-head::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 0.3) 0%,
        rgba(200, 220, 255, 0.2) 40%,
        transparent 100%
    );
    border-radius: 50%;
    filter: blur(2px);
    will-change: transform;
    animation: comaExpand 2.5s ease-in-out infinite;
}

/* Cola de polvo principal - optimizada */
.comet-tail {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220px;
    height: 6px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.7) 0%,
        rgba(255, 240, 180, 0.6) 10%,
        rgba(200, 180, 255, 0.4) 35%,
        rgba(138, 43, 226, 0.3) 60%,
        rgba(88, 101, 242, 0.2) 80%,
        transparent 100%
    );
    border-radius: 50%;
    filter: blur(2px);
    transform-origin: left center;
}

/* Cola de iones - optimizada */
.comet-tail::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 0;
    width: 250px;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(150, 200, 255, 0.8) 0%,
        rgba(100, 150, 255, 0.6) 25%,
        rgba(88, 101, 242, 0.4) 50%,
        rgba(70, 90, 220, 0.3) 75%,
        transparent 100%
    );
    filter: blur(1px);
    will-change: opacity;
    animation: ionTailFlicker 0.6s ease-in-out infinite;
}

/* Cola de polvo secundaria - simplificada */
.comet-tail::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 0;
    width: 180px;
    height: 8px;
    background: linear-gradient(90deg, 
        rgba(255, 220, 150, 0.4) 0%,
        rgba(200, 180, 255, 0.3) 30%,
        rgba(138, 43, 226, 0.2) 60%,
        transparent 100%
    );
    border-radius: 50%;
    filter: blur(4px);
    opacity: 0.6;
}

@keyframes cometFly {
    0% {
        transform: translate(-150px, -150px) rotate(-45deg);
        opacity: 0;
    }
    8% {
        opacity: 1;
    }
    92% {
        opacity: 1;
    }
    100% {
        transform: translate(calc(100vw + 150px), calc(100vh + 150px)) rotate(-45deg);
        opacity: 0;
    }
}

@keyframes cometNucleusFlicker {
    0%, 100% {
        box-shadow: 
            0 0 15px 3px rgba(255, 255, 255, 0.9),
            0 0 30px 6px rgba(255, 255, 200, 0.6);
    }
    50% {
        box-shadow: 
            0 0 18px 4px rgba(255, 255, 255, 1),
            0 0 35px 7px rgba(255, 255, 200, 0.7);
    }
}

@keyframes comaExpand {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 0.7;
    }
}

@keyframes ionTailFlicker {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 0.6;
    }
}

/* Ondas de gradiente animadas */
.gradient-wave {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.wave {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.wave-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(88, 101, 242, 0.4) 0%, transparent 70%);
    top: -300px;
    right: -300px;
    animation-delay: 0s;
}

.wave-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(114, 137, 218, 0.3) 0%, transparent 70%);
    bottom: -250px;
    left: -250px;
    animation-delay: -5s;
}

.wave-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.25) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.card {
    background: rgba(30, 35, 55, 0.7);
    backdrop-filter: blur(30px) saturate(150%);
    border-radius: 28px;
    padding: 48px 40px;
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-header {
    text-align: center;
    margin-bottom: 40px;
}

.avatar-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 24px;
    cursor: pointer;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(88, 101, 242, 0.4);
    position: relative;
    z-index: 2;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.avatar-wrapper:hover .avatar {
    transform: scale(1.08) rotate(5deg);
    border-color: rgba(88, 101, 242, 0.8);
    box-shadow: 0 15px 40px rgba(88, 101, 242, 0.4);
}

.avatar-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(88, 101, 242, 0.5) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.15);
    }
}

.username {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    animation: slideIn 0.8s ease-out 0.2s both;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.heart-icon {
    color: #ff4757;
    margin-right: 8px;
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(255, 71, 87, 0.6));
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(1.15);
    }
    20%, 40% {
        transform: scale(1);
    }
}

.subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
    animation: slideIn 0.8s ease-out 0.3s both;
}

.social-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 32px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInScale 0.6s ease-out both;
    backdrop-filter: blur(10px);
}

.social-btn:nth-child(1) { animation-delay: 0.4s; }
.social-btn:nth-child(2) { animation-delay: 0.5s; }
.social-btn:nth-child(3) { animation-delay: 0.6s; }
.social-btn:nth-child(4) { animation-delay: 0.7s; }
.social-btn:nth-child(5) { animation-delay: 0.8s; }
.social-btn:nth-child(6) { animation-delay: 0.9s; }

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.social-btn::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;
}

.social-btn:hover::before {
    left: 100%;
}

.social-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.social-btn:hover::after {
    opacity: 1;
}

.social-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.social-btn:active {
    transform: translateY(-2px) scale(0.98);
}

.icon {
    width: 22px;
    height: 22px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.social-btn:hover .icon {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

.instagram:hover {
    background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
    border-color: transparent;
}

.twitter:hover {
    background: #000000;
    border-color: #1da1f2;
}

.tiktok:hover {
    background: linear-gradient(135deg, #00f2ea 0%, #ff0050 100%);
    border-color: transparent;
}

.steam:hover {
    background: linear-gradient(135deg, #1b2838 0%, #2a475e 100%);
    border-color: transparent;
}

.twitch:hover {
    background: #9146ff;
    border-color: transparent;
}

.discord:hover {
    background: #5865f2;
    border-color: transparent;
}

.card-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    animation: fadeIn 1s ease-out 1s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.card-footer p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
}

/* Efecto de brillo en el borde de la tarjeta */
@keyframes borderGlow {
    0%, 100% {
        box-shadow: 
            0 25px 70px rgba(0, 0, 0, 0.6),
            0 0 0 1px rgba(255, 255, 255, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
    50% {
        box-shadow: 
            0 25px 70px rgba(0, 0, 0, 0.6),
            0 0 0 1px rgba(88, 101, 242, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
}

.card {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1), borderGlow 4s ease-in-out infinite;
}

@media (max-width: 480px) {
    .card {
        padding: 32px 24px;
    }

    .username {
        font-size: 30px;
    }

    .social-links {
        grid-template-columns: 1fr;
    }

    .avatar-wrapper {
        width: 120px;
        height: 120px;
    }
}
