* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
body { font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif; background:#f5f5f5; color:#333; font-size:14px; line-height:1.5; overflow-x:hidden; }
a { text-decoration:none; color:inherit; }
img { max-width:100%; display:block; }

/* App Layout */
#app { max-width:480px; margin:0 auto; min-height:100vh; background:#fff; position:relative; padding-bottom:60px; }
.app-header { background:linear-gradient(135deg,#302b63,#24243e); color:#fff; padding:15px 20px; text-align:center; font-size:18px; font-weight:600; position:sticky; top:0; z-index:100; }
.header-title { letter-spacing:2px; }
.page-content { padding-bottom:10px; }

/* Pages */
.page { display:none; padding:0 0 10px; }
.page.active { display:block; }

/* Swiper / Banner */
.swiper-container { position:relative; overflow:hidden; width:100%; height:200px; }
.swiper-wrapper { display:flex; transition:transform .4s ease; height:100%; }
.swiper-slide { min-width:100%; height:100%; }
.swiper-img { width:100%; height:100%; object-fit:cover; }
.swiper-pagination { position:absolute; bottom:10px; left:0; right:0; text-align:center; z-index:10; }
.swiper-pagination span { display:inline-block; width:8px; height:8px; border-radius:50%; background:rgba(255,255,255,.5); margin:0 4px; }
.swiper-pagination span.active { background:#fff; width:20px; border-radius:4px; }

/* Announcement */
.announcement-bar { background:linear-gradient(135deg,#667eea,#764ba2); color:#fff; padding:10px 16px; display:flex; align-items:center; gap:8px; font-size:13px; margin:0 0 10px; }
.ann-icon { font-size:16px; flex-shrink:0; }
.ann-text { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Section */
.section-header { padding:12px 16px 8px; }
.section-header h3 { font-size:16px; color:#302b63; position:relative; padding-left:12px; }
.section-header h3::before { content:''; position:absolute; left:0; top:2px; bottom:2px; width:3px; background:#302b63; border-radius:2px; }

/* Product Grid */
.product-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; padding:0 12px 12px; }
.product-card { background:#fff; border-radius:12px; overflow:hidden; box-shadow:0 2px 12px rgba(0,0,0,.08); transition:transform .2s; cursor:pointer; }
.product-card:active { transform:scale(.97); }
.product-img-wrap { width:100%; padding-top:100%; position:relative; background:#f8f8f8; }
.product-img { position:absolute; top:0; left:0; width:100%; height:100%; object-fit:cover; }
.product-info { padding:10px 12px; }
.product-name { font-size:13px; font-weight:500; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:36px; }
.product-price { color:#e74c3c; font-size:16px; font-weight:700; margin-top:4px; }
.product-price::before { content:'¥'; font-size:12px; }

/* Category Page */
.category-container { display:flex; height:calc(100vh - 160px); }
.category-left { width:90px; background:#f8f8f8; overflow-y:auto; flex-shrink:0; }
.category-item { padding:15px 10px; text-align:center; font-size:13px; color:#666; border-bottom:1px solid #eee; cursor:pointer; transition:all .2s; }
.category-item.active { background:#fff; color:#302b63; font-weight:600; border-left:3px solid #302b63; }
.category-right { flex:1; overflow-y:auto; padding:10px; }
.cat-products { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; }
.cat-product-card { background:#fff; border-radius:10px; overflow:hidden; box-shadow:0 1px 8px rgba(0,0,0,.06); cursor:pointer; }
.cat-product-card:active { opacity:.8; }
.cat-product-img { width:100%; height:130px; object-fit:cover; background:#f0f0f0; }
.cat-product-info { padding:8px 10px; }
.cat-product-name { font-size:12px; font-weight:500; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.cat-product-price { color:#e74c3c; font-size:14px; font-weight:700; margin-top:3px; }
.cat-product-price::before { content:'¥'; font-size:11px; }

/* Players List */
.players-list { padding:10px 12px; }
.player-card { display:flex; align-items:center; gap:12px; padding:12px; background:#fff; border-radius:12px; margin-bottom:10px; box-shadow:0 1px 8px rgba(0,0,0,.06); cursor:pointer; }
.player-card:active { opacity:.8; }
.player-avatar { width:60px; height:60px; border-radius:50%; overflow:hidden; flex-shrink:0; border:2px solid #667eea; }
.player-avatar img { width:100%; height:100%; object-fit:cover; }
.player-info { flex:1; }
.player-name { font-size:16px; font-weight:600; color:#302b63; }
.player-intro { font-size:12px; color:#999; margin-top:3px; }

/* Bottom Nav */
.bottom-nav { position:fixed; bottom:0; left:50%; transform:translateX(-50%); width:100%; max-width:480px; display:flex; background:#fff; border-top:1px solid #eee; z-index:200; padding-bottom:env(safe-area-inset-bottom); }
.nav-item { flex:1; display:flex; flex-direction:column; align-items:center; padding:6px 0 4px; cursor:pointer; color:#999; transition:color .2s; }
.nav-item.active { color:#302b63; }
.nav-icon { font-size:22px; line-height:1; }
.nav-label { font-size:10px; margin-top:2px; }

/* Cart Fab */
.cart-fab { position:fixed; bottom:70px; right:calc(50% - 220px); width:50px; height:50px; background:linear-gradient(135deg,#302b63,#24243e); border-radius:50%; display:flex; align-items:center; justify-content:center; box-shadow:0 4px 15px rgba(48,43,99,.4); cursor:pointer; z-index:150; transition:transform .2s; }
.cart-fab:active { transform:scale(.9); }
.cart-icon { font-size:22px; }
.cart-badge { position:absolute; top:-5px; right:-5px; background:#e74c3c; color:#fff; font-size:11px; min-width:20px; height:20px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-weight:600; }
@media (min-width:480px) { .cart-fab { right:calc(50% - 220px); } }
@media (max-width:480px) { .cart-fab { right:15px; } }

/* Modal */
.modal-overlay { display:none; position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,.5); z-index:300; justify-content:center; align-items:flex-end; }
.modal-overlay.show { display:flex; }
.modal-content { background:#fff; border-radius:20px 20px 0 0; max-height:85vh; overflow-y:auto; width:100%; max-width:480px; padding:20px; animation:slideUp .3s ease; }
@keyframes slideUp { from { transform:translateY(100px); opacity:0; } to { transform:translateY(0); opacity:1; } }
.modal-close { position:absolute; top:15px; right:15px; width:30px; height:30px; background:#f0f0f0; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:14px; cursor:pointer; z-index:10; }
.cart-modal { min-height:300px; }
.checkout-modal { min-height:400px; }

/* Product Detail */
.prod-detail { padding:10px 0; }
.prod-detail-img { width:100%; height:250px; object-fit:cover; border-radius:12px; background:#f0f0f0; margin-bottom:15px; }
.prod-detail-name { font-size:20px; font-weight:700; margin-bottom:8px; }
.prod-detail-price { font-size:24px; color:#e74c3c; font-weight:700; margin-bottom:12px; }
.prod-detail-price::before { content:'¥'; font-size:16px; }
.prod-detail-meta { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:15px; }
.prod-meta-item { background:#f8f8f8; padding:8px 12px; border-radius:8px; font-size:13px; }
.prod-meta-item span:first-child { color:#999; }
.prod-meta-item span:last-child { color:#333; font-weight:500; }
.prod-qty { display:flex; align-items:center; gap:15px; margin-bottom:20px; }
.prod-qty label { font-size:14px; color:#666; }
.qty-control { display:flex; align-items:center; gap:0; border:1px solid #ddd; border-radius:8px; overflow:hidden; }
.qty-btn { width:36px; height:36px; background:#f8f8f8; border:none; font-size:18px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.qty-btn:active { background:#eee; }
.qty-input { width:50px; height:36px; border:none; border-left:1px solid #ddd; border-right:1px solid #ddd; text-align:center; font-size:14px; outline:none; }
.prod-actions { display:flex; gap:10px; }
.prod-btn { flex:1; padding:12px; border:none; border-radius:10px; font-size:15px; font-weight:600; cursor:pointer; transition:opacity .2s; }
.prod-btn:active { opacity:.8; }
.prod-btn-cart { background:linear-gradient(135deg,#667eea,#764ba2); color:#fff; }
.prod-btn-buy { background:linear-gradient(135deg,#e74c3c,#c0392b); color:#fff; }

/* Cart Content */
.cart-empty { text-align:center; padding:50px 20px; color:#999; font-size:14px; }
.cart-item { display:flex; align-items:center; gap:10px; padding:12px 0; border-bottom:1px solid #f0f0f0; }
.cart-check { width:20px; height:20px; accent-color:#302b63; cursor:pointer; }
.cart-item-img { width:60px; height:60px; border-radius:8px; object-fit:cover; background:#f0f0f0; }
.cart-item-info { flex:1; }
.cart-item-name { font-size:13px; font-weight:500; margin-bottom:4px; }
.cart-item-price { font-size:14px; color:#e74c3c; font-weight:600; }
.cart-item-actions { display:flex; align-items:center; gap:8px; }
.cart-qty-btn { width:28px; height:28px; border:1px solid #ddd; border-radius:6px; background:transparent; font-size:14px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.cart-qty-input { width:36px; height:28px; text-align:center; border:1px solid #ddd; border-radius:6px; font-size:13px; outline:none; }
.cart-del-btn { color:#e74c3c; font-size:12px; cursor:pointer; padding:4px 8px; border:none; background:none; }
.cart-footer { display:flex; align-items:center; gap:10px; padding:15px 0 0; border-top:1px solid #eee; margin-top:10px; }
.cart-total { flex:1; font-size:16px; }
.cart-total span { color:#e74c3c; font-weight:700; font-size:18px; }
.cart-total span::before { content:'¥'; font-size:13px; }
.cart-checkout-btn { padding:10px 24px; background:linear-gradient(135deg,#302b63,#24243e); color:#fff; border:none; border-radius:8px; font-size:14px; font-weight:600; cursor:pointer; }

/* Checkout */
.checkout-section { margin-bottom:15px; }
.checkout-section h4 { font-size:14px; color:#302b63; margin-bottom:10px; }
.checkout-summary { background:#f8f8f8; border-radius:8px; padding:12px; }
.checkout-item { display:flex; justify-content:space-between; font-size:13px; padding:5px 0; }
.checkout-total { display:flex; justify-content:space-between; font-size:16px; font-weight:700; color:#e74c3c; padding-top:8px; border-top:1px solid #ddd; margin-top:8px; }

/* Player Select */
.player-select-list { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.player-select-item { padding:8px 16px; border:1px solid #ddd; border-radius:20px; font-size:13px; cursor:pointer; transition:all .2s; }
.player-select-item.selected { border-color:#302b63; background:rgba(48,43,99,.1); color:#302b63; font-weight:600; }
.checkout-btn { width:100%; padding:14px; background:linear-gradient(135deg,#302b63,#24243e); color:#fff; border:none; border-radius:10px; font-size:16px; font-weight:600; cursor:pointer; margin-top:10px; }

/* Mine Page */
.mine-header { background:linear-gradient(135deg,#302b63,#24243e); color:#fff; padding:30px 20px; text-align:center; border-radius:0 0 20px 20px; }
.mine-avatar { width:70px; height:70px; border-radius:50%; border:3px solid rgba(255,255,255,.5); margin:0 auto 10px; overflow:hidden; }
.mine-avatar img { width:100%; height:100%; object-fit:cover; }
.mine-name { font-size:18px; font-weight:600; margin-bottom:4px; }
.mine-group { font-size:12px; background:rgba(255,255,255,.2); display:inline-block; padding:2px 12px; border-radius:10px; }
.mine-balance { padding:15px 20px; display:flex; justify-content:space-between; align-items:center; background:#fff; margin:10px 12px; border-radius:12px; box-shadow:0 1px 8px rgba(0,0,0,.06); }
.mine-balance-label { font-size:13px; color:#999; }
.mine-balance-num { font-size:24px; color:#e74c3c; font-weight:700; }
.mine-menu { padding:0 12px; }
.mine-menu-item { display:flex; align-items:center; gap:12px; padding:14px 16px; background:#fff; border-radius:10px; margin-bottom:8px; box-shadow:0 1px 6px rgba(0,0,0,.04); cursor:pointer; }
.mine-menu-item:active { opacity:.7; }
.mine-menu-icon { font-size:20px; width:30px; text-align:center; }
.mine-menu-text { flex:1; font-size:14px; font-weight:500; }
.mine-menu-arrow { color:#ccc; font-size:12px; }
.mine-recharge { padding:10px 12px; font-size:12px; color:#999; line-height:1.8; }
.mine-recharge a { color:#302b63; }

/* Login / Register */
.auth-container { padding:40px 20px; }
.auth-tabs { display:flex; margin-bottom:30px; border-bottom:2px solid #eee; }
.auth-tab { flex:1; text-align:center; padding:12px; font-size:15px; font-weight:600; cursor:pointer; color:#999; position:relative; }
.auth-tab.active { color:#302b63; }
.auth-tab.active::after { content:''; position:absolute; bottom:-2px; left:0; right:0; height:2px; background:#302b63; }
.auth-form { }
.auth-form .form-group { margin-bottom:15px; }
.auth-form .form-group label { display:block; font-size:13px; color:#666; margin-bottom:5px; }
.auth-form .form-group input,.auth-form .form-group select,.auth-form .form-group textarea { width:100%; padding:12px 15px; border:2px solid #e8e8e8; border-radius:10px; font-size:14px; outline:none; transition:border-color .3s; }
.auth-form .form-group input:focus,.auth-form .form-group select:focus,.auth-form .form-group textarea:focus { border-color:#302b63; }
.auth-form .form-group textarea { resize:vertical; min-height:80px; }
.auth-btn { width:100%; padding:14px; background:linear-gradient(135deg,#302b63,#24243e); color:#fff; border:none; border-radius:10px; font-size:16px; font-weight:600; cursor:pointer; }
.auth-btn:active { opacity:.9; }
.auth-link { text-align:center; margin-top:15px; font-size:13px; color:#999; }
.auth-link a { color:#302b63; font-weight:600; cursor:pointer; }
.contact-select-group { display:flex; gap:8px; }
.contact-select-group select { width:100px; flex-shrink:0; }
.contact-select-group input { flex:1; }

/* Player Detail Modal */
.player-detail { text-align:center; }
.player-detail-avatar { width:100px; height:100px; border-radius:50%; margin:0 auto 15px; overflow:hidden; border:3px solid #667eea; }
.player-detail-avatar img { width:100%; height:100%; object-fit:cover; }
.player-detail-name { font-size:20px; font-weight:700; margin-bottom:6px; }
.player-detail-info { text-align:left; background:#f8f8f8; border-radius:10px; padding:12px 15px; margin-top:12px; }
.player-detail-info p { font-size:13px; color:#666; padding:5px 0; border-bottom:1px solid #eee; }
.player-detail-info p:last-child { border:none; }
.player-detail-info strong { color:#333; }

/* Order Detail */
.order-card { background:#fff; border-radius:10px; padding:15px; margin-bottom:10px; box-shadow:0 1px 6px rgba(0,0,0,.05); }
.order-header { display:flex; justify-content:space-between; margin-bottom:8px; }
.order-no { font-size:12px; color:#999; }
.order-status { font-size:12px; padding:2px 8px; border-radius:10px; font-weight:600; }
.order-status.pending_payment { background:#fff3e0; color:#f57c00; }
.order-status.pending_accept { background:#e3f2fd; color:#1565c0; }
.order-status.completed { background:#e8f5e9; color:#2e7d32; }
.order-status.refunded { background:#fce4ec; color:#c62828; }
.order-status.refunding { background:#f3e5f5; color:#6a1b9a; }
.order-status.pending_review { background:#fff8e1; color:#f9a825; }
.order-status.abnormal { background:#ffebee; color:#b71c1c; }
.order-item-info { display:flex; gap:10px; padding:8px 0; border-bottom:1px solid #f0f0f0; }
.order-item-img { width:50px; height:50px; border-radius:6px; object-fit:cover; }
.order-item-detail { flex:1; }
.order-item-name { font-size:13px; font-weight:500; }
.order-item-meta { font-size:12px; color:#999; margin-top:3px; }
.order-total { text-align:right; font-size:14px; padding-top:8px; }
.order-total span { color:#e74c3c; font-weight:700; }
.order-actions { display:flex; gap:8px; margin-top:10px; }
.order-btn { padding:6px 14px; border:none; border-radius:6px; font-size:12px; cursor:pointer; font-weight:500; }
.order-btn.primary { background:#302b63; color:#fff; }
.order-btn.danger { background:#e74c3c; color:#fff; }
.order-btn.outline { background:transparent; border:1px solid #ddd; color:#666; }

/* Orders Tab */
.orders-tabs { display:flex; overflow-x:auto; gap:0; padding:0; border-bottom:1px solid #eee; }
.orders-tab { flex-shrink:0; padding:10px 14px; font-size:12px; cursor:pointer; color:#999; border-bottom:2px solid transparent; transition:all .2s; white-space:nowrap; }
.orders-tab.active { color:#302b63; border-bottom-color:#302b63; font-weight:600; }

/* Chat */
.chat-container { padding:10px; }
.chat-msg { margin-bottom:10px; display:flex; }
.chat-msg.self { justify-content:flex-end; }
.chat-msg-bubble { max-width:75%; padding:10px 14px; border-radius:12px; font-size:13px; }
.chat-msg.self .chat-msg-bubble { background:#302b63; color:#fff; border-bottom-right-radius:4px; }
.chat-msg.other .chat-msg-bubble { background:#f0f0f0; color:#333; border-bottom-left-radius:4px; }
.chat-time { font-size:10px; color:#999; margin-top:4px; text-align:center; }

/* Rating Stars */
.star-rating { font-size:30px; cursor:pointer; }
.star-rating span { color:#ddd; transition:color .2s; }
.star-rating span.active { color:#ffc107; }

/* Responsive */
@media (max-width:480px) {
    .product-grid { gap:8px; padding:0 8px 8px; }
    .category-left { width:80px; }
}
