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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: #ffffff;
    color: #000000;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    background: #ffffff;
    padding: 16px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    display: flex;
    align-items: center;
    gap: 8px;
}

h1 img {
    height: 24px;
    width: auto;
}

.controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

input[type="text"] {
    background: #ffffff;
    border: 1px solid #d0d0d0;
    color: #000000;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    width: 140px;
}

input[type="text"]:focus {
    outline: none;
    border-color: #000000;
}

select {
    background: #ffffff;
    border: 1px solid #d0d0d0;
    color: #000000;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    width: 140px;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: #000000;
}

select:disabled {
    background: #f5f5f5;
    color: #999999;
    cursor: not-allowed;
}

button {
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
}

button:hover {
    background: #333333;
}

#deleteBtn {
    background: #ffffff;
    color: #000000;
    border: 1px solid #d0d0d0;
}

#deleteBtn:hover {
    background: #f5f5f5;
}

#clearBtn {
    background: #ffffff;
    color: #000000;
    border: 1px solid #d0d0d0;
}

#clearBtn:hover {
    background: #f5f5f5;
}

.main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: 240px;
    background: #fafafa;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.classes-input {
    margin: 16px;
    margin-bottom: 0;
}

#classesTextarea {
    width: 100%;
    height: 120px;
    background: #ffffff;
    border: 1px solid #d0d0d0;
    color: #000000;
    padding: 8px;
    border-radius: 4px;
    font-size: 13px;
    font-family: monospace;
    resize: none;
}

#classesTextarea:focus {
    outline: none;
    border-color: #000000;
}

.drop-zone {
    margin: 16px;
    padding: 40px 20px;
    border: 2px dashed #d0d0d0;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: #000000;
    background: #f5f5f5;
}

.drop-zone p {
    color: #666666;
    font-size: 13px;
}

.image-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 16px;
}

.image-item {
    padding: 8px 10px;
    margin-bottom: 4px;
    background: #ffffff;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    color: #000000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid #e0e0e0;
}

.image-item:hover {
    background: #f5f5f5;
}

.image-item.active {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.image-item.annotated::before {
    content: "✓ ";
    font-weight: bold;
}

.canvas-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.image-info {
    padding: 10px 24px;
    background: #fafafa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #666666;
}

#imageName {
    color: #000000;
    font-weight: 500;
}

.canvas-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    position: relative;
    background: #fafafa;
}

#canvas {
    max-width: 100%;
    max-height: 100%;
    cursor: crosshair;
    display: block;
}

.image-controls {
    padding: 12px 24px;
    background: #fafafa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    gap: 8px;
    align-items: center;
}

.annotations-list {
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    padding: 16px 24px;
    max-height: 160px;
    overflow-y: auto;
}

.annotations-list h3 {
    font-size: 13px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 10px;
}

#annotationsList {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.annotation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: #fafafa;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid #e0e0e0;
}

.annotation-item:hover {
    background: #f0f0f0;
}

.annotation-item.selected {
    border-color: #000000;
    background: #f0f0f0;
}

.annotation-item span {
    color: #000000;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #fafafa;
}

::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}
