/* ============================================
   觅食点餐 H5 - 扁平化白底风格 v3.0
   ============================================ */

:root {
    --primary: #FF6B35;
    --primary-light: #FF8C5A;
    --primary-bg: #FFF4F0;
    --bg: #F5F5F5;
    --bg-white: #FFFFFF;
    --text: #1A1A1A;
    --text-sub: #666666;
    --text-muted: #888888;
    --border: #EEEEEE;
    --radius: 12px;
    --radius-sm: 8px;
    --tab-height: 56px;
    --red: #FF4444;
    --green: #4CAF50;
    --tag-hot: #FF4444;
    /* ── Apple Glassmorphism ── */
    --glass-bg: rgba(255, 255, 255, 0.12);
    --glass-bg-strong: rgba(255, 255, 255, 0.18);
    --glass-border: rgba(255, 255, 255, 0.30);
    --glass-shadow: rgba(0, 0, 0, 0.12);
    --glass-blur: 40px;
    --glass-saturated: 180%;
    --tag-new: #FF6B35;
}

* {
    margin: 0; padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
    background: var(--bg);
    color: var(--text);
    padding-bottom: calc(var(--tab-height) + 60px);
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 14px;
}

/* ============================================
   顶部导航栏
   ============================================ */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-white);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
    cursor: pointer;
}

.location-icon { font-size: 14px; }
.location-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    max-width: 70px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.location-arrow {
    font-size: 10px;
    color: var(--text-sub);
}

.search-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--bg);
    border-radius: 20px;
    padding: 8px 14px;
    border: 1.5px solid transparent;
    transition: border-color 0.2s;
    overflow: hidden;
    min-width: 0;
}

.search-box:focus-within {
    border-color: var(--primary);
    background: var(--bg-white);
}

.search-icon { font-size: 14px; }

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 13px;
    color: var(--text);
    outline: none;
}

.search-box input::placeholder { color: var(--text-muted); }

.top-bar-right .msg-btn {
    font-size: 20px;
    text-decoration: none;
}

/* ============================================
   Banner 轮播
   ============================================ */
.banner-section {
    position: relative;
    margin: 12px 14px;
    border-radius: var(--radius);
    overflow: hidden;
    height: 130px;
}

.banner-slider {
    display: flex;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25,0.8,0.25,1);
}

.banner-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px;
    position: relative;
    overflow: hidden;
}

.banner-content {
    z-index: 1;
}

.banner-tag {
    display: inline-block;
    background: rgba(255,255,255,0.25);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.banner-title {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 4px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.banner-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.9);
}

.banner-emoji {
    font-size: 56px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
    flex-shrink: 0;
}

.banner-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 2;
}

.dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transition: all 0.3s;
    cursor: pointer;
}

.dot.active {
    width: 16px;
    border-radius: 3px;
    background: #fff;
}

/* ============================================
   服务入口宫格
   ============================================ */
.service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    background: var(--bg-white);
    padding: 12px 8px;
    margin: 0 0 8px;
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 4px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}

