/* 全局样式 */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f7f7f7;
    color: #333;
    line-height: 1.6;
}

/* 头部样式 */
.header {
    background-color: white;
    color: grey;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header h1 {
    font-size: 18px;
    margin: 0;
}

.header-user {
    display: flex;
    align-items: center;
}

.header-user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

/* 导航栏样式 */




/* 主内容区域 */
.main-container {
    padding: 15px;
}

/* 卡片样式 */
.card {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card h2 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #007bff;
    font-weight: bold;
}

/* 表单样式 */
form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

form input,
form textarea,
form select {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

form input:focus,
form textarea:focus,
form select:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
    outline: none;
}

form textarea {
    resize: none;
    height: 80px;
}

.btn {
    display: inline-block;
    padding: 10px 15px;
    font-size: 14px;
    color: white;
    background-color: #007bff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    background-color: #0056b3;
}

.btn.cancel {
    background-color: #d9534f;
}

.btn.cancel:hover {
    background-color: #c9302c;
}

/* 菜单项样式 */
.menu-container {
    /*display: grid;*/
    /*gap: 15px;*/
    /*grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));*/
        /*margin-top: 20px;*/
        margin-bottom: 50px;
}

.menu-item {
    background-color: white;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.menu-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.menu-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    /*margin-bottom: 10px;*/
}

.menu-item h3 {
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
    font-weight: bold;
}

.menu-item p {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.menu-item .btn {
    margin-top: 8px;
    width: 100%;
}

/* 弹窗样式 */
.modal {
    /*display: none;*/
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    /*max-width: 400px;*/
    height: 90%;
    overflow-y: auto;
    margin: 50px auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.modal-content h2 {
    margin-bottom: 20px;
    font-size: 18px;
    color: #333;
}

/* 页脚样式 */
.footer {
    background-color: #007bff;
    color: white;
    text-align: center;
    padding: 10px;
    font-size: 12px;
    border-top: 1px solid #0056b3;
}


body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

.header-user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.category-sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    bottom: 0;
    width: 80px;
    background-color: #f7f7f7;
    overflow-y: auto;
    padding: 5px;
    border-right: 1px solid #ddd;
}

.menu-container {
    margin-left: 110px;
    padding-bottom: 100px;
}



.content-section:not(#menuSection) .category-sidebar {
    display: none;
}

.category-sidebar ul {
    list-style: none;
    padding: 0;
}

.category-sidebar li {
    padding: 10px;
    font-size: 14px;
    cursor: pointer;
    margin: 5px 0;
    color: #2C3E50;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    background-color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.category-sidebar li:hover {
    background-color: #ddd;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.main-container {
    padding: 20px 10px;
}

.menu-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.menu-item, .cart-item {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    background-color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* 优化后的订单项样式 */
.order-item {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.order-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

/* 订单头部 */
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.order-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #2C3E50;
}

.order-status {
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.9em;
    color: white;
    background-color: #f39c12; /* 默认待处理状态 */
}

.order-status[data-status="completed"] {
    background-color: #28a745; /* 已完成状态 */
}

/* 订单概要 */
.order-summary {
    margin-bottom: 10px;
}

.order-summary p {
    margin: 5px 0;
    color: #666;
}

.order-summary p strong {
    color: #2C3E50;
}

/* 订单详情 */
.order-details {
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.details-toggle {
    margin: 0;
    color: #007bff;
    cursor: pointer;
    font-weight: bold;
}

.details-toggle:hover {
    color: #0056b3;
}

.toggle-icon {
    font-size: 0.8em;
    margin-left: 5px;
}

.details-list {
    list-style-type: none;
    padding: 0;
    margin: 10px 0 0;
}

.details-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.details-list li:last-child {
    border-bottom: none;
}

.item-name {
    flex: 2;
    color: #2C3E50;
}

.item-quantity {
    flex: 1;
    text-align: center;
    color: #666;
}

.item-price {
    flex: 1;
    text-align: right;
    color: #e63946;
    font-weight: bold;
}

.category-container {
    margin-bottom: 20px;
    /*margin-left: 10px;*/
}

.category-container h3 {
    margin-bottom: 10px;
        margin-top: 10px;
    font-size: 1.0em;
}

.category-items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
}

.menu-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
}

.add-to-cart {
    border: none;
    background: none;
}

.svg-icon {
    font-size: 1.5rem;
    cursor: pointer;
}

/* 浮窗通知样式 */
.toast-notification {
    position: absolute;
    background-color: #28a745;
    color: white;
    width: 100px;
    right: 10px;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.9em;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(-20px);
}

/* 底部导航 */
.nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #fff;
    border-top: 1px solid #ddd;
    position: fixed;
    padding: 5px 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 1000;
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 25%;
    height: 100%;
    background: none;
    border: none;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.nav-btn.active {
    /* color: #007bff; */
}

.nav-btn .icon {
    font-size: 24px;
    margin-bottom: 4px;
    width: 100%;
}

.nav-btn span {
    font-size: 12px;
    line-height: 1.5;
}

.nav-btn:hover {
    /* color: #007bff; */
}

.cart-summary {
    margin-bottom: 60px;
    text-align: right;
}

#checkoutBtn {
    background-color: #4CAF50;
    color: white;
    padding: 12px 24px;
    font-size: 1.2em;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease;
}

#checkoutBtn:hover {
    background-color: #45a049;
}

