/* =============================================
   虚拟资料赚钱机 - Main Stylesheet v2.0
   Zibll Design Language
   ============================================= */

/* === Design Tokens === */
:root {
  --theme-color: #f04494;
  --focus-color: var(--theme-color);
  --focus-shadow: rgba(253, 83, 161, 0.4);
  --key-color: #333;
  --main-color: #4e5358;
  --muted-color: #777;
  --muted-2-color: #999;
  --muted-3-color: #b1b1b1;
  --muted-4-color: #d2d2d2;
  --body-bg: #f5f6f7;
  --main-bg: #fff;
  --muted-bg: #eee;
  --border-color: rgba(50, 50, 50, 0.06);
  --muted-border: rgba(0, 0, 0, 0.03);
  --radius: 8px;
  --radius-sm: 4px;
  --max-width: 1200px;
  --blur-bg: rgba(255, 255, 255, 0.8);
  --shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  --header-bg: var(--blur-bg);
  --header-color: var(--main-color);
  --footer-bg: var(--main-bg);
  --footer-color: var(--muted-2-color);
  --jb-blue-0: rgba(74, 108, 247, 0.08);
  --jb-blue-1: #4a6cf7;
  --jb-red-0: rgba(240, 68, 148, 0.08);
  --jb-red-1: #f04494;
  --jb-green-0: rgba(39, 174, 96, 0.08);
  --jb-green-1: #27ae60;
  --jb-yellow-0: rgba(243, 156, 18, 0.08);
  --jb-yellow-1: #f39c12;
  --jb-purple-0: rgba(142, 68, 173, 0.08);
  --jb-purple-1: #8e44ad;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--main-color);
  background: var(--body-bg);
}
a { color: var(--main-color); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--focus-color); }
img { max-width: 100%; height: auto; }
ul { padding: 0; margin: 0; list-style: none; }

/* === Utility === */
.flex { display: flex; }
.ac { align-items: center; }
.jc { justify-content: center; }
.jsb { justify-content: space-between; }
.flex1 { flex: 1; }
.relative { position: relative; }
.absolute { position: absolute; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.hidden { display: none !important; }
.visible-xs-block { display: none; }
.hidden-xs { display: block; }
.mt4 { margin-top: 4px; }
.mt6 { margin-top: 6px; }
.mt10 { margin-top: 10px; }
.mt20 { margin-top: 20px; }
.mt30 { margin-top: 30px; }
.mb6 { margin-bottom: 6px; }
.mb10 { margin-bottom: 10px; }
.mb20 { margin-bottom: 20px; }
.ml4 { margin-left: 4px; }
.ml6 { margin-left: 6px; }
.ml10 { margin-left: 10px; }
.ml20 { margin-left: 20px; }
.mr4 { margin-right: 4px; }
.mr6 { margin-right: 6px; }
.mr10 { margin-right: 10px; }
.mr20 { margin-right: 20px; }
.p10 { padding: 10px; }
.p20 { padding: 20px; }
.em09 { font-size: 0.9em; }
.em12 { font-size: 1.2em; }
.em14 { font-size: 1.4em; }
.em18 { font-size: 1.8em; }
.em2x { font-size: 2em; }
.em3x { font-size: 3em; }
.fit-cover { width: 100%; height: 100%; object-fit: cover; }
.radius { border-radius: 100px; }
.radius8 { border-radius: var(--radius); }
.scroll-y { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.muted-color { color: var(--muted-color); }
.muted-2-color { color: var(--muted-2-color); }
.muted-3-color { color: var(--muted-3-color); }
.muted-4-color { color: var(--muted-4-color); }

/* === Container === */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 15px; }
.container-fluid { width: 100%; padding: 0 15px; }
.container-header { max-width: var(--max-width); margin: 0 auto; }
.row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-9,
.col-sm-6, .col-sm-12, .col-xs-12 { padding: 0 15px; box-sizing: border-box; }
.col-md-3 { width: 25%; }
.col-md-4 { width: 33.3333%; }
.col-md-5 { width: 41.6667%; }
.col-md-6 { width: 50%; }
.col-md-7 { width: 58.3333%; }
.col-md-9 { width: 75%; }
.col-sm-6 { width: 50%; }
.col-sm-12, .col-xs-12 { width: 100%; }

/* === Header === */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}
.navbar { margin-bottom: 0; }
.navbar-header { display: flex; align-items: center; justify-content: space-between; }
.navbar-brand { padding: 15px 0; }
.navbar-logo { display: flex; align-items: center; }
.navbar-logo img { max-height: 36px; }
.logo-text { font-size: 20px; font-weight: 700; color: var(--key-color); letter-spacing: -0.5px; }
.navbar-toggle {
  display: none; background: none; border: none; padding: 15px; cursor: pointer;
  font-size: 18px; color: var(--main-color);
}
.collapse { display: flex; align-items: center; flex: 1; }
.navbar-nav { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.navbar-nav > li { position: relative; }
.navbar-nav > li > a {
  display: block; padding: 10px 14px; color: var(--main-color);
  border-radius: var(--radius); font-size: 14px; transition: all 0.2s;
}
.navbar-nav > li > a:hover,
.navbar-nav > li.current-menu-item > a,
.navbar-nav > li.current_page_item > a { background: var(--jb-blue-0); color: var(--jb-blue-1); }
.navbar-nav .sub-menu {
  display: none; position: absolute; top: 100%; left: 0;
  background: var(--main-bg); border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12); min-width: 180px;
  padding: 8px 0; z-index: 99;
}
.navbar-nav li:hover > .sub-menu { display: block; }
.navbar-nav .sub-menu a {
  display: block; padding: 8px 20px; color: var(--main-color); font-size: 13px;
}
.navbar-nav .sub-menu a:hover { background: var(--jb-blue-0); color: var(--jb-blue-1); }

