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

body {
    font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
    font-weight: 200;
    overflow: hidden;
    background: #000000;
    color: #ffffff;
    padding-top: 70px; /* Space for fixed header */
}

/* Header Styles */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.header-left .site-title {
    font-size: 24px;
    font-weight: 100;
    color: #ffffff;
    margin: 0;
    letter-spacing: 2px;
}

.header-right {
    display: flex;
    gap: 30px;
}

.nav-tab {
    color: #666;
    text-decoration: none;
    font-size: 12px;
    font-weight: 200;
    letter-spacing: 1.5px;
    transition: all 0.3s;
    padding: 8px 0;
    border-bottom: 1px solid transparent;
}

.nav-tab:hover {
    color: #ffffff;
}

.nav-tab.active {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

/* Page Content Styles */
.page-content {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100% - 70px);
    overflow-y: auto;
}

.page-content.active {
    display: block;
}

/* Main Page Styles */
.main-page-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
    padding: 40px;
    background: #000000;
}

.main-title {
    font-size: 64px;
    font-weight: 100;
    margin-bottom: 20px;
    color: #ffffff;
    letter-spacing: 8px;
}

.main-subtitle {
    font-size: 18px;
    color: #888;
    margin-bottom: 30px;
    font-weight: 200;
    letter-spacing: 2px;
}

.main-description {
    max-width: 600px;
    margin-bottom: 40px;
}

.main-description p {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.8;
    font-weight: 200;
    letter-spacing: 0.5px;
}

.cta-button {
    background: transparent;
    border: 1px solid #ffffff;
    color: #ffffff;
    padding: 15px 40px;
    border-radius: 0;
    cursor: pointer;
    font-size: 12px;
    font-weight: 200;
    letter-spacing: 2px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    background: #ffffff;
    color: #000000;
}

/* Text Page Styles */
.text-page-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 40px;
}

.text-page-container h1 {
    font-size: 36px;
    margin-bottom: 30px;
    color: #ffffff;
    font-weight: 100;
    letter-spacing: 4px;
}

.text-page-container h2 {
    font-size: 20px;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #cccccc;
    font-weight: 200;
    letter-spacing: 2px;
}

.text-content {
    font-size: 14px;
    line-height: 2.0;
    color: #888;
}

.text-content p {
    margin-bottom: 20px;
    font-weight: 200;
}

.text-content ul,
.text-content ol {
    margin-left: 30px;
    margin-bottom: 20px;
}

.text-content li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.text-content strong {
    color: #ffffff;
    font-weight: 300;
}

.text-content a {
    color: #ffffff;
    transition: color 0.3s;
}

.text-content a:hover {
    color: #888;
}

.text-content img {
    width: 100%;
    height: auto;
    margin: 40px 0 10px 0;
    display: block;
}

.text-content .image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
    width: 100%;
}

.text-content .image-grid img {
    margin: 0 0 10px 0;
    width: 100%;
}

.text-content .demo-link {
    display: inline-block;
    margin: 30px 0;
    padding: 15px 40px;
    background: transparent;
    border: 1px solid #ffffff;
    color: #ffffff;
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 2px;
    transition: all 0.3s;
    text-transform: uppercase;
}

.text-content .demo-link:hover {
    background: #ffffff;
    color: #000000;
}

.text-content .caption {
    font-size: 11px;
    color: #666;
    text-align: center;
    margin-top: 5px;
    margin-bottom: 40px;
    font-style: italic;
    font-weight: 200;
    letter-spacing: 0.5px;
    line-height: 1.6;
    display: block;
    width: 100%;
}

.text-content figure {
    margin: 40px 0;
    width: 100%;
}

.text-content figure img {
    margin: 0;
    width: 100%;
}

.text-content figure figcaption {
    font-size: 11px;
    color: #666;
    text-align: center;
    margin-top: 15px;
    font-style: italic;
    font-weight: 200;
    letter-spacing: 0.5px;
    line-height: 1.6;
}

/* Explore Page Specific Adjustments */
#page-explore #background-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Generate Page Specific Adjustments */
#page-generate #background-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#page-generate #workspace {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto;
}

#page-generate .split-left {
    z-index: 2;
    pointer-events: auto;
}

