* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', Roboto, 'Segoe UI', Tahoma, sans-serif;
    background: #f5f5f5;
}

/* 页面切换 */
.page {
    display: none;
    height: 100vh;
    overflow: hidden;
}

.page.active {
    display: block;
}

/* ========== 就餐人数选择页面（美团风格） ========== */
.people-bg {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C42 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.people-container {
    width: 100%;
    padding: 20px;
    text-align: center;
}

.restaurant-header {
    margin-bottom: 50px;
}

.restaurant-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.restaurant-header h1 {
    color: white;
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 600;
}

.table-name {
    color: rgba(255,255,255,0.9);
    font-size: 16px;
}

.people-card {
    background: white;
    border-radius: 24px;
    padding: 40px 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.people-title {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.people-selector {
    margin-bottom: 40px;
}

.people-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 15px;
}

.people-btn {
    width: 56px;
    height: 56px;
    border-radius: 28px;
    border: none;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.people-btn.minus {
    background: #f0f0f0;
    color: #666;
}

.people-btn.plus {
    background: #FF6B35;
    color: white;
}

.people-btn:active {
    transform: scale(0.95);
}

.people-number {
    font-size: 48px;
    font-weight: bold;
    color: #333;
    min-width: 80px;
}

.people-range {
    color: #999;
    font-size: 14px;
}

.confirm-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #FF6B35, #FF8C42);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.confirm-btn:active {
    transform: scale(0.98);
}

.arrow {
    font-size: 20px;
}

/* ========== 美团风格点餐页面 ========== */
.meituan-header {
    background: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
}

.location-info {
    flex: 1;
}

.restaurant-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.table-info {
    font-size: 12px;
    color: #999;
}

.divider {
    margin: 0 8px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-switch-mini {
    display: flex;
    background: #f5f5f5;
    border-radius: 20px;
    overflow: hidden;
}

.lang-mini-btn {
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-mini-btn.active {
    background: #FF6B35;
    color: white;
}

.cart-icon {
    position: relative;
    cursor: pointer;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #FF6B35;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    min-width: 18px;
    text-align: center;
}

/* 搜索栏 */
.search-bar {
    background: white;
    padding: 8px 16px 12px;
}

.search-input {
    background: #f5f5f5;
    border-radius: 30px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-icon {
    font-size: 16px;
}

.search-input input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
}

.search-input input::placeholder {
    color: #bbb;
}

/* 主体布局 */
.order-main {
    display: flex;
    height: calc(100vh - 120px);
    background: #f5f5f5;
}

.category-sidebar {
    width: 88px;
    background: white;
    overflow-y: auto;
    border-right: 1px solid #f0f0f0;
}

.category-item {
    padding: 16px 8px;
    text-align: center;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    color: #666;
}

.category-item.active {
    color: #FF6B35;
    font-weight: 500;
    background: #fff5f0;
}

.category-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: #FF6B35;
    border-radius: 0 2px 2px 0;
}

.food-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

/* 菜品卡片（美团风格） */
.food-card {
    background: white;
    border-radius: 12px;
    margin-bottom: 12px;
    display: flex;
    padding: 12px;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.food-card:active {
    background: #fafafa;
}

.food-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.food-info {
    flex: 1;
}

.food-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.food-desc {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.food-price {
    font-size: 16px;
    font-weight: 600;
    color: #FF6B35;
}

.food-price small {
    font-size: 12px;
    font-weight: normal;
}

.food-sales {
    font-size: 11px;
    color: #999;
    margin-left: 8px;
}

.food-card-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
}

.add-btn {
    background: #FF6B35;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.add-btn:active {
    transform: scale(0.95);
}

/* 底部购物车栏（美团风格） */
.cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 90;
    cursor: pointer;
    transition: transform 0.3s;
}

.cart-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-icon-large {
    position: relative;
    width: 50px;
    height: 50px;
    background: #FF6B35;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 4px 12px rgba(255,107,53,0.3);
}

.cart-badge-large {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
}

.cart-price-info {
    line-height: 1.3;
}

.cart-total-price {
    font-size: 18px;
    font-weight: bold;
    color: #FF6B35;
}

.cart-tip {
    font-size: 11px;
    color: #999;
}

.cart-bar-right {
    background: #FF6B35;
    color: white;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 购物车侧边栏 */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 375px;
    height: 100%;
    background: white;
    z-index: 201;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    box-shadow: -2px 0 12px rgba(0,0,0,0.15);
}

.cart-sidebar.open {
    right: 0;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    display: none;
}

.overlay.active {
    display: block;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.cart-header h3 {
    font-size: 18px;
    color: #333;
}

.close-cart {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.cart-item-price {
    font-size: 14px;
    color: #FF6B35;
}

.cart-item-spiciness {
    font-size: 11px;
    color: #999;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-item-controls button {
    width: 28px;
    height: 28px;
    border-radius: 14px;
    border: none;
    background: #f5f5f5;
    font-size: 16px;
    cursor: pointer;
}

.cart-item-controls button:active {
    background: #e0e0e0;
}

.cart-footer {
    padding: 16px;
    border-top: 1px solid #f0f0f0;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 500;
}

.cart-total span:last-child {
    color: #FF6B35;
    font-size: 20px;
}

.checkout-btn {
    width: 100%;
    padding: 14px;
    background: #FF6B35;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}

/* 模态框（美团风格） */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 300;
    align-items: flex-end;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 500px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.modal-image {
    position: relative;
}

.modal-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 24px 24px 0 0;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 18px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.modal-info {
    padding: 20px;
}

.modal-info h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.modal-price {
    margin-bottom: 20px;
}

.price-symbol {
    font-size: 14px;
    color: #FF6B35;
}

.modal-price span:last-child {
    font-size: 28px;
    font-weight: bold;
    color: #FF6B35;
}

.modal-option {
    margin-bottom: 20px;
}

.option-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.spiciness-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.spice-btn {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 25px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.spice-btn.active {
    background: #FF6B35;
    color: white;
    border-color: #FF6B35;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 20px;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border-radius: 18px;
    border: 1px solid #e0e0e0;
    background: white;
    font-size: 20px;
    cursor: pointer;
}

.add-to-cart-modal {
    width: 100%;
    padding: 14px;
    background: #FF6B35;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 500;
    margin-top: 20px;
    cursor: pointer;
}

/* 提示消息 */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    z-index: 400;
    white-space: nowrap;
    animation: fadeInOut 2s ease;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    85% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}