/* =====================================================================
   Damka棋类合集 · 启动登录页 login.css
   竖屏 H5 · 深蓝渐变底 / 金色标题 / 玻璃面板 / 金色按钮 / 无图片纯代码
   ===================================================================== */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  min-height: 100vh; min-height: 100dvh;
  background: #0b1f45;
  color: #f4f6fb;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Noto Sans", "Noto Sans Uyghur", "Noto Sans Arabic", sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  overflow-x: hidden;
}

body[dir="rtl"] { direction: rtl; }

/* ==== 全屏竖屏容器 ==== */
.screen {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 520px;          /* 竖屏留白 */
  min-height: 100vh; min-height: 100dvh;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top,0px) + 22px) 22px calc(env(safe-area-inset-bottom,0px) + 18px);
}

/* ==== 深蓝渐变背景(克制,少DIY过度渐变) ==== */
.screen::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(120% 80% at 50% -10%, #1b3a7a 0%, #103061 45%, transparent 70%),
    linear-gradient(180deg, #0d2553 0%, #0a1c45 60%, #081536 100%);
}
/* 顶部微弱金色氛围光 + 底部暗光(营造进深感但不抢) */
.bg-glow { position: fixed; border-radius: 50%; filter: blur(60px); z-index: -1; opacity:.5; }
.bg-glow-a { width: 260px; height: 260px; top: -60px; left: 50%; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255,205,90,.34), transparent 65%); }
.bg-glow-b { width: 300px; height: 300px; bottom: -90px; left: 50%; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(20,80,170,.5), transparent 65%); }

