* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.scanner-section {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    max-width: 100%;
}

.camera-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 1rem;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

#camera {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.btn {
    min-width: 120px;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn.primary {
    background-color: #3498db;
    color: white;
}

.btn.secondary {
    background-color: #95a5a6;
    color: white;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.preview-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#preview {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto 2rem;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.data-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.permission-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    font-style: italic;
}

.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1rem 2rem;
    border-radius: 5px;
    font-size: 1.1rem;
    z-index: 1000;
}

@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }
    
    .scanner-section {
        padding: 0.5rem;
        margin: -0.5rem;
        border-radius: 0;
    }
    
    .camera-container {
        border-radius: 0;
        aspect-ratio: 3/4;
    }
    
    .controls {
        padding: 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    #preview {
        border-radius: 0;
    }
}

.camera-guide {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.5);
    top: 10%;
    left: 10%;
    right: 10%;
    bottom: 10%;
    pointer-events: none;
    border-radius: 4px;
}

.camera-guide::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2px;
} 