/* Global Styles */
@font-face {
    font-family: 'BELL';
    src: url('assets/BELL.ttf') format('truetype');
}

@font-face {
    font-family: 'Hanson';
    src: url('assets/Hanson-Bold.otf') format('opentype');
}

@font-face {
    font-family: 'Angelface';
    src: url('assets/Angel_wish.ttf') format('truetype');
}

@font-face {
    font-family: 'Scripty';
    src: url('assets/AmostelySignature.ttf') format('truetype');
}

:root {
    --glass-bg: rgba(0, 0, 0, 0.4);
    --glass-border: rgba(255, 255, 255, 0.15);
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --accent-glow: rgba(255, 255, 255, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 18px;
    cursor: none;
}

/* Base cursor for clickable elements */
a,
button,
.overlay,
.social-btn,
.control-btn {
    cursor: none;
}

/* Video Background */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: #000;
}

#bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

/* Overlay */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: none;
    transition: opacity 0.5s ease;
}

.overlay-text {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.2rem;
    color: white;
    opacity: 0.8;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

/* Main Wrapper for Scaling */
.main-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 90%;
    max-width: 850px;
}

/* Main Container (Glass Card) */
.container {
    background: transparent;
    border: none;
    padding: 25px 30px;
    width: 100%;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center everything column-wise */
    gap: 12px;
    /* Tighter layout overall */

    /* GSAP 3D Transform Context */
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Profile Header */
.profile-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    /* Tighter profile head */
}

.avatar-wrapper {
    position: relative;
    width: 130px;
    height: 130px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-decoration {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    pointer-events: none;
    z-index: 1;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.username {
    position: relative;
    font-family: 'Hanson', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 0 10px var(--accent-glow);
    display: inline-block;
}

.username-text {
    position: relative;
    z-index: 2;
}

/* Fireflies Effect */
.fireflies-container {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    z-index: 1;
    pointer-events: none;
    overflow: visible;
}

.firefly {
    position: absolute;
    width: 3px;
    height: 3px;
    background-color: #fff;
    /* Light color for white text */
    border-radius: 50%;
    box-shadow: 0 0 5px 2px rgba(255, 255, 255, 0.8), 0 0 10px 4px rgba(200, 200, 255, 0.4);
    opacity: 0;
    animation: fireflyAnim linear infinite;
}

@keyframes fireflyAnim {
    0% {
        transform: translate(0, 0) scale(0);
        opacity: 0;
    }

    20% {
        opacity: 1;
        transform: translate(var(--tx1), var(--ty1)) scale(1.2);
    }

    80% {
        opacity: 1;
        transform: translate(var(--tx2), var(--ty2)) scale(0.8);
    }

    100% {
        transform: translate(var(--tx3), var(--ty3)) scale(0);
        opacity: 0;
    }
}

/* Header Badges (Shrink Ray) */
.badges {
    display: flex;
    gap: 5px;
}

.badges img,
.badges-container img,
.profile-header img.badge {
    height: 22px !important;
    width: auto !important;
    display: inline-block;
    vertical-align: middle;
}

.bio {
    font-size: 1rem;
    color: var(--text-secondary);
    min-height: 1.2em;
    font-family: 'BELL', sans-serif;
}

/* Widget Grid */
.widget-grid {
    display: flex !important;
    flex-direction: row !important;
    gap: 15px;
    /* Tighter gap */
    width: 100%;
    max-width: 600px;
    /* Make widgets less wide */
    margin: 15px auto 0 auto;
    /* Spaced separate from top group slightly */
}

/* Widget Card (Visuals) */
.widget-card {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 12px 15px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    height: 110px !important;
    /* Reduced Height */
    min-height: 110px;
    transition: transform 0.2s ease;
    position: relative;
    overflow: hidden;
}

.widget-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
}

/* Widget Layout Containers (No Visuals) */
#discord-widget,
#roblox-widget {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* Discord Widget Specifics */
#discord-widget {
    gap: 12px;
}

