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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f7;
    color: #1d1d1f;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 18px;
    color: #86868b;
}

.upload-section {
    margin-bottom: 40px;
}

.upload-area {
    background: white;
    border: 2px dashed #d2d2d7;
    border-radius: 18px;
    padding: 60px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f9f9fb;
}

.upload-area.drag-over {
    border-color: #667eea;
    background: #f0f0ff;
}

.upload-icon {
    color: #667eea;
    margin-bottom: 20px;
}

.upload-text {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 14px;
    color: #86868b;
}

.editor-section {
    background: white;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px;
    background: #f5f5f7;
    border-radius: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

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

.tool-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #1d1d1f;
}

.tool-btn:hover {
    background: #e8e8ed;
}

.tool-btn.active {
    background: #667eea;
    color: white;
}

.color-picker-wrapper,
.stroke-width-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

#color-picker {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

#stroke-width {
    width: 100px;
}

#stroke-width-value {
    min-width: 20px;
    text-align: center;
}

.action-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #1d1d1f;
}

.action-btn:hover {
    background: #e8e8ed;
}

.canvas-container {
    position: relative;
    background: #f5f5f7;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

#image-canvas,
#annotation-canvas {
    position: absolute;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#annotation-canvas {
    cursor: crosshair;
}

.export-section {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #667eea;
    color: white;
}

.export-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

.export-btn.secondary {
    background: #e8e8ed;
    color: #1d1d1f;
}

.export-btn.secondary:hover {
    background: #d2d2d7;
}

@media (max-width: 768px) {
    h1 {
        font-size: 36px;
    }
    
    .subtitle {
        font-size: 16px;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .toolbar {
        justify-content: center;
    }
    
    .canvas-container {
        padding: 10px;
    }
}