* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --purple-dark: #1a0a2e;
    --purple-main: #6b46c1;
    --purple-light: #9d7ce3;
    --purple-glow: rgba(107, 70, 193, 0.3);
    --text-main: #ffffff;
    --text-secondary: #a0a0a0;
    --card-bg: rgba(20, 20, 20, 0.6);
    --card-border: rgba(107, 70, 193, 0.2);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(180deg, #000000 0%, #0a0a0a 50%, #000000 100%);
}

.gradient-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(107, 70, 193, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(157, 124, 227, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(26, 10, 46, 0.5) 0%, transparent 50%);
    animation: aurora 15s ease-in-out infinite;
    filter: blur(60px);
}

@keyframes aurora {
    0%, 100% {
        transform: translateX(0) translateY(0) scale(1);
        opacity: 0.8;
    }
    33% {
        transform: translateX(-50px) translateY(30px) scale(1.1);
        opacity: 1;
    }
    66% {
        transform: translateX(50px) translateY(-30px) scale(0.95);
        opacity: 0.9;
    }
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 20%, rgba(107, 70, 193, 0.15) 0%, transparent 30%),
        radial-gradient(circle at 70% 60%, rgba(157, 124, 227, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 50% 80%, rgba(107, 70, 193, 0.12) 0%, transparent 30%);
    animation: waves 20s ease-in-out infinite;
}

@keyframes waves {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

.particles::before,
.particles::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
}

.particles::before {
    background: 
        radial-gradient(2px 2px at 15% 25%, rgba(157, 124, 227, 0.9) 0%, transparent 50%),
        radial-gradient(1px 1px at 45% 15%, rgba(107, 70, 193, 0.8) 0%, transparent 50%),
        radial-gradient(2px 2px at 75% 35%, rgba(157, 124, 227, 0.9) 0%, transparent 50%),
        radial-gradient(1px 1px at 25% 55%, rgba(107, 70, 193, 0.7) 0%, transparent 50%),
        radial-gradient(2px 2px at 85% 65%, rgba(157, 124, 227, 0.8) 0%, transparent 50%),
        radial-gradient(1px 1px at 55% 75%, rgba(107, 70, 193, 0.9) 0%, transparent 50%),
        radial-gradient(2px 2px at 35% 85%, rgba(157, 124, 227, 0.7) 0%, transparent 50%),
        radial-gradient(1px 1px at 65% 45%, rgba(107, 70, 193, 0.8) 0%, transparent 50%),
        radial-gradient(2px 2px at 90% 20%, rgba(157, 124, 227, 0.9) 0%, transparent 50%),
        radial-gradient(1px 1px at 10% 70%, rgba(107, 70, 193, 0.8) 0%, transparent 50%);
    animation: sparkle 4s ease-in-out infinite;
}

.particles::after {
    background: 
        radial-gradient(1px 1px at 20% 40%, rgba(157, 124, 227, 0.8) 0%, transparent 50%),
        radial-gradient(2px 2px at 60% 30%, rgba(107, 70, 193, 0.9) 0%, transparent 50%),
        radial-gradient(1px 1px at 40% 65%, rgba(157, 124, 227, 0.7) 0%, transparent 50%),
        radial-gradient(2px 2px at 80% 50%, rgba(107, 70, 193, 0.8) 0%, transparent 50%),
        radial-gradient(1px 1px at 50% 90%, rgba(157, 124, 227, 0.9) 0%, transparent 50%),
        radial-gradient(2px 2px at 30% 10%, rgba(107, 70, 193, 0.7) 0%, transparent 50%),
        radial-gradient(1px 1px at 70% 80%, rgba(157, 124, 227, 0.8) 0%, transparent 50%),
        radial-gradient(2px 2px at 95% 40%, rgba(107, 70, 193, 0.9) 0%, transparent 50%);
    animation: sparkle 4s ease-in-out infinite 2s;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
}

