body {
    margin: 0 auto;
    background: black;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.camera-container {
    position: relative;
    width: 100%;
}

.camera-container video {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.camera-container canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 999;
    width: 100%;
    height: auto;
}

#scanner {
    position: relative;
    width: 100%;
}

.switch-camera-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    font-size: 24px;
}

.camera-name {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.camera-name.visible {
    opacity: 1;
}

.btn {
    color: white;
    border-radius: 10px;
    background: #00000080;
    font-weight: bold;
    border: 2px solid #FFFFFF80;
    padding: 8px 16px;
    cursor: pointer;
    text-align: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn:hover {
    background: #FFFFFF20;
    border-color: #FFFFFF;
}

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

.container {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.barcode-list {
    width: 100%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
}

.barcode-list h2 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 24px;
}

.list-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

#barcodeList {
    list-style: none;
    padding: 0;
    margin: 0;
}

.barcode-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    transition: background 0.2s ease;
}

.barcode-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.barcode-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.barcode-code {
    font-size: 16px;
    font-weight: bold;
    word-break: break-all;
}

.barcode-format {
    font-size: 12px;
    color: #AAAAAA;
}

.barcode-actions {
    display: flex;
    gap: 8px;
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    .barcode-list {
        padding: 15px;
    }
    
    .barcode-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .barcode-actions {
        width: 100%;
        margin-top: 8px;
    }
    
    .barcode-actions .btn {
        flex: 1;
    }
}