/* Modal Animations */
@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

/* Modal Styles */
.center-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(8px);
}

.center-modal.show {
  opacity: 1;
  pointer-events: auto;
  animation: overlayFadeIn 0.3s ease-out;
}

.center-modal .box {
  /* Blend with app background to remove visible frame */
  background: #ffffff; /* match app header gradient end */
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.2); /* softer */
  border: 1px solid #dbeafe; /* remove box outline */
  transform: scale(0.98);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.center-modal.show .box {
  transform: scale(1);
  opacity: 1;
  animation: modalFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.center-modal .title {
  padding: 18px 24px;
  background: transparent; /* unify with box */
  color: #1e3a8a;
  font-size: 18px;
  font-weight: 700;
  border-bottom: none;
  box-shadow: none; /* no inner separator */
  position: relative;
}

.center-modal .msg {
  padding: 24px;
  color: #475569;
  line-height: 1.6;
  overflow-y: auto;
  max-height: 60vh;
  scrollbar-width: thin;
  scrollbar-color: #93c5fd transparent;
  flex-grow: 1;
}

.center-modal .msg::-webkit-scrollbar {
  width: 6px;
}

.center-modal .msg::-webkit-scrollbar-track {
  background: transparent;
}

.center-modal .msg::-webkit-scrollbar-thumb {
  background-color: #93c5fd;
  border-radius: 3px;
}

.center-modal .scroll-area {
  max-height: 50vh;
  overflow-y: hidden;
  padding-right: 8px;
  margin-right: 0; /* remove negative margin that could create edge line */
  position: relative;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.center-modal .scroll-content {
  padding: 8px 0;
  line-height: 1.8;
  font-size: 15px;
  color: #475569;
}

/* Scrollbar styling for webkit browsers */
.center-modal .scroll-area::-webkit-scrollbar {
  width: 4px;
}

.center-modal .scroll-area::-webkit-scrollbar-track {
  background: rgba(37, 99, 235, 0.05);
  border-radius: 2px;
}

.center-modal .scroll-area::-webkit-scrollbar-thumb {
  background: rgba(37, 99, 235, 0.3);
  border-radius: 2px;
}

.center-modal .scroll-area::-webkit-scrollbar-thumb:hover {
  background: rgba(37, 99, 235, 0.5);
}

/* Scroll hint gradient effect */
.scroll-hint {
  position: absolute;
  left: 0;
  right: 0;
  height: 40px;
  pointer-events: none;
  z-index: 2;
}

.scroll-hint.top {
  top: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));
}

.scroll-hint.bottom {
  bottom: 0;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));
}

.center-modal .actions {
  padding: 16px 24px;
  background: transparent; /* unify with box */
  border-top: none;
  box-shadow: none; /* remove inner separator line */
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.center-modal .btn {
  min-width: 100px;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
}

.center-modal .btn.ghost {
  background: transparent;
  color: #2563eb;
  border: 1px solid #3b82f6;
}

.center-modal .btn.ghost:hover {
  background: rgba(37, 99, 235, 0.05);
  border-color: #2563eb;
}

.center-modal .btn:not(.ghost) {
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  color: white;
  border: none;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.3);
}

.center-modal .btn:not(.ghost):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.center-modal .btn:active {
  transform: translateY(1px);
}

.center-modal .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

.center-modal .tiny.muted {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  color: #64748b;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

/* Scroll indicator */
.scroll-indicator {
  height: 3px;
  background: rgba(37, 99, 235, 0.1);
  position: relative;
  margin: 8px 0 12px;
  border-radius: 3px;
  overflow: hidden;
}

.scroll-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  transition: width 0.1s ease-out;
  border-radius: 3px;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .center-modal .box {
    max-width: 95%;
    max-height: 85vh;
  }
  
  .center-modal .title,
  .center-modal .msg,
  .center-modal .actions {
    padding: 16px;
  }
  
  .center-modal .btn {
    min-width: auto;
    padding: 10px 16px;
    font-size: 13px;
  }
}

