:root {
    --bg: #050505;
    --text-main: #ffffff;
    --text-muted: #888888;
    --accent: #FF6363; 
    --glass: rgba(20, 20, 20, 0.6);
    --border: rgba(255, 255, 255, 0.08);
    --font-ui: 'Inter', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; user-select: none; -webkit-user-select: none; cursor: none; -webkit-tap-highlight-color: transparent; }

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: var(--font-ui);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

#cur { 
    position: fixed; width: 12px; height: 12px; pointer-events: none; z-index: 9999; 
    mix-blend-mode: difference; top: 0; left: 0; 
    opacity: 0; transition: opacity 0.2s ease; 
    will-change: transform; 
}

#cur::before, #cur::after { 
    content: ''; position: absolute; top: 50%; left: 50%; width: 100%; height: 2px; 
    background: rgba(255, 255, 255, 0.5); 
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s ease; 
}

#cur::before { transform: translate(-50%,-50%) rotate(90deg); }
#cur::after { transform: translate(-50%,-50%) rotate(0deg); }

body.hov #cur::before { transform: translate(-50%,-50%) rotate(135deg); background: var(--accent); }
body.hov #cur::after { transform: translate(-50%,-50%) rotate(45deg); background: var(--accent); }

.grid-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 30px 30px;
    mask-image: radial-gradient(
        200px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
        black 0%, 
        transparent 100%
    );
    -webkit-mask-image: radial-gradient(
        200px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
        black 0%, 
        transparent 100%
    );
}

.ambient-glow {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(255, 99, 99, 0.15) 0%, rgba(0,0,0,0) 70%);
    z-index: -1; pointer-events: none;
    animation: pulse 6s ease-in-out infinite alternate;
    will-change: opacity, transform;
}

@keyframes pulse {
    0% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.1); }
}

.scanlines {
    position: fixed; inset: 0; 
    background: repeating-linear-gradient(to bottom, transparent 0px, transparent 2px, rgba(0, 0, 0, 0.2) 2px, rgba(0, 0, 0, 0.2) 4px);
    pointer-events: none; z-index: 0; opacity: 0.5;
}

.window-frame {
    width: auto;
    min-width: 120px;
    background: rgba(15, 15, 15, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 20px 50px rgba(0,0,0,0.5);
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-group { 
    display: flex; 
    flex-direction: row; 
    gap: 12px; 
    justify-content: center;
}

.ray-btn {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    text-decoration: none;
    color: var(--text-muted);
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    cursor: none;
    border: 1px solid transparent;
}

.ray-btn:hover { 
    color: var(--text-main); 
    background: rgba(255, 255, 255, 0.08); 
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.ray-btn:hover::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 8px; right: 8px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    box-shadow: 0 -2px 8px var(--accent);
}

.icon-box {
    width: auto;
    font-size: 1.2rem;
    display: flex; 
    justify-content: center; 
    align-items: center;
    margin: 0; 
    color: var(--text-muted);
    transition: 0.2s;
}

.x-logo { width: 18px; height: 18px; }

.ray-btn:hover .icon-box { color: var(--text-main); }

@media (max-width: 500px) {
    #cur { display: none; }
    .grid-bg { display: none; }
    * { cursor: default; }
    .window-frame { width: auto; margin: 0 20px; }
    .ray-btn { cursor: pointer; }
}