/* === Navbar Form === */
.navbar-form { display: flex; align-items: center; margin-left: auto; }
.navbar-right { margin-left: auto !important; }
.list-inline { display: flex; align-items: center; gap: 4px; padding: 0; margin: 0; list-style: none; }
.splitters > li { position: relative; }

/* === User Dropdown === */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 12px; border: none; border-radius: var(--radius);
  font-size: 14px; cursor: pointer; transition: all 0.2s; background: transparent; color: var(--main-color);
}
.btn:hover { background: var(--jb-blue-0); color: var(--jb-blue-1); }
.avatar-img { display: inline-block; border-radius: 50%; overflow: hidden; background: var(--muted-bg); }
.avatar-img img { display: block; }
.sub-menu {
  display: none; position: absolute; top: 100%; right: 0; left: auto;
  background: var(--main-bg); border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12); min-width: 220px; padding: 15px; z-index: 99;
}
.user-dropdown-toggle + .sub-menu { display: none; }
.user-dropdown-toggle:hover + .sub-menu,
.user-dropdown-toggle + .sub-menu:hover { display: block; }
.sub-user-box .user-avatar { text-align: center; }
.sub-user-box .user-avatar img { border-radius: 50%; width: 60px; height: 60px; }

/* === Mobile Header === */
.mobile-header { display: none; }
.mobile-navbar {
  position: fixed; top: 0; bottom: 0; width: 280px; background: var(--main-bg);
  z-index: 110; padding: 20px; box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  transform: translateX(-100%); transition: transform 0.3s;
}
.mobile-navbar-show .mobile-navbar { transform: translateX(0); }
.fixed-body {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.4); z-index: 105; display: none;
}
.mobile-navbar-show .fixed-body { display: block; }
.mobile-menus li { border-bottom: 1px solid var(--border-color); }
.mobile-menus li a { display: block; padding: 12px 0; font-size: 15px; }
.mobile-menus .sub-menu { display: none; padding-left: 16px; }

