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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
}

.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部横幅 */
.banner-bg {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
}

.banner-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 店铺卡片 */
.shop-card {
    background: white;
    margin: -40px 12px 12px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

.shop-header {
    display: flex;
    align-items: center;
    padding: 16px;
}

.shop-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFE4B5, #FFDAB9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #8B4513;
    margin-right: 12px;
}

.shop-info {
    flex: 1;
}

.shop-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.level-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}

.shop-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.shop-desc {
    font-size: 13px;
    color: #999;
}

.shop-qrcode {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #666;
}

.shop-announce {
    padding: 12px 16px;
    background: #fafafa;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #999;
}

.announce-icon {
    font-size: 16px;
}

/* 选项卡 */
.tabs-bar {
    background: white;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    border-bottom: 1px solid #f0f0f0;
}

.tab {
    font-size: 16px;
    font-weight: 600;
    color: #999;
    padding: 8px 16px;
    position: relative;
    cursor: pointer;
}

.tab.active {
    color: #333;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: #333;
    border-radius: 2px;
}

.tabs-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.add-btn {
    background: white;
    border: 1px solid #4CAF50;
    color: #4CAF50;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
}

.search-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #666;
    cursor: pointer;
}

/* 主内容区 */
.main-content {
    flex: 1;
    display: flex;
    padding-bottom: 140px;
}

/* 左侧分类侧边栏 */
.category-sidebar {
    width: 100px;
    background: #f8f8f8;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 280px;
    bottom: 140px;
    overflow-y: auto;
}

.category-item {
    padding: 16px 8px;
    text-align: center;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    background: #f8f8f8;
    border-left: 3px solid transparent;
}

.category-item.active {
    background: white;
    color: #4CAF50;
    border-left-color: #4CAF50;
    font-weight: 600;
}

/* 右侧菜品区域 */
.food-area {
    flex: 1;
    margin-left: 100px;
    padding: 12px;
}

.food-header {
    padding: 8px 0;
    margin-bottom: 8px;
}

.food-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.food-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.food-card {
    background: white;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.food-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.food-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.food-info {
    flex: 1;
    margin-left: 12px;
    min-width: 0;
}

.food-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.food-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 4px;
}

.food-rating i {
    font-size: 12px;
    color: #FFD700;
}

.food-rating span {
    font-size: 12px;
    color: #999;
    margin-left: 4px;
}

.food-sales {
    font-size: 12px;
    color: #999;
}

.food-price {
    font-size: 18px;
    font-weight: 600;
    color: #FF6B6B;
    margin-right: 12px;
}

.add-cart-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #4CAF50;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

/* 底部操作栏 */
.bottom-bar {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    padding: 0 16px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.cart-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    cursor: pointer;
    position: relative;
    font-size: 22px;
    color: #666;
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #FF6B6B;
    color: white;
    font-size: 11px;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.random-btn {
    background: white;
    border: 1px solid #ddd;
    color: #666;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    margin-right: 8px;
}

.invite-btn {
    flex: 1;
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 8px;
}

.order-btn {
    background: #333;
    color: white;
    border: none;
    padding: 10px 28px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.order-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 底部导航栏 */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 20%;
    height: 100%;
    color: #999;
    text-decoration: none;
    font-size: 11px;
    position: relative;
}

.tab-item i {
    font-size: 22px;
    margin-bottom: 4px;
}

.tab-item.active {
    color: #4CAF50;
}

.tab-dot {
    position: absolute;
    top: 2px;
    right: 50%;
    transform: translateX(12px);
    width: 8px;
    height: 8px;
    background: #FF6B6B;
    border-radius: 50%;
}

/* 弹窗样式 */
.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
}

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

.modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 16px 16px 0 0;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    cursor: pointer;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #999;
}

.empty-cart i {
    font-size: 48px;
    margin-bottom: 16px;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item-info h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.cart-item-info p {
    font-size: 14px;
    color: #FF6B6B;
}

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

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: #666;
}

.qty-btn.plus {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

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

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-top: 1px solid #eee;
    background: white;
}

.footer-left {
    font-size: 16px;
}

.total-price {
    font-size: 24px;
    font-weight: 600;
    color: #FF6B6B;
    margin-left: 8px;
}

.confirm-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 36px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* 页面头部 */
.page-header {
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    height: 56px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 99;
}

.page-header h1 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.back-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #666;
    cursor: pointer;
}

.header-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
}

.status-btn {
    background: white;
    border: 1px solid #ddd;
    color: #666;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
}

/* 订单页面 */
.order-tabs {
    display: flex;
    background: white;
    padding: 0 16px;
    border-bottom: 1px solid #f0f0f0;
}

.order-tab {
    flex: 1;
    text-align: center;
    padding: 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    position: relative;
}

.order-tab.active {
    color: #333;
}

.order-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: #333;
    border-radius: 2px;
}

.order-content {
    flex: 1;
    padding: 12px;
    padding-bottom: 100px;
}

.order-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

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

.order-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.order-time {
    font-size: 12px;
    color: #999;
}

.order-status {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
}

.order-status.pending {
    background: #FFF3E0;
    color: #FF9800;
}

.order-status.completed {
    background: #E8F5E9;
    color: #4CAF50;
}

.order-items {
    padding: 12px;
}

