/* =================================================
   🌐 全局基础样式（只定义一次）
================================================= */
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont;
  background: #f6f7f9;
  color: #111;
}

h1, h2, h3 {
  margin: 0 0 12px;
}

p {
  margin: 8px 0 16px;
  color: #555;
}

/* =================================================
   🧑‍💻 后台管理 Admin
================================================= */

.app-card {
  max-width: 520px;
  margin: 0 auto 24px;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,.1);
}

input, textarea, select {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
}

textarea {
  resize: vertical;
}

button {
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  background: #6366f1;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  opacity: 0.9;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.tab {
  padding: 8px 14px;
  border-radius: 6px;
  background: #eee;
  cursor: pointer;
  border: none;
}

.tab.active {
  background: #6366f1;
  color: #fff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.app-item {
  border-top: 1px solid #eee;
  padding-top: 12px;
  margin-top: 12px;
  font-size: 14px;
}
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: #fff;
  border-radius: 14px;
  width: 90%;
  max-width: 520px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

.modal h3 {
  margin-top: 0;
}

.modal label {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  color: #555;
}

.modal input,
.modal textarea {
  width: 100%;
  margin-top: 4px;
}

.modal hr {
  margin: 16px 0;
  border: none;
  border-top: 1px solid #eee;
}

/* =====================
   全局
===================== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    sans-serif;
  background: #f5f7fb;
  color: #1f2937;
}

/* =====================
   Header
===================== */
.admin-header {
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: #fff;
  padding: 14px 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;

  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  font-weight: 700;
  font-size: 18px;
  white-space: nowrap;
}

/* =====================
   Tabs
===================== */
.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tab {
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.tab:hover {
  background: rgba(255,255,255,0.25);
}

.tab.active {
  background: #fff;
  color: #4f46e5;
  font-weight: 600;
}

/* =====================
   主体区域
===================== */
.admin-main {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
}

/* =====================
   卡片
===================== */
.app-card {
  max-width: 520px;
  margin: 0 auto;
  background: #fff;
  border-radius: 14px;
  padding: 28px 28px 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.app-card h2 {
  margin: 0 0 20px;
  font-size: 18px;
}

/* =====================
   表单
===================== */
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  margin-top: 16px;
  color: #374151;
}

input,
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fff;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

/* file input 轻微统一 */
input[type="file"] {
  padding: 8px;
  background: #f9fafb;
}

/* =====================
   主按钮
===================== */
button {
  font-size: 14px;
}

.app-card button {
  margin-top: 22px;
  width: 100%;
  padding: 12px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.app-card button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(99,102,241,0.35);
}

/* =====================
   Tab 内容
===================== */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* =====================
   Modal（保持兼容）
===================== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: #fff;
  border-radius: 14px;
  width: 90%;
  max-width: 520px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

/* ===== Button System ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: #f3f4f6;
  color: #374151;
  cursor: pointer;
  transition: all .2s ease;
}

.btn:hover {
  background: #e5e7eb;
}

/* 主操作（编辑） */
.btn-primary {
  background: #6366f1;
  color: #fff;
}
.btn-primary:hover {
  background: #4f46e5;
}

/* 次操作（刷新） */
.btn-secondary {
  background: #eef2ff;
  color: #4338ca;
}
.btn-secondary:hover {
  background: #e0e7ff;
}

/* 危险操作（删除） */
.btn-danger {
  background: transparent;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.btn-danger:hover {
  background: #fee2e2;
}
.app-row {
  padding: 16px 0;
  border-bottom: 1px solid #eee;
}

.app-info strong {
  font-size: 15px;
}

.meta {
  font-size: 12px;
  color: #6b7280;
  margin: 4px 0 10px;
}

.link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.link-row label {
  width: 48px;
  font-size: 12px;
  color: #6b7280;
}

.link-row input {
  flex: 1;
  font-size: 12px;
}

.app-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.domain-row {
  padding: 14px 0;
  border-bottom: 1px solid #eee;
}

.domain-main {
  font-size: 14px;
  margin-bottom: 6px;
}

.domain-status {
  font-size: 12px;
  margin-left: 6px;
  color: #6b7280;
}

.domain-status.active {
  color: #16a34a;
}

.domain-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.domain-ns {
  font-size: 12px;
  color: #d97706;
  margin-top: 8px;
}

.ns-tip {
  margin-top: 4px;
  font-size: 11px;
  color: #9ca3af;
}

/* =================================================
   📱 前台落地页 Landing Page
================================================= */

.page {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* 不允许页面无限变宽 */
.app-container {
  width: 100%;
  max-width: 420px;   /* ✅ 强制像手机 */
  background: #fff;
  padding: 16px;
}

/* 桌面端也保持“手机比例” */
@media (min-width: 900px) {
  .app-container {
    max-width: 420px; /* ❗不要 860px */
  }
}


/* 顶部 */
.header {
  display: flex;
  gap: 14px;
  align-items: center;
}


@media (max-width: 640px) {
  .header {
    align-items: flex-start;
  }
}

.icon {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  margin-bottom: 6px;
}


.meta h1 {
  font-size: 22px;
  margin-bottom: 4px;
}

.publisher {
  font-size: 13px;
  color: #16a34a;
  margin-bottom: 6px;
}

.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 52px;

  margin: 16px 0 20px;

  background: linear-gradient(180deg, #22c55e, #16a34a);
  color: #fff;

  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1;            /* ⭐关键：防止文字基线偏移 */

  border-radius: 999px;
  text-decoration: none;

  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.35);
}


/* 评分行（像 Google Play） */
.rating-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 280px;     /* ⬅️ 控制宽度 */
  margin: 12px auto 0; /* ⬅️ 居中 */
  text-align: center;
}


.rating-item {
  flex: 1;
}

.rating-item strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
}