/* === Buttons === */
.but {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 20px; border: none; border-radius: var(--radius);
  font-size: 14px; cursor: pointer; transition: all 0.3s;
  background: var(--muted-bg); color: var(--main-color); text-decoration: none;
}
.but:hover { opacity: 0.85; color: #fff; }
.btn-block { width: 100%; display: flex; text-align: center; }
.padding-lg { padding: 12px 28px; }
.padding-sm { padding: 6px 14px; }

/* Gradient Buttons */
.jb-blue {
  background: linear-gradient(135deg, #4a6cf7, #6366f1);
  color: #fff;
}
.jb-red {
  background: linear-gradient(135deg, #f04494, #e74c3c);
  color: #fff;
}
.jb-green {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: #fff;
}
.jb-yellow {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #fff;
}
.jb-purple {
  background: linear-gradient(135deg, #8e44ad, #9b59b6);
  color: #fff;
}
.but-primary {
  background: var(--jb-blue-1); color: #fff;
}

/* === Sign Modal === */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 200; }
.modal.fade .modal-dialog { transform: scale(0.9); transition: transform 0.3s; }
.modal.fade.in .modal-dialog { transform: scale(1); }
.modal.in { display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.5); }
.modal-dialog { width: 380px; max-width: 92%; margin: 0 auto; position: relative; }
.modal-content { background: var(--main-bg); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.modal-header { padding: 15px 20px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: flex-end; }
.modal-body { padding: 20px; }
.close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--muted-2-color); padding: 4px; }
.close:hover { color: var(--main-color); }
.modal-backdrop { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.3); z-index: 199; }

.sign-content { position: relative; }
.sign.zib-widget { padding: 30px; border-radius: var(--radius); }
.sign .close { position: absolute; top: 14px; right: 18px; z-index: 2; }
.sign-nav { display: flex; justify-content: center; gap: 20px; margin: 0 0 20px; }
.sign-nav li a {
  font-size: 16px; font-weight: 600; color: var(--muted-3-color); padding: 8px 0;
  border-bottom: 2px solid transparent; transition: all 0.3s;
}
.sign-nav li.active a, .sign-nav li a:hover { color: var(--jb-blue-1); border-bottom-color: var(--jb-blue-1); }
.blur-bg { background: var(--blur-bg); backdrop-filter: blur(10px); }

/* === Line Form === */
.line-form { position: relative; }
.line-form-input {
  width: 100%; padding: 14px 0 6px; border: none; border-bottom: 1px solid var(--muted-4-color);
  background: transparent; font-size: 15px; color: var(--key-color); outline: none; transition: border-color 0.3s;
}
.line-form-input:focus { border-bottom-color: var(--jb-blue-1); }
.line-form-line {
  position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
  background: var(--jb-blue-1); transition: width 0.3s;
}
.line-form-input:focus ~ .line-form-line { width: 100%; }
.scale-placeholder {
  position: absolute; top: 12px; left: 0; font-size: 15px; color: var(--muted-3-color);
  transition: all 0.3s; pointer-events: none;
}
.line-form-input:focus ~ .scale-placeholder,
.line-form-input:not(:placeholder-shown) ~ .scale-placeholder {
  top: -4px; font-size: 12px; color: var(--jb-blue-1);
}

/* === Tab === */
.tab-content > .tab-pane { display: none; }
.tab-content > .active.in { display: block; }
.fade { transition: opacity 0.15s; opacity: 0; }
.fade.in { opacity: 1; }

/* === Search Modal === */
#u_search .modal-dialog { width: 500px; }
#u_search .input-group { display: flex; }
#u_search .form-control {
  flex: 1; padding: 12px 16px; border: 2px solid var(--jb-blue-1); border-radius: var(--radius) 0 0 var(--radius);
  font-size: 15px; outline: none;
}
#u_search .input-group-btn .btn {
  padding: 12px 24px; border-radius: 0 var(--radius) var(--radius) 0; font-size: 15px;
}

/* === Zib Widget (Card) === */
.zib-widget {
  background: var(--main-bg); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px;
}
.widget { margin-bottom: 20px; }
.widget-title {
  font-size: 16px; font-weight: 600; color: var(--key-color);
  margin: 0 0 16px; padding-bottom: 10px; border-bottom: 2px solid var(--border-color);
}
.widget-title span { border-bottom: 2px solid var(--jb-blue-1); padding-bottom: 10px; }

/* === Product Card === */
.product-card {
  background: var(--main-bg); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform 0.3s, box-shadow 0.3s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,0.1); }
