/* =========================================
   1. GLOBAL ATMOSPHERE (Orbital Stress)
   ========================================= */
body {
    font-family: 'Inter', sans-serif;
    background-color: #0F051A; /* Deep violet/black */
    color: #E0E0E0;
    overflow: hidden; /* No scrollbars, we handle pan/zoom in JS */
    margin: 0;
}

/* Radial Light Effects */
body::before {
    content: '';
    position: fixed;
    top: -20vh;
    left: -20vw;
    width: 80vw;
    height: 80vh;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.1), transparent 70%);
    filter: blur(100px);
    z-index: -1;
    animation: pulse-light-1 15s infinite alternate;
}

body::after {
    content: '';
    position: fixed;
    bottom: -30vh;
    right: -30vw;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.08), transparent 70%);
    filter: blur(120px);
    z-index: -1;
    animation: pulse-light-2 20s infinite alternate;
}

@keyframes pulse-light-1 {
    from { transform: scale(0.8) translate(0, 0); opacity: 0.7; }
    to { transform: scale(1.2) translate(50px, 30px); opacity: 1; }
}

@keyframes pulse-light-2 {
    from { transform: scale(0.9) translate(0, 0); opacity: 0.6; }
    to { transform: scale(1.1) translate(-40px, -20px); opacity: 0.9; }
}

/* =========================================
   2. SHARED UI COMPONENTS
   ========================================= */

/* Primary Action Buttons (Login, Save) */
.btn-primary {
    background: linear-gradient(90deg, #8A2BE2, #4169E1);
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.5);
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(138, 43, 226, 0.8);
}

/* Legacy Input Style (Used in Login Modal) */
.panel-input {
    background-color: #2C1D45;
    border: 1px solid #4A3A69;
    color: #E0E0E0;
    border-radius: 8px;
}
.panel-input:focus {
    background-color: #33224D;
    border-color: #8A2BE2;
    box-shadow: none;
    outline: none;
}

/* =========================================
   3. NEW INTERFACE ELEMENTS (Vanilla JS Build)
   ========================================= */

/* Floating Toolbar Buttons (Zoom, Center, Save) */
.tool-btn {
    width: 48px;
    height: 48px;
    background-color: rgba(31, 18, 53, 0.8);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    transition: all 0.2s;
    cursor: pointer;
}
.tool-btn:hover {
    background-color: #8A2BE2;
    transform: scale(1.1);
}

/* Context Menu Items */
.ctx-btn {
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    color: #E0E0E0;
    background: transparent;
    border: none;
    transition: background 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.ctx-btn:hover {
    background-color: #33224D;
    color: white;
}

/* Edit Panel Labels */
.lbl {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #A0A0B0;
    margin-bottom: 4px;
}

/* Edit Panel Inputs */
.inp {
    width: 100%;
    background-color: #2C1D45;
    border: 1px solid #4A3A69;
    color: white;
    padding: 8px;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s;
}
.inp:focus {
    border-color: #8A2BE2;
}

/* Infinite Grid Background */
.grid-bg {
    background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* Scrollbar Customization for Edit Panel */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #150A25; 
}
::-webkit-scrollbar-thumb {
    background: #4A3A69; 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8A2BE2; 
}