/* Component styles */

/* Layout */
.main-content {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.annotation-panel {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 20px;
}

.control-panel {
    width: 300px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 20px;
}

/* Image container and canvas */
.image-container {
    width: 100%;
    height: 600px;
    border: 2px dashed var(--border-secondary);
    border-radius: 12px;
    overflow: hidden;
    background: var(--overlay-bg);
    position: relative;
    cursor: default;
}

.upload-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.05);
    z-index: 1;
    cursor: pointer;
}

.annotation-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: crosshair;
    z-index: 10;
}

.result-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Control sections */
.control-section {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    background: var(--overlay-bg);
}

.control-section h3 {
    color: var(--accent-primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Class selector */
.class-selector {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.class-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
}

.class-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.class-option.active {
    border-color: currentColor;
    background: rgba(255, 255, 255, 0.1);
}

.class-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    margin-right: 10px;
}

/* Buttons */
.btn {
    padding: 12px 18px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    margin-bottom: 10px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Info sections */
.annotation-info {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.annotation-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    text-align: center;
}

.stat-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px;
    border-radius: 6px;
}

[data-theme="light"] .stat-item {
    background: rgba(0, 0, 0, 0.05);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.instructions {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.instructions h4 {
    color: var(--accent-secondary);
    margin-bottom: 10px;
}

.instructions ul {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding-left: 20px;
}

/* Controls */
.zoom-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pan-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: grid;
    grid-template-columns: repeat(3, 40px);
    gap: 5px;
}

.control-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
    transform: scale(1.1);
}

.control-btn:active {
    transform: scale(0.95);
    background: var(--accent-primary);
}

[data-theme="light"] .control-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--border-primary);
    color: var(--text-primary);
}

/* Example images */
.example-images-section {
    margin: 30px 0 20px;
    text-align: center;
}

.example-heading {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-weight: normal;
}

.example-images-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.example-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(139, 92, 246, 0.2);
    transition: all 0.3s ease;
    cursor: grab;
}

.example-image:hover {
    transform: translateY(-3px);
    border-color: var(--accent-primary);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.example-image:active {
    cursor: grabbing;
}

/* Selected box info */
.selected-box-info {
    display: none;
    margin-top: 15px;
    padding: 10px;
    background: var(--overlay-bg);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
}

.selected-class-display {
    display: flex;
    align-items: center;
}
