
/* Original layout: static/css/home.css */



.home-top {
  max-width: 560px;
  margin: 0 auto;
  padding: 22px 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.home-logo {
  width: 116px;
  mix-blend-mode: screen;
}
.msg-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(9, 20, 48, 0.55);
  border: 1px solid rgba(34, 211, 238, 0.4);
  transition: background 0.15s ease, transform 0.1s ease;
}
.msg-link img { width: 21px; height: 21px; }
.msg-link:active {
  background: rgba(9, 20, 48, 0.9);
  transform: scale(0.94);
}

.home-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 16px 120px;
}

.home-card {
  position: relative;
  isolation: isolate;
  border-radius: 18px;
  border: 1px solid rgba(63, 115, 248, 0.35);
  padding: 16px;
  margin-bottom: 16px;
  animation: cardIn 0.5s ease both;
}
.home-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(9, 27, 61, 0.72);
  box-shadow: inset 0 0 15px rgba(34, 211, 238, 0.25);
  z-index: -1;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.carousel-card {
  padding: 0!important;
  overflow: hidden;
}
.carousel-card::before {
  box-shadow: none;
}
.carousel {
  position: relative;
}
.carousel-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.3, 0.8, 0.3, 1);
}
.carousel-slide {
  flex: none;
  width: 100%;
}
.carousel-slide img {
  width: 100%;
  height: auto;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}
.carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}
.carousel-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: width 0.25s ease, background 0.25s ease;
}
.carousel-dots .dot.active {
  width: 18px;
  border-radius: 3px;
  background: #4fc3ff;
}

/* ---------- 区块标题（带图标） ---------- */
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.sec-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sec-icon {
  width: 24px;
  height: 24px;
}
.sec-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.more-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.15s ease;
}
.more-link .more-arrow {
  width: 11px;
  height: 11px;
}
.more-link:active { color: #4fc3ff; }

.market-row {
  display: flex;
  justify-content:space-between;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.market-row::-webkit-scrollbar {
  display: none;
}
.market-item {
  flex: none;
  width: calc(33% - 5px);
  display: flex;
  align-items: stretch;
  gap: 4px;
  border-radius: 12px;
  background: rgba(6, 16, 40, 0.55);
  border: 1px solid rgba(34, 211, 238, 0.18);
  box-shadow: inset 0 0 15px rgba(34, 211, 238, 0.25);
  padding: 10px;
  transition: background 0.15s ease;
}
.market-item:active { background: rgba(6, 16, 40, 0.85); }
.coin-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.mk-name-row {
  display: flex;
  align-items: center;
  gap: 5px;
}
.coin-icon {
  flex: none;
  width: 22px;
  height: 22px;
}
.mk-name {
  font-size: 14px;
  font-weight:bold;
  color: rgba(255, 255, 255, 1);
  white-space: nowrap;
}
.mk-name span{font-weight:normal;color:#00C0E8;padding-left:5px;}
.mk-price {
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 0.2px;
  margin-top: 10px;
  white-space: nowrap;
  color:#fff;
}
.mk-change {
  font-size: 14px;
  font-weight: bold;
  margin-top: 5px;
}
/* 迷你 K 线（右下角） */
.kline-chart.chart-line {
  flex: none;
  width: 84px;
  height: 52px;
  align-self: flex-end;
  margin-left: 6px;
}
.up { color: #22be5a; }
.down { color: #ff4d5e; }

.func-row {
  display:flex;
  justify-content:center;
  gap: 10px;
  border-radius: 14px;
  padding: 18px 8px 14px;
  background: rgba(6, 16, 40, 0.55);
  border: 1px solid rgba(34, 211, 238, 0.18);
  box-shadow: inset 0 0 15px rgba(34, 211, 238, 0.25);
  transition: background 0.15s ease, transform 0.1s ease;
}
.func-box {
  display: flex;
  width:25%;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background:none;
}
.func-icon-bg {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #00c0e8, #3f73f8);
  border: 1px solid rgba(0, 229, 255, 0.5);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.45),
    inset 0 -3px 6px rgba(3, 20, 90, 0.35),
    0 0 14px rgba(0, 229, 255, 0.45);
}
.func-icon-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 45%);
  pointer-events: none;
}
.func-icon {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
}
.func-name {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.5px;
}

/* ---------- 公告 / 资讯 ---------- */
.news-tabs {
  display: flex;
  gap: 28px;
}
.news-tab {
  position: relative;
  padding: 2px 0 6px;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 16px;
  transition: color 0.2s ease;
}
.news-tab.active {
  color: #fff;
  font-weight: 600;
}
.news-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, #4fc3ff, #2f6bff);
}
.news-list { display: none; }
.news-list.active { display: block; }
.news-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.15s ease;
}
.news-item:first-of-type { border-top: 0; }
.news-item:active { background: rgba(255, 255, 255, 0.05); }
.news-thumb {
  flex: none;
  width: 90px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(34, 211, 238, 0.2);
}
.news-body { flex: 1; min-width: 0; }
.news-arrow {
  flex: none;
  align-self: center;
  margin-left: 4px;
  opacity: 0.55;
  background:rgba(255,255,255,0.2);
  border:1px solid #5E84E5;
  border-radius:100%;
  padding:5px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.news-arrow img {
  width: 12px;
  height: 12px;
}
.news-title {
  font-size: 14px;
  font-weight:bold;
  line-height: 1.5;
  white-space: nowrap; 
  width:100%;
  overflow: hidden;   
  text-overflow: ellipsis; 
  color: rgba(255, 255, 255, 0.92);
}
.news-subtitle{font-size:12px;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap; 
  overflow: hidden;   
  width:100%;
  text-overflow: ellipsis; 
  }
.news-meta {
  display: flex;
  align-items: center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 5px;
}
.news-meta>div{flex:1;width:calc(100% - 40px);}
.news-tag {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(63, 115, 248, 0.18);
  border: 1px solid rgba(63, 115, 248, 0.4);
  color: #9ec5ff;
}
.news-date {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  background:url("../images/time.svg") no-repeat left;
  background-size:14px 14px;
  padding-left:18px;
}

/* ---------- 悬浮客服 ---------- */
.float-service {
  position: fixed;
  right: 18px;
  bottom: 40%;
  z-index: 60;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #2f6bff, #1644c8);
  border: 2px solid rgba(0, 229, 255, 0.5);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.35);
  color: #fff;
  transition: transform 0.1s ease;
}
.float-service img{width:80%;}
.float-service:active { transform: scale(0.94); }

