/* index.css — 首页（移植 pages/index/index.wxss，rpx/2 → px） */

.index-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px 30px;
  background: #0a1628;
}

/* Hero */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 18px;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}
.hero-logo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 1px solid rgba(255, 215, 0, 0.65);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.25);
  margin-bottom: 10px;
  object-fit: cover;
}
.title-ar {
  font-size: 30px;
  font-weight: 800;
  color: #FFC300;
  line-height: 1.3;
  direction: rtl;
  text-shadow:
    0 0 2px rgba(255, 250, 235, 0.75),
    0 0 6px rgba(255, 80, 60, 0.55),
    0 0 13px rgba(255, 45, 30, 0.4),
    0 0 24px rgba(225, 15, 15, 0.25);
  filter: drop-shadow(0 0 7px rgba(255, 45, 30, 0.4)) drop-shadow(0 0 17px rgba(200, 0, 0, 0.22));
}
.title {
  font-size: 16px;
  font-weight: 700;
  color: rgba(255, 224, 170, 0.95);
  letter-spacing: 1.5px;
  margin-top: 1px;
}
.subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 5px;
  letter-spacing: 4px;
}
/* 中文品牌字：任何语言模式下都保持楷体（新疆哈萨克语字体锁定中已为其开例外） */
.brand-cn {
  font-family: "STKaiti", "KaiTi", "Kaiti SC", "Kaiti TC", "STSong", "SimSun", serif;
}
/* 标题区三行顺序：阿拉伯字母 / 中文名 / 西里尔字母 */
.hero .subtitle { margin-top: 3px; }
.hero .title { margin-top: 4px; }
/* 中文名（第二行）：三语模式下始终显示汉字，楷体优先，字距收紧，暖金色描边 */
.hero .subtitle {
  font-family: "STKaiti", "KaiTi", "Kaiti SC", "Kaiti TC", "STSong", "SimSun", serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #F7E4B5;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.55), 0 0 12px rgba(255, 215, 0, 0.18);
}
.web-badge {
  margin-top: 8px;
  font-size: 12px;
  color: #4FB3D9;
  border: 1px solid rgba(79, 179, 217, 0.5);
  border-radius: 10px;
  padding: 2px 10px;
  letter-spacing: 1px;
}

/* 继续上次对局 */
.resume-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 27, 60, 0.9);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.resume-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.resume-icon {
  font-size: 24px;
}
.resume-title {
  font-size: 16px;
  color: #FFD700;
  font-weight: 600;
}
.resume-code {
  font-size: 13px;
  color: #8a9ab5;
  margin-top: 2px;
}
.btn-resume {
  padding: 8px 20px;
  font-size: 15px;
  white-space: nowrap;
}

/* 模式区 */
.mode-section {
  width: 100%;
  position: relative;
}
.section-title {
  font-size: 17px;
  color: #FFD700;
  margin-bottom: 10px;
  padding-left: 4px;
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
  font-weight: 700;
}
.mode-card {
  display: flex;
  align-items: center;
  background: rgba(10, 22, 40, 0.95);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 10px;
  padding: 14px 12px;
  margin-bottom: 10px;
  transition: all 0.2s;
  position: relative;
  z-index: 1;
  cursor: pointer;
}
.mode-card:active {
  background: rgba(255, 215, 0, 0.08);
  border-color: rgba(255, 215, 0, 0.4);
  transform: scale(0.98);
}
.mode-card-secondary {
  border-color: rgba(255, 215, 0, 0.18);
}
.mode-card-secondary .mode-icon {
  color: #d4a54a;
}
.mode-icon {
  margin-right: 10px;
  width: 34px;
  text-align: center;
  line-height: 1;
  color: #FFD700;
}
.mode-icon svg { width: 26px; height: 26px; }
.lang-toggle svg { width: 15px; height: 15px; }
.mode-info { flex: 1; display: flex; flex-direction: column; }
.mode-name {
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
}
.mode-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 3px;
}
.mode-arrow {
  font-size: 18px;
  color: rgba(255, 215, 0, 0.5);
  margin-left: 6px;
}

/* 展开面板 */
.diff-panel, .room-panel {
  border: 1px solid rgba(255, 215, 0, 0.12);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  margin-top: -4px;
  position: relative;
  z-index: 2;
}
.diff-title {
  font-size: 16px;
  color: #FFD700;
  margin-bottom: 8px;
  text-align: center;
  font-weight: 800;
}
.diff-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.diff-btn {
  flex: 1 1 40%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(20, 35, 65, 0.9);
  border: 1px solid rgba(255, 215, 0, 0.15);
  border-radius: 7px;
  padding: 9px 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.diff-btn.active {
  background: rgba(255, 215, 0, 0.12);
  border-color: #FFD700;
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.2);
}
/* 好友对战：二选一区块 */
.pvp-rooms-left {
  text-align: center;
  font-size: 12px;
  color: rgba(255, 215, 0, 0.75);
  margin-bottom: 10px;
}
.pvp-block {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  padding: 12px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.03);
}
.pvp-block-title {
  font-size: 13px;
  font-weight: 700;
  color: #f0d9a0;
  margin-bottom: 9px;
}
.pvp-block-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: rgba(255, 215, 0, 0.14);
  border: 1px solid #FFD700;
  border-radius: 7px;
  color: #FFD700;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s;
}
.pvp-block-btn:active { transform: scale(0.98); }
.pvp-block-btn[disabled] { opacity: 0.5; cursor: default; }
.pvp-block-sub {
  margin-top: 7px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
}
.pvp-cancel {
  display: block;
  margin: 8px auto 0;
  padding: 5px 14px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.6);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}
