body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.button-container {
    margin: 20px 0;
}

button {
    padding: 10px 20px;
    margin: 0 10px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    color: white;
    transition: background-color 0.3s;
}

#startButton {
    background-color: #4CAF50;
}

#startButton:hover {
    background-color: #45a049;
}

#startButton:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

#stopButton {
    background-color: #f44336;
}

#stopButton:hover {
    background-color: #da190b;
}

#stopButton:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.viewport {
    width: 100%;
    max-width: 640px;
    height: 480px;
    margin: 20px auto;
    border: 2px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background-color: #000;
}

#interactive.viewport > video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#interactive.viewport > canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#result {
    margin: 20px auto;
    padding: 20px;
    border-radius: 5px;
    background-color: #e8f5e9;
    color: #2e7d32;
    display: none;
    max-width: 600px;
}

.barcode-result {
    text-align: center;
    font-family: 'Courier New', monospace;
}

.barcode-text {
    font-size: 24px;
    margin: 10px 0;
    word-break: break-all;
}

.barcode-info {
    font-size: 16px;
    color: #666;
    margin-top: 5px;
}

#error {
    margin: 20px;
    padding: 15px;
    border-radius: 5px;
    background-color: #ffebee;
    color: #c62828;
    display: none;
    font-size: 18px;
}