.service-item:active {
    background: var(--bg);
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.service-name {
    font-size: 12px;
    color: var(--text);
    white-space: nowrap;
}

/* ============================================
   分割线和标题
   ============================================ */
.section-divider {
    height: 8px;
    background: var(--bg);
}

.section-header {
    background: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 10px;
    border-bottom: 1px solid var(--border);
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.dish-count-text {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   主菜单区域：左侧分类 + 右侧菜品
   ============================================ */
.menu-layout {
    display: flex;
    background: var(--bg-white);
    min-height: 60vh;
    position: relative;
}

/* 左侧分类 */
.category-sidebar {
    width: 82px;
    flex-shrink: 0;
    background: #FAFAFA;
    border-right: 1px solid var(--border);
    overflow-y: auto;
    position: sticky;
    top: 57px;
    max-height: calc(100vh - 57px - var(--tab-height));
    -webkit-overflow-scrolling: touch;
}

.category-sidebar::-webkit-scrollbar { display: none; }

.cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 6px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.15s;
    position: relative;
    min-height: 56px;
}

.cat-item .cat-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.cat-item span {
    font-size: 12px;
    color: var(--text-sub);
    text-align: center;
    line-height: 1.3;
    word-break: break-all;
}

.cat-item.active {
    background: var(--bg-white);
    border-left-color: var(--primary);
}

.cat-item.active span {
    color: var(--primary);
    font-weight: 600;
}

/* 右侧菜品面板 */
.dish-panel {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    padding: 0;
}

/* ============================================
   骨架屏
   ============================================ */
#skeleton-list {
    padding: 12px;
}

.skeleton-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.skeleton-row::before {
    content: '';
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    background: linear-gradient(90deg, #F0F0F0 25%, #E0E0E0 50%, #F0F0F0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.3s infinite;
}

.skeleton-row::after {
    content: '';
    flex: 1;
    height: 80px;
    border-radius: var(--radius-sm);
    background: linear-gradient(90deg, #F0F0F0 25%, #E0E0E0 50%, #F0F0F0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.3s infinite;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   菜品列表（横向卡片）
   ============================================ */
.dish-group-title {
    padding: 10px 12px 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-sub);
    background: #FAFAFA;
    border-bottom: 1px solid var(--border);
}

.dish-card {
    display: flex;
    gap: 12px;
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
    position: relative;
    background: var(--bg-white);
    transition: background 0.1s;
}

.dish-card:active {
    background: #FFFAF8;
}

.dish-img {
    flex-shrink: 0;
    width: 88px;
    height: 88px;
    border-radius: var(--radius-sm);
    background: #F5F5F5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    overflow: hidden;
    position: relative;
}

.dish-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.dish-img-fallback {
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    background: var(--primary-bg);
}

.dish-tag {
    position: absolute;
    top: 4px;
    left: 4px;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    color: #fff;
    line-height: 1.4;
}

.dish-tag.hot { background: var(--tag-hot); }
.dish-tag.new { background: var(--tag-new); }
.dish-tag.rec { background: #9B6EF3; }

.dish-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dish-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 4px;
    /* 最多显示2行 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dish-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dish-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.dish-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    color: #FF9900;
}

.dish-sales {
    font-size: 11px;
    color: var(--text-muted);
}

.dish-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dish-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.dish-price {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
}

.dish-price-unit {
    font-size: 12px;
    font-weight: 400;
    color: var(--primary);
}

.dish-price-old {
    font-size: 11px;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* 加减按钮 */
.qty-ctrl {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    transition: transform 0.1s, opacity 0.15s;
    line-height: 1;
    flex-shrink: 0;
}

.qty-btn:active { transform: scale(0.9); }

.btn-minus {
    background: rgba(120, 120, 128, 0.14);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #1D1D1F;
    border: 0.5px solid rgba(120, 120, 128, 0.16);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06),
                inset 0 0.5px 0 rgba(255,255,255,0.5);
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-minus:hover {
    background: rgba(120, 120, 128, 0.2);
}

.btn-plus {
    background: rgba(120, 120, 128, 0.14);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #1D1D1F;
    border: 0.5px solid rgba(120, 120, 128, 0.16);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06),
                inset 0 0.5px 0 rgba(255,255,255,0.5);
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-plus:hover {
    background: rgba(120, 120, 128, 0.22);
}

.btn-only-plus {
    background: #34C759;
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(52,199,89,0.35),
                inset 0 0.5px 0 rgba(255,255,255,0.25);
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    line-height: 1;
}

.btn-only-plus:active { transform: scale(0.9); }

.qty-num {
    font-size: 15px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
    color: var(--text);
}

/* ============================================
   空状态
   ============================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
    gap: 10px;
}

.empty-icon { font-size: 48px; }
.empty-text { font-size: 14px; }

/* ============================================
   购物车底栏
   ============================================ */
.cart-bar {
    position: fixed;
    bottom: var(--tab-height);
    left: 0;
    right: 0;
    background: #2C2C2C;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 10px 16px;
    z-index: 200;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

.cart-bar.visible {
    transform: translateY(0);
}

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

.cart-icon-wrap {
    position: relative;
    font-size: 26px;
    line-height: 1;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

.cart-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cart-total {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.cart-tip {
    font-size: 11px;
    color: #888;
}

.btn-checkout {
    background: #34C759;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    flex-shrink: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    box-shadow: 0 2px 8px rgba(52,199,89,0.3),
                inset 0 0.5px 0 rgba(255,255,255,0.25);
}

.btn-checkout:hover {
    background: #30D158;
    box-shadow: 0 4px 14px rgba(52,199,89,0.4);
}

.btn-checkout:active { transform: scale(0.97); }

/* ============================================
   底部 Tab 导航
   ============================================ */
.tab-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--tab-height);
    background: var(--glass-bg-strong);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturated)) brightness(1.1);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturated)) brightness(1.1);
    display: flex;
    border-top: 1px solid var(--glass-border);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.08);
    z-index: 300;
}

.tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.tab svg {
    width: 24px; height: 24px;
    transition: transform 0.2s ease;
}

.tab.active { color: var(--primary) !important; }

.tab.active svg {
    fill: var(--primary) !important;
    transform: scale(1.08);
}

.tab-icon { font-size: 22px; line-height: 1; }
.tab-label { font-size: 10px; font-weight: 500; }

/* ============================================
   随机抽菜弹窗
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 500;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.wheel-container {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 24px 20px;
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.wheel-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

#wheel-canvas {
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.wheel-start {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 12px 36px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255,107,53,0.35);
    transition: transform 0.1s;
}

.wheel-start:active { transform: scale(0.97); }

.wheel-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: var(--bg);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 14px;
    cursor: pointer;
    color: var(--text-sub);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel-result {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 32px 24px;
    width: 100%;
    max-width: 320px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.result-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.result-title {
    font-size: 14px;
    color: var(--text-sub);
}

.result-dish {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
}

.result-tip {
    font-size: 13px;
    color: var(--primary);
}

.btn-add-cart {
    background: #FF9500;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 11px 28px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    box-shadow: 0 2px 8px rgba(255,149,0,0.3),
                inset 0 0.5px 0 rgba(255,255,255,0.25);
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-add-cart:hover {
    background: #FF9F0A;
    box-shadow: 0 4px 14px rgba(255,149,0,0.4);
}

.btn-add-cart:active { transform: scale(0.97); }

/* ============================================
   Toast 提示
   ============================================ */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%) scale(0.9);
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    white-space: nowrap;
}

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

/* ============================================
   购物车飞入动画小球
   ============================================ */
.fly-ball {
    position: fixed;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    z-index: 9998;
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.5,0,-0.5,1);
    opacity: 1;
}

/* ============================================
   注册/登录页
   ============================================ */
.auth-page {
    min-height: 100vh;
    background: var(--bg-white);
    display: flex;
    flex-direction: column;
    padding: 60px 24px 40px;
}

.auth-logo { font-size: 48px; margin-bottom: 8px; }
.auth-title { font-size: 26px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.auth-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 40px; }

.input-group {
    width: 100%;
    margin-bottom: 16px;
}

.input-group label {
    font-size: 12px;
    color: var(--text-sub);
    margin-bottom: 6px;
    display: block;
}

.input-group input {
    width: 100%;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 13px 14px;
    font-size: 15px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: var(--primary);
    background: var(--bg-white);
}

.input-group input::placeholder { color: var(--text-muted); }

