/* ===== MEME Launchpad 独立 DApp 样式（对齐附件新版） ===== */
:root {
  --bg-color: #0b0f19;
  --card-bg: rgba(20, 27, 45, 0.7);
  --primary: #8b5cf6;
  --secondary: #06b6d4;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(139, 92, 246, 0.3);
  --input-bg: rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  background-image:
    radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.1), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.1), transparent 25%);
  min-height: 100vh;
}

/* ===== 顶部导航 ===== */
.navbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 50px; background: rgba(11, 15, 25, 0.8);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-color);
  position: sticky; top: 0; z-index: 100;
}
.logo { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: bold; background: linear-gradient(90deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.brand-logo {
  width: 40px; height: 40px; border-radius: 12px; object-fit: contain; flex: none;
  background: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.45);
  padding: 2px;
}
.foot-logo { width: 24px; height: 24px; border-radius: 7px; object-fit: contain; }

.connect-btn {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: #fff; border: none; padding: 10px 24px; border-radius: 8px;
  font-weight: bold; cursor: pointer; transition: 0.3s;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}
.connect-btn:hover { transform: translateY(-2px); box-shadow: 0 0 25px rgba(6, 182, 212, 0.7); }

.nav-right { display: flex; align-items: center; gap: 12px; }
.lang-select {
  background: rgba(0, 0, 0, 0.4); color: var(--text-main);
  border: 1px solid var(--border-color); border-radius: 8px;
  padding: 9px 10px; font-size: 14px; cursor: pointer; outline: none; max-width: 150px;
}
.lang-select option { background: #141b2d; color: var(--text-main); }

/* ===== 首屏 ===== */
.hero { text-align: center; padding: 60px 20px 40px 20px; }
.hero h1 { font-size: 48px; margin-bottom: 20px; text-shadow: 0 0 20px rgba(139, 92, 246, 0.5); }
.hero p { color: var(--text-muted); font-size: 18px; max-width: 600px; margin: 0 auto; }

/* ===== 套餐矩阵 ===== */
.matrix-section { padding: 20px 50px 60px 50px; }
.section-title { text-align: center; font-size: 32px; margin-bottom: 40px; color: var(--secondary); }

.grid-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; max-width: 1200px; margin: 0 auto; }
@media (max-width: 1024px) { .grid-container { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .grid-container { grid-template-columns: 1fr; } }

.card {
  background: var(--card-bg); border: 1px solid var(--border-color);
  border-radius: 16px; padding: 30px; transition: 0.3s; position: relative;
  backdrop-filter: blur(10px); display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2); border-color: var(--primary); }
.card.recommended { border: 2px solid var(--secondary); box-shadow: 0 0 20px rgba(6, 182, 212, 0.2); }
.recommended-tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: linear-gradient(90deg, var(--primary), var(--secondary)); padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: bold; white-space: nowrap; }

.card h3 { font-size: 22px; margin-bottom: 8px; text-align: center; }
.card .price { font-size: 28px; font-weight: bold; color: var(--secondary); margin-bottom: 20px; text-align: center; border-bottom: 1px dashed var(--border-color); padding-bottom: 15px; }

.features { list-style: none; margin-bottom: 25px; color: var(--text-muted); flex-grow: 1; }
.features li { margin-bottom: 12px; display: flex; align-items: center; font-size: 14px; }
.features li::before { content: '✦'; color: var(--primary); margin-right: 10px; }

.buy-btn { width: 100%; padding: 15px; background: rgba(139, 92, 246, 0.1); border: 1px solid var(--primary); color: var(--text-main); border-radius: 8px; font-size: 16px; font-weight: bold; cursor: pointer; transition: 0.3s; }
.buy-btn:hover { background: var(--primary); color: #fff; box-shadow: 0 0 15px var(--primary); }

/* 门槛切换（10 / 18 BNB） */
.threshold-group { display: flex; gap: 10px; margin-bottom: 20px; }
.threshold-btn { flex: 1; padding: 10px 8px; background: rgba(6, 182, 212, 0.08); border: 1px solid var(--border-color); color: var(--text-muted); border-radius: 8px; cursor: pointer; font-size: 13px; transition: 0.3s; }
.threshold-btn.active { border-color: var(--secondary); color: var(--secondary); background: rgba(6, 182, 212, 0.15); }

/* 玩法说明次要按钮 */
.info-btn { width: 100%; padding: 10px; margin-bottom: 12px; background: transparent; border: 1px dashed var(--primary); color: var(--primary); border-radius: 8px; cursor: pointer; font-size: 14px; transition: 0.3s; }
.info-btn:hover { background: rgba(139, 92, 246, 0.1); }

/* ===== 税费分配表格 ===== */
.tax-section { max-width: 800px; margin: 0 auto 60px auto; background: var(--card-bg); padding: 40px; border-radius: 16px; border: 1px solid var(--border-color); backdrop-filter: blur(10px); }
.tax-section h3 { text-align: center; margin-bottom: 10px; }
.tax-subtitle { text-align: center; color: var(--text-muted); margin-bottom: 30px; font-size: 14px; line-height: 1.5; }

.token-form-row { display: flex; gap: 15px; margin-bottom: 25px; }
.token-form-row .tax-input { flex: 1; }

.tax-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.tax-table th, .tax-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, 0.1); vertical-align: middle; }
.tax-table th { color: var(--text-muted); font-weight: normal; font-size: 14px; }