#page-generate .split-right {
    z-index: 1;
}

#page-explore #workspace {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#page-explore #toolbar {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
}

/* Split Layout for Explore Page */
.split-container {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
}

.split-left,
.split-right {
    width: 50%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.split-left {
    background: #000000;
    position: relative;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    isolation: isolate; /* Create new stacking context */
    z-index: 10; /* Ensure it's above background */
    display: flex;
    justify-content: center;
    align-items: center;
}

#pointcloud-container {
    width: 100%;
    height: 100%;
    background: #000000;
    position: relative;
}

#pointcloud-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.split-right {
    position: relative;
    cursor: grab; /* Indicate interactivity for LiDAR area */
    overflow: hidden; /* Prevent child elements from overflowing */
}

.split-right:active {
    cursor: grabbing;
}

/* MRI Viewer Styles */
#mri-canvas {
    max-width: 90%;
    max-height: 80%;
    image-rendering: pixelated;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: #000;
    cursor: ns-resize; /* Vertical scroll cursor */
    touch-action: none; /* Disable touch gestures */
}

#mri-canvas:active {
    cursor: grabbing;
}

/* MRI Controls */
#mri-controls {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.axis-btn {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #999;
    padding: 8px 16px;
    font-size: 11px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 200;
    text-transform: uppercase;
}

.axis-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ccc;
}

.axis-btn.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ffffff;
    color: #ffffff;
}

/* 3D Navigator */
#mri-navigator {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 150px;
    height: 150px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.8);
    z-index: 10;
    pointer-events: none;
}

#mri-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.9);
    padding: 15px 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    z-index: 5;
}

#slice-info {
    font-size: 14px;
    color: #ffffff;
    font-weight: 200;
    letter-spacing: 1px;
}

#mri-instructions {
    font-size: 10px;
    color: #666;
    font-weight: 200;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* LiDAR/RealSense Viewer Styles */
#lidar-viewer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 20;
}

#lidar-canvas {
    width: 640px;
    height: 480px;
    image-rendering: pixelated;
    border: 2px solid rgba(0, 255, 204, 0.3);
    background: #1a1a1a;
    cursor: crosshair;
    touch-action: none;
    display: block;
    margin-bottom: 20px;
    position: relative;
    z-index: 25;
}

#lidar-canvas:active {
    cursor: grabbing;
}

.generate-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 255, 204, 0.1);
    border: 2px solid rgba(0, 255, 204, 0.6);
    color: #0fc;
    padding: 20px 60px;
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    z-index: 30;
    backdrop-filter: blur(10px);
}

.generate-btn:hover {
    background: rgba(0, 255, 204, 0.2);
    border-color: #0fc;
    color: #fff;
    box-shadow: 0 0 30px rgba(0, 255, 204, 0.5);
    transform: translate(-50%, -50%) scale(1.05);
}

.generate-btn:active {
    transform: translate(-50%, -50%) scale(0.98);
}

#lidar-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    position: relative;
    z-index: 25;
}

#lidar-info {
    display: flex;
    gap: 20px;
    align-items: center;
    background: rgba(0, 0, 0, 0.9);
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 15px;
    position: relative;
    z-index: 25;
}

#lidar-status {
    font-size: 13px;
    color: #ffffff;
    font-weight: 200;
    letter-spacing: 1px;
}

#lidar-fps {
    font-size: 12px;
    color: #0fc;
    font-weight: 300;
    letter-spacing: 0.5px;
}

#depth-controls {
    text-align: center;
    margin-top: 5px;
    position: relative;
    z-index: 25;
}

.control-btn {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #999;
    padding: 8px 16px;
    font-size: 11px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 200;
    text-transform: uppercase;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ccc;
}

.control-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.control-btn:disabled:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
    color: #999;
}

#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#workspace {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: grab;
}

#workspace.panning {
    cursor: grabbing;
}

#connections-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#nodes-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 10000px;
    height: 10000px;
    transform-origin: 0 0;
}

