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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 800px;
    width: 100%;
}

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

button {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #5568d3;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

#logout-btn {
    background: #e74c3c;
}

#logout-btn:hover {
    background: #c0392b;
}

#products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.product {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.product-name {
    font-weight: 600;
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 8px;
}

.product-category {
    color: #7f8c8d;
    font-size: 14px;
}

.loading {
    text-align: center;
    color: #7f8c8d;
    padding: 20px;
}

.error {
    background: #fee;
    color: #c33;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #c33;
}

.categories-container {
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.categories {
    display: flex;
    gap: 12px;
    padding-bottom: 8px;
    min-width: min-content;
}

.category-tag {
    background: #f8f9fa;
    color: #495057;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    user-select: none;
}

.category-tag:hover {
    background: #e9ecef;
}

.category-tag.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.categories-container::-webkit-scrollbar {
    height: 6px;
}

.categories-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.categories-container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

.categories-container::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}
