/* 资产交易平台 App 原型 - 设备外壳与通用组件 */
:root {
  --device-w: 393px;
  --device-h: 852px;
  --radius-device: 48px;
  --status-h: 54px;
  --tab-h: 72px;
  --safe-bottom: env(safe-area-inset-bottom, 20px);
  --ink: #0f172a;
  --muted: #64748b;
  --brand: #0ea5e9;
  --brand-dark: #0284c7;
  --surface: #f8fafc;
  --card: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--surface);
  color: var(--ink);
}

.phone-root {
  width: var(--device-w);
  height: var(--device-h);
  max-height: 100vh;
  margin: 0 auto;
  background: #000;
  border-radius: var(--radius-device);
  padding: 10px;
  box-shadow: 0 25px 80px rgba(15, 23, 42, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  overflow: hidden;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: calc(var(--radius-device) - 10px);
  overflow: hidden;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* iOS 风格状态栏 */
.status-bar {
  height: var(--status-h);
  padding: 12px 24px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  flex-shrink: 0;
}

.status-bar .time {
  margin-top: 2px;
}

.status-bar .icons {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--ink);
}

.status-bar .battery {
  width: 24px;
  height: 11px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  padding: 1px;
  position: relative;
}

.status-bar .battery::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 3px;
  width: 2px;
  height: 5px;
  background: var(--ink);
  border-radius: 0 1px 1px 0;
}

.status-bar .battery-inner {
  height: 100%;
  width: 85%;
  background: var(--ink);
  border-radius: 1px;
}

/* 主内容区：为底部 Tab 预留空间 */
.scroll-main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--tab-h) + var(--safe-bottom));
}

.scroll-main.no-tab {
  padding-bottom: 16px;
}

/* 顶部导航（子页） */
.nav-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 12px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.nav-header .back {
  color: var(--brand);
  font-size: 18px;
  padding: 4px;
}

.nav-header h1 {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  text-align: center;
  padding-right: 26px;
}

/* 底部 Tab Bar */
.tab-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--tab-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 0.5px solid rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding-top: 8px;
  z-index: 20;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  font-size: 10px;
  text-decoration: none;
  min-width: 56px;
}

.tab-item i {
  font-size: 22px;
}

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

/* 卡片与 chip */
.card-shadow {
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06),
    0 8px 24px rgba(15, 23, 42, 0.06);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  background: #f1f5f9;
  color: #475569;
  white-space: nowrap;
}

.chip.active {
  background: #e0f2fe;
  color: var(--brand-dark);
  font-weight: 600;
}
