/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #050505;
    --card-bg: rgba(38, 38, 42, 0.72);
    --card-border: rgba(255, 255, 255, 0.06);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    --text-primary: #e4e4e7;
    --text-secondary: rgba(228, 228, 231, 0.55);
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.12);
    --particle-color: rgba(200, 160, 220, 0.6);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: var(--font);
    background: var(--bg);
    background-image: url('https://wallpapercave.com/wp/wp12419212.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   PARTICLE CANVAS
   ============================================ */
#particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ============================================
   MAIN CONTAINER
   ============================================ */
.container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

/* ============================================
   CARD
   ============================================ */
.card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 2.5rem 2rem 1.5rem;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    
    /* Entry animation */
    animation: cardAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(20px) scale(0.97);
}

@keyframes cardAppear {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Subtle inner glow */
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 18px;
    padding: 1px;
    background: linear-gradient(
        160deg,
        rgba(255, 255, 255, 0.08),
        transparent 40%,
        transparent 60%,
        rgba(255, 255, 255, 0.03)
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ============================================
   PROFILE
   ============================================ */
.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

/* Avatar */
.avatar-wrapper {
    position: relative;
    width: 88px;
    height: 88px;
    margin-bottom: 0.25rem;
}

.avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.avatar-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #7700ff;
    background: none;
    opacity: 1;
    animation: none;
}

@keyframes ringPulse {
    0%, 100% { opacity: 0; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.02); }
}

/* Username */
.username {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.2;
    animation: textGlow 3s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% { text-shadow: 0 0 8px rgba(168, 85, 247, 0); }
    50% { text-shadow: 0 0 16px rgba(168, 85, 247, 1), 0 0 40px rgba(168, 85, 247, 0.7), 0 0 60px rgba(168, 85, 247, 0.3); }
}

/* Badge */
.badge {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    filter: drop-shadow(0 0 6px var(--accent-glow));
}

/* Bio */
.bio {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-secondary);
    text-align: center;
    max-width: 280px;
    line-height: 1.5;
}

/* ============================================
   SOCIAL LINKS
   ============================================ */
.socials {
    display: flex;
    gap: 0.625rem;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
    text-decoration: none;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.social-icon:hover {
    transform: scale(1.18);
    box-shadow: 0 0 14px 3px rgba(100, 0, 200, 0.5);
}


/* ============================================
   CURSOR GLOW (added via JS)
   ============================================ */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 130, 246, 0.06), transparent 70%);
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Pantallas grandes (tablets, desktop) */
@media (min-width: 768px) {
    .card {
        max-width: 480px;
        padding: 3rem 2.5rem 2rem;
    }

    .avatar-wrapper {
        width: 100px;
        height: 100px;
    }

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

    .username {
        font-size: 1.7rem;
    }

    .bio {
        font-size: 0.95rem;
    }

    .social-icon {
        width: 48px;
        height: 48px;
    }
}

/* Móviles medianos (iPhone 14, Android normal ~390px) */
@media (max-width: 480px) {
    .container {
        padding: 1.25rem 1rem;
    }

    .card {
        padding: 2rem 1.5rem 1.5rem;
        border-radius: 14px;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .avatar-wrapper {
        width: 76px;
        height: 76px;
    }

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

    .username {
        font-size: 1.3rem;
    }

    .bio {
        font-size: 0.82rem;
    }

    .social-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .socials {
        gap: 0.5rem;
    }
}

/* Móviles pequeños (iPhone SE, ~320px) */
@media (max-width: 360px) {
    .card {
        padding: 1.75rem 1.25rem 1.25rem;
    }

    .avatar-wrapper {
        width: 64px;
        height: 64px;
    }

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

    .username {
        font-size: 1.2rem;
    }

    .social-icon {
        width: 36px;
        height: 36px;
    }
}


/* ============================================
   TOOLTIP DISCORD
   ============================================ */
.tooltip-wrapper {
    position: relative;
    cursor: pointer;
}

.tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(30, 30, 35, 0.95);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-family: var(--font);
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(168, 85, 247, 0.3);
}

.tooltip-wrapper:hover .tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   SELECTION
   ============================================ */
::selection {
    background: rgba(56, 189, 248, 0.25);
    color: #fff;
}

/* Scrollbar (if ever needed) */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}