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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #1e88e2 40%);
    color: #333;
    min-height: 100vh;
}

.container {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    padding-bottom: 80px;
}

/* Screens */
.screen {
    display: none;
    padding: 24px;
}

.screen.active {
    display: block;
}

/* Logo & Header */
.logo {
    text-align: center;
    margin-bottom: 24px;
}

.logo i {
    color: #4CAF50;
    font-size: 48px;
}

.logo span {
    display: block;
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 8px;
}

h1 {
    color: #2c3e50;
    margin-bottom: 24px;
}

/* Header with back button */
.screen-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.screen-header h1 {
    flex: 1;
    margin: 0;
}

/* Icon Buttons */
.icon-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f0f0f0;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.icon-btn:hover {
    background: #e0e0e0;
}

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

.icon-btn i {
    font-size: 16px;
    color: #555;
}

/* Input Group */
.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #555;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Checkbox */
.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox input[type="checkbox"] {
    display: block;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background: #45a049;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-block {
    width: 100%;
    margin-bottom: 12px;
}

.btn-group {
    display: flex;
    gap: 12px;
}

.btn-group .btn {
    flex: 1;
}

/* Card */
.card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: box-shadow 0.2s;
    position: relative;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.card-subtitle {
    font-size: 14px;
    color: #757575;
}

.card-actions {
    display: flex;
    gap: 12px;
    position: absolute;
    top: 16px;
    right: 16px;
}

.card-actions i {
    color: #757575;
    cursor: pointer;
    padding: 4px;
}

.card-actions i:hover {
    color: #4CAF50;
}

.card-actions .fa-trash:hover {
    color: #f44336;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 14px;
    font-weight: 600;
    color: #757575;
    text-transform: uppercase;
}

/* List Items */
.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
}

.list-item:hover {
    background: #f0f0f0;
}

.item-name {
    flex: 1;
    font-size: 16px;
}

.item-name.checked {
    text-decoration: line-through;
    color: #999;
}

.item-category {
    font-size: 12px;
    color: #757575;
    padding: 4px 8px;
    background: #e0e0e0;
    border-radius: 4px;
}

.item-quantity {
    font-size: 14px;
    font-weight: 600;
    color: #4CAF50;
    padding: 4px 8px;
    background: #e8f5e9;
    border-radius: 4px;
    min-width: 40px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.list-item-actions {
    display: flex;
    gap: 8px;
}

.list-item-actions i {
    color: #757575;
    cursor: pointer;
    padding: 4px;
}

.list-item-actions i:hover {
    color: #4CAF50;
}

.list-item-actions .fa-trash:hover {
    color: #f44336;
}

/* Category Header */
.category-header {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    padding: 16px 12px 8px;
}

/* Empty State */
.empty-state {
    text-align: center;
    color: #999;
    padding: 48px 24px;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
}

/* Sync Badge */
.sync-badge {
    display: none;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.sync-badge.online {
    background: #e8f5e9;
    color: #2e7d32;
    display: inline-block;
}

.sync-badge.offline {
    background: #ffebee;
    color: #c62828;
    display: inline-block;
}

/* Bottom CTA Bar - Fixed innerhalb des Container-Bereichs */
.bottom-cta-wrapper {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 600px;
    background: white;
    padding: 16px;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    z-index: 100;
    left: 50%;
    transform: translateX(-50%);
}

.bottom-cta .btn {
    width: 100%;
}

/* FAB (Floating Action Button) - DEPRECATED, use .bottom-cta instead */
.fab {
    display: none;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 12px;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h2 {
    font-size: 20px;
    color: #2c3e50;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #757575;
    cursor: pointer;
    padding: 4px;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

/* Toast */
.toast {
    display: none;
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 2000;
    font-size: 14px;
}

.toast.active {
    display: block;
}

.toast.success {
    background: #4CAF50;
}

.toast.error {
    background: #f44336;
}

/* Loading */
.loading-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.loading-container.active {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Private List Container */
#private-list-container {
    margin-top: 24px;
}

/* Family Section */
.family-section {
    margin-bottom: 24px;
}

.family-header {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    padding: 8px 0;
    margin-bottom: 12px;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        border-radius: 0;
    }

    .fab {
        bottom: 16px;
        right: 16px;
    }
}

/* Language Switcher - Fixed Position, Always Visible */
.lang-switcher-fixed {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1000;
}

.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-btn {
    background: white;
    color: #555;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
    transition: all 0.2s;
}

.lang-btn:hover {
    background: #f5f5f5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.lang-btn i {
    font-size: 12px;
}

.lang-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 140px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.lang-menu.show {
    display: block;
}

.lang-option {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    font-size: 14px;
    transition: background 0.15s;
}

.lang-option:hover {
    background: #f5f5f5;
}

.lang-option.active {
    background: #e3f2fd;
    color: #1976d2;
}

.lang-option i {
    font-size: 16px;
}
