/* Base Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #0f172a;
    /* Dark blue/slate */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-glow: rgba(56, 189, 248, 0.5);
    --hover-bg: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Dynamic Background Globes */
.background-globes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.globe {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 12s infinite alternate ease-in-out;
}


.globe-1 {
    width: 300px;
    height: 300px;
    background: #003bb3;
    /* Darker Electric Blue */
    top: -50px;
    left: -50px;
    animation-delay: 0s;
}

.globe-2 {
    width: 400px;
    height: 400px;
    background: #0051ff;
    /* Electric Blue */
    bottom: -100px;
    right: -100px;
    animation-delay: -2s;
}

.globe-3 {
    width: 250px;
    height: 250px;
    background: #4d82ff;
    /* Lighter Electric Blue */
    top: 40%;
    left: 40%;
    margin-left: -125px;
    margin-top: -125px;
    animation-delay: -4s;
    opacity: 0.4;
}

@keyframes float {
    0% {
        transform: translateX(-150px) translateY(0) scale(1);
    }

    50% {
        transform: translateX(0px) translateY(-30px) scale(1.05);
    }

    100% {
        transform: translateX(150px) translateY(0) scale(1.1);
    }
}

/* Glass Container */
.glass-container {
    width: 90%;
    max-width: 480px;
    min-height: 60vh;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem 1.5rem;
    /* Reduced padding */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

/* Shine Effect on Glass */
.glass-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: skewX(-25deg);
    pointer-events: none;
}

/* Profile Section */
.profile-header {
    margin-bottom: 2.5rem;
}

.profile-img-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(45deg, #2563eb, #0ea5e9);
    position: relative;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--bg-color);
    display: block;
}

.profile-name {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.profile-bio {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 300;
}

/* Links List */
.links-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Separate icon/text and arrow */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 1rem 1.25rem;
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.link-item:hover {
    background: var(--hover-bg);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.2),
        0 0 0 1px var(--accent-glow) inset;
    border-color: rgba(255, 255, 255, 0.3);
}

.icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #e2e8f0;
}

.link-item span {
    flex-grow: 1;
    text-align: left;
    padding-left: 1rem;
    font-weight: 500;
    font-size: 1.05rem;
}

.arrow-box {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    color: #cbd5e1;
}

.link-item:hover .arrow-box {
    opacity: 1;
    transform: translateX(0);
}

/* Footer */
.footer {
    margin-top: 3rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .glass-container {
        width: 100%;
        /* Full width check */
        max-width: 100%;
        min-height: 100vh;
        /* Make it take full screen or just fit content? "Farla stare tutta nello schermo" -> suggests fitting content without scrolling if possible. */
        /* Actually "diminuisci la grandezza... per farla stare tutta nello schermo" implies it's too big/tall.  */
        /* If I make min-height: auto and remove fixed height, it fits content. */
        min-height: auto;
        border-radius: 0;
        /* Optional: if full screen, maybe no radius? Or keep it card like? User said "tab". I'll keep radius but small or 0 if full width */
        border-radius: 20px;
        margin: 1rem;
        /* Add margin so it IS a card "in" the screen */
        width: calc(100% - 2rem);
        padding: 1.5rem 1rem;
    }

    .profile-header {
        margin-bottom: 1.5rem;
        /* Reduced margin */
    }

    .profile-img-container {
        width: 90px;
        height: 90px;
        margin-bottom: 1rem;
    }

    .profile-name {
        font-size: 1.35rem;
    }

    .profile-bio {
        font-size: 0.85rem;
    }

    .link-item {
        padding: 0.8rem 1rem;
    }

    .links-list {
        gap: 0.8rem;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}