* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000000;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}


.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
}

.background-grid::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    background: radial-gradient(
        circle,
        rgba(100, 100, 100, 0.15) 0%,
        transparent 70%
    );
    transform: translate(-50%, -50%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
}


.card-wrapper {
    position: relative;
    z-index: 1;
    padding: 40px;
    perspective: 1200px;
}

.card {
    width: 420px;
    height: 580px;
    border-radius: 32px;
    position: relative;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
    background: 
        linear-gradient(135deg,
            #f8f8f8 0%,
            #efefef 5%,
            #e8e8e8 10%,
            #d8d8d8 15%,
            #c8c8c8 20%,
            #b8b8b8 25%,
            #a8a8a8 30%,
            #989898 35%,
            #888888 40%,
            #989898 45%,
            #a8a8a8 50%,
            #b8b8b8 55%,
            #c8c8c8 60%,
            #d8d8d8 65%,
            #e8e8e8 70%,
            #efefef 75%,
            #f5f5f5 80%,
            #fafafa 85%,
            #fdfdfd 90%,
            #ffffff 95%,
            #ffffff 100%
        );
    box-shadow: 
        inset 0 2px 4px rgba(255, 255, 255, 0.9),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3),
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(255, 255, 255, 0.1);
}


.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 32px;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.8) 0%, transparent 30%),
        radial-gradient(circle at 75% 25%, rgba(255, 255, 255, 0.6) 0%, transparent 25%),
        radial-gradient(circle at 50% 50%, rgba(150, 150, 150, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 25% 75%, rgba(255, 255, 255, 0.5) 0%, transparent 30%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.7) 0%, transparent 35%);
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 1;
}


.card-glow {
    position: absolute;
    inset: 0;
    border-radius: 32px;
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.2) 20%,
        transparent 40%
    );
    mix-blend-mode: overlay;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.card-wrapper:hover .card-glow {
    opacity: 1;
}


.card::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 36px;
    padding: 4px;
    background: linear-gradient(
        90deg,
        #ffffff 0%,
        #f0f0f0 5%,
        #e0e0e0 10%,
        #d0d0d0 15%,
        #c0c0c0 20%,
        #b0b0b0 25%,
        #a0a0a0 30%,
        #909090 35%,
        #808080 40%,
        #707070 45%,
        #606060 50%,
        #707070 55%,
        #808080 60%,
        #909090 65%,
        #a0a0a0 70%,
        #b0b0b0 75%,
        #c0c0c0 80%,
        #d0d0d0 85%,
        #e0e0e0 90%,
        #f0f0f0 95%,
        #ffffff 100%
    );
    background-size: 200% 100%;
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderFlow 4s linear infinite;
    pointer-events: none;
    z-index: 3;
}

@keyframes borderFlow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

.card-content {
    position: relative;
    z-index: 4;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 50px;
    border-radius: 28px;
    overflow: hidden;
    background: 
        linear-gradient(135deg,
            rgba(15, 15, 15, 0.98) 0%,
            rgba(20, 20, 20, 0.97) 50%,
            rgba(25, 25, 25, 0.98) 100%
        );
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.1),
        inset 0 -1px 2px rgba(0, 0, 0, 0.5);
}

.username {
    position: relative;
    font-size: 64px;
    font-weight: 600;
    letter-spacing: -1px;
    margin-bottom: 12px;
    color: #ffffff;
    text-transform: lowercase;
    filter: drop-shadow(0 4px 20px rgba(255, 255, 255, 0.4)) drop-shadow(0 0 40px rgba(255, 255, 255, 0.2));
}


.username::before {
    content: 'brekz';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    z-index: -1;
    background: linear-gradient(
        90deg,
        #ffffff 0%,
        #f0f0f0 10%,
        #d0d0d0 20%,
        #a0a0a0 30%,
        #707070 40%,
        #505050 50%,
        #707070 60%,
        #a0a0a0 70%,
        #d0d0d0 80%,
        #f0f0f0 90%,
        #ffffff 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: blur(4px) brightness(1.2);
    animation: outlineFlow 3s linear infinite;
}

.bio-text {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 50px;
    text-align: center;
}

@keyframes outlineFlow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

.social-icons {
    display: flex;
    flex-direction: row;
    gap: 16px;
    justify-content: center;
    align-items: center;
}

.social-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        #f8f8f8 0%,
        #e8e8e8 25%,
        #c8c8c8 50%,
        #a8a8a8 75%,
        #d8d8d8 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #1a1a1a;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.8),
        inset 0 -1px 2px rgba(0, 0, 0, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    cursor: pointer;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border-radius: 50%;
    background: radial-gradient(
        circle at 30% 30%,
        rgba(255, 255, 255, 0.6) 0%,
        transparent 50%
    );
    pointer-events: none;
}

.social-icon:hover {
    transform: translateY(-3px) scale(1.08);
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.9),
        inset 0 -1px 2px rgba(0, 0, 0, 0.3),
        0 6px 16px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 255, 255, 0.3);
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        #f0f0f0 25%,
        #d8d8d8 50%,
        #c0c0c0 75%,
        #e8e8e8 100%
    );
}

.social-icon svg {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
    transition: filter 0.3s ease;
}

.social-icon:hover svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}




.discord-presence {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.35); 
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(8px); 
}

.presence-indicator {
    width: 8px;
    height: 8px;
    background: #43b581; 
    border-radius: 50%;
    box-shadow: 0 0 8px #43b581; 
    animation: pulse-glow 2s ease-in-out infinite;
}

.presence-indicator.loading {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: rgba(255, 255, 255, 0.8);
    box-shadow: none;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

.presence-text {
    display: inline-block;
    white-space: nowrap;
    will-change: transform;
    color: white; 
}

.spotify-banner {
    display: none;
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    justify-content: center;
    gap: 6px;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.32);
    color: #ffffff;
    border: 0;
    border-radius: 10px;
    z-index: 5;
    width: auto;
    min-width: fit-content;
    max-width: 240px;
    overflow: hidden;
}

.spotify-banner.active {
    display: flex;
}

.spotify-icon {
    display: inline-flex;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 2px;
    height: 12px;
    width: 18px;
    flex: 0 0 auto;
    flex-shrink: 0;
}

.spotify-icon span {
    display: block;
    width: 3px;
    background: #ffffff;
    border-radius: 2px;
    animation: wave-bar 1s ease-in-out infinite;
    opacity: 0.9;
}

.spotify-icon span:nth-child(1) { animation-delay: 0s; height: 6px; }
.spotify-icon span:nth-child(2) { animation-delay: 0.12s; height: 10px; }
.spotify-icon span:nth-child(3) { animation-delay: 0.24s; height: 7px; }

.spotify-track-box {
    position: relative;
    flex: 0 1 180px;
    min-width: 100px;
    max-width: 180px;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spotify-track-box.marquee-mode {
    justify-content: flex-start;
}

.spotify-track {
    display: inline-block;
    font-size: 13px;
    line-height: 1.2;
    color: #ffffff;
    white-space: nowrap;
    max-width: 100%;
}


@keyframes marquee {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.marquee-active {
    display: flex;
    gap: 0;
    white-space: nowrap;
}

.marquee-text {
    flex-shrink: 0;
    padding-right: 40px;
}


@keyframes marquee-loop {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes wave-bar {
    0%, 100% { transform: scaleY(0.7); }
    50% { transform: scaleY(1.3); }
}

.text-box {
    max-width: 220px;      
    overflow: hidden;
    white-space: nowrap;
}


.card.spotify-active {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.card.spotify-active .card-content {
    background: rgba(0,0,0,0.35); 
    backdrop-filter: none;
}

.card.spotify-active .card-content::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.65'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
    opacity: 0.8;
}

.card.spotify-active::before {
    opacity: 0.25; 
    backdrop-filter: none;
}


.discord-presence {
    background: rgba(0, 0, 0, 0.35); 
    backdrop-filter: blur(8px);
    color: white;
}


@media (max-width: 768px) {
    .card {
        width: 90vw;
        max-width: 380px;
        height: 520px;
    }

    .card-content {
        padding: 40px 30px;
    }

    .username {
        font-size: 52px;
        margin-bottom: 10px;
    }

    .bio-text {
        font-size: 12px;
        margin-bottom: 36px;
    }

    .social-icons {
        gap: 12px;
        flex-wrap: wrap;
    }

    .social-icon {
        width: 38px;
        height: 38px;
    }

    .social-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .discord-presence {
        bottom: 20px;
        padding: 6px 12px;
    }
    
    .presence-text {
        font-size: 11px;
    }
}