#cartSection {
    padding: 10px 100px;
}

#setContainer {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px auto;
    max-width: 600px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

#setContainer img {
    display: block;
    margin: 20px auto;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

#setContainer a {
    display: block;
    margin: 10px 0;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    transition: background-color 0.3s ease;
}

#setContainer a:hover {
    background-color: #0056b3;
}

#setContainer hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

#setContainer span {
    display: block;
    text-align: center;
    color: #666;
    margin: 5px 0;
}

#ordersSection{
    padding: 10px 100px;
}


/* 分享菜单按钮 */
.share-menu-btn {
    padding: 5px 15px;
    border-radius: 12px;
    font-size: 0.9em;
    color: white;
    background-color: #007bff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.share-menu-btn:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

/* 保留原有订单样式 */
.order-item {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.order-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.order-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #2C3E50;
}

#randomSection{
    padding: 0px 100px;
}

/* 其余样式保持不变 */


/* 动画效果 */
.order-item, #setContainer {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 响应式设计 */
@media (max-width: 767px) {
    .category-items {
        grid-template-columns: repeat(1, 1fr);
    }

    #setContainer {
        max-width: 100%;
        margin: 10px;
    }

    .order-item {
        /*margin: 10px;*/
        padding: 15px;
    }

    .order-header h3 {
        font-size: 1.1em;
    }

    .details-list li {
        /*flex-direction: column;*/
        align-items: flex-start;
    }

    .item-quantity, .item-price {
        text-align: left;
        margin-top: 5px;
    }
}



     /* 搜索框和按钮样式 */
        .search-container {
            padding: 10px 15px;
            background-color: #f9f9f9;
            position: sticky;
            top: 0;
            z-index: 10;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .search-box {
            display: flex;
            align-items: center;
            background-color: #fff;
            border-radius: 25px;
            padding: 8px 15px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease;
        }

        .search-box:focus-within {
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
        }

        .search-box input {
            border: none;
            outline: none;
            flex: 1;
            padding: 5px;
            font-size: 1em;
            color: #333;
        }

        .search-box .icon {
            width: 1.2em;
            height: 1.2em;
            margin-right: 8px;
            color: #666;
        }

        .search-box button {
            background-color: #c5e1a5;
            border: none;
            border-radius: 20px;
            padding: 6px 12px;
            color: white;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background-color 0.3s ease;
        }

        .search-box button:hover {
            background-color: #c5e1a5;
        }

        /* 手机端适配 */
        @media (max-width: 768px) {
            .search-container {
                padding: 8px 10px;
            }

            .search-box {
                padding: 6px 10px;
            }

            .search-box input {
                font-size: 0.9em;
            }

            .search-box button {
                padding: 5px 10px;
            }
            
            .menu-container {
                margin-left: 90px;
            }
        }
        
        
        
        /* 全局样式 */
        body {
            font-family: 'Arial', sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f7f7f7;
            color: #333;
            line-height: 1.6;
        }

        /* 头部样式 */
        .header {
            background-color: white;
            color: grey;
            padding: 10px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            position: sticky;
            top: 0;
            z-index: 1000;
        }

        .header-title {
            font-size: 18px;
            color: grey;
            text-decoration: none;
            transition: color 0.3s ease;
        }

        .header-title:hover {
            color: #007bff;
        }

        .header-user {
            display: flex;
            align-items: center;
        }

        .header-user img {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            margin-right: 10px;
        }

        /* 侧边栏样式 */
        .category-sidebar {
            position: fixed;
            left: 0;
            top: 60px;
            bottom: 60px;
            width: 100px;
            background-color: #f7f7f7;
            overflow-y: auto;
            padding: 5px;
            border-right: 1px solid #ddd;
        }

        .category-sidebar ul {
            list-style: none;
            padding: 0;
        }

        .category-sidebar li {
            padding: 10px 5px;
            font-size: 12px;
            cursor: pointer;
            margin: 5px 0;
            color: #2C3E50;
            border: 1px solid #ddd;
            border-radius: 8px;
            text-align: center;
            background-color: white;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
        }

        .category-sidebar li:hover {
            background-color: #ddd;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
        }

        /* 主容器 */
        .main-container {
            padding: 10px 10px 20px;
            /*margin-left: 100px;*/
        }

        .content-section:not(#menuSection) .category-sidebar {
            display: none;
        }

        /* 菜单样式 */
        .menu-container {
            padding-bottom: 100px;
        }

        .category-container {
            margin-bottom: 20px;
            /*margin-left: 10px;*/
        }

        .category-container h3 {
            margin-bottom: 10px;
            margin-top: 10px;
            font-size: 1.0em;
        }

        .category-items {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 5px;
        }

        .menu-item, .cart-item {
            padding: 5px 10px;
            border: 1px solid #ddd;
            border-radius: 8px;
            height: 120px;
            background-color: white;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .menu-item:hover, .cart-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        .menu-item img, .cart-item img {
            width: 100px;
            height: 100px;
            object-fit: cover;
            border-radius: 8px;
        }

        /* 添加/数量控件样式 */
        .add-to-cart {
            border: none;
            background: none;
            cursor: pointer;
        }

        .quantity-control {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 80px;
            background-color: #f0f0f0;
            border-radius: 10px;
            padding: 2px 5px 2px 2px;
        }

        .quantity-control button {
            background: none;
            border: none;
            font-size: 1.2em;
            color: #007bff;
            cursor: pointer;
            width: 20px;
            height: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: color 0.3s ease;
        }

        .quantity-control button:hover {
            color: #0056b3;
        }

        .quantity-control span {
            font-size: 1em;
            color: #333;
            min-width: 20px;
            text-align: center;
        }

        /* 搜索样式 */
        .search-container {
            padding: 10px 15px;
            background-color: #f9f9f9;
            position: sticky;
            top: 0;
            z-index: 10;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .search-box {
            display: flex;
            align-items: center;
            background-color: #fff;
            border-radius: 25px;
            padding: 8px 15px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease;
        }

        .search-box:focus-within {
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
        }

        .search-box input {
            border: none;
            outline: none;
            flex: 1;
            padding: 5px;
            font-size: 1em;
            color: #333;
        }

        .search-box .icon {
            width: 1.2em;
            height: 1.2em;
            margin-right: 8px;
            color: #666;
        }

        .search-box button {
            background-color: #c5e1a5;
            border: none;
            border-radius: 20px;
            padding: 6px 12px;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }

        .search-box button:hover {
            background-color: #aed581;
        }

        /* 购物车样式 */
        .cart-summary {
            margin-bottom: 110px;
            text-align: right;
        }

        #checkoutBtn {
            background: linear-gradient(135deg, #4CAF50, #66BB6A); /* 渐变色 */
            color: white;
            padding: 12px 24px;
            font-size: 1.1em;
            border-radius: 25px;
            border: none;
            cursor: pointer;
            transition: transform 0.2s ease, box-shadow 0.3s ease;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        }

        #checkoutBtn:hover {
            transform: scale(1.05);
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
        }

        #checkoutBtn:active {
            transform: scale(0.95);
        }

        /* 加载指示器 */
        .loading-indicator {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(0, 0, 0, 0.85);
            color: white;
            padding: 20px 40px;
            border-radius: 15px;
            font-size: 1.2em;
            z-index: 2000;
            display: none;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        }

        .loading-spinner {
            width: 24px;
            height: 24px;
            border: 3px solid #fff;
            border-top: 3px solid transparent;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            display: inline-block;
            margin-right: 10px;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* 成功浮窗 */
        .success-toast {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: linear-gradient(135deg, #4CAF50, #81C784);
            color: white;
            padding: 20px 40px;
            border-radius: 15px;
            font-size: 1.2em;
            z-index: 2000;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
            opacity: 0;
            transition: opacity 0.5s ease, transform 0.5s ease;
        }

        .success-toast.show {
            opacity: 1;
            transform: translate(-50%, -60%);
        }

        /* 导航样式 */
        .nav {
            display: flex;
            justify-content: space-around;
            align-items: center;
            background-color: #fff;
            border-top: 1px solid #ddd;
            position: fixed;
            padding: 5px 0;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 50px;
            z-index: 998;
        }

        .nav-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            width: 25%;
            height: 100%;
            background: none;
            border: none;
            font-size: 12px;
            color: #666;
            cursor: pointer;
            transition: color 0.3s ease, transform 0.2s ease;
        }

        .nav-btn.active {
            color: #007bff;
            transform: scale(1.1);
        }

        .nav-btn:active {
            transform: scale(0.95);
        }

        .nav-btn .icon {
            font-size: 24px;
            margin-bottom: 4px;
        }

        .nav-btn span {
            font-size: 12px;
            line-height: 1.5;
        }

        /* 订单样式 */
        .order-item {
            background-color: white;
            border: 1px solid #ddd;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .order-item:hover {
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            transform: translateY(-3px);
        }

        .order-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #eee;
            padding-bottom: 10px;
            margin-bottom: 10px;
        }

        .order-header h3 {
            margin: 0;
            font-size: 1.2em;
            color: #2C3E50;
        }

        .share-menu-btn {
            padding: 5px 15px;
            border-radius: 12px;
            font-size: 0.9em;
            color: white;
            background-color: #007bff;
            border: none;
            cursor: pointer;
            transition: background-color 0.3s ease, transform 0.3s ease;
        }

        .share-menu-btn:hover {
            background-color: #0056b3;
            transform: translateY(-1px);
        }

        /* 设置样式 */
        #setContainer {
            background-color: white;
            border: 1px solid #ddd;
            border-radius: 8px;
            padding: 20px;
            margin: 20px auto;
            max-width: 600px;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
            animation: fadeIn 0.5s ease-in;
        }

        #setContainer img {
            display: block;
            margin: 20px auto;
            max-width: 100%;
            height: auto;
            border-radius: 8px;
        }

        #setContainer a {
            display: block;
            margin: 10px 0;
            padding: 10px 20px;
            background-color: #007bff;
            color: white;
            text-decoration: none;
            border-radius: 5px;
            text-align: center;
            transition: background-color 0.3s ease;
        }

        #setContainer a:hover {
            background-color: #0056b3;
        }

        #setContainer hr {
            border: none;
            border-top: 1px solid #eee;
            margin: 20px 0;
        }

        #setContainer span {
            display: block;
            text-align: center;
            color: #666;
            margin: 5px 0;
        }

        /* 动画 */
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* 响应式设计 */
        @media (max-width: 767px) {
            .category-items {
                grid-template-columns: repeat(1, 1fr);
            }

            .category-sidebar {
                width: 80px;
            }

            .main-container {
                /* margin-left: 80px; */ /* 已注释 */
                margin-left: 0;
            }

            .menu-item img, .cart-item img {
                width: 80px;
                height: 80px;
            }

            .quantity-control {
                width: 55px;
            }

            #setContainer {
                max-width: 100%;
                margin: 10px 0px;
            }

            #checkoutBtn {
                padding: 8px 16px;
                font-size: 1em;
            }
            
            #cartSection{
                padding: 10px;
            }
            
            #ordersSection{
                padding: 0px;
            }
            
            #randomSection{
                padding: 0px;
            }
        }
      
 /* 随机点餐样式 */
    .random-container {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 8px;
        padding: 20px;
        margin: 6px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
        animation: fadeIn 0.4s ease-in;
        max-width: 100%;
        font-family: system-ui, -apple-system, 'PingFang SC', sans-serif;
    }
    
    h2{
        text-align: center;
        margin: 0px 0px 5px;
    }

    .random-options {
        margin-bottom: 8px;
    }

    .random-options h3 {
        font-size: 1rem;
        color: #111827;
        margin: 10px 0;
        font-weight: 600;
        text-align: center;
    }

    .form-group {
        margin-bottom: 8px;
    }

    .form-group label {
        display: block;
        font-size: 0.85rem;
        color: #374151;
        margin-bottom: 4px;
        font-weight: 500;
    }

    /* 滑动选择器 */
    .quantity-slider {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .quantity-slider input[type="range"] {
        -webkit-appearance: none;
        width: 100%;
        height: 8px;
        background: linear-gradient(to right, #6B46C1 0%, #6B46C1 var(--value), #e5e7eb var(--value), #e5e7eb 100%);
        border-radius: 4px;
        outline: none;
        transition: background 0.2s ease;
    }

    .quantity-slider input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 16px;
        height: 16px;
        background: #6B46C1;
        border-radius: 50%;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        cursor: pointer;
    }

    .quantity-slider input[type="range"]::-moz-range-thumb {
        width: 16px;
        height: 16px;
        background: #6B46C1;
        border-radius: 50%;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        cursor: pointer;
    }

    .quantity-slider span {
        font-size: 0.9rem;
        color: #111827;
        font-weight: 500;
    }

    /* 分类按钮 */
    .category-tags {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 6px;
        position: relative;
    }

    .category-tag {
        padding: 5px 8px;
        border-radius: 10px;
        font-size: 0.75rem;
        text-align: center;
        cursor: pointer;
        transition: all 0.3s ease;
        user-select: none;
        min-height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        overflow: hidden;
    }

    .category-tag.selected {
        /*background: linear-gradient(135deg, #6B46C1, #A78BFA);*/
            background: linear-gradient(135deg, #9b85cd, #ebaef0);
        color: white;
        box-shadow: 0 0 8px rgba(107, 70, 193, 0.5);
        transform: scale(1.05);
    }

    .category-tag:not(.selected) {
        background: #F3F4F6;
        color: #374151;
        opacity: 0.85;
    }

    .category-tag:hover {
        transform: scale(1.03);
        opacity: 1;
    }

    .category-tag::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.3s ease, height 0.3s ease;
    }

    .category-tag:active::after {
        width: 120px;
        height: 120px;
    }

    /* 选中计数提示 */
    .category-count {
        position: absolute;
        top: -8px;
        right: -8px;
        background: #DC2626;
        color: white;
        font-size: 0.7rem;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }

    /* 快捷套餐按钮 */
    .quick-options {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 6px;
    }

    .quick-btn {
        padding: 6px 14px;
        background: linear-gradient(135deg, #6B46C1, #A78BFA);
        background: linear-gradient(135deg, #9b85cd, #ebaef0);
        color: white;
        border: none;
        border-radius: 10px;
        font-size: 0.8rem;
        cursor: pointer;
        transition: all 0.2s ease;
        position: relative;
        overflow: hidden;
        min-height: 40px;
    }

    .quick-btn::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.3s ease, height 0.3s ease;
    }

    .quick-btn:active::after {
        width: 150px;
        height: 150px;
    }

    .quick-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 3px 8px rgba(107, 70, 193, 0.3);
    }

    /* 生成按钮 */
    .generate-btn {
        width: 100%;
        padding: 10px;
        /*background: linear-gradient(135deg, #6B46C1, #A78BFA);*/
            background: linear-gradient(135deg, #9b85cd, #ebaef0);
        color: white;
        border: none;
        border-radius: 10px;
        font-size: 0.9rem;
        font-weight: 600;
        cursor: pointer;
        position: relative;
        overflow: hidden;
        transition: all 0.3s ease;
        animation: glow 2s ease-in-out infinite;
        min-height: 48px;
    }

    .generate-btn::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.3s ease, height 0.3s ease;
    }

    .generate-btn:active::after {
        width: 200px;
        height: 200px;
    }

    .generate-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(107, 70, 193, 0.3);
    }

    @keyframes glow {
        0% { background-position: 0% 50%; }
        50% { background-position: 100% 50%; }
        100% { background-position: 0% 50%; }
    }

    .random-result {
        border-top: 1px solid #e5e7eb;
        padding-top: 8px;
    }

    .random-result h3 {
        font-size: 1rem;
        color: #111827;
        margin-bottom: 6px;
        font-weight: 600;
    }

    .random-dishes {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 6px;
        max-height: 300px;
        overflow-y: auto;
        padding-right: 4px;
    }

    .random-dishes::-webkit-scrollbar {
        width: 6px;
    }

    .random-dishes::-webkit-scrollbar-thumb {
        background: #6B46C1;
        border-radius: 3px;
    }

    .random-dish-item {
        background: #f9fafb;
        padding: 6px;
        border-radius: 10px;
        transition: all 0.2s ease;
        animation: slideIn 0.3s ease forwards;
    }

    .random-dish-item:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }

    .random-dish-item img {
        width: 50px;
        height: 50px;
        object-fit: cover;
        border-radius: 8px;
    }

    .random-dish-item h4 {
        font-size: 0.9rem;
        margin: 0 0 3px;
        color: #111827;
    }

    .random-dish-item p {
        font-size: 0.75rem;
        margin: 2px 0;
        color: #6b7280;
    }

    .random-total {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 8px;
        flex-wrap: wrap;
        gap: 6px;
    }

    .random-total p {
        margin: 0;
        font-size: 0.95rem;
        color: #dc2626;
        font-weight: 500;
    }

    .random-total .btn {
        background: linear-gradient(135deg, #22C55E, #86EFAC);
        padding: 8px 16px;
        border-radius: 10px;
        color: white;
        border: none;
        font-size: 0.85rem;
        cursor: pointer;
        transition: all 0.2s ease;
        min-height: 40px;
    }

    .random-total .btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    }

    .random-total .btn:disabled {
        background: #d1d5db;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

    /* 随机点餐加载动画 */
    .random-loading {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        display: none;
        justify-content: center;
        align-items: center;
        z-index: 3000;
    }

    .random-loading-content {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        padding: 16px;
        border-radius: 12px;
        text-align: center;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
        animation: bounceIn 0.3s ease;
    }

    .random-loading-spinner {
        width: 36px;
        height: 36px;
        background: url('https://www.xzzsb.xyz/food/food.ico') no-repeat center;
        background-size: cover;
        margin: 0 auto 6px;
        animation: spin 0.7s linear infinite;
    }

    .random-loading-content p {
        font-size: 0.9rem;
        color: #111827;
        margin: 6px 0;
    }

    .random-loading-progress {
        width: 140px;
        height: 6px;
        background: #e5e7eb;
        border-radius: 3px;
        overflow: hidden;
    }

    .random-loading-progress-bar {
        width: 0;
        height: 100%;
        background: linear-gradient(135deg, #6B46C1, #A78BFA);
        transition: width 0.15s ease;
    }

    /* 动画 */
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(6px); }
        to { opacity: 1; transform: translateY(0); }
    }

    @keyframes slideIn {
        from { opacity: 0; transform: translateX(-8px); }
        to { opacity: 1; transform: translateX(0); }
    }

    @keyframes bounceIn {
        0% { transform: scale(0.7); opacity: 0; }
        50% { transform: scale(1.05); opacity: 1; }
        100% { transform: scale(1); }
    }

    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }

    /* 导航栏调整 */
    .nav-btn {
        width: 20%;
        font-size: 0.75rem;
    }

    .nav-btn .icon {
        font-size: 1.1rem;
    }
    

    /* 响应式设计 */
    @media (max-width: 767px) {
        .random-container {
            margin: 0px;
            padding: 20px;
            padding-bottom: 20px;
            margin-bottom: 70px;
        }

        .random-options h3 {
            font-size: 0.95rem;
        }

        .quantity-slider input[type="range"] {
            width: 90%;
        }

        .quantity-slider span {
            font-size: 0.85rem;
        }

        .category-tags {
            grid-template-columns: repeat(3, 1fr);
        }

        .category-tag {
            font-size: 0.7rem;
            padding: 4px 7px;
            min-height: 34px;
        }

        .quick-options {
            grid-template-columns: repeat(3, 1fr);
        }

        .quick-btn {
            padding: 5px 12px;
            font-size: 0.75rem;
            min-height: 36px;
        }

        .generate-btn {
            padding: 8px;
            font-size: 0.85rem;
            min-height: 44px;
        }

        .random-dishes {
            grid-template-columns: repeat(2, 1fr);
        }

        .random-dish-item img {
            width: 48px;
            height: 48px;
        }

        .random-dish-item h4 {
            font-size: 0.85rem;
        }

        .random-dish-item p {
            font-size: 0.7rem;
        }

        .random-total {
            flex-direction: column;
            align-items: stretch;
        }

        .random-total .btn {
            width: 100%;
            padding: 8px;
        }
    }