/* =============================================================
   SMS 接码平台 · 前台样式（对标 5sim 风格，清爽商用）
   ============================================================= */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --primary: #2f8dff;
  --primary-d: #1f74e0;
  --primary-l: #e8f2ff;
  --orange: #ff9f43;
  --green: #1da956;
  --red: #e05252;
  --text: #22334d;
  --text-2: #6b7d94;
  --text-3: #9aa9bd;
  --bg: #eef3fa;
  --card: #ffffff;
  --border: #e4ecf6;
  --radius: 18px;
  --shadow: 0 4px 20px rgba(45, 90, 160, .08);
  --shadow-lg: 0 10px 40px rgba(45, 90, 160, .14);
}

html, body { height: 100%; }
body {
  font-family: 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  background-image:
    radial-gradient(600px 300px at 85% -5%, rgba(47,141,255,.10), transparent 60%),
    radial-gradient(500px 260px at -10% 30%, rgba(29,169,86,.07), transparent 60%);
  min-height: 100vh;
}

[v-cloak] { display: none; }
button { font-family: inherit; }
input { font-family: inherit; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 20px;
  height: 62px; display: flex; align-items: center; gap: 14px;
}
.logo { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; letter-spacing: .3px; }
.logo-badge {
  width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(135deg, #2f8dff, #1f6de0);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 17px; box-shadow: 0 4px 12px rgba(47,141,255,.4);
}
.logo span em { font-style: normal; color: var(--primary); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--primary-l); color: var(--primary-d);
  font-size: 12.5px; font-weight: 700; padding: 6px 13px; border-radius: 22px;
  font-family: Consolas, monospace;
}
.btn-link {
  background: none; border: none; color: var(--text-2); font-size: 13px;
  cursor: pointer; padding: 6px 10px; border-radius: 8px; transition: .2s;
}
.btn-link:hover { background: #f0f5fc; color: var(--red); }

/* ---------- 页面容器 ---------- */
.page { max-width: 1120px; margin: 0 auto; padding: 28px 20px 60px; }
.narrow { max-width: 620px; margin: 0 auto; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px;
}

/* ---------- 卡密登录页 ---------- */
.hero { text-align: center; padding: 46px 20px 30px; }
.hero h1 { font-size: 30px; font-weight: 800; letter-spacing: .5px; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero p { color: var(--text-2); margin-top: 10px; font-size: 14.5px; }
.login-card { max-width: 430px; margin: 10px auto 0; padding: 32px; }
.login-card label { font-size: 13px; font-weight: 700; color: var(--text-2); display: block; margin-bottom: 8px; }
.code-input {
  width: 100%; padding: 14px 16px; font-size: 16px; letter-spacing: 2px;
  font-family: Consolas, monospace; text-align: center; text-transform: uppercase;
  border: 2px solid var(--border); border-radius: 13px; outline: none;
  background: #f9fbfe; transition: .2s; color: var(--text);
}
.code-input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(47,141,255,.12); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; font-weight: 700; font-size: 14.5px;
  border-radius: 13px; padding: 13px 26px; transition: .22s;
}
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }
.btn-primary {
  background: linear-gradient(135deg, #3d9dff, #2475e8); color: #fff;
  box-shadow: 0 6px 18px rgba(47,141,255,.35);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(47,141,255,.45); }
.btn-block { width: 100%; }
.btn-outline { background: #fff; color: var(--primary-d); border: 1.5px solid #cfe2fb; }
.btn-outline:hover { background: var(--primary-l); }
.btn-danger-soft { background: #fdeeee; color: var(--red); }
.btn-danger-soft:hover { background: #fbdede; }
.btn-warn-soft { background: #fff5e6; color: #e8890c; }
.btn-warn-soft:hover { background: #ffedd3; }
.btn-green { background: linear-gradient(135deg, #27c168, #159a4c); color: #fff; box-shadow: 0 6px 18px rgba(29,169,86,.3); }
.btn-green:hover:not(:disabled) { transform: translateY(-2px); }
.err-msg { color: var(--red); font-size: 13px; margin-top: 12px; text-align: center; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 760px; margin: 42px auto 0; }
.feature {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 16px; text-align: center;
}
.feature .ic { font-size: 26px; }
.feature h3 { font-size: 14px; margin: 8px 0 4px; }
.feature p { font-size: 12px; color: var(--text-3); }

/* ---------- 提示横幅 ---------- */
.hint-banner {
  background: #fff8e8; border: 1.5px solid #f5d9a0; color: #9c6b12;
  border-radius: 13px; padding: 12px 16px; font-size: 13px; font-weight: 600;
  margin-bottom: 18px; line-height: 1.6;
}
/* 进行中的订单横幅 */
.hint-banner.active-order {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: #eef7ff; border-color: #bcd9fb; color: var(--text); flex-wrap: wrap;
}
.active-order .ao-main { flex: 1; min-width: 190px; }
.active-order .ao-title { font-size: 13.5px; font-weight: 700; }
.active-order .ao-phone {
  font-family: Consolas, monospace; font-weight: 800; font-size: 15px; color: var(--primary-d);
  letter-spacing: .5px;
}
.active-order .ao-sub { font-size: 12.5px; color: var(--text-2); margin-top: 5px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.active-order .ao-sub .status-tag { font-size: 12.5px; }
.btn-sm { padding: 9px 16px; font-size: 13px; border-radius: 10px; flex-shrink: 0; }

/* 订单历史列表 */
.order-list { display: flex; flex-direction: column; }
.order-item {
  display: flex; align-items: center; gap: 12px; padding: 13px 4px;
  border-bottom: 1px solid var(--border); transition: .15s;
}
.order-item:last-child { border-bottom: none; padding-bottom: 2px; }
.order-item:first-child { padding-top: 2px; }
div.order-item.clickable { cursor: pointer; }
div.order-item.clickable:hover { background: #f7fbff; }
.order-item .oi-main { flex: 1; min-width: 0; }
.order-item .oi-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 700; word-break: break-all;
}
.order-item .oi-title .gi-icon { width: 24px; height: 24px; border-radius: 7px; font-size: 12px; }
.order-item .oi-sub {
  font-size: 11.5px; color: var(--text-3); margin-top: 4px; padding-left: 31px;
  font-family: Consolas, monospace; word-break: break-all;
}
.order-item .status-tag { font-size: 12.5px; white-space: nowrap; flex-shrink: 0; }
.order-item .oi-arrow { color: var(--text-3); font-size: 19px; line-height: 1; flex-shrink: 0; }

/* ---------- 步骤 ---------- */
.steps { display: flex; align-items: center; gap: 0; margin-bottom: 26px; }
.step { display: flex; align-items: center; gap: 9px; color: var(--text-3); font-size: 13.5px; font-weight: 700; }
.step .dot {
  width: 28px; height: 28px; border-radius: 50%; background: #dfe8f4; color: var(--text-2);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; transition: .3s;
}
.step.on { color: var(--text); }
.step.on .dot { background: linear-gradient(135deg, #3d9dff, #2475e8); color: #fff; box-shadow: 0 4px 10px rgba(47,141,255,.4); }
.step.done .dot { background: var(--green); color: #fff; }
.step-line { flex: 1; height: 2px; background: #dfe8f4; margin: 0 12px; border-radius: 2px; min-width: 24px; }

/* ---------- 搜索框 ---------- */
.search-box { position: relative; margin-bottom: 14px; }
.search-box input {
  width: 100%; padding: 12px 16px 12px 42px; border: 1.5px solid var(--border);
  border-radius: 12px; font-size: 14px; outline: none; background: #f9fbfe; transition: .2s;
}
.search-box input:focus { border-color: var(--primary); background: #fff; }
.search-box::before {
  content: '🔍'; position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 14px; opacity: .55;
}

/* ---------- 服务/国家 网格 ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 11px; max-height: 380px; overflow-y: auto; padding: 2px; }
.grid-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px;
  border: 1.5px solid var(--border); border-radius: 13px; cursor: pointer;
  background: #fff; transition: .18s; user-select: none;
}
.grid-item:hover { border-color: #bcd8fb; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(45,90,160,.09); }
.grid-item.sel { border-color: var(--primary); background: var(--primary-l); }
.gi-icon {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: #fff; overflow: hidden;
}
.gi-icon img { width: 100%; height: 100%; object-fit: cover; }
.gi-name { font-size: 13.5px; font-weight: 700; line-height: 1.25; word-break: break-all; }
.gi-sub { font-size: 11px; color: var(--text-3); font-weight: 500; margin-top: 1px; }
.flag {
  width: 30px; height: 22px; border-radius: 5px; overflow: hidden; flex-shrink: 0;
  background: #dfe8f4; display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; color: var(--text-2);
}
.flag img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 已选中的条目（对应截图中的选中样式） */
.sel-pill {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1.5px solid var(--border); border-radius: 30px;
  padding: 9px 16px; box-shadow: var(--shadow);
}
.sel-pill .x {
  width: 26px; height: 26px; border-radius: 50%; background: var(--primary-l);
  color: var(--primary-d); border: none; cursor: pointer; font-size: 14px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; transition: .2s; flex-shrink: 0;
}
.sel-pill .x:hover { background: #fbdede; color: var(--red); }
.sel-pill .name { font-weight: 700; font-size: 14.5px; color: var(--primary-d); }

.section-title { font-size: 16px; font-weight: 800; margin: 26px 0 14px; display: flex; align-items: center; gap: 8px; }
.section-title .n { color: var(--primary); }
.empty { text-align: center; color: var(--text-3); padding: 36px 0; font-size: 13.5px; }

/* ---------- 运营商卡片 ---------- */
.op-card {
  position: relative; display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 13px; transition: .2s; box-shadow: var(--shadow);
}
.op-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #bcd8fb; }
.op-badge {
  position: absolute; top: -10px; left: 16px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .6px;
  padding: 3px 12px; border-radius: 20px; color: #fff;
}
.badge-best { background: linear-gradient(90deg, #37c978, #1da956); }
.op-info { flex: 1; min-width: 0; }
.op-name { font-size: 16.5px; font-weight: 800; }
.op-meta { display: flex; gap: 10px; margin-top: 5px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.op-rate { display: inline-flex; align-items: center; gap: 4px; }
.op-stock { color: var(--green); font-weight: 700; }
.op-stock.zero { color: var(--text-3); }
.op-right { display: flex; align-items: center; gap: 16px; }
.btn-buy {
  width: 46px; height: 46px; border-radius: 14px; border: none; cursor: pointer;
  background: linear-gradient(135deg, #3d9dff, #2475e8); color: #fff; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(47,141,255,.35); transition: .2s; flex-shrink: 0;
}
.btn-buy:hover:not(:disabled) { transform: translateY(-2px) scale(1.04); }
.btn-buy:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 订单页 ---------- */
.order-head { position: relative; text-align: center; margin-bottom: 22px; }
.order-head .no { font-size: 14px; color: var(--text-2); }
.order-head .no b { color: var(--text); font-size: 16px; }
.btn-back {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  background: #f0f5fc; color: var(--text-2); border: none; cursor: pointer;
  font-size: 13px; font-weight: 700; padding: 8px 13px; border-radius: 10px; transition: .2s;
}
.btn-back:hover { background: var(--primary-l); color: var(--primary-d); }
.kv { display: flex; align-items: center; padding: 9px 0; font-size: 14px; }
.kv .k { color: var(--text-2); flex-shrink: 0; }
.kv .dots { flex: 1; border-bottom: 2px dotted #dbe4f0; margin: 0 12px; transform: translateY(-4px); }
.kv .v { font-weight: 700; display: flex; align-items: center; gap: 8px; }

.phone-row {
  display: flex; align-items: center; gap: 10px; margin: 16px 0;
  background: #f6faff; border: 1.5px solid #d8e8fd; border-radius: 14px; padding: 13px 15px;
}
.phone-row .num {
  flex: 1; text-align: center; font-size: 21px; font-weight: 800; letter-spacing: 1px;
  font-family: Consolas, monospace;
}
.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; border: none; cursor: pointer;
  background: linear-gradient(135deg, #3d9dff, #2475e8); color: #fff; font-size: 17px;
  display: flex; align-items: center; justify-content: center; transition: .2s; flex-shrink: 0;
}
.icon-btn:hover { transform: translateY(-1px); }
.icon-btn.ghost { background: #e8eff9; color: var(--primary-d); }

.wait-box {
  background: #f2f8ff; border-radius: 14px; padding: 20px; text-align: center; margin: 14px 0;
}
.wait-box h4 { font-size: 15px; margin-bottom: 6px; }
.wait-box p { font-size: 12.5px; color: var(--text-2); }
.dots-anim { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.dots-anim i {
  width: 9px; height: 9px; border-radius: 50%; background: #b9d6f8;
  animation: bounce 1.2s infinite;
}
.dots-anim i:nth-child(2) { animation-delay: .15s; background: var(--primary); }
.dots-anim i:nth-child(3) { animation-delay: .3s; background: var(--orange); }
.dots-anim i:nth-child(4) { animation-delay: .45s; background: #b9d6f8; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-7px); }
}

.code-row {
  display: flex; gap: 10px; margin-top: 8px;
}
.code-view {
  flex: 1; padding: 15px; border: 2px dashed #cfe0f5; border-radius: 13px;
  text-align: center; font-size: 22px; font-weight: 800; letter-spacing: 3px;
  font-family: Consolas, monospace; color: var(--green); background: #f6fcf8;
}
.code-view.empty { color: var(--text-3); font-size: 14px; letter-spacing: 0; font-weight: 500; border-style: solid; background: #fafcfe; }
.sms-text { background: #f8fafd; border-radius: 10px; padding: 11px 14px; font-size: 12.5px; color: var(--text-2); margin-top: 10px; word-break: break-all; }

.status-tag { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; }
.st-PENDING { color: var(--orange); }
.st-RECEIVED { color: var(--green); }
.st-FINISHED { color: var(--green); }
.st-CANCELED, .st-TIMEOUT { color: var(--text-3); }
.st-BANNED { color: var(--red); }

.order-actions { display: flex; gap: 11px; margin-top: 24px; flex-wrap: wrap; }
.order-actions .btn { flex: 1; min-width: 120px; padding: 13px 10px; }

.countdown { font-family: Consolas, monospace; font-weight: 800; color: var(--orange); }

.done-box { text-align: center; padding: 30px 10px; }
.done-box .big { font-size: 52px; }
.done-box h3 { margin: 12px 0 8px; font-size: 19px; }
.done-box p { color: var(--text-2); font-size: 13.5px; line-height: 1.7; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #22334d; color: #fff; padding: 11px 22px; border-radius: 12px;
  font-size: 13.5px; box-shadow: 0 8px 24px rgba(0,0,0,.25);
  animation: slideDown .25s ease;
}
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

/* ---------- loading skeleton / spinner ---------- */
.spinner {
  width: 36px; height: 36px; border-radius: 50%; margin: 30px auto;
  border: 3.5px solid #d8e6f8; border-top-color: var(--primary);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- footer ---------- */
.footer { text-align: center; color: var(--text-3); font-size: 12px; padding: 24px 0 34px; }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .page { padding: 20px 14px 50px; }
  .card { padding: 20px 16px; }
  .hero h1 { font-size: 24px; }
  .features { grid-template-columns: 1fr; gap: 10px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .op-right { gap: 10px; }
  .phone-row .num { font-size: 17px; }
  .step span.txt { display: none; }
  .topbar-inner { padding: 0 14px; }
}
