body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: #000;
    color: #fff;
    overflow: hidden;
    /* Hide scrollbars for full immersion */
}

#3d-graph {
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

#ui-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    background: rgba(20, 20, 30, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    width: 350px;
    transition: all 0.3s ease;
}

#ui-overlay:hover {
    background: rgba(20, 20, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

h1 {
    margin: 0 0 15px 0;
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(90deg, #00d2ff 0%, #3a7bd5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

input[type="text"] {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

input[type="text"]:focus {
    border-color: #3a7bd5;
}

select {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
}

button {
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(90deg, #00d2ff 0%, #3a7bd5 100%);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
}

button:hover {
    opacity: 0.9;
}

button:active {
    transform: scale(0.98);
}

#status-msg {
    margin-top: 15px;
    font-size: 0.85rem;
    color: #aaa;
    min-height: 1.2em;
}

#node-info {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    word-break: break-all;
    color: #00d2ff;
}

#instructions {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 12px;
    pointer-events: none;
    /* Let clicks pass through */
    font-size: 0.8rem;
    color: #ccc;
    backdrop-filter: blur(4px);
}

#instructions ul {
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0;
}

#instructions li {
    margin-bottom: 4px;
}

#side-panel {
    position: absolute;
    top: 0;
    right: -400px;
    /* Hidden by default */
    width: 350px;
    height: 100vh;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(12px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -8px 0 32px 0 rgba(0, 0, 0, 0.37);
    transition: right 0.3s ease;
    z-index: 20;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

#side-panel.open {
    right: 0;
}

#close-panel {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    font-weight: bold;
}

#panel-title {
    margin-top: 40px;
    font-size: 1.2rem;
    color: #00d2ff;
    word-break: break-all;
}

.panel-section {
    margin-bottom: 20px;
}

.panel-section h3 {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
}

#panel-url a {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    word-break: break-all;
}

#panel-url a:hover {
    color: #3a7bd5;
    text-decoration: underline;
}

#panel-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

#panel-links li {
    padding: 8px 10px;
    margin-bottom: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
    word-break: break-all;
}

#panel-links li:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #00d2ff;
}