/* ---------- 客服弹窗（与个人中心弹窗风格一致） ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 8, 26, 0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-mask.show {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  width: min(320px, 84vw);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(13, 32, 70, 0.96), rgba(7, 18, 45, 0.96));
  border: 1px solid rgba(63, 115, 248, 0.55);
  box-shadow: 0 0 26px rgba(0, 229, 255, 0.25), inset 0 0 18px rgba(34, 211, 238, 0.25);
  padding: 26px 22px 22px;
  text-align: center;
  transform: scale(0.92);
  transition: transform 0.25s ease;
}
.modal-mask.show .modal { transform: scale(1); }
.modal-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 16px;
}
.service-line {
  display: flex;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 12px;
  word-break: break-all;
}
.service-line span {
  color: rgba(255, 255, 255, 0.55);
}
.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}
.modal-btn {
  flex: 1;
  padding: 11px 0;
  border-radius: 12px;
  border: 0;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
}
.modal-btn:active { transform: scale(0.97); }
.modal-btn.confirm {
  background: linear-gradient(180deg, #2f6bff, #1644c8);
  border: 1px solid rgba(0, 229, 255, 0.45);
  color: #fff;
}

/* ---------- 手机端微调 ---------- */
@media (max-width: 420px) {
  .home-top { padding: 16px 16px 0; }
  .home-logo { width: 100px; }
  .home-page { padding: 14px 12px 110px; }
  .home-card { padding: 14px; }
  .carousel-slide img { height: 156px; }
  .market-item { width: 180px; padding: 8px 6px; gap: 6px; }
  .coin-icon { width: 22px; height: 22px; }
  .mk-price { font-size: 12.5px; }
  .func-box { padding: 14px 6px 12px; }
  .func-icon-bg { width: 50px; height: 50px; border-radius: 13px; }
  .func-icon { width: 26px; height: 26px; }
  .news-thumb { width: 90px; height: 60px; }
}

