* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border: #e5e7eb;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

.app-header {
  background: linear-gradient(135deg, #1e3a5f, #2563eb);
  color: white;
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

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

.logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.header-search {
  font-size: 20px;
  cursor: pointer;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.header-search:active {
  opacity: 0.6;
}

.search-bar {
  background: white;
  padding: 8px 16px 10px;
  display: none;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 48px;
  z-index: 99;
}

.search-bar.show {
  display: block;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg);
  border-radius: 20px;
  padding: 8px 14px;
  gap: 8px;
}

.search-icon {
  font-size: 16px;
  opacity: 0.5;
}

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

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

.search-clear {
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  display: none;
  padding: 2px 6px;
}

.search-clear.show {
  display: block;
}

.main-content {
  padding-bottom: calc(70px + var(--safe-bottom));
  min-height: calc(100vh - 48px);
}

.page {
  display: none;
  padding: 12px 14px;
}

.page.active {
  display: block;
}

.banner-swiper {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  position: relative;
}

.banner-track {
  display: flex;
  transition: transform 0.4s ease;
}

.banner-slide {
  min-width: 100%;
}

.banner-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 18px;
  color: white;
  min-height: 120px;
}

.banner-text h2 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}

.banner-text p {
  font-size: 12px;
  opacity: 0.9;
}

.banner-icon {
  font-size: 48px;
  opacity: 0.9;
}

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
}

.banner-dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.5);
  transition: all 0.3s;
}

.banner-dot.active {
  width: 18px;
  background: white;
}

.section {
  margin-bottom: 20px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.section-more {
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.category-card {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}

.category-card:active {
  transform: scale(0.96);
}

.category-card-icon {
  font-size: 28px;
  margin-bottom: 6px;
}

.category-card-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}

.category-card-count {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.hot-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.hot-list::-webkit-scrollbar {
  display: none;
}

.hot-card {
  min-width: 150px;
  background: var(--card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  scroll-snap-align: start;
  flex-shrink: 0;
}

.hot-card-cover {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.hot-card-info {
  padding: 10px;
}

.hot-card-title {
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 6px;
}

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

.hot-card-price {
  font-size: 15px;
  font-weight: 700;
  color: #ef4444;
}

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

.product-card {
  display: flex;
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  cursor: pointer;
  gap: 12px;
  transition: transform 0.15s;
}

.product-card:active {
  transform: scale(0.98);
}

.product-card-cover {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  flex-shrink: 0;
}

.product-card-info {
  flex: 1;
  min-width: 0;
}

.product-card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.product-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 6px;
}

.product-card-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.product-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 500;
}

.product-tag.hot {
  background: #fef2f2;
  color: #ef4444;
}

.product-tag.new {
  background: #ecfdf5;
  color: #10b981;
}

.product-tag.type {
  background: #eff6ff;
  color: #3b82f6;
}

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

.product-card-price {
  font-size: 16px;
  font-weight: 700;
  color: #ef4444;
}

.product-card-price .symbol {
  font-size: 12px;
}

.product-card-original {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 4px;
}

.product-card-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px;
  -webkit-overflow-scrolling: touch;
}

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

.category-tab {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  background: white;
  color: var(--text-secondary);
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.2s;
  white-space: nowrap;
}

.category-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.page-category .product-list {
  margin-top: 0;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  display: none;
}

.empty-state.show {
  display: block;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}

.mine-header {
  background: linear-gradient(135deg, #1e3a5f, #2563eb);
  border-radius: var(--radius);
  padding: 20px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: white;
  margin-bottom: 16px;
}

.mine-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.mine-info {
  flex: 1;
}

.mine-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

.mine-phone {
  font-size: 12px;
  opacity: 0.8;
}

.mine-edit {
  font-size: 12px;
  padding: 4px 12px;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 12px;
  cursor: pointer;
}

.mine-stats {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  justify-content: space-around;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.stat-item {
  text-align: center;
  cursor: pointer;
}

.stat-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.mine-menu {
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

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

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

.menu-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.menu-icon {
  font-size: 18px;
}

.menu-arrow {
  font-size: 20px;
  color: var(--text-muted);
}

.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.page-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.back-btn {
  font-size: 15px;
  color: var(--primary);
  cursor: pointer;
  font-weight: 500;
}

.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--card);
  display: flex;
  justify-content: space-around;
  padding: 6px 0 calc(6px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
  z-index: 100;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  padding: 4px 16px;
  transition: color 0.2s;
  color: var(--text-muted);
}

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

.tab-icon {
  font-size: 20px;
}

.tab-label {
  font-size: 11px;
  font-weight: 500;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  animation: fadeIn 0.2s ease;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  z-index: 201;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal.show {
  transform: translateX(-50%) translateY(0);
}

.modal-detail-header {
  position: relative;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
}

.detail-cover {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.3);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  z-index: 2;
}

.modal-detail-body {
  padding: 16px 18px 24px;
  overflow-y: auto;
  flex: 1;
}

.detail-tag-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.detail-category-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #eff6ff;
  color: #3b82f6;
  font-weight: 500;
}

.detail-tag-item {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #fef2f2;
  color: #ef4444;
  font-weight: 500;
}

.detail-new-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #ecfdf5;
  color: #10b981;
  font-weight: 500;
  display: none;
}

.detail-new-tag.show {
  display: inline;
}

.detail-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
}

