:root {
    --primary-color: #007aff;
    --primary-hover: #005bb5;
    --danger-color: #ff3b30;
    --bg-color: #f5f5f7;
    --card-bg: #ffffff;
    --text-main: #1d1d1f;
    --text-secondary: #86868b;
    --border-color: #e5e5ea;
    --border-radius: 16px;
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.04);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding: 20px;
    padding-bottom: 80px;
}

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

/* Header */
.app-header {
    text-align: center;
    margin-bottom: 24px;
}

.app-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.app-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
}

/* Voice Section */
.mic-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 0;
}

.mic-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    font-size: 28px;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mic-btn:hover {
    transform: scale(1.05);
    background-color: var(--primary-hover);
}

.mic-btn:active {
    transform: scale(0.95);
}

.mic-btn.listening {
    background-color: var(--danger-color);
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 20px rgba(255, 59, 48, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0);
    }
}

.transcript-box {
    margin-top: 16px;
    padding: 12px;
    background-color: #f8f9fa;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-main);
    text-align: center;
}

.transcript-box.hidden {
    display: none;
}

/* Status Box */
.status-box {
    margin-top: 12px;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s;
}

.status-box.info {
    background-color: #f0f8ff;
    color: #0056b3;
}

.status-box.error {
    background-color: #ffeeee;
    color: #cc0000;
}

.status-box.success {
    background-color: #eeffee;
    color: #008800;
}

/* Buttons */
.primary-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.primary-btn:hover:not(:disabled) {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.primary-btn:active:not(:disabled) {
    transform: translateY(0);
}

.primary-btn:disabled {
    background-color: #d1d1d6;
    cursor: not-allowed;
    opacity: 0.8;
}

.text-btn {
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.text-btn:hover {
    opacity: 0.7;
}

.text-danger {
    color: var(--danger-color);
}

/* List Section */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.list-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.shopping-list {
    list-style: none;
    margin-bottom: 20px;
    min-height: 100px;
}

.shopping-list:empty::after {
    content: "Noch keine Artikel gescannt.";
    display: block;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 30px;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f9f9fb;
    border-radius: 8px;
    margin-bottom: 8px;
    animation: slideIn 0.3s ease;
    border: 1px solid #f0f0f0;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.item-info {
    display: flex;
    flex-direction: column;
}

.item-name {
    font-weight: 600;
    font-size: 15px;
}

.item-price {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 14px;
    margin-top: 2px;
}

.delete-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.delete-btn:hover {
    color: var(--danger-color);
    background: #ffeeee;
}

/* Total */
.total-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #fdfdfd;
    border-radius: 12px;
    border: 2px solid var(--primary-color);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

#total-price {
    color: var(--primary-color);
    font-size: 24px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: white;
    padding: 24px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.hidden .modal-content {
    transform: translateY(20px);
}

.modal-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.price-input-group {
    display: flex;
    align-items: center;
    background: #f5f5f7;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 24px;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.price-input-group:focus-within {
    border-color: var(--primary-color);
}

.price-input-group input {
    border: none;
    background: transparent;
    font-size: 24px;
    font-weight: 700;
    width: 100%;
    outline: none;
    color: var(--text-main);
}

.price-input-group .currency {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-left: 8px;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions button {
    flex: 1;
    padding: 14px;
}

.name-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e5e5ea;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    color: var(--text-main);
    font-weight: 600;
    transition: border-color 0.2s;
}

.name-input:focus {
    outline: none;
    border-color: var(--primary-color);
}