.node {
    position: absolute;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid #333;
    border-radius: 0;
    min-width: 240px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.node.selected {
    border-color: #ffffff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.node-header {
    background: #000000;
    padding: 12px 15px;
    border-radius: 0;
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

.node-title {
    font-weight: 200;
    font-size: 12px;
    color: #fff;
    letter-spacing: 1px;
}

.node-close {
    background: transparent;
    border: 1px solid #666;
    color: #666;
    width: 20px;
    height: 20px;
    border-radius: 0;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.node-close:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.node-body {
    padding: 15px;
}

.pointcloud-viewer {
    width: 100%;
    height: 180px;
    background: #000;
    border-radius: 4px;
    margin-bottom: 10px;
    border: 1px solid #333;
    position: relative;
    overflow: hidden;
}

.control-panel {
    background: rgba(0, 0, 0, 0.8);
    padding: 12px;
    border-radius: 0;
    border: 1px solid #333;
}

.control-group {
    margin-bottom: 10px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-label {
    display: block;
    font-size: 10px;
    color: #666;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 200;
}

.control-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 200;
}

.control-input:focus {
    outline: none;
    border-color: #ffffff;
}

.control-slider {
    width: 100%;
    height: 4px;
    background: #333;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.control-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #ffffff;
    border-radius: 0;
    cursor: pointer;
}

.control-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #ffffff;
    border-radius: 0;
    cursor: pointer;
    border: none;
}

.node-ports {
    position: relative;
}

.port {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background: #666;
    border: 2px solid #888;
    border-radius: 50%;
    cursor: crosshair;
    transition: all 0.2s;
    z-index: 10;
}

.port:hover {
    background: #ffffff;
    border-color: #ffffff;
    transform: translateX(-50%) scale(1.3);
}

.port.input {
    top: -22px;
    background: #cccccc;
}

.port.output {
    bottom: -22px;
    background: #666666;
}

/* Node Tooltip */
.node-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(0, 0, 0, 0.95);
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid #666;
    font-size: 11px;
    line-height: 1.5;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.node-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(0, 0, 0, 0.95);
}

.node-tooltip.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(-15px);
}

#toolbar {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Node Details Panel */
.node-panel {
    position: fixed;
    top: 70px;
    right: -400px;
    width: 380px;
    max-height: calc(100vh - 100px);
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(0, 255, 204, 0.4);
    border-right: none;
    z-index: 200;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.node-panel.open {
    right: 0;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 255, 204, 0.2);
    background: rgba(0, 255, 204, 0.05);
}

.panel-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 300;
    color: #0fc;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.panel-header .close-btn {
    background: transparent;
    border: 1px solid rgba(0, 255, 204, 0.4);
    color: #0fc;
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 0;
}

.panel-header .close-btn:hover {
    background: rgba(0, 255, 204, 0.1);
    border-color: #0fc;
    transform: scale(1.05);
}

.panel-content {
    padding: 20px;
}

.detail-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-section:last-child {
    border-bottom: none;
}

.detail-section label {
    display: block;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.detail-section span,
.detail-section p {
    display: block;
    font-size: 14px;
    color: #fff;
    font-weight: 200;
    line-height: 1.6;
}

.detail-section h4 {
    margin: 0 0 15px 0;
    font-size: 13px;
    color: #0fc;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 300;
}

.property-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.property-item label {
    flex: 0 0 100px;
    margin: 0;
    font-size: 11px;
}

.property-item input[type="range"] {
    flex: 1;
    height: 2px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    border-radius: 0;
}

.property-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #0fc;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.2s;
}

.property-item input[type="range"]::-webkit-slider-thumb:hover {
    background: #fff;
    transform: scale(1.2);
}

.property-item input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #0fc;
    cursor: pointer;
    border-radius: 0;
    border: none;
    transition: all 0.2s;
}

.property-item input[type="range"]::-moz-range-thumb:hover {
    background: #fff;
    transform: scale(1.2);
}

.property-item span {
    flex: 0 0 50px;
    text-align: right;
    font-size: 12px;
    color: #0fc;
    font-family: monospace;
}

button {
    background: transparent;
    border: 1px solid #ffffff;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 0;
    cursor: pointer;
    font-size: 11px;
    font-weight: 200;
    letter-spacing: 1px;
    transition: all 0.2s;
}

button:hover {
    background: #ffffff;
    color: #000000;
}

button:active {
    transform: translateY(0);
}