.order-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
}

.item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
}

.item-info {
    flex: 1;
}

.item-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.item-price {
    font-size: 14px;
    color: #FF6B6B;
}

.item-qty {
    font-size: 14px;
    color: #999;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fafafa;
}

.order-total {
    font-size: 13px;
    color: #999;
}

.order-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    border: none;
    cursor: pointer;
}

.action-btn.cancel {
    background: #f5f5f5;
    color: #666;
}

.action-btn.confirm {
    background: #4CAF50;
    color: white;
}

/* 发现页面 */
.notice-card {
    background: linear-gradient(135deg, #FFF9C4, #FFF59D);
    margin: 12px;
    padding: 12px 16px;
    border-radius: 12px;
}

.notice-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #8B6914;
}

.notice-icon {
    font-size: 18px;
}

.discover-content {
    flex: 1;
    padding-bottom: 100px;
}

.discover-section {
    background: white;
    margin: 12px;
    border-radius: 12px;
    overflow: hidden;
}

.section-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.section-item:last-child {
    border-bottom: none;
}

.item-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-right: 12px;
}

.item-icon.share {
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    color: #1976D2;
}

.item-icon.bell {
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
    color: #FF9800;
}

.item-icon.message {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    color: #4CAF50;
}

.item-info {
    flex: 1;
}

.item-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.item-info p {
    font-size: 13px;
    color: #999;
}

.arrow-icon {
    font-size: 16px;
    color: #ccc;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #FF6B6B;
    border-radius: 50%;
    margin-right: 12px;
}

/* 冰箱页面 */
.status-tags {
    display: flex;
    background: white;
    padding: 12px 16px;
    gap: 16px;
}

.status-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #999;
}

.status-tag.active {
    color: #4CAF50;
}

.status-tag i {
    font-size: 10px;
}

.search-bar {
    display: flex;
    gap: 12px;
    padding: 12px;
}

.search-input {
    flex: 1;
    height: 44px;
    padding: 0 16px;
    border-radius: 22px;
    border: 1px solid #ddd;
    font-size: 14px;
    background: #f5f5f5;
}

.category-tags {
    display: flex;
    background: white;
    padding: 12px;
    gap: 12px;
    overflow-x: auto;
    white-space: nowrap;
}

.category-tag {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    background: #f5f5f5;
    color: #666;
    cursor: pointer;
}

.category-tag.active {
    background: #4CAF50;
    color: white;
}

.fridge-content {
    flex: 1;
    padding-bottom: 160px;
}

.empty-fridge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: #999;
}

.empty-fridge i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.fridge-bottom {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    display: flex;
    gap: 12px;
    padding: 12px;
    background: white;
    border-top: 1px solid #eee;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.bottom-btn {
    flex: 1;
    padding: 12px;
    border-radius: 25px;
    font-size: 14px;
    border: none;
    cursor: pointer;
}

.bottom-btn.notice {
    background: #f5f5f5;
    color: #666;
}

.bottom-btn.modify {
    background: #FF9800;
    color: white;
}

.bottom-btn.clear {
    background: #4CAF50;
    color: white;
}

/* 个人中心页面 */
.profile-header {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    padding: 32px 16px 16px;
    border-radius: 0 0 24px 24px;
}

.user-card {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.user-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    margin-right: 16px;
}

.user-detail {
    flex: 1;
    color: white;
}

.user-detail h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.user-detail p {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.edit-profile {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
}

.stats-row {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
}

.stat-item {
    flex: 1;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.menu-section {
    margin: 12px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-icon {
    font-size: 20px;
    color: #666;
    margin-right: 12px;
}

.menu-item span:first-of-type {
    flex: 1;
    font-size: 15px;
    color: #333;
}

.menu-badge {
    font-size: 12px;
    color: #FF6B6B;
    margin-right: 8px;
}

/* 响应式适配 */
@media (max-width: 480px) {
    .banner-bg {
        height: 160px;
    }
    
    .shop-card {
        margin: -35px 10px 10px;
    }
    
    .shop-avatar {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }
    
    .shop-name {
        font-size: 16px;
    }
    
    .tabs-bar {
        padding: 0 12px;
        height: 48px;
    }
    
    .tab {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    .add-btn {
        padding: 4px 12px;
        font-size: 12px;
    }
    
    .search-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .category-sidebar {
        width: 85px;
        top: 256px;
        bottom: 120px;
    }
    
    .category-item {
        padding: 12px 4px;
        font-size: 12px;
    }
    
    .food-area {
        margin-left: 85px;
        padding: 8px;
    }
    
    .food-card {
        padding: 10px;
    }
    
    .food-image {
        width: 70px;
        height: 70px;
    }
    
    .food-name {
        font-size: 14px;
    }
    
    .food-price {
        font-size: 16px;
    }
    
    .add-cart-btn {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
    
    .bottom-bar {
        height: 56px;
        padding: 0 12px;
    }
    
    .cart-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .random-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .invite-btn {
        padding: 8px 20px;
        font-size: 13px;
    }
    
    .order-btn {
        padding: 8px 24px;
        font-size: 13px;
    }
    
    .tab-bar {
        height: 56px;
    }
    
    .tab-item i {
        font-size: 20px;
    }
    
    .tab-item span {
        font-size: 10px;
    }
}