/* 卡世界开放平台 — 公共样式（与官网风格对齐：白底 / 品牌蓝 #165dff / PingFang SC / 1200px 容器） */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: PingFangSC-Medium, PingFang SC, Microsoft YaHei, "Helvetica Neue", Arial, sans-serif; background: #fff; color: #1d1d1f; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { display: block; }

/* ===== 顶部导航 ===== */
.op-header { position: sticky; top: 0; z-index: 100; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.op-header .op-header-inner { width: 1200px; margin: 0 auto; height: 64px; display: flex; align-items: center; justify-content: space-between; }
.op-logo { display: flex; align-items: center; }
.op-logo img { height: 34px; width: auto; margin-right: 10px; }
.op-logo .op-logo-text { font-size: 20px; font-weight: 700; color: #2f6bff; letter-spacing: 1px; }
.op-logo .op-logo-badge { margin-left: 8px; font-size: 12px; font-weight: 400; color: #165dff; background: #eaf1ff; border-radius: 4px; padding: 2px 8px; }
.op-menu { display: flex; align-items: center; }
.op-menu a { font-size: 15px; color: #1d1d1f; margin: 0 22px; padding: 6px 2px; position: relative; transition: color .2s; }
.op-menu a:hover { color: #2f6bff; }
.op-menu a.active { color: #1d1d1f; font-weight: 700; }
.op-menu a.active:after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: -4px; width: 20px; height: 3px; border-radius: 2px; background: #2f6bff; }
.op-actions { display: flex; align-items: center; gap: 12px; }
.op-btn-login { font-size: 14px; color: #1d1d1f; padding: 8px 16px; border-radius: 8px; transition: color .2s; }
.op-btn-login:hover { color: #2f6bff; }
.op-btn-primary { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 22px; border-radius: 8px; background: #165dff; color: #fff; font-size: 14px; cursor: pointer; border: none; transition: background .2s; }
.op-btn-primary:hover { background: #3370ff; }

/* ===== 页脚 ===== */
.op-footer { background: #f7f8fa; margin-top: 80px; }
.op-footer-inner { width: 1200px; margin: 0 auto; padding: 48px 0 24px; }
.op-footer-top { display: flex; justify-content: space-between; padding-bottom: 32px; border-bottom: 1px solid #e5e6eb; }
.op-footer-brand { display: flex; align-items: center; }
.op-footer-brand img { height: 32px; margin-right: 10px; }
.op-footer-brand span { font-size: 18px; font-weight: 700; color: #2f6bff; }
.op-footer-links { display: flex; gap: 80px; }
.op-footer-col .op-footer-col-title { font-size: 14px; font-weight: 700; color: #1d1d1f; margin-bottom: 14px; }
.op-footer-col a { display: block; font-size: 13px; color: #86909c; line-height: 28px; transition: color .2s; }
.op-footer-col a:hover { color: #2f6bff; }
.op-footer-bottom { padding-top: 20px; font-size: 12px; color: #a9aeb8; text-align: center; }
.op-footer-bottom a { color: #a9aeb8; text-decoration: none; transition: color .2s; }
.op-footer-bottom a:hover { color: #86909c; }
.op-footer-col a.op-dev-qr-open { cursor: pointer; }

/* ===== 联系开发者二维码弹窗 ===== */
.op-modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1000; align-items: center; justify-content: center; }
.op-modal-mask.show { display: flex; }
.op-modal-box { position: relative; background: #fff; border-radius: 16px; padding: 28px 32px 26px; width: 320px; max-width: 88%; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.18); }
.op-modal-title { font-size: 16px; font-weight: 700; color: #1d1d1f; margin-bottom: 16px; }
.op-modal-box img { display: block; width: 240px; max-width: 100%; height: auto; margin: 0 auto; border-radius: 8px; }
.op-modal-tip { font-size: 12px; color: #86909c; margin-top: 12px; }
.op-modal-close { position: absolute; top: 8px; right: 12px; background: none; border: none; font-size: 22px; line-height: 1; color: #86909c; cursor: pointer; padding: 4px; }
.op-modal-close:hover { color: #1d1d1f; }

/* ===== 通用组件 ===== */
.op-container { width: 1200px; margin: 0 auto; }
.op-btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; cursor: pointer; border: none; transition: all .2s; font-size: 14px; }
.op-btn-blue { background: #165dff; color: #fff; height: 40px; padding: 0 24px; }
.op-btn-blue:hover { background: #3370ff; }
.op-btn-ghost { background: #fff; color: #165dff; height: 40px; padding: 0 24px; border: 1px solid #165dff; }
.op-btn-ghost:hover { background: #eaf1ff; }
.op-btn-lg { height: 52px; padding: 0 36px; font-size: 16px; border-radius: 12px; }
.op-btn[disabled] { opacity: .55; cursor: not-allowed; }

/* toast */
#op-toast { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); z-index: 9999; background: rgba(0,0,0,.78); color: #fff; font-size: 14px; padding: 10px 22px; border-radius: 8px; opacity: 0; transition: opacity .25s; pointer-events: none; max-width: 80%; }
#op-toast.show { opacity: 1; }

/* 加载 / 空态 */
.op-loading { padding: 60px 0; text-align: center; color: #86909c; font-size: 14px; }
.op-loading .op-spinner { display: inline-block; width: 22px; height: 22px; border: 2px solid #c9d8ff; border-top-color: #165dff; border-radius: 50%; animation: op-spin .8s linear infinite; vertical-align: -5px; margin-right: 8px; }
@keyframes op-spin { to { transform: rotate(360deg); } }
.op-empty { padding: 60px 0; text-align: center; color: #a9aeb8; font-size: 14px; }
.op-error-box { padding: 40px 24px; text-align: center; background: #fff7f0; border: 1px solid #ffd9b8; border-radius: 12px; color: #ad5b00; font-size: 14px; line-height: 24px; }

@media (max-width: 1240px) {
  .op-header .op-header-inner, .op-footer-inner, .op-container { width: 92%; }
  .op-menu a { margin: 0 10px; font-size: 14px; }
}

/* ===== 汉堡菜单（移动端） ===== */
.op-burger { display: none; align-items: center; justify-content: center; width: 34px; height: 34px; border: none; background: none; border-radius: 8px; cursor: pointer; padding: 0; }
.op-burger svg { width: 20px; height: 20px; fill: #1d1d1f; }
.op-burger:active { background: #f2f3f5; }
.op-nav-panel { display: none; }

/* ===== 移动端适配（≤900px） ===== */
@media (max-width: 900px) {
  .op-header .op-header-inner { height: 56px; }
  .op-menu { display: none; }
  .op-burger { display: flex; margin-left: auto; }
  .op-nav-panel { display: block; position: absolute; top: 56px; left: 0; right: 0; background: #fff; border-bottom: 1px solid #f0f1f5; box-shadow: 0 12px 24px rgba(0,0,0,.08); padding: 6px 4%; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility .2s; }
  .op-nav-panel.show { opacity: 1; visibility: visible; transform: translateY(0); }
  .op-nav-panel a { display: block; font-size: 15px; color: #1d1d1f; padding: 13px 10px; border-bottom: 1px solid #f7f8fa; }
  .op-nav-panel a:last-child { border-bottom: none; }
  .op-nav-panel a.active { color: #165dff; font-weight: 700; }
  .op-logo img { height: 28px; margin-right: 8px; }
  .op-logo .op-logo-text { font-size: 17px; }
  .op-logo .op-logo-badge { font-size: 11px; padding: 1px 6px; }
  .op-actions { gap: 8px; }
  .op-btn-login { padding: 6px 8px; font-size: 13px; }
  .op-btn-primary { height: 34px; padding: 0 12px; font-size: 13px; }
  .op-footer-inner { padding: 36px 0 20px; }
  .op-footer-top { flex-direction: column; gap: 26px; padding-bottom: 26px; }
  .op-footer-links { gap: 40px; flex-wrap: wrap; }
}
