:root {
    --card-bg: rgba(16, 16, 18, 0.6);
    --line: rgba(255, 255, 255, 0.08);
    --muted: rgba(255, 255, 255, 0.55);
    --status-online: #23a559;
    --status-idle: #f0b232;
    --status-dnd: #f23f42;
    --status-offline: #80848e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (pointer: fine) {
    * { cursor: crosshair !important; }
    a, button, .entry-screen { cursor: pointer !important; }
}

body {
    background: #050505;
    color: #fff;
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-font-smoothing: antialiased;
}

#bg-video {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    pointer-events: none;
    user-select: none;
}

.loop-fade {
    position: fixed;
    inset: 0;
    background: #000;
    opacity: 0;
    z-index: -1;
    pointer-events: none;
    transition: opacity 1.2s ease-in-out;
}

.shade {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

#mouse-light {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle 500px at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, 0.04), transparent 70%);
    opacity: 0;
    transition: opacity 1.5s ease;
}

#mute-btn {
    position: fixed;
    top: 24px;
    left: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border: 1px solid var(--line);
    background: var(--card-bg);
    color: #fff;
    opacity: 0.8;
    transition: opacity 0.2s;
}
#mute-btn:hover { opacity: 1; }
#mute-btn svg { width: 18px; height: 18px; }

.now-playing {
    position: fixed;
    top: 24px;
    left: 76px;
    height: 40px;
    max-width: min(260px, calc(100vw - 100px));
    padding: 0 16px 0 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.now-playing .music-wave { margin: 0; }
.now-playing .music-wave .bar { background: #fff; }
.now-playing.muted .music-wave .bar { animation: none; transform: scaleY(0.2); }
.np-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.np-text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#np-title { font-size: 0.8rem; font-weight: 600; }
#np-artist { font-size: 0.7rem; color: var(--muted); }

.name-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 2px; }
.name-row .display-name { margin-bottom: 0; }

.identity-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin-top: 2px;
}
.guild-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--line);
}
.guild-tag img { width: 15px; height: 15px; border-radius: 3px; }
.guild-tag.hidden { display: none; }
.badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: fit-content;
    margin: 28px auto 0;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
}
.badges img { width: 34px; height: 34px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5)); }
.badges:empty { display: none; }



.badge-wrapper { position: relative; display: inline-flex; cursor: pointer; }
.badge-wrapper::after {
    content: attr(data-title);
    position: absolute;
    bottom: 100%; left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: rgba(10, 10, 12, 0.95);
    color: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    border: 1px solid var(--line);
    z-index: 20;
}
.badge-wrapper:hover::after { opacity: 1; transform: translateX(-50%) translateY(-2px); }

#particles-container {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    pointer-events: none;
    will-change: transform;
}

@keyframes float-particle {
    0% { transform: translate3d(0, -10vh, 0); }
    100% { transform: translate3d(0, 110vh, 0); }
}

.container {
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    position: relative;
}

.profile-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
    padding: 40px 34px 34px;
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: 18px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: scale(0.85);
    filter: blur(12px);
    transition: opacity 1.5s ease, filter 1.5s ease, transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.profile-card.cinematic-show {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}

.avatar-container { position: relative; margin-bottom: 20px; }

.avatar {
    width: 116px;
    height: 116px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    object-fit: cover;
    background: #1a1a1a;
    display: block;
}

.presence-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid #1b1b1d;
    background: var(--status-offline);
}
.presence-dot.online { background: var(--status-online); }
.presence-dot.idle { background: var(--status-idle); }
.presence-dot.dnd { background: var(--status-dnd); }

.user-info { text-align: center; margin-bottom: 26px; }
.display-name { font-size: 2rem; font-weight: 600; margin-bottom: 2px; }
.username { font-size: 1rem; font-weight: 400; color: var(--muted); }

.custom-status {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
}
.custom-status.hidden { display: none; }
.cursor-blink { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.activity-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 26px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 12px;
    transition: opacity 0.3s ease;
    position: relative;
    isolation: isolate;
}
.spotify-glow {
    position: absolute;
    top: 4px; left: 4px; right: 4px; bottom: 4px;
    background-size: cover;
    background-position: center;
    filter: blur(14px) saturate(1.2) brightness(0.4);
    z-index: -1;
    border-radius: 12px;
    opacity: 0.5;
    pointer-events: none;
}
.activity-container.hidden { display: none; }

.activity-icon,
.activity-icon-svg {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    flex-shrink: 0;
}
.activity-icon { object-fit: cover; }
.activity-icon-svg {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
}

.activity-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
}

.activity-name {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-state,
.activity-details-text {
    font-size: 0.88rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-wave { display: flex; align-items: center; gap: 2px; height: 12px; margin-left: 8px; flex-shrink: 0; }
.music-wave .bar { width: 2px; background: #1db954; border-radius: 1px; animation: wave 1.2s ease-in-out infinite; }
.music-wave .bar:nth-child(1) { height: 5px; }
.music-wave .bar:nth-child(2) { height: 12px; animation-delay: -0.2s; }
.music-wave .bar:nth-child(3) { height: 8px; animation-delay: -0.4s; }
.music-wave .bar:nth-child(4) { height: 5px; animation-delay: -0.6s; }
@keyframes wave { 50% { transform: scaleY(0.3); } }

.spotify-progress-container {
    width: 100%;
    height: 3px;
    margin-top: 6px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    overflow: hidden;
}
.spotify-progress-bar { height: 100%; width: 0; background: #1db954; transition: width 1s linear; }

.spotify-link {
    display: flex;
    padding: 6px;
    color: #fff;
    opacity: 0.45;
    transition: opacity 0.2s;
}
.spotify-link:hover { opacity: 1; }

.entry-screen {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    background: #050505;
    user-select: none;
    transition: opacity 1.5s ease, visibility 1.5s ease;
}
.entry-screen.fade-out { opacity: 0; visibility: hidden; pointer-events: none; }

.entry-text {
    font-size: 1.15rem;
    font-weight: 300;
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.8);
    animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

.social-links { display: flex; gap: 14px; justify-content: center; }

.social-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    transition: background 0.2s, border-color 0.2s;
}
.social-btn img { width: 24px; height: 24px; opacity: 0.85; transition: opacity 0.2s; }
.social-btn:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.2); }
.social-btn:hover img { opacity: 1; }

.social-btn { position: relative; }
.link-preview {
    position: absolute;
    bottom: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: 130px;
    background: rgba(16, 16, 18, 0.95);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 30;
}
.social-btn:hover .link-preview {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.preview-banner {
    width: 100%;
    height: 32px;
    border-radius: 6px;
}
.preview-ig .preview-banner { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); }
.preview-tiktok .preview-banner { background: linear-gradient(45deg, #ff0050, #00f2fe); }
.preview-spotify .preview-banner { background: #1db954; }
.preview-text {
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    color: #fff;
    line-height: 1.2;
}
.preview-text small {
    font-size: 0.65rem;
    color: var(--muted);
    font-weight: 400;
}

@media (max-width: 600px) {
    .profile-card { padding: 28px 22px 24px; }
    .avatar { width: 104px; height: 104px; }
    .display-name { font-size: 1.75rem; }
    .social-btn { width: 48px; height: 48px; }
    .social-btn img { width: 22px; height: 22px; }
    #mute-btn { top: 16px; left: 16px; }
}