.discord-avatar-wrapper {
    position: relative;
    width: 50px;
    height: 50px;
}

.discord-avatar {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50%;
}

.discord-status-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #000;
    position: absolute;
    bottom: 0;
    right: 0;
}

.status-online {
    background-color: #23a559;
}

.status-idle {
    background-color: #f0b232;
}

.status-dnd {
    background-color: #f23f43;
}

.status-offline {
    background-color: #80848e;
}

.discord-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
    z-index: 1;
}

.username-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.username-row strong {
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Guild Tag */
.guild-tag-container {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 4px 8px;
    margin-left: 0;
    font-size: 0.85em;
    font-weight: bold;
    white-space: nowrap;
}

.clan-badge {
    width: 16px !important;
    height: 16px !important;
    object-fit: contain;
}

.clan-tag {
    color: var(--text-secondary);
}

.activity-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

/* Discord Logo (FIXED) */
.discord-widget .discord-logo,
.discord-widget svg,
#discord-widget .discord-logo,
#discord-widget svg {
    opacity: 0.15 !important;
    /* Dimmed discord logo */
    width: 28px !important;
    height: 28px !important;
    position: absolute;
    top: 10px;
    right: 10px;
}

/* Roblox Widget Specifics */
.roblox-info {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    position: relative;
}

.roblox-avatar-bg {
    position: absolute !important;
    left: -5px !important;
    /* Adjusted */
    bottom: -5px !important;
    /* Adjusted */
    height: 110% !important;
    /* Scaled down */
    width: auto;
    z-index: 1;
    opacity: 1 !important;
    object-fit: contain;
}

.roblox-text-container {
    position: relative;
    z-index: 10;
    margin-left: auto;
    text-align: right;
    padding-right: 20px;
    width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.roblox-btn {
    display: inline-block;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    color: white;
    text-decoration: none;
    font-size: 0.65rem;
    transition: background 0.2s;
    white-space: nowrap;
    width: fit-content;
    margin-top: 4px;
    margin-left: auto;
}

.roblox-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Social Buttons */
.social-buttons {
    display: inline-flex;
    justify-content: center;
    gap: 15px;
    margin: 15px auto 0 auto;
    /* Spaced from the widget block */
}

.social-btn {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    text-decoration: none;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
}

.social-btn img {
    width: 24px !important;
    height: 24px !important;
    object-fit: contain;
    transition: transform 0.2s;
    cursor: none;
}

/* Tooltip on Hover */
.social-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 130%;
    /* Position above hover */
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    font-family: 'Inter', sans-serif;
}

.social-btn:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.social-btn:hover img {
    transform: scale(1.2);
}

/* Metadata Container (below bio) */
.metadata-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 5px;
}

.metadata {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.meta-icon {
    width: 16px;
    height: auto;
    opacity: 0.8;
}

.divider {
    opacity: 0.6;
    margin: 0 12px;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10000;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    text-align: center;
}

.toast.hidden {
    opacity: 0;
    transform: translate(-50%, 20px);
}

/* Responsive Design */
@media (max-width: 600px) {
    .widget-grid {
        flex-direction: column;
    }

    .container {
        padding: 25px;
    }

    .username {
        font-size: 1.5rem;
    }
}

/* Custom DOM Cursor */
#custom-cursor {
    position: fixed;
    width: 32px;
    height: auto;
    pointer-events: none;
    z-index: 10001;
    /* Above trail */
    top: 0;
    left: 0;
    transform: translate(0, 0);
    transition: transform 0.1s ease-out;
}

#custom-cursor.clicking {
    transform: scale(0.9);
}

#custom-cursor.hovering {
    transform: scale(1.1);
}

/* Cursor Trail */
.cursor-trail-dot {
    position: fixed;
    width: 12px;
    height: 12px;
    margin-left: -6px;
    margin-top: -6px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transition: opacity 0.2s;
}