* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Nunito', sans-serif;
}

body {
    background-color: #f7f9fc;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #4CAF50;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.logo h1 {
    color: #4CAF50;
    font-size: 1.8rem;
}

.total-container {
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.add-item-container {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

input, button {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 1rem;
}

button {
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: bold;
}

button:hover {
    background-color: #3e8e41;
}

.scan-container {
    margin-bottom: 20px;
    text-align: center;
}

#scan-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    background-color: #2196F3;
}

#scan-btn:hover {
    background-color: #0b7dda;
}

#scanning-status {
    margin-top: 10px;
    color: #2196F3;
    font-weight: bold;
}

.shopping-list {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.shopping-list h2 {
    color: #4CAF50;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

#items-list {
    list-style-type: none;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 10px;
    border-bottom: 1px solid #eee;
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: bold;
    font-size: 1.1rem;
}

.item-details {
    color: #666;
    font-size: 0.9rem;
}

.item-subtotal {
    font-weight: bold;
    color: #4CAF50;
    margin-right: 15px;
}

.action-btns button {
    padding: 8px 12px;
    margin-left: 5px;
}

.edit-btn {
    background-color: #FFC107;
}

.edit-btn:hover {
    background-color: #e0a800;
}

.delete-btn {
    background-color: #F44336;
}

.delete-btn:hover {
    background-color: #d32f2f;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
}

.edit-form {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.hidden {
    display: none;
}

@media (max-width: 600px) {
    .add-item-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .list-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .action-btns {
        margin-top: 10px;
        align-self: flex-end;
    }
    
    .item-subtotal {
        margin-top: 5px;
    }
}

