html,
body,
* {
    cursor: var(--site-cursor, auto) !important;
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    color: #fff;
    font-family: monospace;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

body {
    position: relative;
}

/* background video */
#bgvid {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
    filter: blur(3px);
    transform: scale(1.015);
}

/* dark overlay so text stays readable but video is still visible */
#bg-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, 0.22) 68%, rgba(0, 0, 0, 0.62) 100%);
}

/* subtle particles */
#particles {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: none;
    pointer-events: none;
}

/* cursor glow */
#cursor-light {
    position: fixed;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 50;
    display: none;
    opacity: 0.32;
    transition: opacity 0.18s ease;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.10) 0%,
        rgba(255, 255, 255, 0.05) 30%,
        rgba(255, 255, 255, 0.02) 48%,
        rgba(255, 255, 255, 0) 72%
    );
}

/* intro */
#intro {
    position: fixed;
    inset: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 100;
    transition: opacity 0.8s ease;
}

#heart {
    font-size: 28px;
    line-height: 1;
    opacity: 0.95;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.14);
}

#enter {
    margin-top: 14px;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: lowercase;
    color: rgba(255, 255, 255, 0.42);
}

/* main content */
#main {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    perspective: 1200px;
    transition: opacity 1.1s ease;
}

#profile-wrap {
    position: relative;
    width: 640px;
    max-width: calc(100vw - 40px);
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 28px 28px 24px;
    border-radius: 30px;
    background: rgba(10, 10, 10, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        inset 0 -1px 0 rgba(255, 255, 255, 0.012);
    overflow: visible;
    isolation: isolate;
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.18s ease-out;
    animation: box-outline-pulse 2.2s ease-in-out infinite;
}

#profile-wrap::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 29px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 20%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.008), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.008));
    pointer-events: none;
    z-index: -1;
}

@keyframes box-outline-pulse {
    0%,
    100% {
        border-color: rgba(255, 255, 255, 0.05);
        box-shadow:
            0 28px 70px rgba(0, 0, 0, 0.28),
            inset 0 1px 0 rgba(255, 255, 255, 0.03),
            inset 0 -1px 0 rgba(255, 255, 255, 0.012);
    }

    50% {
        border-color: rgba(255, 255, 255, 0.14);
        box-shadow:
            0 28px 70px rgba(0, 0, 0, 0.28),
            inset 0 1px 0 rgba(255, 255, 255, 0.05),
            inset 0 -1px 0 rgba(255, 255, 255, 0.02),
            0 0 14px rgba(255, 255, 255, 0.10);
    }
}

#profile-wrap::after {
    content: none;
}

#member-rank {
    position: absolute;
    top: 18px;
    right: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#member-rank-icon {
    width: 17px;
    height: 17px;
    object-fit: contain;
    display: block;
    opacity: 0.92;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.10));
}

#member-rank-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 12px);
    transform: translateX(-50%) translateY(4px);
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(14, 14, 14, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.94);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#member-rank:hover #member-rank-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* top profile row */
#top-row {
    display: flex;
    align-items: center;
    gap: 18px;
}

#pfp-wrap {
    position: relative;
    flex-shrink: 0;
    overflow: visible;
}

#pfp {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
    box-shadow:
        0 0 22px rgba(255, 255, 255, 0.22),
        0 0 44px rgba(255, 255, 255, 0.12);
}

#profile-views {
    position: absolute;
    top: -18px;
    left: 0;
    transform: translateX(-42%);
    padding: 7px 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(14, 14, 14, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.92);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
    z-index: 3;
}

.views-eye {
    font-size: 11px;
    opacity: 0.85;
}

#identity {
    min-width: 0;
}

#name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

#username {
    margin: 0;
    font-size: 44px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: rgba(255, 255, 255, 0.98);
    text-shadow:
        0 0 6px rgba(255, 255, 255, 0.14),
        0 0 16px rgba(255, 255, 255, 0.08);
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.98);
    paint-order: stroke fill;
    min-height: 1em;
    width: 7ch;
    display: inline-block;
}

#username::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 0.9em;
    margin-left: 6px;
    vertical-align: -0.08em;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.26);
    animation: blink-caret 0.9s step-end infinite;
}

#username.typing-complete::after {
    opacity: 0;
    animation: none;
}

#username.typewriter-finish {
    animation: username-finish 0.7s ease;
}

