@import url("./asset-integration.css");

/* 诗韵千年 — 视觉令牌（依据需求文档 §3 定稿） */
:root {
  /* 色彩 */
  --sky:        #4A90D9;
  --sky-deep:   #2F6CB0;
  --sky-50:     #EAF2FB;
  --cream:      #F8F6F0;
  --cream-deep: #EFEAD9;
  --paper:      #FFFFFF;
  --meadow:     #6B9B37;
  --meadow-50:  #ECF3DF;
  --gold:       #C9A227;
  --gold-soft:  #E8C95A;
  --gold-50:    #FBF3D9;

  --ink-1:      #1F2A33;
  --ink-2:      #5A6B7C;
  --ink-3:      #8E99A4;
  --ink-4:      #BCC4CC;
  --line:       rgba(31, 42, 51, 0.08);
  --line-strong:rgba(31, 42, 51, 0.16);

  --success:    #34A853;
  --warning:    #F5A623;
  --error:      #D93025;

  /* 字体 */
  --f-ui:    -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
             "Source Han Sans SC", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --f-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong",
             "Iowan Old Style", Georgia, serif;
  --f-mono:  "SF Mono", "JetBrains Mono", ui-monospace, Menlo, monospace;

  /* 圆角 / 间距 */
  --r-tag: 8px;
  --r-card: 14px;
  --r-card-lg: 18px;
  --r-pill: 999px;

  --pad-h: 16px;
  --gap-xs: 4px;
  --gap-sm: 8px;
  --gap-md: 12px;
  --gap-lg: 16px;
  --gap-xl: 24px;

  --nav-h: 44px;
  --tab-h: 56px;
  --btn-h: 48px;

  /* 阴影 */
  --shadow-card: 0 1px 2px rgba(31, 42, 51, 0.04), 0 8px 24px rgba(31, 42, 51, 0.06);
  --shadow-fab:  0 6px 20px rgba(74, 144, 217, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }

/* ===== iPhone 15 Pro device frame (390 × 844) ===== */
.device {
  width: 390px;
  height: 844px;
  background: var(--cream);
  position: relative;
  overflow: hidden;
  font-family: var(--f-ui);
  color: var(--ink-1);
  font-size: 15px;
  line-height: 1.5;
}

/* Status bar (iOS) */
.status-bar {
  height: 54px;
  padding: 18px 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--f-ui);
  font-weight: 600;
  font-size: 17px;
  color: var(--ink-1);
  position: relative;
  z-index: 10;
}
.status-bar .time { letter-spacing: -0.5px; }
.status-bar .right { display: flex; align-items: center; gap: 6px; }
.status-bar .right svg { display: block; }

/* Dynamic Island */
.dynamic-island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 124px;
  height: 36px;
  background: #000;
  border-radius: 999px;
  z-index: 11;
  pointer-events: none;
}

/* Home indicator */
.home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  background: var(--ink-1);
  border-radius: 3px;
  z-index: 30;
  opacity: 0.85;
}

/* Top nav bar */
.nav-bar {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 var(--pad-h);
  gap: var(--gap-md);
  position: relative;
}
.nav-bar .title {
  font-size: 17px;
  font-weight: 600;
  flex: 1;
  text-align: center;
}
.nav-bar .icon-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--ink-1);
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav-bar .icon-btn svg { width: 22px; height: 22px; }

/* Bottom tab bar */
.tab-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--tab-h) + 22px);
  padding-bottom: 22px;
  background: rgba(248, 246, 240, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 0.5px solid var(--line);
  display: flex;
  z-index: 20;
}
.tab-bar .tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--ink-3);
  font-size: 10px;
  letter-spacing: 0.5px;
  cursor: pointer;
  padding-top: 8px;
  position: relative;
  text-decoration: none;
}
.tab-bar .tab svg { width: 24px; height: 24px; }
.tab-bar .tab.active { color: var(--gold); font-weight: 600; }
.tab-bar .tab.active::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 1px;
}

/* Buttons */
.btn {
  height: var(--btn-h);
  padding: 0 22px;
  border-radius: var(--r-pill);
  border: none;
  font-family: var(--f-ui);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 100ms ease-out;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--sky); color: #fff; }
.btn-secondary { background: var(--paper); color: var(--ink-1); border: 1px solid var(--line-strong); }
.btn-ghost { background: transparent; color: var(--sky); }

/* Tag */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--r-tag);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3px;
  background: var(--sky-50);
  color: var(--sky-deep);
}
.tag-meadow { background: var(--meadow-50); color: var(--meadow); }
.tag-gold   { background: var(--gold-50); color: #8E6B00; }

/* Card */
.card {
  background: var(--paper);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}

/* Kazakh ornament (SVG strip used decoratively) */
.ornament-strip {
  height: 18px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='18' viewBox='0 0 180 18'><g fill='none' stroke='%23C9A227' stroke-width='1' opacity='0.55'><path d='M0 9 L12 9 M168 9 L180 9'/><path d='M22 9 l8 -6 l8 6 l-8 6 z M50 9 l8 -6 l8 6 l-8 6 z M78 9 l8 -6 l8 6 l-8 6 z M106 9 l8 -6 l8 6 l-8 6 z M134 9 l8 -6 l8 6 l-8 6 z'/><circle cx='30' cy='9' r='1.4' fill='%23C9A227'/><circle cx='58' cy='9' r='1.4' fill='%23C9A227'/><circle cx='86' cy='9' r='1.4' fill='%23C9A227'/><circle cx='114' cy='9' r='1.4' fill='%23C9A227'/><circle cx='142' cy='9' r='1.4' fill='%23C9A227'/></g></svg>");
  background-repeat: repeat-x;
  background-position: center;
}

/* Scroll bar hide */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }
