* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a1a;
    color: #e0e0e0;
    min-height: 100vh;
}

header {
    background: #2d2d2d;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.logo {
    width: 200px;
    height: 56px;
    object-fit: contain;
}

.btn-config {
    position: absolute;
    right: 15px;
    font-size: 24px;
    text-decoration: none;
    color: #e0e0e0;
    background: #404040;
    padding: 8px 15px;
    border-radius: 8px;
    transition: all 0.3s;
}

.btn-config:hover {
    background: #505050;
    transform: scale(1.05);
}

main {
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #4CAF50;
    font-size: 24px;
}

.search-box {
    background: #2d2d2d;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

#searchInput {
    width: 100%;
    padding: 15px;
    border: 2px solid #404040;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
    background: #1a1a1a;
    color: #e0e0e0;
}

#searchInput:focus {
    outline: none;
    border-color: #4CAF50;
}

.btn-primary, .btn-camera, .btn-fechar {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.btn-camera {
    background: #2196F3;
    color: white;
}

.btn-camera:hover {
    background: #0b7dda;
}

.btn-fechar {
    background: #f44336;
    color: white;
}

.btn-fechar:hover {
    background: #da190b;
}

.resultado {
    background: #2d2d2d;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    min-height: 100px;
}

.produto-card {
    background: #404040;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}

.produto-card h2 {
    color: #4CAF50;
    margin-bottom: 10px;
    font-size: 20px;
}

.produto-info {
    margin: 10px 0;
    font-size: 16px;
}

.produto-info strong {
    color: #4CAF50;
}

.preco {
    font-size: 28px;
    color: #4CAF50;
    font-weight: bold;
    margin-top: 15px;
}

.erro {
    color: #f44336;
    text-align: center;
    padding: 20px;
    font-size: 16px;
}

.camera-container {
    background: #2d2d2d;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    position: relative;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.camera-header {
    text-align: center;
    margin-bottom: 15px;
    color: #4CAF50;
}

.camera-header h3 {
    font-size: 16px;
    margin: 0;
}

.camera-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
}

#video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    background: #000;
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.scanner-overlay::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 150px;
    transform: translateY(-50%);
    border: 2px solid #4CAF50;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

.scanner-line {
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4CAF50, transparent);
    transform: translateY(-50%);
    animation: scan 2s linear infinite;
}

@keyframes scan {
    0%, 100% {
        transform: translateY(-75px);
    }
    50% {
        transform: translateY(75px);
    }
}

.loading {
    text-align: center;
    color: #4CAF50;
    font-size: 18px;
}

@media (max-width: 480px) {
    .logo {
        width: 150px;
        height: 42px;
    }
    
    h1 {
        font-size: 20px;
    }
    
    .search-box {
        padding: 15px;
    }
}