/* Global styles */
body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #4a90e2;
    color: white;
    text-align: center;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1, h2 {
    margin: 0.5rem 0;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

section:hover {
    transform: translateY(-5px);
}

input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    border-color: #4a90e2;
    outline: none;
}

button {
    background-color: #4a90e2;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s, transform 0.2s;
    margin: 0.5rem 0;
}

button:hover {
    background-color: #357abd;
    transform: scale(1.05);
}

button:active {
    transform: scale(0.98);
}

#qr-code, #barcode-container {
    text-align: center;
    margin: 1rem 0;
}

#barcode {
    display: block;
    margin: 0 auto;
}

#video {
    width: 100%;
    max-width: 400px;
    height: auto;
    border: 1px solid #ccc;
    border-radius: 4px;
    display: block;
    margin: 1rem auto;
}

#result {
    margin: 1rem 0;
    font-weight: bold;
    word-break: break-all;
}

/* Responsive design */
@media (min-width: 768px) {
    main {
        flex-direction: row;
        justify-content: space-between;
    }
    
    section {
        flex: 1;
        margin: 0 1rem;
    }
    
    section:first-child {
        margin-left: 0;
    }
    
    section:last-child {
        margin-right: 0;
    }
}