.rating-item span {
  font-size: 12px;
  color: #666;
}

/* 应用信息表 */
.app-info {
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  padding: 12px 0;
  margin: 16px 0;
}

.info-row {
  display: grid;
  grid-template-columns: 140px 1fr; /* 左固定，右自适应 */
  align-items: center;
  font-size: 14px;
  padding: 6px 0;
}


.info-row span:first-child {
  color: #666;
  text-align: left;
}

.info-row span:last-child {
  text-align: right;
  font-weight: 500;
}


/* =================================================
   🧩 Section 卡片
================================================= */

.section {
  margin-top: 20px;
  padding: 16px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}

/* 截图 */
.screenshots {
  display: flex;
  flex-wrap: nowrap;        /* ❗禁止换行 */
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  padding-left: 2px;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}


.screenshots img {
  height: 300px;
  width: auto;
  max-width: 240px;     /* ✅ 核心：单张截图最大宽度 */
  border-radius: 14px;
  flex-shrink: 0;
  scroll-snap-align: start;
}




/* 权限 */
.permissions {
  font-size: 14px;
  color: #444;
  padding-left: 18px;
}

.permissions li {
  margin-bottom: 6px;
}

/* 安全提示 */
.security {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  color: #166534;
}

/* 评论 */
.review {
  border-top: 1px solid #eee;
  padding: 10px 0;
  font-size: 14px;
}

/* =================================================
   🏷 增强模块（标签 / 年龄 / 提示）
================================================= */

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.tag {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 500;
}

.age-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 6px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 600;
}

.download-note {
  font-size: 12px;
  color: #666;
  text-align: center;
  margin-top: 12px;
}

/* =================================================
   ⬇️ 底部悬浮下载按钮（核心转化点）
================================================= */

.btn-float {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: #16a34a;
  color: white;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
  z-index: 999;
}
/* =================================================
   🔒 强制全设备纵向（最终兜底）
================================================= */

html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  background: #f6f7f9;
}


/* 永远手机宽度 */
.app-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

/* 禁止任何横向布局 */
.page,
.main,
.layout,
.container {
  display: block !important;
}
/* 🔥 强制修复 Download APK 居中问题 */
.download-btn {
  position: relative !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  padding: 0 !important;
  margin: 16px 0 20px;

  width: 100%;
  height: 52px;

  font-size: 16px;
  font-weight: 700;
  line-height: 1 !important;
  letter-spacing: 0.3px;

  color: #fff;
  background: linear-gradient(180deg, #22c55e, #16a34a);

  border-radius: 999px;
  text-decoration: none;

  text-align: center !important;
}

/* ❗杀掉所有可能的伪元素 */
.download-btn::before,
.download-btn::after {
  content: none !important;
}

/* ❗防止 span / text 被偏移 */
.download-btn * {
  margin: 0 !important;
  padding: 0 !important;
}