.tax-input-wrapper { position: relative; display: flex; align-items: center; }
.tax-input {
  width: 100%; padding: 10px 35px 10px 15px;
  background: var(--input-bg); border: 1px solid var(--border-color);
  border-radius: 8px; color: var(--secondary); font-size: 16px; font-weight: bold;
  outline: none; transition: 0.3s;
}
.tax-input:focus { border-color: var(--secondary); box-shadow: 0 0 10px rgba(6, 182, 212, 0.3); }
.percent-sign { position: absolute; right: 15px; color: var(--text-muted); font-weight: bold; }

/* 自定义收款地址输入框 */
.custom-address-input {
  width: 100%; padding: 10px 15px; margin-top: 5px;
  background: rgba(0, 0, 0, 0.6); border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px; color: var(--text-main); font-size: 13px; outline: none;
}
.custom-address-input:focus { border-color: var(--primary); }
.addr-note { display: block; margin-top: 5px; font-size: 12px; line-height: 1.5; color: rgba(255, 255, 255, 0.55); }

.total-box { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; padding: 20px; background: rgba(0, 0, 0, 0.5); border-radius: 8px; border: 1px dashed var(--primary); }
.total-box span:first-child { font-size: 16px; color: var(--text-muted); }
.total-value { font-size: 28px; font-weight: bold; transition: 0.3s; }

/* ===== 服务协议勾选 ===== */
.tos-row { display: flex; align-items: flex-start; gap: 10px; margin-top: 22px; font-size: 13px; color: var(--text-muted); cursor: pointer; }
.tos-checkbox { width: 15px; height: 15px; margin-top: 2px; accent-color: var(--primary); cursor: pointer; flex: none; }
.tos-text { line-height: 1.6; }
.tos-link { color: var(--secondary); text-decoration: none; }
.tos-link:hover { text-decoration: underline; }

/* 未同意协议时套餐按钮禁用态 */
.buy-btn:disabled, .buy-btn.disabled { opacity: 0.4; cursor: not-allowed; background: rgba(139, 92, 246, 0.05); border-color: rgba(148, 163, 184, 0.3); color: var(--text-muted); }
.buy-btn:disabled:hover, .buy-btn.disabled:hover { background: rgba(139, 92, 246, 0.05); box-shadow: none; transform: none; }

/* 协议弹窗 */
.tos-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.65); display: flex; align-items: center; justify-content: center; z-index: 300; padding: 20px; }
.tos-mask[hidden] { display: none; }
.tos-modal { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; padding: 28px; max-width: 520px; width: 100%; backdrop-filter: blur(10px); }
.tos-title { display: block; font-size: 17px; color: var(--secondary); margin-bottom: 16px; text-align: center; }
.tos-body { color: var(--text-muted); font-size: 14px; line-height: 1.7; max-height: 50vh; overflow-y: auto; }
.tos-body p { margin-bottom: 10px; }
.tos-list { padding-left: 20px; }
.tos-list li { margin-bottom: 12px; }
.tos-list b { color: var(--text-main); }
.tos-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }
.tos-btn { padding: 11px 24px; background: linear-gradient(90deg, var(--primary), var(--secondary)); color: #fff; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; }
.tos-btn.ghost { background: transparent; border: 1px solid var(--border-color); color: var(--text-muted); }

/* ===== 官方防伪 ===== */
.verified-badge { display: inline-block; margin-left: 8px; padding: 3px 10px; font-size: 12px; font-weight: bold; color: #10b981; -webkit-text-fill-color: #10b981; background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.4); border-radius: 20px; vertical-align: middle; }
.verify-section { margin-top: 30px; padding: 0 50px; }
.verify-row {
  display: flex; gap: 12px; margin: 16px auto 0; align-items: center; flex-wrap: wrap;
  max-width: 720px;
}
.verify-row .tax-input { flex: 1 1 160px; width: auto; min-width: 0; padding-right: 15px; height: 44px; }
.verify-btn {
  flex: none; height: 44px; padding: 0 22px; align-self: center;
  background: linear-gradient(90deg, var(--primary), var(--secondary)); color: #fff;
  border: none; border-radius: 8px; font-weight: bold; cursor: pointer; white-space: nowrap;
}
.verify-btn:hover { transform: translateY(-2px); box-shadow: 0 0 18px rgba(6, 182, 212, 0.6); }
.verify-result { margin-top: 16px; padding: 18px; border-radius: 12px; font-size: 15px; line-height: 1.7; }
.verify-result.ok { color: #10b981; background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.4); }
.verify-result.bad { color: #ef4444; background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.4); }
.verify-result .vr-addr { font-family: monospace; font-size: 13px; opacity: 0.8; word-break: break-all; }

/* ===== 页脚 ===== */
footer { text-align: center; padding: 30px; color: var(--text-muted); font-size: 14px; border-top: 1px solid var(--border-color); background: rgba(11, 15, 25, 0.9); }
.foot-risk { margin-top: 10px; opacity: 0.6; }

/* ===== 本地提示弹层（占位，不连后端） ===== */
.toast-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.toast-mask[hidden] { display: none; }
.toast { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; padding: 28px; max-width: 420px; width: 100%; text-align: center; backdrop-filter: blur(10px); }
.toast strong { display: block; font-size: 18px; margin-bottom: 10px; color: var(--secondary); }
.toast p { color: var(--text-muted); font-size: 14px; line-height: 1.7; margin-bottom: 20px; text-align: left; white-space: pre-line; }
.toast-btn { padding: 12px 28px; background: linear-gradient(90deg, var(--primary), var(--secondary)); color: #fff; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; }

@media (max-width: 768px) {
  .navbar { padding: 16px 20px; }
  .hero h1 { font-size: 32px; }
  .matrix-section { padding: 20px 20px 40px 20px; }
  .tax-section { padding: 24px 18px; }
}