.btn-primary-full {
    width: 100%;
    background: #007AFF;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    box-shadow: 0 2px 8px rgba(0,122,255,0.3),
                inset 0 0.5px 0 rgba(255,255,255,0.25);
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-primary-full:hover {
    background: #0A84FF;
    box-shadow: 0 4px 14px rgba(0,122,255,0.4);
}

.btn-primary-full:active { transform: scale(0.98); }

/* ============================================
   订单页
   ============================================ */
.order-page { background: var(--bg); min-height: 100vh; }

.order-tabs {
    background: var(--bg-white);
    display: flex;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.order-tab {
    flex: 1;
    text-align: center;
    padding: 13px 0;
    font-size: 14px;
    color: var(--text-sub);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.order-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.order-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    margin: 10px 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.order-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 14px 10px;
    border-bottom: 1px solid var(--border);
}

.order-status-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
}

.status-done { background: #E8F5E9; color: #4CAF50; }
.status-pending { background: #FFF3E0; color: #FF9800; }
.status-cancel { background: #FAFAFA; color: #999; }

.order-card-body { padding: 12px 14px; }
.order-dish-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text);
}

.order-dish-icon { font-size: 24px; }
.order-dish-name { flex: 1; }
.order-dish-qty { color: var(--text-muted); }

.order-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 13px;
    border-top: 1px solid var(--border);
}

.order-total-text {
    font-size: 14px;
    color: var(--text);
}

.order-total-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}