/* Container */
.container {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Profile Section */
.profile-section {
    text-align: center;
    margin-bottom: 25px;
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.avatar-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
}

.avatar-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 105px;
    height: 105px;
    background: var(--purple-glow);
    border-radius: 50%;
    filter: blur(30px);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

.avatar {
    position: relative;
    width: 85px;
    height: 85px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--purple-main);
    box-shadow: 0 0 30px var(--purple-glow);
    transition: transform 0.3s ease;
    overflow: hidden;
    background: linear-gradient(135deg, var(--purple-main), var(--purple-light));
}

.avatar:hover {
    transform: scale(1.05) rotate(5deg);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-text {
    font-size: 48px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.name {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--text-main), var(--purple-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dynamic-content {
    min-height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tagline {
    font-size: 13px;
    color: var(--text-secondary);
    letter-spacing: 1.5px;
    margin-bottom: 15px;
    transition: opacity 0.3s ease;
}

.tagline.hidden {
    display: none;
}

/* Spotify Badge */
.spotify-badge {
    display: none;
    margin-top: 8px;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--card-border);
    background: rgba(10, 10, 10, 0.6);
    max-width: 320px;
}

.spotify-badge.visible {
    display: inline-block;
}

.spotify-badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--purple-glow);
    border-color: var(--purple-main);
}

.spotify-badge img {
    display: block;
    width: 100%;
    height: auto;
    min-height: 50px;
}

/* Links Section */
.links-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.link-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 14px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s ease;
    overflow: hidden;
    animation: fadeInUp 0.8s ease;
    animation-fill-mode: both;
    min-height: 120px;
}

.link-card:nth-child(1) { animation-delay: 0.1s; }
.link-card:nth-child(2) { animation-delay: 0.2s; }
.link-card:nth-child(3) { animation-delay: 0.3s; }
.link-card:nth-child(4) { animation-delay: 0.4s; }

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--purple-glow), transparent);
    transition: left 0.5s ease;
}

.link-card:hover::before {
    left: 100%;
}

.link-card:hover {
    transform: translateY(-5px);
    border-color: var(--purple-main);
    box-shadow: 0 10px 40px var(--purple-glow);
    background: rgba(30, 30, 30, 0.8);
}

.link-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--purple-main), var(--purple-light));
    border-radius: 12px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.link-card:hover .link-icon {
    transform: rotate(360deg) scale(1.1);
}

.link-icon svg {
    width: 26px;
    height: 26px;
    color: white;
}

.link-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.link-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-main);
}

.link-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

.link-arrow {
    display: none;
}

/* Footer */
.footer {
    text-align: center;
    padding: 10px 0;
    color: var(--text-secondary);
    font-size: 12px;
    animation: fadeInUp 1s ease 0.5s;
    animation-fill-mode: both;
}

/* Responsive */
@media (max-width: 640px) {
    body {
        overflow: hidden;
        height: 100vh;
    }

    .container {
        padding: 20px 16px 10px;
        height: 100vh;
        min-height: auto;
        justify-content: space-between;
    }

    .profile-section {
        margin-bottom: 10px;
    }

    .avatar-wrapper {
        margin-bottom: 8px;
    }

    .avatar {
        width: 60px;
        height: 60px;
    }

    .avatar-glow {
        width: 75px;
        height: 75px;
    }

    .name {
        font-size: 24px;
        margin-bottom: 4px;
    }

    .tagline {
        font-size: 11px;
        margin-bottom: 8px;
    }

    .spotify-badge {
        max-width: 100%;
        margin-bottom: 10px;
        margin-top: 0;
    }

    .spotify-badge img {
        max-height: 70px;
    }

    .links-section {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 10px;
        flex: 1;
        align-content: center;
    }

    .link-card {
        min-height: auto;
        padding: 12px 14px;
        gap: 8px;
    }

    .link-icon {
        width: 40px;
        height: 40px;
    }

    .link-icon svg {
        width: 20px;
        height: 20px;
    }

    .link-title {
        font-size: 15px;
    }

    .link-subtitle {
        font-size: 11px;
    }

    .footer {
        padding: 8px 0;
        font-size: 10px;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, var(--purple-main), var(--purple-light));
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 10px 40px var(--purple-glow);
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast svg {
    flex-shrink: 0;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background: var(--purple-main);
    color: white;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--purple-main);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--purple-light);
}