/* 随机匹配：倒计时状态行 */
.pvp-match-status {
  margin-top: 10px;
  padding: 10px;
  border-radius: 7px;
  background: rgba(255, 215, 0, 0.08);
  border: 1px dashed rgba(255, 215, 0, 0.35);
  color: #f0d9a0;
  font-size: 13px;
  text-align: center;
  line-height: 1.5;
}
.pvp-match-status .pm-sec {
  font-size: 20px;
  font-weight: 800;
  color: #FFD700;
  margin: 0 2px;
}
/* 好友对战：输房号加入 */
.pvp-join {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.pvp-input {
  flex: 1;
  min-width: 0;
  background: rgba(20, 35, 65, 0.9);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 7px;
  color: #fff;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 4px;
  text-align: center;
  padding: 10px 8px;
}
.pvp-input::placeholder {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.35);
}
.pvp-join-btn {
  flex: 0 0 auto;
  padding: 0 18px;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid #FFD700;
  border-radius: 7px;
  color: #FFD700;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s;
}
.pvp-join-btn:active { transform: scale(0.97); }
.pvp-join-btn[disabled] { opacity: 0.5; cursor: default; }
.pvp-hint {
  margin-top: 8px;
  font-size: 12px;
  color: #ff8a80;
  text-align: center;
}
/* 分享二维码 */
.share-card { text-align: center; }
.qrcode-box {
  margin: 10px auto 8px;
  width: 210px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
}
.qrcode-box img { display: block; width: 100% !important; height: auto !important; }
.share-hint {
  font-size: 14px;
  color: #9fb2d8;
  margin-bottom: 12px;
  line-height: 1.6;
}
/* 两个操作按钮之间留出间距 */
.share-card .btn-gold + .btn-gold { margin-top: 14px; }

.diff-record {
  font-size: 12px;
  color: #9fb2d8;
  margin-top: 3px;
  min-height: 13px;
}
.diff-btn.active .diff-record {
  color: #FFD700;
}
.diff-label {
  font-size: 17px;
  font-weight: 800;
  color: #FFD700;
}
.diff-hint {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.95);
  margin-top: 3px;
}

.btn-large { margin-bottom: 0; }
.room-input {
  display: block;
  width: 100%;
  margin: 10px 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 6px;
  height: 40px;
  padding: 0 12px;
  font-size: 16px;
  color: #FFD700;
  letter-spacing: 4px;
  text-align: center;
  outline: none;
}
.room-input:focus { border-color: rgba(255, 215, 0, 0.5); }
.room-input::placeholder { color: rgba(255, 255, 255, 0.45); letter-spacing: 0; }
.or-divider {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  margin: 8px 0 2px;
}

/* 曼陀罗背景（对齐小程序效果） */
.mandala-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: auto;
  max-height: 82vh;
  object-fit: contain;
  opacity: 0.75;
  filter: drop-shadow(0 0 40px rgba(255, 215, 0, 0.25)) brightness(1.15);
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: multiply;
  animation: mandalaBreathe 6s ease-in-out infinite;
}
@keyframes mandalaBreathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
  50% { transform: translate(-50%, -50%) scale(1.04); opacity: 0.85; }
}

/* 底部 */
.footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 24px;
}
.footer-links {
  display: flex;
  gap: 12px;
  align-items: center;
}
.footer-links span {
  font-size: 13px;
  color: rgba(255, 215, 0, 0.5);
  cursor: pointer;
}
.footer-links span:active { color: #FFD700; }
.footer-links a { font-size: 13px; color: rgba(255, 215, 0, 0.5); text-decoration: none; }
.footer-links a:active { color: #FFD700; }
.version-tag {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 1px;
}

/* 弹窗内容 */
.rules-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rule-sec {
  font-size: 15px;
  font-weight: 800;
  color: #FFD700;
  margin-top: 8px;
}
.rule-item {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}
.rule-kk {
  font-size: 12px;
  color: rgba(159, 178, 216, 0.85);
  line-height: 1.55;
  padding-left: 10px;
  border-left: 2px solid rgba(255, 215, 0, 0.25);
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 50vh;
  overflow-y: auto;
}
.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 9px 10px;
}
.history-left { display: flex; align-items: center; gap: 8px; }
.history-result {
  font-size: 14px;
  font-weight: 700;
  width: 24px;
  text-align: center;
}
.history-result.win { color: #FFD700; }
.history-result.lose { color: #ff6b6b; }
.history-result.draw { color: rgba(255, 255, 255, 0.5); }
.history-vs { font-size: 13px; color: rgba(255, 255, 255, 0.5); }
.history-moves { font-size: 12px; color: rgba(255, 215, 0, 0.6); }
.history-time { font-size: 11px; color: rgba(255,255,255,0.3); display:block; margin-top:2px;}
.empty-history {
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.3);
  padding: 20px 0;
}