#badges {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.badge {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.08);
    font-size: 14px;
}

.badge-owner {
    position: relative;
    padding: 0;
    width: 32px;
    min-width: 32px;
    overflow: visible;
}

.badge-icon {
    width: 17px;
    height: 17px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 8px rgba(255, 214, 102, 0.24));
}

.badge-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) translateY(4px);
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(14, 14, 14, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.94);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

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

@keyframes blink-caret {
    0%,
    45% {
        opacity: 1;
    }

    46%,
    100% {
        opacity: 0;
    }
}

@keyframes username-finish {
    0%,
    100% {
        transform: translateX(0);
        opacity: 1;
    }

    10%,
    30%,
    50%,
    70% {
        opacity: 0.55;
    }

    20%,
    60% {
        transform: translateX(-1px);
        opacity: 1;
    }

    40%,
    80% {
        transform: translateX(1px);
        opacity: 0.82;
    }
}

#status {
    margin: 6px 0 4px;
    font-size: 17px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    min-height: 1.2em;
}

#status::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 0.95em;
    margin-left: 6px;
    vertical-align: -0.08em;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.18);
    animation: blink-caret 0.9s step-end infinite;
}

#status.typing-complete::after {
    opacity: 0;
    animation: none;
}

#joined {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.56);
}

/* middle box */
#social-card {
    width: 100%;
    min-height: 108px;
    padding: 14px 16px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    text-decoration: none;

    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        0 0 30px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

#social-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

#discord-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

#discord-icon {
    width: 62px;
    height: 62px;
    border-radius: 16px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}

#discord-icon-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#discord-icon-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#discord-info {
    min-width: 0;
}

#discord-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

#discord-title {
    font-size: 20px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
}

#discord-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.26);
    font-weight: 700;
}

#discord-subtext {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2fd66f;
    display: inline-block;
}

.separator {
    opacity: 0.35;
}

#join-wrap {
    position: relative;
    flex-shrink: 0;
}

#join-btn {
    min-width: 90px;
    height: 50px;
    padding: 0 18px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    background: #20b46a;
    box-shadow: 0 0 18px rgba(32, 180, 106, 0.22);
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

#join-btn:hover {
    transform: scale(1.04);
    filter: brightness(1.04);
    box-shadow: 0 0 22px rgba(32, 180, 106, 0.30);
}

/* icon row */
#social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 4px;
}

#social-icons a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

#social-icons img {
    width: 38px;
    height: 38px;
    opacity: 0.94;
    transform: scale(1);
    transition:
        transform 0.16s ease,
        opacity 0.16s ease,
        filter 0.16s ease;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.24));
}

#social-icons img:hover {
    opacity: 1;
    transform: scale(1.10);
    filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.44));
}

#discord-copy-tooltip,
#discord-redirect-tooltip,
#instagram-redirect-tooltip,
#tiktok-redirect-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 12px);
    transform: translateX(-50%) translateY(4px);
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(14, 14, 14, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.94);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#discord-copy.show-tooltip #discord-copy-tooltip,
#social-card.show-tooltip #join-wrap #discord-redirect-tooltip,
#instagram-link.show-tooltip #instagram-redirect-tooltip,
#tiktok-link.show-tooltip #tiktok-redirect-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

#discord-redirect-tooltip {
    left: 50%;
    right: auto;
    bottom: calc(100% + 12px);
    transform: translateX(-50%) translateY(4px);
}

/* responsive */
@media (max-width: 800px) {
    #profile-wrap {
        width: min(94vw, 640px);
        padding: 24px 22px 22px;
    }

    #username {
        font-size: 34px;
    }

    #pfp {
        width: 88px;
        height: 88px;
    }

    #profile-views {
        top: -16px;
        left: 2px;
        transform: translateX(-38%);
    }

    #social-card {
        min-height: 96px;
    }

    #social-icons img {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 580px) {
    #profile-wrap {
        padding: 20px 18px 18px;
        border-radius: 24px;
    }

    #member-rank {
        top: 14px;
        right: 14px;
    }

    #top-row {
        gap: 14px;
    }

    #username {
        font-size: 26px;
    }

    #status {
        font-size: 14px;
    }

    #social-card {
        flex-direction: column;
        align-items: stretch;
    }

    #join-btn {
        width: 100%;
    }
}