/* Light-surface color mapping; geometry is unchanged. */
body {
  background: #ffffff;
}
.bottom-nav {
  border-top: 1px solid #d8e5f6;
}
.bottom-nav::before {
  background: #ffffff;
}
.nav-item {
  color: #1d304b;
}
.nav-item.active {
  color: #1164d9;
}
.back-btn:hover {
  background: #f7faff;
}
.top-logo {
  mix-blend-mode: normal;
}
.toast {
  background: #203550;
  border: 1px solid #d8e5f6;
  box-shadow: none;
}
.page-bg::after {
  background: #f7faff;
}
.home-logo {
  mix-blend-mode: normal;
}
.msg-link {
  background: #f7faff;
  border: 1px solid #d8e5f6;
}
.msg-link:active {
  background: #ffffff;
}
.home-card {
  border: 1px solid #d8e5f6;
}
.home-card::before {
  background: #f7faff;
  box-shadow: none;
}
.carousel-dots .dot {
  background: #edf3fa;
}
.carousel-dots .dot.active {
  background: #267ce7;
}
.more-link {
  color: #687c93;
}
.more-link:active {
  color: #1164d9;
}
.market-item {
  background: #f7faff;
  border: 1px solid #d8e5f6;
  box-shadow: none;
}
.market-item:active {
  background: #ffffff;
}
.mk-name {
  color: #1d304b;
}
.mk-name span {
  color: #1164d9;
}
.mk-price {
  color: #1d304b;
}
.up {
  color: #169777;
}
.down {
  color: #c05465;
}
.func-row {
  background: #f7faff;
  border: 1px solid #d8e5f6;
  box-shadow: none;
}
.func-icon-bg {
  background: linear-gradient(180deg, #267ce7, #1561d5);
  border: 1px solid #d8e5f6;
  box-shadow: none;
}
.func-icon-bg::after {
  background: linear-gradient(180deg, #edf3fa, transparent 45%);
}
.func-name {
  color: #1d304b;
}
.news-tab {
  color: #687c93;
}
.news-tab.active {
  color: #1d304b;
}
.news-tab.active::after {
  background: linear-gradient(90deg, #267ce7, #1561d5);
}
.news-item {
  border-top: 1px solid #eaf0f7;
}
.news-item:active {
  background: #edf3fa;
}
.news-thumb {
  border: 1px solid #d8e5f6;
}
.news-arrow {
  background: #edf3fa;
  border: 1px solid #d8e5f6;
}
.news-title {
  color: #1d304b;
}
.news-subtitle {
  color: #687c93;
}
.news-tag {
  background: #edf4fe;
  border: 1px solid #d8e5f6;
  color: #1164d9;
}
.news-date {
  color: #687c93;
}
.float-service {
  background: linear-gradient(180deg, #1561d5, #1561d5);
  border: 2px solid #d8e5f6;
  box-shadow: none;
  color: #1d304b;
}
.modal-mask {
  background: rgba(21,40,69,.42);
}
.modal {
  background: linear-gradient(180deg, #ffffff, #ffffff);
  border: 1px solid #d8e5f6;
  box-shadow: none;
}
.service-line {
  color: #52667e;
}
.service-line span {
  color: #687c93;
}
.modal-btn.confirm {
  background: linear-gradient(180deg, #1561d5, #1561d5);
  border: 1px solid #d8e5f6;
  color: #1d304b;
}

.func-row {
  background: linear-gradient(150deg,#fff 32%,#fbfdff 67%,#edf5ff);
  border-color: #e0ecfb;
  border-radius: 16px;
  box-shadow: inset 0 1px 1px #fff,0 6px 12px -9px rgba(43,113,190,.38),0 1px 2px rgba(50,111,190,.04);
  transition: background .18s ease,box-shadow .18s ease,transform .15s ease;
}

.home-card-flat { padding: 0; }