#info {
    background: rgba(0, 0, 0, 0.9);
    padding: 8px 15px;
    border-radius: 0;
    font-size: 10px;
    color: #666;
    border: 1px solid #333;
    font-weight: 200;
    letter-spacing: 0.5px;
}

.connection-line {
    stroke: #ffffff;
    stroke-width: 1;
    fill: none;
    pointer-events: stroke;
    cursor: pointer;
}

.connection-line:hover {
    stroke: #cccccc;
    stroke-width: 2;
}

.temp-connection {
    stroke: #888888;
    stroke-width: 1;
    fill: none;
    stroke-dasharray: 5, 5;
    pointer-events: none;
    opacity: 0.6;
}

/* 3D Network Styles */
#workspace {
    position: relative;
    width: 100%;
    height: 100%;
}

#workspace canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.node-info-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid #00aaff;
    border-radius: 8px;
    padding: 20px;
    min-width: 280px;
    max-width: 350px;
    color: #ffffff;
    font-family: Arial, sans-serif;
    box-shadow: 0 8px 32px rgba(0, 170, 255, 0.3);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
}

.node-info-panel h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 600;
    color: #00ffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 2px solid #00aaff;
    padding-bottom: 10px;
}

.node-info-panel p {
    margin: 10px 0;
    font-size: 13px;
    line-height: 1.6;
    color: #cccccc;
}

.node-info-panel p.description {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #333;
    color: #aaaaaa;
    font-size: 12px;
}

.node-info-panel strong {
    color: #00aaff;
    font-weight: 600;
}

/* Region Info Section within Node Info Panel */
.region-info-section {
    margin: 15px 0;
    padding: 12px;
    background: rgba(0, 255, 204, 0.05);
    border-left: 3px solid #00ffcc;
    border-radius: 4px;
}

/* Point Cloud Viewer in Info Panel */
.info-panel-viewer {
    width: 100%;
    height: 250px;
    margin: 15px 0;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #00aaff;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.info-panel-viewer canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.region-info-section h4 {
    margin: 0 0 10px 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #00ffcc;
    font-weight: 600;
}

.region-info-section p {
    margin: 6px 0;
    font-size: 12px;
}

.region-info-section .region-full-name {
    color: #aaa;
    font-size: 11px;
    font-style: italic;
}

/* UMAP Visualization Section */
.umap-visualization-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #333;
}

.section-label {
    display: block;
    color: #00aaff;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 500;
}

.umap-container {
    background: #0a0a0a;
    border: 1px solid #222;
    border-radius: 4px;
    min-height: 300px;
    position: relative;
    overflow: hidden;
}

.umap-container canvas {
    display: block;
    cursor: grab;
}

.umap-container canvas:active {
    cursor: grabbing;
}

.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-size: 12px;
    text-align: center;
}

.umap-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 170, 255, 0.05);
    border-radius: 4px;
}

.umap-controls label {
    color: #888;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.session-select {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #00aaff;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
    outline: none;
}

.session-select:hover {
    border-color: #00aaff;
}

.session-select:focus {
    border-color: #00aaff;
    box-shadow: 0 0 0 1px rgba(0, 170, 255, 0.2);
}

.umap-info {
    color: #666;
    font-size: 10px;
    margin-left: auto;
}

.csv-loader {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #333;
}

.csv-loader label {
    display: block;
    color: #00aaff;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.small-btn {
    background: transparent;
    border: 1px solid #00aaff;
    color: #00aaff;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1px;
    transition: all 0.2s;
    text-transform: uppercase;
}

.small-btn:hover {
    background: #00aaff;
    color: #000000;
}

#umap-visualization {
    margin-top: 15px;
}

#umap-canvas {
    width: 100%;
    border-radius: 4px;
    background: #000;
}

#umap-info {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

#csv-status, #umap-status {
    margin-left: 10px;
    font-size: 10px;
}

.csv-info {
    margin-top: 8px;
    font-size: 9px;
    color: #666;
}

.csv-info code {
    background: #222;
    padding: 2px 6px;
    border-radius: 3px;
    color: #888;
}

#csv-status {
    margin-left: 10px;
    font-size: 11px;
    color: #888;
}

