* {
    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;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #667eea;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-buttons {
    display: flex;
    gap: 15px;
}

.nav-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .nav-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    }

.main-content {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 30px;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.sidebar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    height: fit-content;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

    .sidebar h3 {
        color: #667eea;
        margin-bottom: 20px;
        font-size: 20px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

.category-item {
    padding: 15px;
    margin: 8px 0;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

    .category-item:hover {
        background: rgba(102, 126, 234, 0.2);
        transform: translateX(5px);
    }

    .category-item.active {
        background: linear-gradient(45deg, #667eea, #764ba2);
        color: white;
        transform: translateX(5px);
    }

.menu-area {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

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

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 25px;
    padding: 12px 20px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

    .search-bar:focus-within {
        background: rgba(102, 126, 234, 0.15);
        transform: scale(1.02);
    }

    .search-bar input {
        border: none;
        background: transparent;
        outline: none;
        flex: 1;
        margin-left: 10px;
        font-size: 16px;
    }

.view-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.toggle-btn {
    background: rgba(102, 126, 234, 0.1);
    border: none;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .toggle-btn.active {
        background: linear-gradient(45deg, #667eea, #764ba2);
        color: white;
    }

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.menu-table {
    display: none;
}

    .menu-table.active {
        display: block;
    }

.menu-grid.active {
    display: grid;
}

.menu-item {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

    .menu-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    }

.item-image {
    width: 100%;
    height: 150px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 10px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
}

.item-info h4 {
    color: #333;
    margin-bottom: 8px;
    font-size: 18px;
}

.item-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-price {
    font-size: 20px;
    font-weight: bold;
    color: #667eea;
}

.add-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .add-btn:hover {
        transform: scale(1.05);
    }

.cart-area {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    height: fit-content;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.cart-header {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.cart-total {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid rgba(102, 126, 234, 0.2);
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
}

.checkout-btn {
    width: 100%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    margin-top: 20px;
    transition: all 0.3s ease;
}

    .checkout-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    }

.table-view {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

    .table-view th,
    .table-view td {
        padding: 15px;
        text-align: left;
        border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    }

    .table-view th {
        background: rgba(102, 126, 234, 0.1);
        font-weight: 600;
        color: #667eea;
    }

    .table-view tr:hover {
        background: rgba(102, 126, 234, 0.05);
    }

/* Mobile First Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 250px 1fr 250px;
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    .container {
        padding: 15px;
    }

    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .nav-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .logo {
        font-size: 24px;
        text-align: center;
    }

    .sidebar {
        order: 1;
    }

    .menu-area {
        order: 2;
        padding: 20px;
    }

    .cart-area {
        order: 3;
        position: sticky;
        top: 20px;
    }

    .menu-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header {
        padding: 15px;
        margin-bottom: 20px;
    }

    .logo {
        font-size: 20px;
    }

    .nav-btn {
        padding: 10px 16px;
        font-size: 14px;
    }

    .sidebar {
        padding: 20px;
    }

    .menu-area {
        padding: 15px;
    }

    .cart-area {
        padding: 20px;
        position: static;
    }

    .menu-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .menu-item {
        padding: 15px;
    }

    .item-image {
        height: 120px;
    }

    .search-bar {
        padding: 10px 15px;
    }

    .view-toggle {
        flex-direction: column;
        gap: 8px;
    }

    .toggle-btn {
        padding: 12px 16px;
    }

    .category-item {
        padding: 12px;
        font-size: 14px;
    }

    .table-view {
        font-size: 14px;
    }

        .table-view th,
        .table-view td {
            padding: 10px 8px;
        }

    .floating-cart {
        width: 50px;
        height: 50px;
        font-size: 20px;
        bottom: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 8px;
    }

    .header {
        padding: 12px;
        margin-bottom: 15px;
    }

    .logo {
        font-size: 18px;
    }

    .nav-buttons {
        gap: 8px;
    }

    .nav-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

        .nav-btn span {
            display: none;
        }

    .sidebar,
    .menu-area,
    .cart-area {
        padding: 15px;
        border-radius: 15px;
    }

    .menu-item {
        padding: 12px;
    }

    .item-image {
        height: 100px;
        font-size: 36px;
    }

    .item-info h4 {
        font-size: 16px;
    }

    .item-description {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .item-price {
        font-size: 16px;
    }

    .add-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .search-bar {
        padding: 8px 12px;
        margin-bottom: 15px;
    }

        .search-bar input {
            font-size: 14px;
        }

    .view-toggle {
        margin-bottom: 15px;
    }

    .toggle-btn {
        padding: 10px 12px;
        font-size: 12px;
    }

    .category-item {
        padding: 10px;
        font-size: 13px;
    }

    .sidebar h3,
    .cart-header {
        font-size: 16px;
    }

    .cart-item {
        padding: 8px 0;
    }

    .qty-btn {
        width: 22px;
        height: 22px;
        font-size: 12px;
    }

    .table-view {
        font-size: 12px;
    }

        .table-view th,
        .table-view td {
            padding: 8px 5px;
        }

    .checkout-btn {
        padding: 12px;
        font-size: 14px;
    }

    .floating-cart {
        width: 45px;
        height: 45px;
        font-size: 18px;
        bottom: 10px;
        right: 10px;
    }

    .cart-badge {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
}

/* Landscape orientation for mobile devices */
@media (max-width: 768px) and (orientation: landscape) {
    .main-content {
        grid-template-columns: 200px 1fr 200px;
        gap: 15px;
    }

    .sidebar,
    .cart-area {
        padding: 15px;
    }

    .menu-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* Very small screens */
@media (max-width: 320px) {
    .nav-buttons {
        flex-direction: column;
        width: 100%;
    }

    .nav-btn {
        width: 100%;
        justify-content: center;
    }

    .item-footer {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .add-btn {
        width: 100%;
        padding: 10px;
    }

    .table-view th,
    .table-view td {
        padding: 6px 3px;
        font-size: 11px;
    }
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    background: rgba(102, 126, 234, 0.2);
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.floating-cart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
}

    .floating-cart:hover {
        transform: scale(1.1);
    }

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}
