/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif; background: #fafafa; color: #171717; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; will-change: transform; }
img[loading="lazy"] { background: #f0f0f0; }

/* Nav */
nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(0,0,0,.06); }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; color: #171717; }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { font-size: 14px; color: #666; transition: color .2s; }
.nav-links a:hover { color: #171717; }
.nav-user { font-size: 14px; color: #171717; font-weight: 500; }
.nav-btn { display: inline-block; padding: 6px 16px; font-size: 14px; font-weight: 500; background: #171717; color: #fff !important; border-radius: 8px; transition: opacity .2s; }
.nav-btn:hover { opacity: .85; }
.nav-btn-sm { display: inline-block; padding: 6px 14px; font-size: 14px; color: #666; border: 1px solid #e5e5e5; border-radius: 8px; transition: all .2s; }
.nav-btn-sm:hover { border-color: #171717; color: #171717; }
.lang-toggle { display: inline-block; padding: 4px 10px; font-size: 12px; font-weight: 600; color: #999; border: 1px solid #e5e5e5; border-radius: 6px; transition: all .2s; letter-spacing: .5px; }
.lang-toggle:hover { border-color: #171717; color: #171717; background: #f5f5f5; }
.nav-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; color: #171717; }

/* Main */
main { max-width: 1100px; margin: 0 auto; padding: 0 24px; min-height: calc(100vh - 200px); }

/* Hero */
.hero { text-align: center; padding: 48px 0 32px; }
.hero h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 8px; }
.hero p { font-size: 15px; color: #666; }
.hero-banner { display: inline-flex; align-items: center; gap: 8px; background: #171717; color: #fff; padding: 6px 20px; border-radius: 999px; font-size: 14px; font-weight: 600; margin-bottom: 20px; }
.sep { opacity: .4; }

/* Search */
.search-wrap { max-width: 480px; margin: 0 auto 24px; }
.search { width: 100%; padding: 12px 16px; font-size: 14px; border: none; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.08); outline: none; transition: box-shadow .2s; }
.search:focus { box-shadow: 0 0 0 2px #171717; }

/* Categories */
.cats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 32px; }
.cat { padding: 6px 16px; font-size: 13px; border: 1px solid #e5e5e5; border-radius: 999px; background: #fff; color: #666; cursor: pointer; transition: all .2s; }
.cat:hover { border-color: #171717; color: #171717; }
.cat.on { background: #171717; color: #fff; border-color: #171717; }

/* Grid & Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-bottom: 48px; }
.card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,.06); transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.08); transform: translateY(-2px); }
.card-img-wrap { width: 100%; aspect-ratio: 16/10; overflow: hidden; background: #f0f0f0; }
.card-img { width: 100%; height: 100%; object-fit: cover; }
.card-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #e8e8e8, #d4d4d4); color: #999; font-size: 24px; font-weight: 600; }
.card-body { padding: 16px; }
.card-title { font-size: 15px; font-weight: 600; color: #171717; margin-bottom: 4px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-desc { font-size: 13px; color: #888; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-footer { display: flex; align-items: center; justify-content: space-between; }
.price { font-size: 18px; font-weight: 600; color: #171717; }

/* Buttons */
.btn { display: inline-block; padding: 10px 24px; font-size: 14px; font-weight: 500; border: none; border-radius: 10px; cursor: pointer; transition: opacity .2s; text-align: center; }
.btn-primary { background: #171717; color: #fff !important; border: 1px solid #333; }
.btn-primary:hover { opacity: .85; }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 8px; }
.btn-buy { width: 100%; padding: 14px 24px; font-size: 16px; font-weight: 600; }
.btn-full { width: 100%; }

/* Product Page */
.product-page { padding: 24px 0 48px; }
.product-back { margin-bottom: 24px; }
.product-back a { font-size: 14px; color: #666; transition: color .2s; }
.product-back a:hover { color: #171717; }
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.product-image { border-radius: 16px; overflow: hidden; background: #f0f0f0; }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-img-placeholder { width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #e8e8e8, #d4d4d4); color: #999; font-size: 36px; font-weight: 600; }
.product-info { display: flex; flex-direction: column; }
.product-title { font-size: 24px; font-weight: 700; letter-spacing: -0.3px; margin-bottom: 8px; }
.product-category { display: inline-block; padding: 4px 12px; font-size: 12px; background: #f0f0f0; color: #666; border-radius: 6px; margin-bottom: 20px; width: fit-content; }
.product-price-box { display: flex; align-items: baseline; gap: 8px; margin-bottom: 24px; }
.product-price { font-size: 28px; font-weight: 700; color: #171717; }
.product-desc { margin-bottom: 24px; }
.product-desc h3 { font-size: 14px; font-weight: 600; color: #666; margin-bottom: 8px; }
.product-desc p { font-size: 14px; color: #424242; line-height: 1.7; }
.product-actions { margin-bottom: 20px; }
.product-meta { padding: 16px; background: #f9f9f9; border-radius: 10px; }
.product-meta p { font-size: 13px; color: #888; }

/* New User Discount */
.product-price-original { font-size: 18px; color: #999; text-decoration: line-through; margin-right: 8px; }
.product-price-discount { color: #16a34a; font-size: 32px; }
.new-badge { display: inline-block; background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 6px; margin-left: 12px; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .8; } }
.new-user-tip { color: #16a34a; font-weight: 500; margin-top: 8px; }

/* Card Price Discount */
.price-wrap { display: flex; align-items: center; gap: 6px; }
.price-original { font-size: 14px; color: #999; text-decoration: line-through; }
.price-discount { font-size: 20px; font-weight: 600; color: #16a34a; }
.new-badge-sm { display: inline-block; background: #16a34a; color: #fff; font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 4px; }

/* Cloud Type Badge */
.cloud-badge { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 22px; border-radius: 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.3px; margin-top: 10px; margin-bottom: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cloud-quark { background: #2563eb; color: #fbbf24; }
.cloud-baidu { background: #2563eb; color: #fbbf24; }
.cloud-aliyun { background: #2563eb; color: #fbbf24; }
.cloud-123pan { background: #2563eb; color: #fbbf24; }
.cloud-xunlei { background: #2563eb; color: #fbbf24; }
.cloud-lanzou { background: #2563eb; color: #fbbf24; }
.cloud-guangya { background: #2563eb; color: #fbbf24; }
.cloud-115pan { background: #2563eb; color: #fbbf24; }

/* Cloud badges - International */
.cloud-mega { background: #ffe8e8; color: #d9232e; }
.cloud-gdrive { background: #e8f5e9; color: #1a73e8; }
.cloud-dropbox { background: #e3f2fd; color: #0061ff; }
.cloud-onedrive { background: #e8f4fd; color: #0078d4; }
.cloud-pcloud { background: #f3e8ff; color: #6b21a8; }
.cloud-mediafire { background: #fce4ec; color: #c62828; }
.cloud-wetransfer { background: #fff3e0; color: #e65100; }
.cloud-box { background: #e3f2fd; color: #0061d5; }
.cloud-weiyun { background: #e8f4fd; color: #1a73e8; }
.cloud-ctfile { background: #fff7e6; color: #ff6a00; }
.cloud-other { background: #2563eb; color: #fbbf24; }

/* Order Status */
.order-status { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 6px; }
.status-pending { background: #fff3cd; color: #856404; }
.status-paid { background: #d4edda; color: #155724; }
.status-failed { background: #f8d7da; color: #721c24; }

/* Reviews */
.reviews-section { margin-top: 48px; padding: 32px 20px 0; border-top: 1px solid #e5e5e5; }
.reviews-title { font-size: 20px; font-weight: 600; color: #171717; margin-bottom: 24px; }
.review-form { background: #f9f9f9; padding: 24px; border-radius: 12px; margin-bottom: 32px; }
.review-form h3 { font-size: 16px; font-weight: 600; color: #171717; margin-bottom: 16px; }
.rating-input { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.rating-input label { font-size: 14px; font-weight: 500; color: #171717; }
.rating-input select { padding: 8px 12px; font-size: 14px; border: none; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.review-textarea { width: 100%; min-height: 100px; padding: 12px; font-size: 14px; font-family: inherit; border: none; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.08); resize: vertical; margin-bottom: 16px; }
.review-login-tip { padding: 16px; text-align: center; color: #666; font-size: 14px; background: #f9f9f9; border-radius: 8px; margin-bottom: 24px; }
.review-login-tip a { color: #171717; font-weight: 500; }
.reviews-list { display: flex; flex-direction: column; gap: 16px; }
.review-item { padding: 20px; background: #fff; border: 1px solid #e5e5e5; border-radius: 12px; }
.review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.review-user { font-size: 14px; font-weight: 600; color: #171717; }
.review-rating { font-size: 14px; }
.review-date { font-size: 12px; color: #999; margin-left: auto; }
.review-content { font-size: 14px; color: #424242; line-height: 1.6; }
.no-reviews { text-align: center; color: #999; padding: 32px; }

/* Auth Pages */
.auth-page { max-width: 400px; margin: 64px auto; }
.auth-card { background: #fff; border-radius: 16px; padding: 40px 32px; box-shadow: 0 0 0 1px rgba(0,0,0,.06); }
.auth-card h1 { font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 8px; }
.auth-sub { font-size: 14px; color: #888; text-align: center; margin-bottom: 32px; }
.auth-form .form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: #666; margin-bottom: 6px; }
.form-group input { width: 100%; padding: 12px 14px; font-size: 14px; border: none; border-radius: 10px; background: #f5f5f5; outline: none; transition: box-shadow .2s; }
.form-group input:focus { box-shadow: 0 0 0 2px #171717; background: #fff; }
.auth-switch { text-align: center; margin-top: 24px; font-size: 14px; color: #888; }
.auth-switch a { color: #171717; font-weight: 500; }
.auth-form .btn-primary { background: #171717; color: #ffffff; font-size: 16px; padding: 14px; }

/* Payment Page */
.payment-page { max-width: 480px; margin: 48px auto; }
.payment-card { background: #fff; border-radius: 16px; padding: 40px 32px; box-shadow: 0 0 0 1px rgba(0,0,0,.06); text-align: center; }
.payment-card h1 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.payment-hint { font-size: 14px; color: #888; margin-bottom: 24px; }
.payment-icon { width: 200px; height: 200px; margin: 0 auto 24px; display: flex; align-items: center; justify-content: center; background: #f5f5f5; border-radius: 12px; overflow: hidden; }
.payment-icon img { width: 100%; height: 100%; object-fit: contain; }
.payment-spinner { width: 40px; height: 40px; border: 3px solid #e5e5e5; border-top-color: #171717; border-radius: 50%; animation: spin .8s linear infinite; margin: 24px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.payment-note { font-size: 13px; color: #888; line-height: 1.6; }

/* Orders Page */
.orders-page { padding: 24px 0 48px; }
.page-header { margin-bottom: 32px; }
.page-header h1 { font-size: 24px; font-weight: 700; }
.orders-list { display: flex; flex-direction: column; gap: 16px; }
.order-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 0 0 1px rgba(0,0,0,.06); }
.order-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.order-no { font-size: 13px; color: #888; }
.order-body { display: flex; align-items: center; gap: 16px; }
.order-thumb { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: #f0f0f0; }
.order-thumb-placeholder { width: 64px; height: 64px; border-radius: 8px; background: #e8e8e8; display: flex; align-items: center; justify-content: center; color: #999; font-size: 14px; font-weight: 600; }
.order-product { flex: 1; }
.order-product-name { font-size: 15px; font-weight: 600; color: #171717; margin-bottom: 4px; }
.order-amount { font-size: 14px; color: #888; }
.order-date { font-size: 12px; color: #999; }
.order-download { margin-top: 12px; padding-top: 12px; border-top: 1px solid #f0f0f0; }
.order-download a { font-size: 14px; font-weight: 500; color: #16a34a; }
.download-link { display: block; padding: 8px 16px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; font-size: 13px; color: #16a34a; font-weight: 500; word-break: break-all; overflow-wrap: break-word; }
.download-hint { font-size: 13px; color: #888; margin-top: 4px; }
.order-pending { text-align: center; padding: 16px; color: #888; font-size: 14px; }
.order-failed { padding: 16px; background: #fff5f5; border-radius: 8px; text-align: center; }
.order-failed p { color: #721c24; font-size: 14px; margin-bottom: 12px; }
.empty-state { text-align: center; padding: 64px 0; color: #999; }
.empty-state p { font-size: 15px; margin-bottom: 16px; }
.no-results { grid-column: 1 / -1; text-align: center; padding: 64px 0; color: #999; }

/* Flash Messages */
.flash-container { margin: 16px 0; }
.flash { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 8px; }
.flash-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.flash-error { background: #fff5f5; color: #dc2626; border: 1px solid #fecaca; }

.update-banner { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); background: rgba(255,255,255,.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(0,0,0,.08); border-radius: 12px; padding: 10px 12px; display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 500; color: #171717; box-shadow: 0 10px 24px rgba(0,0,0,.08); z-index: 150; cursor: pointer; animation: updateSlideDown .2s ease; }
.update-banner[hidden] { display: none !important; }
.update-banner:hover { box-shadow: 0 14px 32px rgba(0,0,0,.10); }
.update-banner:focus { outline: none; box-shadow: 0 0 0 2px #171717, 0 14px 32px rgba(0,0,0,.10); }
.update-banner__action { margin-left: 2px; padding: 6px 10px; background: #171717; color: #fff; border-radius: 10px; font-size: 13px; font-weight: 600; }
@keyframes updateSlideDown { from { opacity: 0; transform: translateX(-50%) translateY(-8px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* Error Page */
.error-page { text-align: center; padding: 96px 0; }
.error-page h1 { font-size: 64px; font-weight: 700; color: #e5e5e5; margin-bottom: 12px; }
.error-page p { font-size: 16px; color: #888; margin-bottom: 24px; }

/* Footer */
footer { text-align: center; padding: 32px 24px; border-top: 1px solid rgba(0,0,0,.06); margin-top: 48px; }
footer p { font-size: 13px; color: #999; margin-bottom: 4px; }
.footer-links a { color: #999; transition: color .2s; }
.footer-links a:hover { color: #171717; }


/* Proxy Download Service */
.proxy-service {
    margin-top: 24px;
    padding: 14px 16px;
    border-left: 3px solid #e5e5e5;
    font-size: 13px;
    line-height: 1.6;
}
.proxy-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #171717;
    margin-bottom: 6px;
}
.proxy-header svg { display: none; }
.proxy-desc {
    color: #888;
    margin: 0 0 10px;
}
.proxy-contact {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}
.proxy-contact svg { display: none; }

.proxy-note {
    color: #aaa;
    font-size: 12px;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; background: #fff; padding: 16px 24px; gap: 12px; border-bottom: 1px solid rgba(0,0,0,.06); box-shadow: 0 4px 12px rgba(0,0,0,.06); }
    .nav-toggle { display: block; }
    .hero h1 { font-size: 22px; }
    .hero p { font-size: 14px; }
    .update-banner { top: 64px; width: calc(100% - 24px); justify-content: space-between; }
    .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-detail { grid-template-columns: 1fr; gap: 24px; }
    .product-image { max-height: 300px; }
    .card-body { padding: 12px; }
    .card-title { font-size: 14px; }
    .price { font-size: 16px; }
    .auth-card { padding: 32px 20px; }
    .payment-card { padding: 32px 20px; }
    /* Orders Page Responsive */
    .orders-page { padding: 16px 0 32px; }
    .page-header { margin-bottom: 24px; }
    .page-header h1 { font-size: 20px; }
    .page-header p { font-size: 14px; color: #888; }
    .order-card { padding: 16px; border-radius: 10px; }
    .order-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .order-header > div { width: 100%; display: flex; justify-content: space-between; align-items: center; }
    .order-body { flex-direction: column; align-items: flex-start; gap: 12px; }
    .order-thumb { width: 48px; height: 48px; }
    .order-thumb-placeholder { width: 48px; height: 48px; font-size: 12px; }
    .order-product { width: 100%; }
    .order-product-name { font-size: 14px; }
    .order-download { width: 100%; }
    .download-link { width: 100%; word-break: break-all; display: block; text-align: center; }
    .order-pending, .order-failed { padding: 12px; }
}
@media (max-width: 480px) {
    .grid { grid-template-columns: 1fr; }
    .hero-banner { font-size: 12px; padding: 5px 14px; }
}