.csv-info {
    margin-top: 12px;
    padding: 10px;
    background: rgba(0, 170, 255, 0.1);
    border: 1px solid rgba(0, 170, 255, 0.3);
    border-radius: 4px;
    font-size: 10px;
    line-height: 1.6;
    color: #888;
}

.csv-info code {
    display: block;
    margin-top: 5px;
    padding: 5px 8px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
    color: #00ffcc;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    word-break: break-all;
}

/* 3D View - Adjust workspace for full canvas */
#page-explore #workspace canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* MRI Canvas Cursor */
#mri-canvas {
    cursor: crosshair;
}

#mri-canvas:hover {
    cursor: pointer;
}

/* Network Controls Panel */
/* Network Controls Panel (inside workspace) */
#page-explore #workspace .network-controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 280px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(0, 255, 204, 0.3);
    border-radius: 8px;
    padding: 15px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* Network Controls Panel for Generate Page */
#page-generate .split-left .network-controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 280px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(0, 255, 204, 0.3);
    border-radius: 8px;
    padding: 15px;
    z-index: 150;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

#page-generate .network-controls h3 {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 300;
    color: #0fc;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#page-generate .network-controls label {
    display: block;
    margin: 10px 0;
    color: #aaa;
    font-size: 12px;
    cursor: pointer;
}

#page-generate .network-controls input[type="checkbox"] {
    margin-right: 8px;
}

/* Fallback for other pages */
.network-controls {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 280px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(0, 255, 204, 0.3);
    border-radius: 8px;
    padding: 15px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.control-header {
    font-size: 14px;
    font-weight: 300;
    color: #00ffcc;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 255, 204, 0.2);
    letter-spacing: 1px;
}

.control-group {
    margin-bottom: 15px;
}

.control-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #ccc;
    margin-bottom: 5px;
    font-weight: 300;
}

.control-value {
    color: #00ffcc;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    min-width: 40px;
    text-align: right;
}

.control-group input[type="range"] {
    width: 100%;
    height: 14px;
    background: transparent;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #00ffcc;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 255, 204, 0.5);
    transition: all 0.2s;
}

.control-group input[type="range"]::-webkit-slider-thumb:hover {
    background: #00fff2;
    box-shadow: 0 0 12px rgba(0, 255, 204, 0.8);
    transform: scale(1.1);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #00ffcc;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 8px rgba(0, 255, 204, 0.5);
    transition: all 0.2s;
}

.control-group input[type="range"]::-moz-range-thumb:hover {
    background: #00fff2;
    box-shadow: 0 0 12px rgba(0, 255, 204, 0.8);
    transform: scale(1.1);
}

.control-group input[type="range"]:focus {
    outline: none;
}

.control-group input[type="range"]::-webkit-slider-runnable-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.control-group input[type="range"]::-moz-range-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* MRI Click Feedback */
.mri-click-marker {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid #00ffcc;
    border-radius: 50%;
    pointer-events: none;
    z-index: 100;
    transform: translate(-50%, -50%);
    display: none;
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.8);
}

@keyframes mri-click-pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
        border-width: 3px;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.7;
        border-width: 2px;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
        border-width: 1px;
    }
}

/* Region Selection Notification */
.region-notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(0, 255, 204, 0.95);
    color: #000;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 255, 204, 0.5);
    z-index: 10000;
    display: none;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

/* Region Info Panel */
#region-info-panel {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 280px;
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid rgba(0, 255, 204, 0.3);
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    font-family: Arial, sans-serif;
    backdrop-filter: blur(10px);
}

.region-info-header {
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.2), rgba(0, 200, 255, 0.2));
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 255, 204, 0.3);
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#region-name {
    color: #00ffcc;
    font-size: 16px;
    font-weight: 600;
    flex: 1;
}

#close-region-panel {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

#close-region-panel:hover {
    color: #00ffcc;
}

.region-info-content {
    padding: 16px;
}

.region-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
}

.region-info-row:last-child {
    margin-bottom: 0;
}

.region-label {
    color: #888;
    font-weight: 500;
}

.region-info-row > span:last-child {
    color: #ddd;
    font-weight: 600;
}

#region-color-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

#region-color-box {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
}

#region-color-hex {
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.region-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
