* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #1976d2 0%, #0d47a1 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4081;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Products Page */
.products-page {
    padding: 20px;
}

.products-page h1 {
    margin-bottom: 30px;
    color: #1976d2;
}

.filters {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.filters select,
.filters input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    width: 100%;
}

.filter-btn {
    padding: 10px 20px;
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.filter-btn:hover {
    background: #1565c0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #eee;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card h3 {
    padding: 15px 15px 5px;
    font-size: 1.2rem;
    color: #333;
}

.product-card p {
    padding: 0 15px;
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.product-footer {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
}

.price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #1976d2;
}

.add-to-cart {
    padding: 10px 20px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.add-to-cart:hover {
    background: #43a047;
}

/* Cart Page */
.cart-page {
    padding: 20px;
}

.cart-page h1 {
    margin-bottom: 30px;
    color: #1976d2;
}

.cart-items {
    margin-bottom: 30px;
}

.cart-item {
    background: white;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.item-info h3 {
    margin-bottom: 5px;
    color: #333;
}

.item-info p {
    color: #1976d2;
    font-weight: bold;
    font-size: 1.1rem;
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-btn {
    padding: 8px 15px;
    background: #f0f0f0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.quantity-btn:hover {
    background: #e0e0e0;
}

.quantity {
    font-size: 1.1rem;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.remove-btn {
    padding: 8px 15px;
    background: #ff5252;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.remove-btn:hover {
    background: #d32f2f;
}

.cart-summary {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cart-summary p {
    margin: 15px 0;
    font-size: 1.1rem;
}

.cart-summary .total-count,
.cart-summary .total-price {
    font-weight: bold;
    color: #1976d2;
}

.cart-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.checkout-btn,
.telegram-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.checkout-btn {
    background: #ff9800;
    color: white;
}

.checkout-btn:hover {
    background: #f57c00;
}

.telegram-btn {
    background: #0088cc;
    color: white;
}

.telegram-btn:hover {
    background: #0077b5;
}

.telegram-btn svg {
    width: 20px;
    height: 20px;
}

.empty-cart {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.2rem;
}

/* Checkout Modal */
.checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-content h2 {
    margin-bottom: 25px;
    color: #1976d2;
    text-align: center;
}

.order-form .form-group {
    margin-bottom: 20px;
}

.order-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.order-form input,
.order-form textarea,
.order-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
}

.order-form textarea {
    min-height: 100px;
    resize: vertical;
}

.order-form select {
    cursor: pointer;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.submit-order-btn,
.cancel-order-btn {
    padding: 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    flex: 1;
    transition: background 0.3s;
}

.submit-order-btn {
    background: #4caf50;
    color: white;
}

.submit-order-btn:hover {
    background: #43a047;
}

.cancel-order-btn {
    background: #f44336;
    color: white;
}

.cancel-order-btn:hover {
    background: #d32f2f;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1976d2;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    font-size: 1.2rem;
    color: #1976d2;
    font-weight: 500;
}

/* Login Page */
.login-page {
    padding: 20px;
    max-width: 400px;
    margin: 50px auto;
}

.login-page h1 {
    margin-bottom: 30px;
    color: #1976d2;
    text-align: center;
}

.login-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input {
    padding: 12px;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.login-form button {
    padding: 14px;
    width: 100%;
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.3s;
}

.login-form button:hover {
    background: #1565c0;
}

.login-message {
    padding: 15px;
    margin: 15px 0;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
}

.login-message.info {
    background: #e3f2fd;
    color: #1565c0;
}

.login-message.success {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.login-message.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* Home Page */
.home-page {
    padding: 40px 20px;
    text-align: center;
}

.home-page h1 {
    margin-bottom: 40px;
    color: #1976d2;
    font-size: 2.5rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.feature {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature h3 {
    color: #1976d2;
    margin-bottom: 15px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.feature p {
    color: #666;
    line-height: 1.6;
}

.quick-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 15px 30px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.3s;
    min-width: 200px;
}

.action-btn:hover {
    background: #43a047;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 40px 0;
    flex-wrap: wrap;
}

.page-btn {
    padding: 10px 15px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.page-btn:hover {
    background: #f5f5f5;
}

.page-btn.active {
    background: #1976d2;
    color: white;
    border-color: #1976d2;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: slideIn 0.3s;
    max-width: 400px;
    font-weight: 500;
}

.notification.success {
    background: #4caf50;
}

.notification.error {
    background: #f44336;
}

.notification.info {
    background: #2196f3;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Install Prompt */
.install-prompt {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    z-index: 2000;
    animation: slideUp 0.3s;
}

.install-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.install-content p {
    margin: 0;
    font-weight: 500;
    color: #333;
}

.install-btn,
.cancel-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.install-btn {
    background: #1976d2;
    color: white;
}

.install-btn:hover {
    background: #1565c0;
}

.cancel-btn {
    background: #f5f5f5;
    color: #333;
}

.cancel-btn:hover {
    background: #e0e0e0;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        gap: 10px;
    }
    
    .nav-links a {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .filters {
        grid-template-columns: 1fr;
    }
    
    .cart-item {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .item-controls {
        justify-content: center;
    }
    
    .cart-actions {
        flex-direction: column;
    }
    
    .checkout-btn,
    .telegram-btn {
        width: 100%;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .notification {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}

/* Додайте до app.css */
.telegram-setup-page {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.telegram-setup-page h1 {
    color: #1976d2;
    margin-bottom: 30px;
    text-align: center;
}

.setup-steps {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
}

.step {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #0088cc;
}

.step h3 {
    color: #0088cc;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.setup-form {
    margin-top: 20px;
}

.setup-form .form-group {
    margin-bottom: 20px;
}

.setup-form input,
.setup-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    margin-top: 5px;
}

.test-btn,
.save-btn,
.back-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    margin-right: 10px;
    margin-top: 10px;
    transition: background 0.3s;
}

.test-btn {
    background: #2196f3;
    color: white;
}

.save-btn {
    background: #4caf50;
    color: white;
}

.back-btn {
    background: #9e9e9e;
    color: white;
}

.test-result {
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.test-result.info {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
}

.test-result.success {
    background: #e8f5e8;
    border: 1px solid #c8e6c9;
}

.test-result.error {
    background: #ffebee;
    border: 1px solid #ffcdd2;
}

.troubleshooting {
    background: #fff3e0;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
    border-left: 4px solid #ff9800;
}

.troubleshooting h3 {
    color: #f57c00;
    margin-bottom: 15px;
}

.troubleshooting ul {
    padding-left: 20px;
}

.troubleshooting li {
    margin-bottom: 10px;
    line-height: 1.5;
}