:root {
    --bg-color: #030303;
    --paper-color: #050505;
    --accent-color: #00f2ff;
    --text-color: #f0f0f0;
    --grid-color: rgba(255, 255, 255, 0.05);
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Space Grotesk', sans-serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

#paper-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: crosshair;
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 20px 20px;
}

#paper {
    position: absolute;
    width: 1000000px;
    height: 1000000px;
    transform-origin: 0 0;
    will-change: transform;
}

.char {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 18px;
    line-height: 20px;
    width: 20px;
    height: 20px;
    text-align: center;
    user-select: none;
    pointer-events: none;
}

#cursor {
    position: absolute;
    width: 2px;
    height: 20px;
    background-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
    z-index: 100;
    pointer-events: none;
}

.remote-cursor {
    position: absolute;
    width: 2px;
    height: 20px;
    background-color: #fff;
    z-index: 50;
    pointer-events: none;
}

.cursor-name {
    position: absolute;
    top: -18px;
    left: 0;
    font-size: 10px;
    background: #000;
    color: #fff;
    padding: 1px 4px;
    border-radius: 2px;
    white-space: nowrap;
}

#ui-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    padding: 1rem;
    z-index: 1000;
}

#minimal-info {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.mode-btn {
    background: #111;
    border: 1px solid #333;
    color: #666;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    transition: all 0.2s;
    pointer-events: auto;
}

.mode-btn.active {
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 0 5px var(--accent-color);
}

#coords-display {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #444;
}

#f-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid #333;
    padding: 1.5rem;
    border-radius: 12px;
    width: 300px;
    display: none;
    pointer-events: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

.f-item {
    padding: 10px;
    border-bottom: 1px solid #222;
    cursor: pointer;
    transition: background 0.2s;
}

.f-item:hover { background: var(--accent-color); color: black; }

#context-menu {
    position: fixed;
    background: #111;
    border: 1px solid #333;
    color: white;
    width: 180px;
    z-index: 5000;
    display: none;
    padding: 5px 0;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    pointer-events: auto;
}

.menu-item {
    padding: 8px 15px;
    cursor: pointer;
    font-size: 13px;
}

.menu-item:hover { background: var(--accent-color); color: black; }

.status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #444;
}

.status-dot.online { background-color: #00ff88; }