.btn-reorder {
    background: rgba(0,122,255,0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #007AFF;
    border: 0.5px solid rgba(0,122,255,0.3);
    border-radius: 8px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-reorder:hover {
    background: rgba(0,122,255,0.14);
    border-color: rgba(0,122,255,0.5);
}

.btn-reorder:active { transform: scale(0.97); }

/* ============================================
   活动页
   ============================================ */
.activity-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    margin: 10px 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    cursor: pointer;
}

.activity-img {
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
}

.activity-body { padding: 14px; }
.activity-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.activity-desc { font-size: 13px; color: var(--text-sub); line-height: 1.5; margin-bottom: 10px; }
.activity-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.activity-time { font-size: 11px; color: var(--text-muted); }
.activity-btn {
    background: rgba(0,122,255,0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #007AFF;
    border: 0.5px solid rgba(0,122,255,0.3);
    border-radius: 8px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.activity-btn:hover {
    background: rgba(0,122,255,0.14);
}

/* ============================================
   个人中心页
   ============================================ */
.profile-page { background: var(--bg); min-height: 100vh; }

.profile-header {
    background: var(--primary);
    padding: 30px 20px 50px;
    position: relative;
}

.profile-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 10px;
    border: 3px solid rgba(255,255,255,0.5);
}

.profile-name {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.profile-sub { font-size: 12px; color: rgba(255,255,255,0.8); }

.profile-stats {
    background: var(--bg-white);
    border-radius: var(--radius);
    margin: -30px 14px 12px;
    padding: 16px;
    display: flex;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

.stat-item {
    flex: 1;
    text-align: center;
    border-right: 1px solid var(--border);
}

.stat-item:last-child { border-right: none; }

.stat-num {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.menu-list {
    background: var(--bg-white);
    border-radius: var(--radius);
    margin: 0 12px 12px;
    overflow: hidden;
}

.menu-list-item {
    display: flex;
    align-items: center;
    padding: 15px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
}

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

.menu-list-icon { font-size: 20px; margin-right: 12px; }
.menu-list-text { flex: 1; font-size: 15px; }
.menu-list-arrow { font-size: 12px; color: var(--text-muted); }

/* ============================================
   消息页
   ============================================ */
.msg-list { background: var(--bg-white); }
.msg-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.msg-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.msg-body { flex: 1; min-width: 0; }
.msg-title { font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.msg-preview {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msg-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.msg-time { font-size: 11px; color: var(--text-muted); }
.msg-badge {
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* ============================================
   通用页面顶栏
   ============================================ */
.page-header {
    background: var(--bg-white);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.back-btn {
    font-size: 20px;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
}

.page-title {
    font-size: 17px;
    font-weight: 700;
    flex: 1;
}

/* ============================================
   Apple macOS Button System
   ============================================ */

/* Base Apple button (frosted glass) */
.btn-apple {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: none;
    -webkit-appearance: none;
    appearance: none;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
}

/* Frosted glass base for non-filled buttons */
.btn-apple.frosted {
    background: rgba(120, 120, 128, 0.12);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    color: var(--apple-label, #1D1D1F);
    border: 0.5px solid rgba(120, 120, 128, 0.18);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06),
                inset 0 0.5px 0 rgba(255,255,255,0.6);
}

.btn-apple.frosted:hover {
    background: rgba(120, 120, 128, 0.18);
}

.btn-apple.frosted:active {
    transform: scale(0.97);
    background: rgba(120, 120, 128, 0.22);
}

/* Apple Blue (Primary) — solid fill */
.btn-apple.blue {
    background: #007AFF;
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(0,122,255,0.3),
                inset 0 0.5px 0 rgba(255,255,255,0.25);
}

.btn-apple.blue:hover {
    background: #0A84FF;
    box-shadow: 0 4px 14px rgba(0,122,255,0.4),
                inset 0 0.5px 0 rgba(255,255,255,0.25);
}

.btn-apple.blue:active {
    transform: scale(0.97);
    background: #0056CC;
}

/* Apple Green (Success) */
.btn-apple.green {
    background: #34C759;
    color: #fff;
    box-shadow: 0 2px 8px rgba(52,199,89,0.3),
                inset 0 0.5px 0 rgba(255,255,255,0.25);
}

.btn-apple.green:hover {
    background: #30D158;
    box-shadow: 0 4px 14px rgba(52,199,89,0.4);
}

.btn-apple.green:active {
    transform: scale(0.97);
    background: #248A3D;
}

/* Apple Red (Danger) */
.btn-apple.red {
    background: #FF3B30;
    color: #fff;
    box-shadow: 0 2px 8px rgba(255,59,48,0.3),
                inset 0 0.5px 0 rgba(255,255,255,0.25);
}

.btn-apple.red:hover {
    background: #FF453A;
    box-shadow: 0 4px 14px rgba(255,59,48,0.4);
}

.btn-apple.red:active {
    transform: scale(0.97);
    background: #D92F20;
}

/* Apple Orange (Warning) */
.btn-apple.orange {
    background: #FF9500;
    color: #fff;
    box-shadow: 0 2px 8px rgba(255,149,0,0.3),
                inset 0 0.5px 0 rgba(255,255,255,0.25);
}

.btn-apple.orange:hover {
    background: #FF9F0A;
    box-shadow: 0 4px 14px rgba(255,149,0,0.4);
}

.btn-apple.orange:active {
    transform: scale(0.97);
    background: #CC7700;
}

/* Outline style */
.btn-apple.outline {
    background: rgba(120, 120, 128, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #007AFF;
    border: 0.5px solid rgba(0,122,255,0.3);
}

.btn-apple.outline:hover {
    background: rgba(0,122,255,0.08);
    border-color: rgba(0,122,255,0.5);
}

.btn-apple.outline:active {
    transform: scale(0.97);
    background: rgba(0,122,255,0.15);
}

/* Pill shape (fully rounded) */
.btn-apple.pill {
    border-radius: 22px;
}

/* Large */
.btn-apple.lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: 10px;
}

/* Small */
.btn-apple.sm {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 6px;
}

/* Full width */
.btn-apple.full {
    width: 100%;
}

/* Disabled */
.btn-apple:disabled,
.btn-apple.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Text button (no background) */
.btn-apple.text {
    background: none;
    color: #007AFF;
    padding: 6px 10px;
}

.btn-apple.text:hover {
    background: rgba(0,122,255,0.1);
}

.btn-apple.text:active {
    background: rgba(0,122,255,0.18);
}

/* Icon button */
.btn-apple.icon {
    padding: 10px;
    border-radius: 8px;
}

.btn-apple.icon.sm {
    padding: 6px;
    border-radius: 6px;
}

/* Gray soft (like macOS sidebar buttons) */
.btn-apple.gray {
    background: rgba(120, 120, 128, 0.16);
    color: #1D1D1F;
    border: 0.5px solid rgba(120, 120, 128, 0.14);
    box-shadow: 0 1px 4px rgba(0,0,0,0.05),
                inset 0 0.5px 0 rgba(255,255,255,0.5);
}

.btn-apple.gray:hover {
    background: rgba(120, 120, 128, 0.22);
}

.btn-apple.gray:active {
    transform: scale(0.97);
    background: rgba(120, 120, 128, 0.28);
}
