/* Base styles */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
}

/* Main layout */
.container {
    display: flex;
    height: 100vh;
}

/* Sidebar styles */
#sidebar {
    width: 250px;
    min-width: 150px;
    max-width: 500px;
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Resizable splitter */
#splitter {
    width: 8px;
    background-color: #dee2e6;
    cursor: col-resize;
    transition: background-color 0.2s;
    user-select: none;
}

#splitter:hover {
    background-color: #adb5bd;
}

#splitter.active {
    background-color: #007bff;
}

/* Control panel */
#controls {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
}

/* 3D viewport */
#viewport {
    flex: 1;
    background-color: black;
}

/* File and view controls */
.file-controls {
    margin-bottom: 15px;
}

.view-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

/* Molecule list container */
.molecule-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.molecule-section {
    margin-bottom: 15px;
}

.section-title {
    font-weight: bold;
    margin-bottom: 5px;
    padding: 5px;
    background-color: #e9ecef;
    border-radius: 4px;
}

/* Individual molecule items */
.molecule-item {
    padding: 8px;
    cursor: pointer;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 5px;
    background-color: white;
}

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

.molecule-item.active {
    background-color: #e7f5ff;
    border-color: #4dabf7;
}

/* Molecule control buttons */
.molecule-controls {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
    margin-top: 5px;
}

/* Button styles */
button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #0056b3;
}

button.secondary {
    background-color: #6c757d;
}

button.secondary:hover {
    background-color: #5a6268;
}

button.danger {
    background-color: #dc3545;
}

button.danger:hover {
    background-color: #c82333;
}

/* Status bar */
.status-bar {
    padding: 8px 15px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    font-size: 0.9em;
    color: #6c757d;
}

/* Navigation controls */
#matchNavigation {
    display: none;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    gap: 10px;
}

#moleculeNumberInput {
    width: 40px;
    text-align: center;
    padding: 2px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.total-molecules {
    color: #6c757d;
}
