* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 10px;
    direction: rtl;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

.main-header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    animation: fadeInDown 0.6s ease;
}

.main-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.logo {
    font-size: 60px;
    animation: bounce 2s infinite;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.menu-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease;
    display: block;
}

.menu-card:nth-child(1) { animation-delay: 0.1s; }
.menu-card:nth-child(2) { animation-delay: 0.2s; }
.menu-card:nth-child(3) { animation-delay: 0.3s; }
.menu-card:nth-child(4) { animation-delay: 0.4s; }
.menu-card:nth-child(5) { animation-delay: 0.5s; }
.menu-card:nth-child(6) { animation-delay: 0.6s; }
.menu-card:nth-child(7) { animation-delay: 0.7s; }
.menu-card:nth-child(8) { animation-delay: 0.8s; }

.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.2);
}

.menu-card .icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.menu-card h3 {
    font-size: 18px;
    margin-bottom: 5px;
    color: #667eea;
}

.menu-card p {
    font-size: 12px;
    color: #666;
}

/* Forms */
.form-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    animation: fadeIn 0.5s ease;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
    font-weight: 600;
}

.btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: #6c757d;
}

.btn-success {
    background: #28a745;
}

.btn-danger {
    background: #dc3545;
}

.btn-small {
    padding: 8px 15px;
    font-size: 14px;
    width: auto;
    display: inline-block;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
    overflow-x: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table th,
table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #e0e0e0;
}

table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #667eea;
    position: sticky;
    top: 0;
}

table tr:hover {
    background: #f8f9fa;
}

/* Search */
.search-box {
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
}

/* Variants */
.variants-container {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.variant-item {
    background: white;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.variant-item input {
    margin-bottom: 8px;
}

.remove-variant {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}

/* Cart */
.cart-item {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item-info {
    flex: 1;
}

.cart-item-actions {
    display: flex;
    gap: 10px;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: slideIn 0.3s ease;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    margin: 50px auto;
    padding: 20px;
    border-radius: 15px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.close-modal {
    float: left;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-header h1 {
        font-size: 24px;
    }
    
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .menu-card {
        padding: 15px;
    }
    
    .menu-card .icon {
        font-size: 30px;
    }
    
    .menu-card h3 {
        font-size: 14px;
    }
    
    .menu-card p {
        font-size: 11px;
    }
    
    table {
        font-size: 12px;
    }
    
    table th,
    table td {
        padding: 8px 4px;
    }
    
    .modal-content {
        margin: 20px auto;
        padding: 15px;
    }
}

/* Loading */
.loading {
    text-align: center;
    padding: 20px;
    color: white;
}

.spinner {
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

