﻿* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #03060d;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #e2e8f0;
}

#canvas-svg {
    width: 100vw;
    height: 100vh;
    display: block;
    cursor: grab;
}

    #canvas-svg:active {
        cursor: grabbing;
    }

/* Contenitore Pulsanti Fluttuanti Trascinabili */
#floating-controls {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(10, 17, 32, 0.82);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(48, 144, 255, 0.4);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65);
    cursor: move;
    z-index: 100;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.4px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
    border: 1px solid rgba(48, 144, 255, 0.35);
    background: rgba(32, 112, 224, 0.18);
    color: #93c5fd;
}

    .action-btn:hover {
        background: rgba(32, 112, 224, 0.35);
    }

#start-btn {
    border-color: rgba(16, 185, 129, 0.55);
    background: rgba(16, 185, 129, 0.18);
    color: #6ee7b7;
}

    #start-btn:hover {
        background: rgba(16, 185, 129, 0.35);
    }

#stop-btn.stopped {
    border-color: rgba(245, 158, 11, 0.65);
    background: rgba(245, 158, 11, 0.25);
    color: #fcd34d;
}

#info-btn {
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(56, 189, 248, 0.16);
    color: #bae6fd;
}

    #info-btn:hover {
        background: rgba(56, 189, 248, 0.32);
    }

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: #64748b;
    box-shadow: 0 0 6px #64748b;
}

    .status-dot.active {
        background-color: #10b981;
        box-shadow: 0 0 10px #10b981;
    }

    .status-dot.paused {
        background-color: #f59e0b;
        box-shadow: 0 0 10px #f59e0b;
    }

/* Pannello di Controllo */
#control-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 265px;
    background: rgba(10, 17, 32, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(48, 144, 255, 0.4);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65);
    transform: translateX(calc(100% + 25px));
    transition: transform 0.3s ease;
    z-index: 90;
}

    #control-panel.open {
        transform: translateX(0);
    }

#panel-toggle {
    position: absolute;
    left: -42px;
    top: 0;
    width: 34px;
    height: 34px;
    background: rgba(10, 17, 32, 0.88);
    border: 1px solid rgba(48, 144, 255, 0.45);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #60a5fa;
}

#control-panel h3 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #60a5fa;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(48, 144, 255, 0.25);
    padding-bottom: 4px;
}

.control-group {
    margin-bottom: 11px;
}

    .control-group label {
        display: flex;
        justify-content: space-between;
        font-size: 12px;
        color: #cbd5e1;
        margin-bottom: 4px;
    }

    .control-group input[type="range"] {
        width: 100%;
        accent-color: #3090ff;
        cursor: pointer;
    }

/* Riquadro Telemetrico Energia Cinetica e Potenziale */
#energy-panel {
    position: fixed;
    bottom: 48px;
    left: 20px;
    width: 255px;
    background: rgba(10, 17, 32, 0.82);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(48, 144, 255, 0.35);
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    font-size: 12px;
    z-index: 85;
    pointer-events: none;
}

    #energy-panel h4 {
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        color: #60a5fa;
        margin-bottom: 8px;
        border-bottom: 1px solid rgba(48, 144, 255, 0.22);
        padding-bottom: 4px;
    }

.telemetry-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    color: #cbd5e1;
}

    .telemetry-row span.val {
        font-family: 'Consolas', 'Courier New', monospace;
        font-weight: 600;
        color: #f8fafc;
    }

.bar-container {
    width: 100%;
    height: 6px;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.bar-fill {
    height: 100%;
    width: 50%;
    transition: width 0.06s linear;
}

#bar-ek {
    background: linear-gradient(90deg, #0ea5e9, #38bdf8);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

#bar-ep {
    background: linear-gradient(90deg, #d97706, #fbbf24);
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

.info-hint {
    position: fixed;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: rgba(148, 163, 184, 0.85);
    background: rgba(10, 17, 32, 0.72);
    border: 1px solid rgba(48, 144, 255, 0.25);
    padding: 6px 16px;
    border-radius: 20px;
    pointer-events: none;
    white-space: nowrap;
}

/* Firma personalizzata in basso a destra */
#signature {
    position: fixed;
    bottom: 14px;
    right: 18px;
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-size: 12.5px;
    letter-spacing: 0.4px;
    color: rgba(147, 197, 253, 0.65);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    pointer-events: none;
    z-index: 80;
}