.product-card-link { display: block; color: inherit; }
.product-card-link:hover { color: inherit; }
.product-card-img {
  position: relative; height: 200px; overflow: hidden; background: var(--muted-bg);
}
.product-card-img img { transition: transform 0.4s; }
.product-card:hover .product-card-img img { transform: scale(1.05); }
.img-badge {
  position: absolute; bottom: 10px; left: 10px; display: inline-block;
  padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 500; color: #fff;
  background: rgba(0,0,0,0.5);
}
.img-badge.hot { background: linear-gradient(135deg, #f04494, #fd7e14); }
.no-thumb { display: flex; align-items: center; justify-content: center; }
.product-card-body { padding: 14px 16px; }
.product-card-title {
  font-size: 15px; font-weight: 600; color: var(--key-color);
  margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.4; min-height: 40px;
}
.product-card-meta { }
.product-card-meta .price {
  font-size: 18px; font-weight: 700; color: var(--jb-red-1);
}
.product-card-meta .free { color: var(--jb-green-1); font-weight: 600; font-size: 15px; }

/* === Shop Header === */
.shop-header { padding: 20px 0; }
.section-title {
  font-size: 24px; font-weight: 700; color: var(--key-color);
  margin: 0 0 8px; position: relative;
}

/* === Category List === */
.ds-cat-list { }
.ds-cat-list li { border-bottom: 1px solid var(--border-color); }
.ds-cat-list li:last-child { border-bottom: none; }
.ds-cat-list a {
  display: flex; justify-content: space-between; padding: 10px 4px; color: var(--main-color); font-size: 14px; transition: color 0.2s;
}
.ds-cat-list li.active a, .ds-cat-list a:hover { color: var(--jb-blue-1); }
.ds-cat-list span { color: var(--muted-3-color); }

/* === Single Product === */
.article { }
.article-title {
  font-size: 22px; font-weight: 700; color: var(--key-color); line-height: 1.4; margin: 0;
}
.product-gallery { border-radius: var(--radius); overflow: hidden; }
.product-gallery img { width: 100%; border-radius: var(--radius); }

/* === Price Box === */
.pay-box {
  background: linear-gradient(135deg, #fff5f5, #fff0f6);
  border-radius: var(--radius); padding: 20px; position: relative;
}
.price-original { margin-bottom: 4px; }
.price-original del { color: var(--muted-3-color); }
.price-current { font-size: 32px; font-weight: 700; color: var(--jb-red-1); }
.price-sign { font-size: 18px; }
.pay-options { }
.pay-option { cursor: pointer; }
.pay-label {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border: 2px solid var(--muted-4-color); border-radius: var(--radius);
  font-size: 14px; transition: all 0.2s;
}
.pay-option.active .pay-label { border-color: var(--jb-blue-1); background: var(--jb-blue-0); }
.pay-option:hover .pay-label { border-color: var(--jb-blue-1); }

/* === File List === */
.file-list { }
.file-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; background: var(--body-bg); border-radius: var(--radius);
  margin-bottom: 8px; transition: background 0.2s;
}
.file-item:hover { background: var(--jb-blue-0); }
.file-name { flex: 1; font-size: 14px; color: var(--main-color); font-weight: 500; }
.file-size { white-space: nowrap; }
.ds-dl-btn { font-size: 12px; padding: 5px 12px; background: var(--jb-blue-1); color: #fff; white-space: nowrap; }
.ds-dl-btn:hover { opacity: 0.85; color: #fff; }

/* === User Sidebar === */
.user-info-card { padding: 30px 20px; }
.user-nav-list { list-style: none; padding: 0; margin: 0; background: var(--main-bg); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.user-nav-list li { border-bottom: 1px solid var(--border-color); }
.user-nav-list li:last-child { border-bottom: none; }
.user-nav-list li a { display: block; padding: 14px 20px; color: var(--main-color); font-size: 14px; transition: all 0.2s; }
.user-nav-list li a:hover { background: var(--jb-blue-0); color: var(--jb-blue-1); }
.user-nav-list li.active a { background: var(--jb-blue-0); color: var(--jb-blue-1); font-weight: 600; border-left: 3px solid var(--jb-blue-1); }

/* === Stat Cards === */
.stat-card { padding: 30px 20px; border-radius: var(--radius); }
.stat-number { font-size: 36px; font-weight: 700; }
.stat-label { font-size: 14px; margin-top: 6px; }

/* === Table === */
.table { width: 100%; border-collapse: collapse; }
.table th {
  padding: 12px 10px; font-weight: 600; color: var(--muted-2-color);
  font-size: 12px; text-transform: uppercase; border-bottom: 2px solid var(--border-color); white-space: nowrap;
}
.table td { padding: 12px 10px; border-bottom: 1px solid var(--border-color); font-size: 14px; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* === Badges === */
.ds-badge { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 12px; font-weight: 500; }
.badge-pending { background: #fff3e0; color: #e65100; }
.badge-completed { background: #e8f5e9; color: #2e7d32; }
.badge-cancelled { background: #fce4ec; color: #c62828; }
.badge-refunded { background: #f3e5f5; color: #6a1b9a; }

/* === Pagination === */
.pagination { text-align: center; margin: 30px 0; }
.pagination-list { display: inline-flex; gap: 6px; padding: 0; margin: 0; list-style: none; }
.pagination-list li { }
.pagination-list .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 12px;
  background: var(--main-bg); border-radius: var(--radius); color: var(--main-color);
  font-size: 14px; border: 1px solid var(--border-color);
}
.pagination-list .page-numbers.current { background: var(--jb-blue-1); color: #fff; border-color: var(--jb-blue-1); }
.pagination-list .page-numbers:hover:not(.current) { background: var(--jb-blue-0); color: var(--jb-blue-1); }

/* === Float Right === */
.float-right {
  position: fixed; right: 20px; bottom: 100px; z-index: 90; display: flex; flex-direction: column; gap: 8px;
}
.float-btn {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; background: var(--main-bg);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1); color: var(--muted-color);
  transition: all 0.3s; cursor: pointer; border: none; font-size: 16px;
}
.float-btn:hover { background: var(--jb-blue-1); color: #fff; box-shadow: 0 4px 15px rgba(74,108,247,0.4); }
.float-btn.fade { opacity: 0; }
.float-btn.ontop { }

/* === Footer Tabbar (Mobile) === */
.footer-tabbar {
  display: none; position: fixed; bottom: 0; left: 0; width: 100%;
  background: var(--main-bg); border-top: 1px solid var(--border-color);
  z-index: 95; padding: 6px 0 env(safe-area-inset-bottom);
}
.footer-tabbar a {
  display: flex; flex-direction: column; align-items: center; flex: 1;
  padding: 6px 0; color: var(--muted-2-color); font-size: 10px;
}
.footer-tabbar a.active { color: var(--jb-blue-1); }
.footer-tabbar .tabbar-icon { font-size: 20px; margin-bottom: 2px; }

/* === Footer === */
.footer { background: var(--footer-bg); color: var(--footer-color); padding: 20px 0; border-top: 1px solid var(--border-color); }
.footer p { margin: 0; }

/* === Main Content === */
.main-content { min-height: calc(100vh - 300px); padding-bottom: 30px; }

/* === Loading === */
.lazy { transition: opacity 0.3s; }
.lazy:not([src*="loading"]) { opacity: 1; }
.pay-loading { padding: 40px 20px; text-align: center; }

/* === Dark Theme === */
body.dark-theme {
  --key-color: #f8fafc;
  --main-color: #e5eef7;
  --muted-color: #aaa;
  --muted-2-color: #888;
  --muted-3-color: #666;
  --muted-4-color: #555;
  --body-bg: #292a2d;
  --main-bg: #323335;
  --muted-bg: #2d2e31;
  --border-color: rgba(114, 114, 114, 0.15);
  --muted-border: rgba(114, 114, 114, 0.08);
  --header-bg: rgba(50, 51, 53, 0.85);
  --blur-bg: rgba(50, 51, 53, 0.85);
  --shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
body.dark-theme .pay-box { background: linear-gradient(135deg, #2d1b1b, #2d1a24); }
body.dark-theme .file-item { background: var(--muted-bg); }
body.dark-theme .modal-content { background: var(--main-bg); }
body.dark-theme .float-btn { background: var(--main-bg); color: var(--main-color); }

/* === ======================================== */
/* === Responsive === */
@media (max-width: 992px) {
  .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-9 { width: 100%; }
  .hidden-sm { display: none !important; }
  .hide-sm { display: none !important; }
}
@media (max-width: 768px) {
  .visible-xs-block { display: block; }
  .hidden-xs { display: none !important; }
  .navbar-toggle { display: block; }
  .collapse .navbar-nav { display: none; }
  .mobile-header { display: block; }
  .footer-tabbar { display: flex; }
  .float-right { bottom: 60px; right: 12px; }
  .footer { padding-bottom: 60px; }
  .col-sm-6 { width: 50%; }
}
