/* eBookware 官网 / 落地页 公共样式
   设计变量与 App 内 static/css/common.css 保持一致 */

:root {
  --primary: #2E9FD9;
  --primary-dark: #1F84B8;
  --primary-light: #E9F5FC;
  --primary-gradient: linear-gradient(135deg, #3FB0E5 0%, #2489C6 100%);

  --bg: #F3F5F7;
  --surface: #FFFFFF;
  --text: #1F2429;
  --text-2: #5A646E;
  --text-3: #98A2AD;
  --border: #E8EBEF;

  --radius: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(31, 41, 55, 0.05);
  --shadow-md: 0 8px 26px rgba(31, 41, 55, 0.09);
  --shadow-lg: 0 16px 48px rgba(31, 41, 55, 0.14);

  --maxw: 480px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
               'Hiragino Sans GB', 'Microsoft YaHei', Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 18px;
}

/* hidden 属性必须能压住下面这些带 display 的类。
   .btn{display:flex} 是作者样式，优先级高于浏览器默认的 [hidden]{display:none}，
   不写这条的话 <a hidden class="btn"> 照样会显示出来 */
[hidden] { display: none !important; }

/* ---------- 按钮 ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 17px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
}
.btn:active { transform: scale(.98); opacity: .9; }

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 10px 24px rgba(46, 159, 217, .32);
}

.btn-ghost {
  background: var(--surface);
  color: var(--primary);
  border: 1px solid var(--border);
}

.btn[disabled] {
  background: #C8D3DB;
  color: rgba(255, 255, 255, .9);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-icon { width: 20px; height: 20px; flex: none; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

/* ---------- 页脚 ---------- */
.footer {
  padding: 34px 18px calc(34px + env(safe-area-inset-bottom));
  text-align: center;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.9;
}
.footer a { color: var(--text-2); }

/* ---------- 微信内「在浏览器打开」引导遮罩 ---------- */
.wx-mask {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(12, 18, 24, .88);
  display: none;
  padding: 18px;
}
.wx-mask.show { display: block; }
.wx-arrow {
  width: 62px;
  margin-left: auto;
  margin-right: 6px;
  color: #fff;
}
.wx-tip {
  color: #fff;
  text-align: right;
  font-size: 17px;
  line-height: 1.8;
  margin: 6px 4px 0 0;
}
.wx-tip b { color: #7FD6FF; font-weight: 600; }
.wx-close {
  display: block;
  margin: 30px auto 0;
  background: none;
  border: 1px solid rgba(255, 255, 255, .5);
  color: rgba(255, 255, 255, .9);
  border-radius: var(--radius-pill);
  padding: 9px 26px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

@media (prefers-reduced-motion: no-preference) {
  .fade-in { animation: fade .4s ease both; }
  @keyframes fade {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
  }
}