/* Site footer */
.site-footer { padding: 10px 12px; border-top: 1px solid #dbeafe; color: #64748b; font-size: 12px; background: #ffffff; margin-top: auto; }
.site-footer .footer-inner { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.site-footer .sep { color: #93c5fd; }
/* Mobile-first styles for 中国华能国际期货交易所 */
* { box-sizing: border-box; }
html, body { 
  margin: 0; 
  padding: 0; 
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif; 
  background: #f5f7fb; 
  color: #1e3a8a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1;
  font-kerning: normal;
}
:root { --primary: #2563eb; --accent: #3b82f6; --bg: #f5f7fb; --card: #ffffff; --muted: #64748b; --danger: #ef4444; --success: #22c55e; }
.app-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.global-logo { position: absolute; top: 12px; left: 12px; z-index: 50; }
.global-logo-inner { display:block; text-decoration:none; padding:0; margin:0; border:none; border-radius:0; background:transparent; box-shadow:none; }
.global-logo-inner img { 
  display:block; 
  height: 28px; 
  width: auto;
}
.trade-disabled,
.trade-disabled:visited,
.trade-disabled:active {
  opacity: 0.5;
  cursor: not-allowed;
}
.app-main { flex: 1; padding: 0; padding-bottom: 16px; }
.app-main.no-bottom-nav { padding-bottom: 0; }
.bottom-nav { height: 64px; display: grid; grid-template-columns: repeat(4, 1fr); background: #ffffff; border-top: 1px solid #dbeafe; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000; box-shadow: 0 -2px 10px rgba(37, 99, 235, 0.1); }
.bottom-nav .nav-item { color: #64748b; text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; }
.bottom-nav .nav-item.active { color: var(--primary); }
.section { margin-bottom: 16px; }
.card { background: var(--card); border: 1px solid #dbeafe; border-radius: 12px; padding: 12px; box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1); }
.card + .card { margin-top: 12px; }
.row { display: flex; gap: 12px; }
.row > .col { flex: 1; }
.btn { appearance: none; border: none; padding: 10px 12px; border-radius: 10px; font-weight: 700; color: #ffffff !important; background: var(--primary); letter-spacing: .1px; }
.btn.secondary { background: var(--accent); color: #ffffff; }
.btn.ghost { background: transparent; color: #2563eb !important; border: 1px solid #3b82f6; font-weight: 600; letter-spacing: .02px; }
.btn.outline { background: #ffffff; color: #2563eb !important; border: 1px solid #3b82f6; font-weight: 600; }
.btn.outline:hover { border-color: #3b82f6; box-shadow: 0 4px 16px rgba(59,130,246,.15); }
.btn.outline:active { transform: translateY(0.5px); }
.btn.danger { background: var(--danger); color: #fff; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(25%); }
.btn.small { padding: 8px 10px; font-size: 12px; border-radius: 8px; }
.btn:not(.ghost):link, .btn:not(.ghost):visited { color: #ffffff; text-decoration: none; }
a.btn:not(.ghost) { color: #ffffff; text-decoration: none; }
.btn.ghost:link, .btn.ghost:visited, a.btn.ghost { color: #2563eb; }
.badge { background: #dbeafe; color: #1e40af; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; padding: 12px 10px; border-bottom: 1px dashed #dbeafe; border-radius: 12px; }
.list li:hover { background: rgba(219, 234, 254, 0.5); }
.contact .title { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.contact .contact-list li { display: block; padding: 12px 6px; line-height: 1.4; font-size: 14px; }
.contact .contact-list .row-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.contact .contact-list .value.nowrap { white-space: nowrap; }
.contact .contact-list li .actions { margin-top: 6px; display: flex; gap: 8px; }
.qr-placeholder { width: 96px; height: 96px; border-radius: 12px; background: #f0f4ff; border: 1px solid #dbeafe; display:flex; align-items:center; justify-content:center; color:#64748b; font-size: 28px; }
.list#positions-list li { flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 6px; }
.list#positions-list .pos-top { display: flex; justify-content: space-between; align-items: center; }
.list#positions-list .pos-top .title { font-weight: 700; font-size: 14px; }
.list#positions-list .pos-top .status { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.list#positions-list .pos-bottom { display: flex; justify-content: space-between; align-items: baseline; }
.list#positions-list .pos-bottom .meta { color: #475569; font-size: 13px; }
.list#positions-list .pos-bottom .time { color: #64748b; }
/* Inline countdown (seconds) style after side label in positions list */
.list#positions-list .pos-bottom .meta .cd { font-size: 13px; font-weight: 600; color: inherit; }
.list#positions-list .pos-bottom .meta .cd.color1,
.list#positions-list .pos-bottom .meta .cd.color2,
.list#positions-list .pos-bottom .meta .cd.danger { color: inherit; }
.list#positions-list .pos-bottom .meta .cd.pulse { animation: none; }
.kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi .item { text-align: center; background: #ffffff; border-radius: 10px; padding: 10px; border: 1px solid #dbeafe; box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1); }
.kpi .label { font-size: 12px; color: var(--muted); }
@media (max-width: 480px) {
  .kpi { grid-template-columns: repeat(2, 1fr); }
}
.hero { background: linear-gradient(180deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.05)); border: 1px solid #dbeafe; border-radius: 16px; padding: 16px; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08); }
.hero h1 { margin: 0 0 6px 0; font-size: 18px; }
.hero p { margin: 0; color: #64748b; font-size: 14px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.product-card { position: relative; background: #ffffff; border: 1px solid #dbeafe; border-radius: 12px; padding: 12px; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.product-card::after { content:""; position:absolute; inset:-1px; border-radius:12px; padding:1px; background: linear-gradient(135deg, rgba(37,99,235,.15), rgba(59,130,246,.1)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events:none; }
.product-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(37, 99, 235, 0.15); border-color:#3b82f6; }
.product-card .title { display:flex; align-items:center; gap:8px; font-weight: 700; margin-bottom: 8px; }
.product-card .title .icon { width:28px; height:28px; border-radius:8px; display:flex; align-items:center; justify-content:center; background:#f0f4ff; border:1px solid #dbeafe; }
.product-card .pc-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; }
.product-card .pc-price { text-align:right; }
.product-card .pc-price .price { font-weight:700; }
.product-card .pc-price .chg { font-size:12px; }
.product-card .pc-price .up { color:#22c55e; }
.product-card .pc-price .down { color:#ef4444; }
.product-card .spark { height:28px; margin-top:6px; }
.product-card .spark canvas { width:100%; height:28px; display:block; }
.product-card .tags { display: flex; gap: 6px; flex-wrap: wrap; }
/* Products page enhancements */
.products-hero { display:flex; flex-direction:column; gap:8px; background: linear-gradient(180deg, rgba(37,99,235,.10), rgba(59,130,246,.05)); border:1px solid #dbeafe; border-radius:14px; padding:12px; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08); }
.products-hero h1 { margin:0; font-size:16px; }
.products-hero p { margin:0; color:#64748b; font-size:13px; }
.products-toolbar { display:flex; gap:10px; margin-top:10px; }
.search { flex:1; position:relative; }
.search input { width:100%; padding-left:34px; }
.search .icon { position:absolute; left:10px; top:50%; transform:translateY(-50%); color:#64748b; }
.chips { display:flex; gap:8px; overflow:auto; padding-bottom:2px; }
.chip { border:1px solid #dbeafe; color:#64748b; padding:6px 10px; border-radius:999px; font-size:12px; white-space:nowrap; }
.chip.active { border-color: var(--primary); color: var(--primary); background: rgba(37,99,235,.08); }
.products-grid { display:grid; grid-template-columns: 1fr 1fr; gap:12px; margin-top:12px; }
.p-card { position:relative; background:#ffffff; border:1px solid #dbeafe; border-radius:14px; padding:12px; display:flex; flex-direction:column; gap:8px; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.p-card::after { content:""; position:absolute; inset:-1px; border-radius:14px; padding:1px; background: linear-gradient(135deg, rgba(37,99,235,.15), rgba(59,130,246,.1)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events:none; }
.p-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(37, 99, 235, 0.15); border-color:#3b82f6; }
.p-card .row1 { display:flex; justify-content:space-between; align-items:center; }
.p-card .name { display:flex; align-items:center; gap:8px; font-weight:700; font-size:14px; }
.p-card .name .icon { width:28px; height:28px; border-radius:8px; display:flex; align-items:center; justify-content:center; background:#f0f4ff; border:1px solid #dbeafe; }
.p-card .price { font-weight:700; }
.p-card .change.up { color:#22c55e; }
.p-card .change.down { color:#ef4444; }
.p-card .row2 { display:flex; justify-content:space-between; align-items:center; }
.p-card .cta { display:inline-flex; align-items:center; gap:6px; padding:8px 10px; border-radius:10px; background: #2563eb; color:#ffffff; text-decoration:none; font-size:12px; }
.p-card .tags { display:flex; gap:6px; }
/* Quick actions */
.quick-actions { display:flex; gap:6px; margin-top:4px; }
.quick-actions .qa { display:inline-flex; align-items:center; justify-content:center; padding:6px 8px; background:#f0f4ff; border:1px solid #dbeafe; border-radius:8px; color:#475569; text-decoration:none; font-size:12px; }
.quick-actions .qa:hover { border-color:#3b82f6; color:#1e3a8a; }
/* Trading page */
.chart-card { padding: 0; overflow: hidden; }
.chart-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid #dbeafe; }
.chart-box { height: 220px; background: #f8fafc; }
.order-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.order-actions .btn { font-size: 14px; padding: 12px 8px; }
.panel { background: #ffffff; border: 1px solid #dbeafe; border-radius: 12px; padding: 10px; box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1); }
.panel h3 { margin: 0 0 8px 0; font-size: 14px; color: #64748b; }
.orderbook { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.orderbook .col h4 { margin: 0 0 6px; font-size: 13px; color: #64748b; }
/* Profile page */
.profile-header .avatar { width:48px; height:48px; border-radius:50%; background:#dbeafe; display:flex; align-items:center; justify-content:center; font-size:22px; border:1px solid #93c5fd; margin-right:8px; color:#1e40af; }
.profile-header .name { font-weight:700; }
.muted { color:#64748b; }
.balance-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap:10px; margin-top:8px; }
.balance-grid .b-item { background:#ffffff; border:1px solid #dbeafe; border-radius:10px; padding:10px; box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1); }
.balance-grid .label { color:#64748b; font-size:12px; }
.balance-grid .value { font-weight:700; margin-top:4px; }
.card .subhead { display:flex; align-items:center; justify-content:space-between; margin-bottom: 8px; }
.action-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.btn.block { width: 100%; text-align: center; }

/* Chevron helper */
.chev { color: #64748b; }

/* Radio chips (method picker) */
.radio-chips { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.radio-chip { display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border:1px solid #dbeafe; border-radius:12px; background:#ffffff; color:#475569; cursor:pointer; user-select:none; transition: border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease; }
.radio-chip input { display:none; }
.radio-chip .dot { width:14px; height:14px; border-radius:50%; border:2px solid #64748b; background: transparent; box-shadow: inset 0 0 0 2px #ffffff; }
.radio-chip.active { border-color: var(--primary); background: rgba(37,99,235,.10); color:#1e3a8a; box-shadow: 0 4px 18px rgba(37,99,235,.10); }
.radio-chip.active .dot { border-color: var(--primary); background: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.25); }
.up { 
  color: #16a34a; 
  font-weight: 700;
  background: rgba(34, 197, 94, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}
.down { 
  color: #dc2626; 
  font-weight: 700;
  background: rgba(239, 68, 68, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}
.orderbook .row { display: grid; grid-template-columns: 38px 48px 1fr 64px; gap: 6px; padding: 4px 0; align-items: center; }
.orderbook .row .bar { height: 10px; background: #e0e7ff; border-radius: 4px; }
.recent-trades .row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; padding: 6px 0; border-bottom: 1px dashed #dbeafe; }
.toast { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #ffffff; color: #1e3a8a; border: 1px solid #dbeafe; padding: 10px 12px; border-radius: 10px; display: none; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15); z-index: 999; }
.toast.show { display: block; }
/* Centered dialog */
.center-dialog { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 200; background: rgba(0,0,0,0.3); }
.center-dialog .box { max-width: 80%; background: #ffffff; color: #1e3a8a; border: 1px solid #dbeafe; border-radius: 12px; padding: 14px 18px; font-weight: 600; box-shadow: 0 20px 40px rgba(37, 99, 235, 0.2); }
.center-dialog.show { display: flex; }
.center-modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 300; background: rgba(0,0,0,0.45); }
.center-modal .box { width: 90%; max-width: 420px; background: #ffffff; border: 1px solid #dbeafe; border-radius: 14px; padding: 16px; color: #1e3a8a; box-shadow: 0 24px 56px rgba(37, 99, 235, 0.25); }
.center-modal .msg { font-weight: 700; margin-bottom: 12px; }
.center-modal .actions { display: flex; gap: 10px; justify-content: flex-end; }
.center-modal.show { display: flex; }

/* Auth (login/register) centered layout */
.auth-page { display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 420px; margin: 10vh auto 0; }
.auth-card .row { justify-content: flex-start; }
.upload-box { position: relative; border: 2px dashed #dbeafe; height: 180px; border-radius: 12px; background: #f8fafc; display: flex; align-items: center; justify-content: center; gap: 6px; color: #64748b; cursor: pointer; transition: border-color .15s ease, background .15s ease; user-select: none; overflow: hidden; }
.upload-box:hover, .upload-box.drag { border-color: var(--primary); background: #ffffff; }
.upload-box .ub-icon { font-size: 24px; opacity: 0.9; }
.upload-box .ub-text { font-size: 12px; color: #64748b; }
.upload-box .upload-preview { display: none; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 10px; border: 1px solid #dbeafe; }
.upload-box.has-image .upload-preview { display: block; }
.upload-box.has-image .ub-icon, .upload-box.has-image .ub-text { display: none; }
/* Sample illustration layer */
.upload-box .upload-sample { position: absolute; inset: 0; border-radius: 10px; opacity: 0.85; background:
  linear-gradient(0deg, rgba(255,255,255,0.06), rgba(255,255,255,0.06)),
  linear-gradient(90deg, rgba(59,130,246,0.10) 0%, rgba(45,212,191,0.10) 100%);
}
.upload-box .upload-sample::before { content: ""; position: absolute; left: 12px; top: 14px; width: 44%; height: 12px; border-radius: 6px; background: #93c5fd; }
.upload-box .upload-sample::after  { content: ""; position: absolute; left: 12px; top: 34px; width: 36%; height: 10px; border-radius: 5px; background: #dbeafe; }
.upload-box .upload-badge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 999px; background: #3b82f6; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; box-shadow: 0 6px 20px rgba(59,130,246,.35); border: 2px solid rgba(255,255,255,.15); }
.upload-box.has-image .upload-sample, .upload-box.has-image .upload-badge { display: none; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(30, 58, 138, 0.3); display: none; align-items: center; justify-content: center; z-index: 100; opacity: 0; transition: opacity .28s ease; backdrop-filter: blur(4px); }
.modal-backdrop.show { display: flex; opacity: 1; animation: overlayFadeIn .28s ease-out; }
.modal { width: 90%; max-width: 420px; background: #ffffff; border: 1px solid #dbeafe; border-radius: 12px; padding: 14px; color: #1e3a8a; box-shadow: 0 18px 48px rgba(37, 99, 235, 0.25); transform: translateY(8px) scale(.98); opacity: 0; transition: transform .32s cubic-bezier(.16,1,.3,1), opacity .24s ease; }
.modal-backdrop.show .modal { transform: translateY(0) scale(1); opacity: 1; animation: modalFadeIn .36s cubic-bezier(.16,1,.3,1); }
.modal h3 { display:flex; align-items:center; gap:8px; }
.modal h3::before { content:""; width:8px; height:8px; border-radius:50%; background: linear-gradient(90deg,#4a6bff,#7b4fff); box-shadow:0 0 0 3px rgba(100,108,255,.18); }
.modal h3 { margin: 0 0 8px 0; font-size: 16px; }
.modal .row { margin-top: 6px; display: flex; justify-content: space-between; color: #64748b; }
.modal .actions { display: flex; gap: 10px; margin-top: 12px; }
.modal .btn { transition: transform .12s ease, box-shadow .2s ease, filter .2s ease; }
.modal .btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(100,108,255,.28); filter: brightness(1.04); }
.modal .btn:active { transform: translateY(0); }
.modal .btn.ghost:hover { border-color:#3b82f6; box-shadow: 0 4px 14px rgba(59,130,246,.18); }

/* Confirm pulse effect */
@keyframes confirmPulse {
  0% { box-shadow: 0 0 0 0 rgba(45,212,191,.45); }
  70% { box-shadow: 0 0 0 12px rgba(45,212,191,0); }
  100% { box-shadow: 0 0 0 0 rgba(45,212,191,0); }
}
.btn.pulse-once { animation: confirmPulse .8s ease-out 1; }
.link { color: var(--primary); text-decoration: none; }
.small { font-size: 12px; color: #64748b; }
input, select { width: 100%; padding: 10px; background: #ffffff; color: #1e3a8a; border: 1px solid #dbeafe; border-radius: 10px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-row + .form-row { margin-top: 10px; }
/* KYC title emphasis */
.kyc-title { font-size: 16px; font-weight: 800; letter-spacing: .3px; }

/* Method chips */
.chip { border-radius: 999px; padding: 6px 12px; border: 1px solid #2563eb; background: #ffffff; color: #2563eb; cursor: pointer; transition: transform .06s ease, background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease; font-size: 12px; }
.chip:hover { background: rgba(37,99,235,.08); box-shadow: 0 2px 10px rgba(37,99,235,.18); }
.chip:active { transform: scale(0.98); }
.chip.active { background: #2563eb; color: #ffffff; border-color: #1e40af; box-shadow: 0 6px 18px rgba(37,99,235,.25); }
.chip-group { display: flex; gap: 8px; flex-wrap: nowrap; }

/* Countdown styles */
.cd { font-size: 22px; font-weight: 800; letter-spacing: 0.5px; }
.cd.color1 { color: var(--primary); }
.cd.color2 { color: var(--accent); }
.cd.danger { color: var(--danger); }
.cd.pulse { animation: cdPulse .4s ease; }
@keyframes cdPulse { 0% { transform: scale(1); } 30% { transform: scale(1.1); } 100% { transform: scale(1); } }

/* Withdraw binding highlight */
.highlight-card { position: relative; background: linear-gradient(180deg, rgba(37,99,235,.10), rgba(59,130,246,.05)); border: 1px solid #dbeafe; border-radius: 14px; padding: 14px; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08); }
.highlight-card .title { font-weight: 800; font-size: 15px; display:flex; align-items:center; gap:8px; }
.highlight-card .desc { color:#64748b; font-size: 12px; margin-top: 4px; }
.status-pill { display:inline-flex; align-items:center; gap:6px; border-radius: 999px; padding: 4px 10px; font-size: 12px; border:1px solid #dbeafe; }
.status-pill.ok { color:#22c55e; border-color:#14532d; background: rgba(34,197,94,.08); }
.status-pill.warn { color:#f59e0b; border-color:#7c4a03; background: rgba(245,158,11,.10); }
.status-pill.muted { color:#64748b; background:#f0f4ff; }
.cta-row { display:flex; gap:10px; align-items:center; justify-content: flex-end; }

/* 买卖盘栏颜色加强 */
.orderbook .buy-row span, .orderbook .buy-row { color: #3b82f6; }
.orderbook .buy-bar {
  background: linear-gradient(90deg, #60a5fa, #2563eb);
  height: 14px;
  border-radius: 7px;
  box-shadow: 0 2px 8px rgba(96,165,250,0.18);
}
.orderbook .sell-row span, .orderbook .sell-row { color: #ef4444; }
.orderbook .sell-bar {
  background: linear-gradient(90deg, #f87171, #ef4444);
  height: 14px;
  border-radius: 7px;
  box-shadow: 0 2px 8px rgba(239,68,68,0.17);
}
.recent-trades .row.trade-up { color: #3b82f6; font-weight: 700; }
.recent-trades .row.trade-down { color: #ef4444; font-weight: 700; }
