/* 开始界面样式（Astrix）：深空背景、标题、模式按钮、次要入口 */

.screen-start {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px calc(32px + env(safe-area-inset-bottom));
  background: radial-gradient(circle at 20% 30%, #161b33 0%, #0b0f19 50%, #030712 100%);
  background-size: cover;
  background-position: center;
}
/* 半透明暗色遮罩，保证文字可读 */
.screen-start::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 35%, rgba(5, 7, 15, 0.45), rgba(5, 7, 15, 0.85) 75%);
  z-index: 0;
}

.start-wrap {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.start-title {
  font-size: clamp(3rem, 12vw, 6rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px rgba(124, 215, 255, 0.25);
}
.start-sub {
  font-size: clamp(0.95rem, 3vw, 1.2rem);
  color: var(--text);
  letter-spacing: 0.3em;
  opacity: 0.9;
}
.start-ver {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.2em;
}

/* 主模式按钮 */
.start-modes {
  display: flex;
  gap: 16px;
  width: 100%;
  max-width: 560px;
  margin-top: 8px;
}
.mode-btn {
  flex: 1;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}
.mode-btn:hover { transform: translateY(-3px); border-color: var(--border-strong); background: rgba(124, 215, 255, 0.1); }
.mode-label { font-size: 1.2rem; font-weight: 600; }
.mode-sub { font-size: 0.82rem; }
.mode-primary {
  background: linear-gradient(135deg, rgba(124, 215, 255, 0.2), rgba(179, 156, 255, 0.2));
  border-color: var(--border-strong);
}
/* 在线模式：未接入，置顶但视觉上弱化为「即将推出」 */
.mode-soon {
  opacity: 0.86;
  background: rgba(10, 15, 28, 0.5);
  border-color: rgba(124, 215, 255, 0.22);
  border-style: dashed;
}
.mode-soon:hover { transform: none; border-color: var(--border-strong); background: rgba(124, 215, 255, 0.08); }
.mode-soon .mode-label { color: var(--cyan); }
.mode-soon .mode-sub { color: var(--muted); }

/* ===== 模态内容：新建存档内联表单 ===== */
.acc-new-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  align-items: center;
}
.acc-new-input {
  flex: 1 1 180px;
  min-height: 44px;
  width: 100%;
}
.acc-new-form .btn { flex: 0 0 auto; }
.acc-new-tip { flex-basis: 100%; margin: 2px 0 0; color: var(--danger); min-height: 1.1em; }
.mod-offline-only {
  color: #ffd479;
  background: rgba(255, 212, 121, 0.08);
  border: 1px solid rgba(255, 212, 121, 0.28);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 10px;
}

/* 次要入口 */
.start-secondary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}
.sec-btn {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(10, 15, 28, 0.6);
  color: var(--muted);
  font-size: 0.85rem;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.sec-btn:hover { color: var(--text); border-color: var(--border-strong); background: rgba(124, 215, 255, 0.08); }

/* ===== 模态内容：账号列表 ===== */
.acc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}
.acc-name { font-weight: 600; }
.acc-meta { font-size: 0.8rem; }
.acc-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 0.85rem; }
.acc-new { width: 100%; margin-top: 4px; }

/* ===== 模态内容：更新日志 / 玩法 / 统计 / 设置 ===== */
.changelog .cl-ver { font-weight: 600; margin-bottom: 8px; }
.cl-list, .tip-list { padding-left: 20px; }
.cl-list li, .tip-list li { margin-bottom: 8px; color: var(--text); }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat-card { padding: 12px 8px; text-align: center; }
.stat-val { font-size: 1.2rem; font-weight: 700; color: var(--cyan); }
.stat-key { font-size: 0.76rem; margin-top: 4px; }

/* ===== 指挥官军衔荣誉 HUD ===== */
.rank-hud {
  padding: 16px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(20, 28, 46, 0.75), rgba(124, 215, 255, 0.08));
  border: 1px solid rgba(124, 215, 255, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.rank-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.rank-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rank-icon-big {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(124, 215, 255, 0.6));
}
.rank-honor-label {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.rank-name-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(124, 215, 255, 0.4);
}
.rank-score-badge {
  background: rgba(10, 15, 28, 0.6);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.rank-score-badge strong {
  color: #ffd479;
  font-size: 1.05rem;
  margin-left: 4px;
}
.rank-desc-text {
  font-size: 0.82rem;
  color: var(--text);
  opacity: 0.9;
  line-height: 1.45;
  margin-bottom: 10px;
}
.rank-bar-wrap {
  height: 8px;
  background: rgba(5, 9, 18, 0.7);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 6px;
}
.rank-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  box-shadow: 0 0 10px rgba(124, 215, 255, 0.6);
  transition: width 0.3s ease;
}
.rank-next-tip {
  font-size: 0.76rem;
  text-align: right;
}

/* ===== 成就勋章殿堂 ===== */
.ach-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.ach-header-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.ach-header-rate {
  font-size: 0.8rem;
}
.ach-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}
.ach-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.ach-card.ach-unlocked {
  border-color: rgba(107, 227, 160, 0.45);
  background: rgba(107, 227, 160, 0.06);
}
.ach-card.ach-locked {
  border-color: rgba(124, 215, 255, 0.15);
  opacity: 0.75;
}
.ach-badge {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.ach-content {
  flex: 1;
  min-width: 0;
}
.ach-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 3px;
}
.ach-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ach-status-tag {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.tag-unlocked {
  background: rgba(107, 227, 160, 0.2);
  color: var(--ok);
  border: 1px solid rgba(107, 227, 160, 0.4);
}
.tag-locked {
  background: rgba(138, 160, 192, 0.15);
  color: var(--muted);
  border: 1px solid var(--border);
}
.ach-desc {
  font-size: 0.74rem;
  line-height: 1.35;
  margin-bottom: 6px;
}
.ach-prog-box {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ach-prog-track {
  flex: 1;
  height: 5px;
  background: rgba(5, 9, 18, 0.6);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.ach-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--ok));
}
.ach-prog-hint {
  font-size: 0.68rem;
  white-space: nowrap;
}

.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
}
.set-label { color: var(--muted); }

.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 14px; }

/* ===== 移动端适配 ===== */
@media (max-width: 899px) {
  .screen-start { background-attachment: scroll; }
  .start-modes { flex-direction: column; }
  .mode-btn { min-height: 84px; }
  .stat-grid { grid-template-columns: 1fr; }
  .start-secondary .sec-btn { flex: 1 1 calc(50% - 10px); }
}