/* ==== 顶部语言切换 ==== */
.lang-toggle {
  position: absolute; top: calc(env(safe-area-inset-top,0px) + 16px); right: 20px;
  z-index: 20; display: flex;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px; overflow: hidden; backdrop-filter: blur(6px);
}
body[dir="rtl"] .lang-toggle { right: auto; left: 20px; }
.lang-toggle button {
  border: none; background: transparent; color: #cdd9f2;
  padding: 7px 14px; font-size: 14px; cursor: pointer; font-family: inherit;
}
.lang-toggle button.on { background: rgba(255,205,90,.2); color: #ffd98a; font-weight: 700; }

/* ==== 玻璃面板基类 ==== */
.glass {
  background: rgba(38,62,112,.34);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 22px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 36px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.16);
}
.glass-strong {
  background: rgba(26,44,88,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ==== 标题区(玻璃卡) ==== */
.login-head {
  width: 100%;
  text-align: center;
  padding: 20px 16px 16px;
  margin-top: 6px;
}
.main-title {
  margin: 0;
  font-size: 30px; font-weight: 800; letter-spacing: 2px;
  color: #ffd98a;
  text-shadow: 0 2px 12px rgba(0,0,0,.35), 0 0 22px rgba(255,205,90,.25);
}
.sub-title {
  margin-top: 6px;
  font-size: 15px; letter-spacing: 4px;
  color: #cfe0ff;
}

/* ==== 中部棋盘棋子展示 ==== */
.board-stage {
  position: relative;
  width: 100%;
  flex: 0 0 auto;
  margin: 20px 0;
  display: flex; justify-content: center;
}
.board-3d {
  transform: rotateX(16deg);
  filter: drop-shadow(0 16px 22px rgba(0,0,0,.4));
}
/* 棋盘外框(木色) */
.cb-board {
  width: min(78vw, 300px);
  aspect-ratio: 1/1;
  background: linear-gradient(90deg,#a56a34,#c8934f,#9c602e);
  border-radius: 10px;
  padding: 8px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.35);
}
.cb-inner {
  width: 100%; height: 100%;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  gap: 0; overflow: hidden; border-radius: 5px;
}
.cbcell { position: relative; }
.cbcell.light { background: #f2e8d4; }
.cbcell.dark  { background: #7a4a1e; }
/* 西洋跳棋棋子在深格 */
.cpiece {
  position: absolute; inset: 10%;
  border-radius: 50%;
  box-shadow: 0 3px 5px rgba(0,0,0,.45), inset 0 2px 3px rgba(255,255,255,.25), inset 0 -2px 3px rgba(0,0,0,.25);
}
/* 飘浮装饰棋子(米白/黑 点缀) */
.float-piece {
  position: absolute;
  width: 26px; height: 26px;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0,0,0,.35), inset 0 2px 3px rgba(255,255,255,.3);
  opacity:.92; animation: bobbing 3.4s ease-in-out infinite;
}
.fp-w { background: radial-gradient(circle at 35% 30%, #fffbe8, #d9cdb2); }
.fp-b { background: radial-gradient(circle at 35% 30%, #3a3a3a, #0c0c0c); }
.fp-1 { left: 6%;  top: 36%; animation-delay: .0s; }
.fp-2 { right: 5%; top: 26%; animation-delay: .6s; }
.fp-3 { left: 9%;  bottom: 12%; animation-delay: 1.2s; width:18px; height:18px;}
.fp-4 { right: 8%; bottom: 8%; animation-delay: 1.8s; }
@keyframes bobbing {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ==== 底部操作(玻璃) ==== */
.login-actions {
  width: 100%;
  padding: 16px;
  margin-top: auto;           /* 推到底部 */
  display: flex; flex-direction: column; gap: 12px;
}
/* 金色主按钮 */
.btn-gold {
  width: 100%;
  position: relative;
  border: none; cursor: pointer;
  padding: 16px; border-radius: 16px;
  font-size: 20px; font-weight: 800; letter-spacing: 4px;
  color: #2f2308;
  background: linear-gradient(135deg, #ffe6ad 0%, #ffd27a 45%, #e8a63f 100%);
  box-shadow: 0 10px 22px rgba(180,120,20,.35), inset 0 1px 0 rgba(255,255,255,.6), inset 0 -2px 4px rgba(140,90,10,.35);
  transition: transform .06s ease, filter .12s ease;
}
.btn-gold:active { transform: translateY(1px) scale(.99); filter: brightness(1.04); }
.btn-gold:disabled { filter: grayscale(.4) brightness(.9); opacity:.75; }
.btn-badge { margin-right: 6px; color:#b87a10; font-size: 12px; vertical-align: 2px; }
/* 次按钮行(规则/设置 边线钮 更克制) */
.btn-row { display: flex; gap: 12px; }
.btn-line {
  flex: 1;
  border: 1px solid rgba(255,255,255,.26);
  background: rgba(255,255,255,.05);
  color: #eaf1ff;
  padding: 13px; border-radius: 14px;
  font-size: 16px; font-weight: 600; letter-spacing: 2px;
  cursor: pointer;
  transition: background .12s ease;
}
.btn-line:active { background: rgba(255,255,255,.12); }

.splash-foot {
  margin-top: 12px;
  font-size: 11px; color: #93a6d0; letter-spacing: 1px;
  opacity:.85;
}

/* ==== 弹窗 ==== */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(4,8,22,.6); padding: 24px;
}
.modal-mask.show { display: flex; }
.modal {
  width: 100%; max-width: 420px;
  border-radius: 22px; padding: 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.modal h2 { margin: 0 0 12px; font-size: 21px; color: #ffd98a; }
.m-body { color: #dbe6fb; line-height: 1.75; font-size: 15px; margin-bottom: 18px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.seg { display: flex; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; overflow:hidden;}
.seg button { border:none; background:transparent; color:#cdd9f2; padding:7px 15px; cursor:pointer; font-family:inherit; font-size:14px;}
.seg button.on { background: rgba(255,205,90,.22); color:#ffd98a; font-weight:700;}

/* ==== 大屏留白(不改宽) ==== */
@media (min-width: 600px) {
  .screen { border: 1px solid rgba(255,255,255,.06); }
}