.detail-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.detail-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
  background: var(--bg);
  padding: 10px 12px;
  border-radius: 8px;
}

.detail-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.detail-feature-item {
  font-size: 12px;
  padding: 5px 10px;
  background: #f0f9ff;
  color: #2563eb;
  border-radius: 14px;
}

.detail-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.detail-price {
  color: #ef4444;
}

.price-symbol {
  font-size: 14px;
  font-weight: 600;
}

.price-value {
  font-size: 24px;
  font-weight: 700;
}

.detail-original-price {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.detail-download-tip {
  font-size: 12px;
  color: #f59e0b;
  background: #fffbeb;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.detail-actions {
  display: flex;
  gap: 12px;
}

.btn-buy {
  flex: 1;
  padding: 12px 0;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: white;
  border: none;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-buy:active {
  opacity: 0.8;
}

.btn-cart {
  width: 100px;
  padding: 12px 0;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-cart:active {
  background: var(--border);
}

.modal-pay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.modal-pay-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.modal-pay-header .modal-close {
  position: static;
  background: var(--bg);
  color: var(--text);
  width: 24px;
  height: 24px;
  font-size: 12px;
}

.modal-pay-body {
  padding: 16px 18px 24px;
  overflow-y: auto;
}

.pay-product-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.pay-product-cover {
  font-size: 28px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 8px;
}

.pay-product-name {
  font-size: 13px;
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pay-amount {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  font-size: 15px;
}

.pay-price {
  font-size: 22px;
  font-weight: 700;
  color: #ef4444;
}

.pay-methods {
  margin-bottom: 20px;
}

.pay-method {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.pay-method-icon {
  font-size: 20px;
}

.pay-method span:nth-child(2) {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.pay-check {
  color: var(--primary);
  font-weight: 700;
  font-size: 16px;
}

.btn-primary {
  width: 100%;
  padding: 12px 0;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: white;
  border: none;
  border-radius: 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-primary:active {
  opacity: 0.8;
}

.btn-go-shop {
  width: auto;
  padding: 10px 32px;
  display: inline-block;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: var(--primary);
}

.content-info {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
}

.content-product-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.content-download-tip {
  font-size: 13px;
  color: #f59e0b;
  background: #fffbeb;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 10px;
  line-height: 1.6;
}

.content-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: #eff6ff;
  border-radius: 8px;
  font-size: 13px;
  color: var(--primary);
  margin-bottom: 8px;
}

.content-link-icon {
  font-size: 16px;
}

.content-note {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

.content-section-title {
  font-size: 14px;
  font-weight: 600;
  margin: 16px 0 10px;
  color: var(--text);
}

.content-link-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}

.content-link-note {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}

.content-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.content-link-url {
  font-size: 12px;
  color: #2563eb;
  word-break: break-all;
  text-decoration: none;
}

.content-link-url:active {
  opacity: 0.7;
}

.content-link-code {
  font-size: 13px;
  color: var(--text);
}

.content-link-code strong {
  color: #f59e0b;
  font-size: 15px;
  letter-spacing: 2px;
  background: #fffbeb;
  padding: 2px 8px;
  border-radius: 4px;
}

.toast {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #1f2937;
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  z-index: 300;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  background: #10b981;
}

.phone-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.phone-overlay.show {
  display: flex;
}
.phone-modal {
  background: #fff;
  border-radius: 16px;
  padding: 30px 24px;
  width: 320px;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: phoneIn 0.3s ease;
}
@keyframes phoneIn {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.phone-modal h3 {
  font-size: 20px;
  margin: 0 0 10px;
  color: #1e293b;
}
.phone-modal p {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 20px;
  line-height: 1.6;
}
.phone-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 18px;
  text-align: center;
  letter-spacing: 2px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.phone-input:focus {
  border-color: var(--primary);
}
.phone-btns {
  margin-top: 16px;
}
.phone-btn-confirm {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.phone-btn-confirm:active {
  opacity: 0.85;
}
.phone-btn-confirm:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.purchased-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #d1fae5;
  color: #059669;
  font-weight: 500;
}

.orders-product-card {
  position: relative;
}

.orders-product-card .product-card-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

.btn-view-content {
  padding: 6px 14px;
  background: #eff6ff;
  color: var(--primary);
  border: none;
  border-radius: 14px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 500;
}

.btn-view-content:active {
  background: #dbeafe;
}

.referral-card {
  background: linear-gradient(180deg, #1e1b4b 0%, #312e81 100%);
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: 16px;
  color: #fff;
  box-shadow: 0 8px 32px rgba(49, 46, 129, 0.4);
  overflow: hidden;
}

.referral-locked {
  text-align: center;
  padding: 28px 20px;
}

.referral-locked-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.referral-locked-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.referral-locked-desc {
  font-size: 12px;
  opacity: 0.7;
  margin-bottom: 16px;
}

.btn-referral-buy {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-referral-buy:active {
  opacity: 0.85;
}

.referral-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
}

.referral-rank-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
}

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

.referral-code-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 6px 12px;
}

.referral-code-label {
  font-size: 11px;
  opacity: 0.7;
}

.referral-code-value {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  font-family: 'Courier New', monospace;
}

.referral-ladder {
  background: rgba(255,255,255,0.08);
  margin: 0 12px 10px;
  border-radius: 10px;
  padding: 12px 14px;
}

.ladder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 10px;
  opacity: 0.9;
}

.ladder-current-rate {
  font-weight: 700;
  color: #fbbf24;
  font-size: 15px;
}

.ladder-bar-wrap {
  margin-bottom: 4px;
}

.ladder-bar {
  height: 8px;
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.ladder-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.ladder-steps {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  opacity: 0.7;
  text-align: center;
}

.ladder-step {
  flex: 1;
}

.ladder-step small {
  font-size: 9px;
}

.ladder-step.active {
  opacity: 1;
  color: #fbbf24;
  font-weight: 700;
}

.ladder-next {
  font-size: 11px;
  text-align: center;
  margin: 8px 0 4px;
  color: #fbbf24;
}

.ladder-rates-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  opacity: 0.8;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.ladder-divider {
  opacity: 0.3;
}

.referral-refund {
  background: rgba(34,197,94,0.12);
  margin: 0 12px 10px;
  border-radius: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(34,197,94,0.2);
}

.refund-header {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

.refund-progress-text {
  color: #4ade80;
  font-size: 12px;
}

.refund-bar-wrap {
  margin-bottom: 6px;
}

.refund-bar {
  height: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
  overflow: hidden;
}

.refund-bar-fill {
  height: 100%;
  background: #22c55e;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.refund-status {
  font-size: 11px;
  opacity: 0.8;
}

.refund-status.done {
  color: #4ade80;
  font-weight: 600;
}

.referral-actions {
  display: flex;
  gap: 10px;
  padding: 0 12px 10px;
}

.btn-referral-copy,
.btn-referral-share {
  flex: 1;
  padding: 10px 0;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-referral-copy {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.btn-referral-share {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
}

.btn-referral-copy:active,
.btn-referral-share:active {
  opacity: 0.8;
}

.referral-stats-row {
  display: flex;
  background: rgba(0,0,0,0.2);
  padding: 10px 0;
}

.ref-stat {
  flex: 1;
  text-align: center;
  cursor: pointer;
}

.ref-stat-num {
  font-size: 16px;
  font-weight: 700;
}

.ref-stat-label {
  font-size: 10px;
  opacity: 0.7;
  display: block;
}

.commission-summary {
  display: flex;
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin: 16px 0;
  box-shadow: var(--shadow);
}

.commission-sum-item {
  flex: 1;
  text-align: center;
}

.commission-sum-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.commission-sum-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.commission-settle-tip {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding: 8px;
  background: #fef3c7;
  border-radius: 8px;
}

.commission-list {
  padding: 0;
}

.commission-item {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
}

.commission-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.commission-item-icon.pending {
  background: #fef3c7;
}

.commission-item-icon.paid {
  background: #d1fae5;
}

.commission-item-info {
  flex: 1;
  min-width: 0;
}

.commission-item-desc {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.commission-item-status {
  font-size: 11px;
  margin-top: 2px;
}

.commission-item-status.pending-text {
  color: #f59e0b;
}

.commission-item-status.paid-text {
  color: #10b981;
}

.commission-item-amount {
  font-size: 16px;
  font-weight: 700;
  color: #f59e0b;
  white-space: nowrap;
}

.commission-item-right {
  text-align: right;
  flex-shrink: 0;
}

.commission-item-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  text-align: right;
}

.ranking-month {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 0;
  color: var(--primary);
}

.ranking-list {
  padding: 0;
}

.ranking-item {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
}

.ranking-num {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.ranking-num.r1 { background: #fef3c7; color: #f59e0b; }
.ranking-num.r2 { background: #f1f5f9; color: #64748b; }
.ranking-num.r3 { background: #fef2f2; color: #ef4444; }
.ranking-num.rn { background: #f8fafc; color: #94a3b8; }

.ranking-info {
  flex: 1;
  min-width: 0;
}

.ranking-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-name.is-me {
  color: var(--primary);
}

.ranking-count {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.empty-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.vip-hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  min-height: 160px;
}

.vip-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 70%, #e94560 100%);
}

.vip-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 28px 20px;
  color: #fff;
}

.vip-crown {
  font-size: 48px;
  margin-bottom: 8px;
  animation: crownPulse 2s ease-in-out infinite;
}

@keyframes crownPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.vip-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
}

.vip-subtitle {
  font-size: 13px;
  opacity: 0.8;
  margin: 0;
}

.vip-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 4px 16px;
}

.benefit-item {
  flex: 1 1 calc(50% - 10px);
  min-width: calc(50% - 10px);
  background: var(--card);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
}

.benefit-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.benefit-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.share-guide-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: none;
}

.share-guide-overlay.show {
  display: block;
}

.share-guide-mask {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
}

.share-guide-arrow {
  position: absolute;
  top: 16px;
  right: 20px;
  text-align: center;
  color: #fff;
  animation: shareBounce 2s ease-in-out infinite;
}

@keyframes shareBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.share-guide-arrow-icon {
  font-size: 48px;
  line-height: 1;
}

.share-guide-text {
  margin-top: 6px;
  font-size: 16px;
}

.share-guide-text strong {
  display: block;
  font-size: 18px;
}

.share-guide-dots {
  display: inline-block;
  background: #fff;
  color: #333;
  border-radius: 8px;
  padding: 2px 14px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-top: 6px;
}

.share-guide-options {
  display: flex;
  gap: 20px;
  margin-top: 24px;
  justify-content: center;
}

.share-guide-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 13px;
}

.share-guide-opt-icon {
  font-size: 28px;
}

.share-guide-tip {
  margin-top: 24px;
  font-size: 12px;
  opacity: 0.7;
  max-width: 260px;
  line-height: 1.6;
}

.withdraw-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: none;
}

.withdraw-overlay.show {
  display: block;
}

.withdraw-mask {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
}

.withdraw-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 340px;
  padding: 28px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: withdrawIn 0.3s ease;
}

@keyframes withdrawIn {
  from { transform: translate(-50%, -50%) scale(0.9); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.withdraw-title {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: #1f2937;
}

.withdraw-balance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f0fdf4;
  border-radius: 10px;
  margin-bottom: 16px;
}

.withdraw-balance-label {
  font-size: 14px;
  color: #166534;
  font-weight: 500;
}

.withdraw-balance-value {
  font-size: 20px;
  font-weight: 700;
  color: #16a34a;
}

.withdraw-input-row {
  display: flex;
  align-items: center;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}

.withdraw-input-row:focus-within {
  border-color: #3b82f6;
}

.withdraw-currency {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  margin-right: 8px;
}

.withdraw-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  background: transparent;
  -moz-appearance: textfield;
}

.withdraw-input::-webkit-outer-spin-button,
.withdraw-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.withdraw-input::placeholder {
  color: #d1d5db;
  font-weight: 400;
  font-size: 14px;
}

.withdraw-tip {
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 20px;
}

.withdraw-tip.error {
  color: #ef4444;
}

.withdraw-actions {
  display: flex;
  gap: 12px;
}

.btn-withdraw-cancel {
  flex: 1;
  padding: 12px 0;
  background: #f3f4f6;
  color: #6b7280;
  border: none;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-withdraw-cancel:active {
  background: #e5e7eb;
}

.btn-withdraw-confirm {
  flex: 1;
  padding: 12px 0;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  border: none;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-withdraw-confirm:active {
  opacity: 0.85;
}

.btn-withdraw {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 600;
  width: 100%;
  margin-top: 10px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-withdraw:active {
  opacity: 0.85;
}