body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    font-family: "Inter", sans-serif;
}
.main-container {
    display: flex;
    height: 100vh;
}
.canvas-area {
    flex: 1;
    background: #f5f5f5;
    position: relative;
    overflow: auto;
}
.canvas-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: 20px 20px;
    background-image: 
        linear-gradient(to right, #e9ecef 1px, transparent 1px),
        linear-gradient(to bottom, #e9ecef 1px, transparent 1px);
    z-index: 0;
}
.sidebar {
    width: 300px;
    background: #ffffff;
    border-left: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}
.tab-content {
    flex: 1;
    overflow-y: auto;
}
.draggable-item {
    padding: 10px;
    margin: 5px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: move;
    user-select: none;
    position: relative;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 10px;
}
.draggable-item i {
    font-size: 1.2em;
    width: 24px;
    text-align: center;
    color: #0d6efd;
}
.draggable-item:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.inspector-panel {
    padding: 15px;
}
.nav-tabs .nav-link {
    color: #495057;
}
.nav-tabs .nav-link.active {
    font-weight: bold;
}
.canvas-element {
    position: absolute;
    background: white;
    padding: 10px;
    border: 2px solid #007bff;
    border-radius: 4px;
    cursor: move;
    user-select: none;
    min-width: 150px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1;
}
.canvas-element:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.element-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    gap: 10px;
}
.element-header .title-section {
    display: flex;
    align-items: center;
    gap: 8px;
}
.element-header i {
    font-size: 1.2em;
    color: #0d6efd;
}
.delete-btn {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.2em;
    cursor: pointer;
    padding: 0 5px;
}
.delete-btn:hover {
    color: #c82333;
}
.ghost {
    opacity: 0.5;
    background: #c8e6c9;
    border: 2px dashed #4caf50;
}

/* Delete animation */
.deleting {
    animation: deleteAnimation 0.5s ease-in forwards;
    pointer-events: none;
}

@keyframes deleteAnimation {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(0.3) rotate(5deg);
        opacity: 0;
    }
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 5px 0;
    min-width: 150px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.context-menu-item {
    padding: 8px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #dc3545;
}

.context-menu-item:hover {
    background-color: #f8f9fa;
}

.context-menu-item i {
    font-size: 0.9em;
}

/* Connection Points */
.connection-point {
    width: 12px;
    height: 12px;
    background: #0052cc;
    border: 2px solid white;
    border-radius: 50%;
    position: absolute;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 0 0 2px #0052cc;
    transition: transform 0.2s;
}

.connection-point:hover {
    transform: scale(1.2);
}

.connection-point.right {
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
}

.connection-point.left {
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
}

/* Connection Lines */
.connection-line {
    position: fixed;
    height: 2px;
    background: #0052cc;
    pointer-events: none;
    z-index: 0;
    transform-origin: left center;
}

/* Status Bar */
.status-bar {
    position: fixed;
    bottom: -200px; /* Start hidden below the viewport */
    left: 0;
    right: 300px; /* Account for sidebar width */
    background: white;
    border-top: 1px solid #dee2e6;
    padding: 10px;
    display: block;
    z-index: 999;
    user-select: none;
    transition: bottom 0.3s ease-in-out;
    height: 160px; /* Fixed height to ensure smooth animation */
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
}

.status-bar.visible {
    bottom: 0;
}

.storage-bar {
    height: 30px;
    background: #dc3545; /* Red for parity */
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
    position: relative;
    display: flex;
    align-items: center;
    color: white;
    font-size: 0.8em;
}

.storage-bar.no-parity {
    background: none;
}

.storage-bar.no-parity .available {
    border-radius: 4px;
}

.storage-bar.insufficient {
    background: #6c757d; /* Gray for insufficient drives */
}

.storage-bar.insufficient .available {
    display: none;
}

.storage-bar .insufficient-text {
    width: 100%;
    text-align: center;
    padding: 0 10px;
    white-space: nowrap;
}

.storage-bar .available {
    height: 100%;
    background: #0052cc; /* Darker blue for available space */
    transition: width 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 10px;
    white-space: nowrap;
}

.storage-bar .parity-label {
    padding: 0 10px;
    white-space: nowrap;
}

/* Remove old label styles */
.storage-bar .bar-label {
    position: relative;
    white-space: nowrap;
}

.status-info {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    font-size: 0.9em;
}

.status-toggle {
    position: fixed;
    bottom: 10px;
    right: 310px;
    z-index: 1000;
    padding: 5px 10px;
    border-radius: 4px;
    background: #0d6efd;
    color: white;
    border: none;
    cursor: pointer;
    transition: 0.15s;
}

.status-toggle:hover {
    background: #0b5ed7;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.storage-bar.no-servers {
    background: #6c757d;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 0.9em;
}

.storage-bar.no-servers .available {
    display: none;
}