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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #fff;
}

.toolbar {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.toolbar h1 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
}

.file-upload {
    position: relative;
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.upload-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.upload-btn:hover {
    background-color: #2980b9;
}

.controls {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    background-color: #95a5a6;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #7f8c8d;
}

.btn-primary {
    background-color: #27ae60;
}

.btn-primary:hover {
    background-color: #229954;
}

.btn-subject {
    background-color: #e74c3c;
}

.btn-subject:hover {
    background-color: #c0392b;
}

.btn-subject.active {
    background-color: #c0392b;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    background-color: #3498db;
}

.btn-small:hover {
    background-color: #2980b9;
}

.canvas-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: auto;
    background-color: #ecf0f1;
}

#annotationCanvas {
    max-width: 100%;
    max-height: 100%;
    border: 2px solid #bdc3c7;
    border-radius: 5px;
    cursor: crosshair;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sidebar {
    width: 350px;
    background-color: #fff;
    border-left: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.labels-section {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.labels-section h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #2c3e50;
}

.checklist {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.checklist-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 5px;
    transition: background-color 0.2s;
}

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

.checklist-item input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checklist-item label {
    flex: 1;
    cursor: pointer;
    user-select: none;
}

.add-label {
    display: flex;
    gap: 5px;
}

.add-label input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.shape-info {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.shape-info h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #2c3e50;
}

.info-item {
    margin-bottom: 15px;
}

.info-item label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.info-item span {
    display: inline-block;
    padding: 5px 10px;
    background-color: #ecf0f1;
    border-radius: 3px;
    font-weight: 600;
}

.info-item select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
}

.actions {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.actions button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

/* Scrollbar Styling */
.checklist::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.checklist::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.checklist::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.checklist::-webkit-scrollbar-thumb:hover,
.sidebar::-webkit-scrollbar-thumb:hover {
    background: #555;
}

