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

:root {
    --primary-color: #e74c3c;
    --secondary-color: #2c3e50;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
    padding-bottom: 100px;
    max-width: 768px;
    margin: 0 auto;
}

/* Header */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
}

.restaurant-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

.language-selector {
    position: relative;
}

.language-btn {
    background-color: var(--bg-color);
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.language-btn:hover {
    background-color: #e9ecef;
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid var(--border);
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background-color: var(--bg-color);
}

.language-option.active {
    background-color: #e8f5e9;
    color: var(--primary-color);
    font-weight: 600;
}

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

/* Categories */
.categories-wrapper {
    position: relative;
    border-top: 1px solid #e9ecef;
}

.categories-scroll {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--white);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    box-shadow: var(--shadow);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
}

.scroll-left {
    left: 8px;
}

.scroll-right {
    right: 8px;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 80px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.category-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--white);
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.category-item.active .category-icon::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    border: 3px solid #ff69b4;
    animation: pulseRing 0.6s ease-out;
}

@keyframes pulseRing {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.category-item:hover .category-icon {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.category-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-dark);
    text-align: center;
    white-space: nowrap;
}

/* Main Content */
.main-content {
    padding: 20px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 768px;
}

/* Menu Item Card */
.menu-item {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.menu-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.menu-item-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.favorite-btn {
    display: none;
}

.menu-item-info {
    padding: 12px;
}

.menu-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}

.menu-item-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

/* Order Footer */
.order-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--white);
    padding: 12px 20px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    z-index: 99;
    max-width: 768px;
    margin: 0 auto;
}

.order-btn {
    width: 100%;
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 16px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.order-btn:hover {
    background-color: #34495e;
}

.order-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
}

.order-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.order-text {
    font-size: 14px;
    font-weight: 600;
}

.order-price {
    font-size: 18px;
    font-weight: 700;
}

.order-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.order-empty i {
    font-size: 24px;
    opacity: 0.5;
}

.order-empty p {
    font-size: 14px;
    opacity: 0.7;
}

.order-btn.empty .order-content {
    display: none;
}

.order-btn.empty .order-empty {
    display: flex;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background-color: var(--white);
    border-radius: 24px 24px 0 0;
    max-width: 768px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.modal-close:hover {
    background-color: var(--white);
    transform: rotate(90deg);
}

.modal-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.modal-body {
    padding: 24px;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.modal-description {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 24px;
}

.modal-footer {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
}

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 16px 0;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background-color: var(--white);
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.quantity-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.quantity-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.quantity-display {
    font-size: 24px;
    font-weight: 700;
    min-width: 40px;
    text-align: center;
}

.add-to-cart-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.add-to-cart-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Cart Modal */
.cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

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

.cart-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.cart-modal .modal-content {
    position: relative;
    background-color: var(--white);
    border-radius: 24px 24px 0 0;
    max-width: 768px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

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

.cart-title {
    font-size: 20px;
    font-weight: 700;
}

.cart-items {
    padding: 16px;
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    background-color: var(--bg-color);
    border-radius: 12px;
    margin-bottom: 12px;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.cart-item-price {
    font-size: 14px;
    color: var(--text-light);
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-quantity-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background-color: var(--white);
    color: var(--primary-color);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.cart-quantity-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.cart-quantity {
    font-size: 16px;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.cart-delete-btn {
    background-color: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
}

.cart-delete-btn:hover {
    color: #c0392b;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #e9ecef;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 700;
}

.cart-checkout-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.cart-checkout-btn:hover {
    background-color: #c0392b;
}

.cart-empty {
    padding: 60px 20px;
    text-align: center;
}

.cart-empty i {
    font-size: 64px;
    color: var(--text-light);
    opacity: 0.3;
    margin-bottom: 16px;
}

.cart-empty p {
    font-size: 16px;
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 480px) {
    .restaurant-name {
        font-size: 20px;
    }
    
    .category-icon {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }
    
    .category-item {
        min-width: 72px;
    }
    
    .menu-item-image {
        height: 140px;
    }
}

