/* Main Container */
.bcs-container {
    max-width: 1200px;
    margin: 0 auto;
    background: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Header */
.bcs-header {
    background: #4d9eff;
    padding: 20px;
    text-align: center;
}

.bcs-header h2 {
    margin: 0;
    color: #000000;
    font-size: 24px;
    font-weight: 600;
}

/* Tools Tabs */
.bcs-tools {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    background: white;
}

.bcs-tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
}

.bcs-tab-btn.active {
    color: #4d9eff;
    border-bottom: 3px solid #4d9eff;
}

.bcs-tab-btn:hover {
    background: #f0f0f0;
}

/* Content Tabs */
.bcs-content {
    padding: 20px;
}

.bcs-tab {
    display: none;
    animation: fadeIn 0.3s ease;
}

.bcs-tab.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Camera Container */
.bcs-camera-container {
    text-align: center;
}

.bcs-reader {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

#reader {
    width: 100%;
}

#reader video {
    width: 100%;
    height: auto;
}

.bcs-camera-controls {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Upload Area */
.bcs-upload-area {
    text-align: center;
}

.bcs-upload-box {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background: white;
    transition: all 0.3s ease;
}

.bcs-upload-icon {
    font-size: 64px;
    margin-bottom: 15px;
}

.bcs-supported-formats {
    font-size: 12px;
    color: #999;
    margin: 10px 0;
}

.bcs-upload-preview {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    text-align: center;
}

.bcs-upload-preview h4 {
    margin: 0 0 15px 0;
    color: #000000;
}

#preview-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.bcs-scanning {
    margin-top: 15px;
    padding: 10px;
    background: #e3f2fd;
    border-radius: 6px;
    color: #4d9eff;
    font-weight: 500;
}

/* Buttons */
.bcs-btn {
    padding: 12px 24px;
    background: #4d9eff;
    color: #000000;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bcs-btn:hover {
    background: #3a8be8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(77, 158, 255, 0.3);
}

.bcs-btn:active {
    transform: translateY(0);
}

.bcs-btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

.bcs-btn-primary {
    background: #4d9eff;
}

.bcs-btn-secondary {
    background: #6c757d;
}

.bcs-btn-secondary:hover {
    background: #5a6268;
}

.bcs-btn-danger {
    background: #dc3545;
}

.bcs-btn-danger:hover {
    background: #c82333;
}

/* Result Section */
.bcs-result-section {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.bcs-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.bcs-result-header h3 {
    margin: 0;
    color: #000000;
    font-size: 18px;
}

.bcs-result {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    min-height: 100px;
}

.bcs-result-content {
    line-height: 1.6;
}

.bcs-result-type {
    font-size: 12px;
    color: #4d9eff;
    font-weight: 500;
    margin-bottom: 8px;
}

.bcs-result-value-label {
    font-weight: 500;
    margin: 10px 0 5px 0;
    color: #000000;
}

.bcs-result-value {
    background: #e0e0e0;
    padding: 10px;
    border-radius: 6px;
    font-family: monospace;
    word-break: break-all;
    margin: 5px 0;
    font-size: 14px;
}

.bcs-result-actions {
    margin-top: 15px;
}

.bcs-placeholder {
    color: #999;
    text-align: center;
    margin: 0;
    padding: 20px;
}

.bcs-error {
    color: #dc3545;
    text-align: center;
    padding: 20px;
}

/* History Section */
.bcs-history-section {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.bcs-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.bcs-history-header h3 {
    margin: 0;
    color: #000000;
    font-size: 18px;
}

.bcs-history-actions {
    display: flex;
    gap: 10px;
}

.bcs-history-list {
    max-height: 400px;
    overflow-y: auto;
}

.bcs-history-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bcs-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: #f9f9f9;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.bcs-history-item:hover {
    background: #f0f0f0;
}

.bcs-history-item-content {
    flex: 1;
    margin-right: 10px;
}

.bcs-history-type {
    color: #4d9eff;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.bcs-history-value {
    font-family: monospace;
    margin: 4px 0;
    word-break: break-all;
    color: #000000;
    font-size: 13px;
}

.bcs-history-date {
    color: #999;
    font-size: 10px;
    margin-top: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bcs-container {
        border-radius: 0;
    }
    
    .bcs-content {
        padding: 15px;
    }
    
    .bcs-tab-btn {
        padding: 12px;
        font-size: 14px;
    }
    
    .bcs-btn {
        padding: 10px 20px;
    }
    
    .bcs-history-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .bcs-history-actions {
        justify-content: space-between;
    }
    
    .bcs-history-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .bcs-history-item-content {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .bcs-delete-scan {
        align-self: flex-end;
    }
    
    .bcs-upload-box {
        padding: 30px 20px;
    }
    
    .bcs-upload-icon {
        font-size: 48px;
    }
}

@media (max-width: 480px) {
    .bcs-tools {
        flex-direction: column;
    }
    
    .bcs-tab-btn {
        border-bottom: 1px solid #e0e0e0;
    }
    
    .bcs-tab-btn.active {
        border-bottom: 1px solid #4d9eff;
    }
    
    .bcs-camera-controls {
        flex-direction: column;
    }
    
    .bcs-btn {
        width: 100%;
        justify-content: center;
    }
    
    .bcs-history-actions {
        flex-direction: column;
    }
    
    .bcs-history-actions .bcs-btn {
        width: 100%;
    }
}

/* Scrollbar Styling */
.bcs-history-list::-webkit-scrollbar {
    width: 8px;
}

.bcs-history-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.bcs-history-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.bcs-history-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Loading Animation */
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.bcs-scanning span {
    animation: pulse 1.5s ease-in-out infinite;
}