* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; background: #f5f5f5; color: #333; line-height: 1.7; font-size: 18px; }
a { color: #1a73e8; text-decoration: none; }
a:hover { color: #1557b0; }
img { max-width: 100%; height: auto; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 15px; }

/* Top Bar */
.topbar { background: #1a1a2e; color: #fff; padding: 14px 0; position: sticky; top: 0; z-index: 100; }
.topbar .container { display: flex; align-items: center; gap: 20px; }
.logo { font-size: 26px; font-weight: bold; color: #e94560 !important; }
.topnav { display: flex; gap: 20px; }
.topnav a { color: #ccc; font-size: 17px; }
.topnav a:hover { color: #fff; }
.topright { margin-left: auto; }
.topright a { color: #aaa; font-size: 16px; }

/* Announcement */
.announcement { background: #fff3cd; border: 1px solid #ffc107; border-radius: 6px; padding: 15px; margin: 20px 0; font-size: 16px; color: #856404; line-height: 2; }

/* Promo */
.promo-banner { background: linear-gradient(135deg, #e94560, #ff6b6b); color: #fff; text-align: center; padding: 12px; border-radius: 6px; margin: 15px 0; font-weight: bold; font-size: 19px; animation: pulse 1.5s infinite; }

.scroll-ads { overflow: hidden; background: linear-gradient(90deg, #1a1a2e, #16213e); border-radius: 8px; margin: 20px 0; padding: 14px 0; white-space: nowrap; }
.scroll-track { display: inline-block; animation: scrollAds 80s linear infinite; }
.scroll-track span { display: inline-block; color: #fff; font-size: 17px; font-weight: bold; padding: 0 30px; }
@keyframes scrollAds { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .8; } }

/* Search */
.search-box { background: #fff; padding: 15px; border-radius: 8px; margin: 15px 0; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.search-box form { display: flex; gap: 10px; }
.search-box input { flex: 1; padding: 12px 16px; border: 1px solid #ddd; border-radius: 4px; font-size: 17px; }
.search-box button { padding: 12px 28px; background: #e94560; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 17px; }
.search-box button:hover { background: #d63851; }

.search-result { margin: 15px 0; color: #666; font-size: 17px; }

/* Product Grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; margin: 20px 0; }
.product-card { background: #fff; border-radius: 8px; overflow: hidden; transition: transform .2s, box-shadow .2s; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.product-card a { display: block; color: inherit; }
.product-img { height: 180px; display: flex; align-items: center; justify-content: center; background: #f9f9f9; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.no-img { color: #bbb; font-size: 14px; text-align: center; padding: 20px; }
.product-info { padding: 12px; }
.product-info h3 { font-size: 18px; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price { color: #e94560; font-size: 22px; font-weight: bold; }
.stock { font-size: 14px; color: #999; margin-top: 4px; }
.empty { grid-column: 1/-1; text-align: center; padding: 40px; color: #999; }

/* Product Detail */
.breadcrumb { padding: 15px 0; font-size: 15px; color: #999; }
.breadcrumb a { color: #666; }
.product-detail { display: flex; gap: 30px; background: #fff; border-radius: 8px; padding: 20px; margin: 15px 0; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.detail-left { flex: 0 0 350px; }
.detail-left img { width: 100%; border-radius: 6px; }
.detail-right { flex: 1; }
.detail-right h1 { font-size: 28px; margin-bottom: 15px; }
.detail-meta p { margin-bottom: 10px; font-size: 17px; }
.detail-meta .label { color: #999; display: inline-block; width: 80px; }
.price-lg { color: #e94560; font-size: 28px; font-weight: bold; }
.detail-desc { margin: 20px 0; padding: 15px; background: #f9f9f9; border-radius: 6px; }
.detail-desc h3 { margin-bottom: 10px; font-size: 18px; }
.detail-desc div { font-size: 16px; color: #666; line-height: 1.8; }

/* Buy Form */
.buy-form { margin-top: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 4px; font-size: 17px; color: #666; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 14px; border: 1px solid #ddd; border-radius: 4px; font-size: 17px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #1a73e8; outline: none; }
.total-price-display { font-size: 30px; font-weight: bold; color: #e94560; margin: 10px 0; }
.total-price-display span { display: block; }
.login-to-buy { margin: 20px 0; padding: 20px; background: #f9f9f9; border-radius: 6px; text-align: center; font-size: 18px; color: #666; }
.login-to-buy a { color: #1a73e8; }
.btn-buy { width: 100%; padding: 14px; background: #e94560; color: #fff; border: none; border-radius: 4px; font-size: 19px; cursor: pointer; }
.btn-buy:hover { background: #d63851; }
.contact-info { text-align: center; margin-top: 10px; font-size: 15px; color: #999; }
.contact-info a { color: #1a73e8; }

/* Footer */
.footer { background: #1a1a2e; color: #888; text-align: center; padding: 20px 0; margin-top: 40px; font-size: 16px; }
.footer p { margin: 5px 0; }

/* Ad Banner */
.ad-banner { background: linear-gradient(135deg, #f093fb, #f5576c); color: #fff; text-align: center; padding: 16px 0; font-size: 22px; font-weight: bold; }
.ad-banner p { margin: 0; animation: pulse 1.5s infinite; }

/* Alert - centered popup overlay */
.alert { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 9999; padding: 35px 60px; border-radius: 16px; font-size: 26px; font-weight: bold; text-align: center; animation: alertShow 4s ease forwards; box-shadow: 0 8px 40px rgba(0,0,0,.3); border: none; max-width: 80vw; pointer-events: none; }
@keyframes alertShow { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.8); } 10% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 70% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(.9); } }
.alert-success { background: linear-gradient(135deg, #11998e, #38ef7d); color: #fff; animation: alertShow 4s ease forwards, rainbowBg 3s linear infinite; }
.alert-error { background: linear-gradient(135deg, #e94560, #f093fb); color: #fff; animation: alertShow 4s ease forwards, rainbowBg 3s linear infinite; }
.alert-info { background: linear-gradient(135deg, #1a73e8, #6c5ce7); color: #fff; animation: alertShow 4s ease forwards, rainbowBg 3s linear infinite; }
@keyframes rainbowBg { 0% { filter: hue-rotate(0deg); } 100% { filter: hue-rotate(360deg); } }
.alert-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,.5); z-index: 9998; animation: alertOverlayFade 4s ease forwards; }
@keyframes alertOverlayFade { 0% { opacity: 0; } 10% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }

/* Query */
.query-form { background: #fff; padding: 35px; border-radius: 12px; margin: 0 auto 30px; box-shadow: 0 4px 20px rgba(0,0,0,.12); max-width: 520px; }
.query-form form { max-width: 400px; }
.query-form .form-group { margin-bottom: 18px; }
.query-form .form-group label { font-size: 16px; margin-bottom: 8px; }
.query-form .form-group input { padding: 12px 14px; font-size: 17px; width: 100%; box-sizing: border-box; }
.query-form button { padding: 14px 28px; background: #e94560; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 18px; width: 100%; }
.query-hint { margin-top: 22px; padding-top: 18px; border-top: 1px solid #eee; }
.query-hint p { margin: 6px 0; font-size: 15px; color: #888; }
.order-detail { background: #fff; padding: 25px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,.12); }
.order-detail h3 { margin-bottom: 15px; font-size: 20px; }
.order-detail table { width: 100%; }
.order-detail td { padding: 10px 14px; border-bottom: 1px solid #eee; font-size: 17px; }
.order-detail td:first-child { color: #999; width: 100px; }

/* Admin */
.admin-login-page { background: #1a1a2e; display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { background: #fff; padding: 40px; border-radius: 12px; width: 480px; box-shadow: 0 4px 20px rgba(0,0,0,.2); }
.login-box h2 { text-align: center; margin-bottom: 25px; color: #1a1a2e; font-size: 24px; }
.login-box button { width: 100%; padding: 14px; background: #e94560; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 18px; }
.login-box .form-group { margin-bottom: 20px; }
.login-box .form-group label { font-size: 16px; margin-bottom: 8px; }
.login-box .form-group input { padding: 12px 14px; font-size: 17px; }

.admin-header { background: #1a1a2e; color: #fff; padding: 12px 0; }
.admin-header .container { display: flex; align-items: center; gap: 20px; }
.admin-logo { font-size: 22px; font-weight: bold; color: #e94560 !important; }
.admin-nav { display: flex; gap: 15px; }
.admin-nav a { color: #ccc; font-size: 16px; }
.admin-nav a:hover { color: #fff; }

.admin-body { padding: 20px 0; }
.admin-body h2 { margin-bottom: 20px; color: #1a1a2e; font-size: 26px; }
.admin-body h3 { margin: 20px 0 10px; color: #333; font-size: 20px; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; margin-bottom: 20px; }
.stat-card { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.1); text-align: center; }
.stat-card h3 { font-size: 16px; color: #999; margin: 0 0 8px; }
.stat-card p { font-size: 32px; font-weight: bold; color: #e94560; }

.admin-table { width: 100%; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.1); border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #eee; font-size: 16px; }
.admin-table th { background: #f5f5f5; color: #666; font-weight: 600; }
.admin-table tr:hover td { background: #fafafa; }
.admin-table button { padding: 4px 10px; border: 1px solid #ddd; background: #fff; border-radius: 3px; cursor: pointer; font-size: 12px; }
.admin-table button:hover { background: #f0f0f0; }

.admin-form { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.1); margin-bottom: 20px; }
.form-row { display: flex; gap: 15px; }
.form-row .form-group { flex: 1; }
.admin-form button[type=submit] { padding: 8px 20px; background: #e94560; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.admin-form button[type=submit]:hover { background: #d63851; }

.filter-bar { display: flex; gap: 8px; margin: 15px 0; }
.filter-bar a { padding: 8px 18px; background: #fff; border: 1px solid #ddd; border-radius: 20px; color: #666; font-size: 15px; }
.filter-bar a.active { background: #e94560; color: #fff; border-color: #e94560; }

/* Auth Forms */
.auth-form { max-width: 520px; margin: 30px auto; background: #fff; padding: 40px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,.12); }
.auth-form h2 { text-align: center; margin-bottom: 25px; color: #1a1a2e; font-size: 26px; }
.auth-form .form-group { margin-bottom: 18px; }
.auth-form .form-group label { font-size: 16px; margin-bottom: 8px; }
.auth-form .form-group input { padding: 12px 14px; font-size: 17px; }
.auth-form .btn-buy { margin-top: 15px; padding: 14px; font-size: 20px; }
.auth-link { text-align: center; margin-top: 22px; font-size: 16px; color: #999; }
.auth-link a { color: #1a73e8; }

.auth-features { margin-bottom: 0; }
.auth-features h3 { text-align: center; margin-bottom: 20px; color: #1a1a2e; font-size: 20px; }
.auth-card { max-width: 520px; margin: 30px auto 20px; background: #fff; padding: 25px 40px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,.12); }
.features-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.feature-item { background: #f0f4ff; padding: 14px; border-radius: 8px; font-size: 16px; color: #1a1a2e; text-align: center; }

/* Profile */
.profile-page { max-width: 800px; margin: 20px auto; }
.profile-page h3 { margin: 25px 0 10px; color: #333; font-size: 20px; }

.profile-card { background: #fff; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,.12); padding: 30px; display: flex; align-items: center; gap: 16px; }
.profile-avatar { width: 60px; height: 60px; border-radius: 50%; background: #e94560; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: bold; flex-shrink: 0; }
.profile-meta { flex: 1; }
.profile-meta h2 { margin: 0; font-size: 22px; color: #1a1a2e; }
.profile-meta p { margin: 4px 0 0; font-size: 15px; color: #999; }
.profile-spent { text-align: right; flex-shrink: 0; }
.spent-label { display: block; font-size: 12px; color: #999; }
.total-spent { color: #e94560; font-size: 26px; font-weight: bold; }

.pwd-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 15px; }
.pwd-card { background: #fff; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,.12); padding: 24px; }
.pwd-card h4 { margin: 0 0 16px; font-size: 18px; color: #333; }
.pwd-card h4 small { font-weight: normal; color: #999; font-size: 13px; }
.pwd-card input { width: 100%; padding: 12px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 16px; margin-bottom: 12px; box-sizing: border-box; }
.pwd-card input:focus { border-color: #1a73e8; outline: none; }
.pwd-card button { width: 100%; padding: 12px; background: #e94560; color: #fff; border: none; border-radius: 6px; font-size: 17px; cursor: pointer; }
.pwd-card button:hover { background: #d63851; }

.order-table { width: 100%; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,.12); border-collapse: collapse; margin-top: 15px; }
.order-table th, .order-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid #eee; font-size: 16px; }
.order-table th { background: #f5f5f5; color: #666; font-weight: 600; }

/* Tier Pricing Table */
.tier-table { margin: 20px 0; padding: 15px; background: #f9f9f9; border-radius: 6px; }
.tier-table h3 { font-size: 16px; margin-bottom: 10px; color: #333; }
.tier-table table { width: 100%; border-collapse: collapse; }
.tier-table th, .tier-table td { padding: 10px 12px; text-align: center; border-bottom: 1px solid #eee; font-size: 16px; }
.tier-table th { background: #e94560; color: #fff; font-weight: 600; }
.tier-table tr:hover td { background: #fff; }
.tier-table td:last-child { color: #e94560; font-weight: bold; }

/* Responsive */
@media (max-width: 768px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-detail { flex-direction: column; }
  .detail-left { flex: none; }
  .form-row { flex-direction: column; gap: 0; }
  .topbar .container { flex-wrap: wrap; }
}

/* Pay Page */
.pay-page { max-width: 500px; margin: 20px auto; }
.pay-header { text-align: center; margin-bottom: 20px; }
.pay-header h2 { color: #1a1a2e; margin-bottom: 8px; font-size: 24px; }
.pay-order-no { font-size: 15px; color: #999; }
.pay-info { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.1); margin-bottom: 20px; }
.pay-info table { width: 100%; }
.pay-info td { padding: 10px 0; font-size: 17px; border-bottom: 1px solid #f0f0f0; }
.pay-info td:first-child { color: #999; width: 100px; }
.pay-amount { color: #e94560; font-size: 28px; font-weight: bold; }
.pay-qrcode-box { background: #fff; border-radius: 8px; padding: 30px 20px; box-shadow: 0 1px 3px rgba(0,0,0,.1); text-align: center; margin-bottom: 20px; min-height: 300px; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.pay-loading p { margin-top: 15px; color: #999; font-size: 14px; }
.pay-qrcode-wrap p { margin: 10px 0; font-size: 14px; color: #666; }
.pay-tip { font-size: 17px; color: #333; margin-bottom: 15px !important; }
.pay-timer { font-size: 15px; color: #999; margin-top: 15px !important; }
.pay-error p { color: #e94560; margin-bottom: 15px; }
.pay-status { background: #fff; border-radius: 8px; padding: 30px 20px; box-shadow: 0 1px 3px rgba(0,0,0,.1); text-align: center; margin-bottom: 20px; }
.pay-status p { font-size: 18px; color: #27ae60; }
.pay-actions { text-align: center; }
.btn-link { display: inline-block; padding: 10px 24px; border: 1px solid #ddd; border-radius: 4px; color: #666; font-size: 17px; }
.btn-link:hover { border-color: #e94560; color: #e94560; }
.pay-not-configured { background: #fff; border-radius: 8px; padding: 30px; box-shadow: 0 1px 3px rgba(0,0,0,.1); text-align: center; }
.pay-not-configured p { color: #666; margin: 8px 0; }
.pay-not-configured code { background: #f5f5f5; padding: 2px 6px; border-radius: 3px; font-size: 13px; }
.spinner { width: 36px; height: 36px; border: 3px solid #f0f0f0; border-top-color: #e94560; border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
