:root {
    --bg: #000000;
    --card-bg: rgba(0, 0, 0, 0.4);
    --border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: #888888;
    
    --accent-cyan: #00ffff;
    --accent-purple: #bd00ff;
    --accent-green: #00ff9d;
    --accent-red: #ff0055;
    
    --font: 'JetBrains Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* Hide default cursor */
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: var(--font);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

/* Custom Cursor */
#cursor {
    position: fixed;
    top: 0; left: 0;
    width: 8px; height: 8px;
    background: white;
    border-radius: 50%;
    pointer-events: none !important; /* CRITICAL */
    z-index: 2000; /* Highest visual element */
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
    mix-blend-mode: difference;
}

#cursor-blur {
    position: fixed;
    top: 0; left: 0;
    width: 40px; height: 40px;
    background: rgba(255, 255, 255, 0.15);
    filter: blur(20px);
    border-radius: 50%;
    pointer-events: none !important; /* CRITICAL */
    z-index: 1999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s;
}

/* Interactive elements expand cursor */
a:hover ~ #cursor, button:hover ~ #cursor {
    width: 12px; height: 12px;
    background: var(--accent-cyan);
}

#starfield {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none !important;
}

.interface {
    position: relative;
    z-index: 100;
    width: 100%;
    max-width: 450px;
    padding: 20px;
    animation: fade-in 1s ease-out;
    transform-style: preserve-3d;
    pointer-events: none; /* Wrapper shouldn't block */
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 0 50px rgba(0,0,0,0.9), inset 0 0 30px rgba(255,255,255,0.02);
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
    pointer-events: auto !important; /* ENABLE CLICKS HERE */
    z-index: 101;
}

/* Header */
.profile-header {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 20px;
}

.avatar-wrapper {
    position: relative;
    width: 90px; height: 90px;
    flex-shrink: 0;
}

#avatar {
    width: 100%; height: 100%;
    border-radius: 16px;
    border: 1px solid var(--border);
    object-fit: cover;
    /* filter: grayscale(100%); REMOVED for stability */
    transition: transform 0.4s;
}

/* .card:hover #avatar { filter: grayscale(0%); } REMOVED */

#status-dot {
    position: absolute;
    bottom: -3px; right: -3px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--text-muted);
    border: 3px solid #050505;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    transition: background-color 0.3s, box-shadow 0.3s;
}

.status.online { background-color: var(--accent-green) !important; box-shadow: 0 0 12px var(--accent-green) !important; }
.status.idle { background-color: #ffaa00 !important; box-shadow: 0 0 12px #ffaa00 !important; }
.status.dnd { background-color: var(--accent-red) !important; box-shadow: 0 0 12px var(--accent-red) !important; }
.status.offline { background-color: var(--text-muted) !important; }

.user-info h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 8px;
    line-height: 1;
}

.local-time-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 10px;
    border-radius: 6px;
    width: fit-content;
    border: 1px solid transparent;
    transition: border-color 0.3s;
}

/* Activity Widget */
#activity-container {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 20px;
    transition: all 0.3s;
    pointer-events: auto;
}

#activity-container.hidden { display: none; }

.activity-icon {
    width: 48px; height: 48px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

#activity-img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: none;
}

#activity-default-icon { font-size: 1.5rem; color: var(--text-muted); }

.activity-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.act-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.act-state {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.act-time {
    font-size: 0.7rem;
    color: var(--text-main);
    opacity: 0.7;
    margin-top: 2px;
    font-family: var(--font);
}

/* Separator */
.separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 0 0 20px 0;
}

/* Links */
.links-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-row {
    display: flex;
    gap: 8px;
    height: 64px;
}

.social-btn {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    padding: 0 16px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    pointer-events: auto; /* FORCE ENABLE */
    cursor: none; /* Custom cursor */
}

.social-btn.link-area { flex-grow: 1; }

.copy-btn {
    width: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--text-muted);
    cursor: none;
    transition: all 0.2s ease;
    font-size: 1.1rem;
    pointer-events: auto; /* FORCE ENABLE */
}

/* Hovers */
.social-row:hover .social-btn, 
.social-row:hover .copy-btn {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.05);
}

.social-btn:active, .copy-btn:active { transform: scale(0.98); }
.copy-btn:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.1) !important; }

.icon-box {
    width: 28px;
    display: flex;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.4rem;
    color: var(--text-muted);
    transition: color 0.2s;
}
.social-row:hover .icon-box { color: var(--text-main); }

.btn-text { display: flex; flex-direction: column; flex-grow: 1; }
.label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.handle { font-size: 1rem; font-weight: 500; }

.arrow {
    font-size: 0.9rem;
    color: var(--text-muted);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.2s ease;
}
.social-btn:hover .arrow { opacity: 1; transform: translateX(0); }

/* Specific Glows */
.social-row:hover .social-btn.telegram { box-shadow: inset 0 0 20px rgba(42, 171, 238, 0.05); border-color: rgba(42, 171, 238, 0.2); }
.social-row:hover .social-btn.discord { box-shadow: inset 0 0 20px rgba(88, 101, 242, 0.05); border-color: rgba(88, 101, 242, 0.2); }
.social-row:hover .social-btn.steam { box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.15); }

/* Toast */
#toast-container {
    position: fixed;
    bottom: 30px; left: 50%;
    transform: translateX(-50%);
    z-index: 2001; /* Above everything */
    pointer-events: none;
}

.toast {
    background: rgba(20, 20, 20, 0.9);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    animation: toast-in 0.3s ease, toast-out 0.3s ease 2s forwards;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
}
.toast i { color: var(--accent-green); }

@keyframes toast-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-20px); } }
@keyframes fade-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 480px) {
    * { cursor: auto; } 
    #cursor, #cursor-blur { display: none; }
    .card { transform: none !important; }
    .profile-header { flex-direction: column; text-align: center; }
    .social-row { flex-direction: row; }
}
