/* ============================================================
   津门弈 - 卡牌游戏样式表
   Tianjin-style Social Deduction Card Game
   ============================================================ */

/* ============================================================
   1. 全局重置与基础样式
   ============================================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  background: #0a0a0f;
  color: #e0d5c0;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: #c8b478;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #e6d7b4;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

input, button, textarea, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
}

button {
  cursor: pointer;
  background: none;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #0a0a0f;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: rgba(200, 180, 120, 0.25);
  border-radius: 3px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(200, 180, 120, 0.4);
}

/* 选中文本样式 */
::selection {
  background: rgba(200, 180, 120, 0.3);
  color: #e6d7b4;
}

/* ============================================================
   2. 预加载页面 (splash-screen)
   ============================================================ */

.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: url('../image/background/ol_bg.jpg') center center / cover no-repeat, linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0a0a0f 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.splash-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.55);
  z-index: 1;
}

.splash-screen__content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.splash-screen__logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-screen__logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.splash-screen--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-screen__title {
  font-size: 2.8rem;
  font-weight: 700;
  color: #c8b478;
  letter-spacing: 0.15em;
  text-shadow: 0 0 30px rgba(200, 180, 120, 0.3), 0 0 60px rgba(200, 180, 120, 0.1);
  margin-bottom: 0.5rem;
  user-select: none;
}

.splash-screen__subtitle {
  font-size: 1rem;
  color: #a09880;
  letter-spacing: 0.5em;
  margin-bottom: 3rem;
  user-select: none;
}

.splash-screen__progress-wrapper {
  width: 240px;
  height: 3px;
  background: rgba(200, 180, 120, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.splash-screen__progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #c8b478, #e6d7b4);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.splash-screen__progress-text {
  font-size: 0.85rem;
  color: #a09880;
  letter-spacing: 0.1em;
}

.splash-screen__loading-tip {
  font-size: 0.8rem;
  color: #6a6070;
  margin-top: 2rem;
  letter-spacing: 0.05em;
  animation: pulse 2s ease-in-out infinite;
}

.splash-screen__notice {
  font-size: 0.78rem;
  color: rgba(200, 180, 120, 0.5);
  margin-top: 1.5rem;
  letter-spacing: 0.08em;
}

/* ============================================================
   3. 登录页面 (login-page)
   ============================================================ */

.login-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: url('../image/background/ol_bg.jpg') center center / cover no-repeat, linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0f0a1a 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.5);
  z-index: 1;
}

/* 背景粒子装饰 */
.login-page__particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

.login-page__particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(200, 180, 120, 0.3);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.login-page__particle:nth-child(1) { top: 15%; left: 10%; animation-delay: 0s; }
.login-page__particle:nth-child(2) { top: 30%; left: 80%; animation-delay: 1s; }
.login-page__particle:nth-child(3) { top: 60%; left: 20%; animation-delay: 2s; }
.login-page__particle:nth-child(4) { top: 75%; left: 70%; animation-delay: 0.5s; }
.login-page__particle:nth-child(5) { top: 45%; left: 50%; animation-delay: 1.5s; }
.login-page__particle:nth-child(6) { top: 85%; left: 40%; animation-delay: 2.5s; }
.login-page__particle:nth-child(7) { top: 20%; left: 60%; animation-delay: 3s; }
.login-page__particle:nth-child(8) { top: 55%; left: 85%; animation-delay: 0.8s; }

/* 登录卡片 - 毛玻璃效果 */
.login-card {
  position: relative;
  width: 400px;
  max-width: 90vw;
  padding: 2rem 1.5rem;
  background: rgba(26, 26, 46, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(200, 180, 120, 0.18);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 80px rgba(200, 180, 120, 0.08);
  z-index: 10;
  animation: fadeIn 0.6s ease;
}

.login-card__title {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: #c8b478;
  letter-spacing: 0.12em;
  margin-bottom: 0.3rem;
}

.login-card__subtitle {
  text-align: center;
  font-size: 0.85rem;
  color: #a09880;
  letter-spacing: 0.3em;
  margin-bottom: 2rem;
}

.login-card__form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.login-card__input-group {
  position: relative;
}

.login-card__label {
  display: block;
  font-size: 0.85rem;
  color: #a09880;
  margin-bottom: 0.4rem;
  letter-spacing: 0.05em;
}

.login-card__input {
  width: 100%;
  padding: 0.9rem 1.1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(200, 180, 120, 0.15);
  border-radius: 8px;
  color: #e0d5c0;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.login-card__input::placeholder {
  color: rgba(160, 152, 128, 0.4);
}

.login-card__input:focus {
  border-color: rgba(200, 180, 120, 0.5);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 20px rgba(200, 180, 120, 0.05);
}

.login-card__input--error {
  border-color: rgba(231, 76, 60, 0.5);
}

.login-card__error-msg {
  font-size: 0.78rem;
  color: #e74c3c;
  margin-top: 0.3rem;
  display: none;
}

.login-card__error-msg--visible {
  display: block;
}

.login-card__btn {
  width: 100%;
  padding: 0.8rem;
  background: linear-gradient(135deg, #c8b478, #b8a468);
  border: none;
  border-radius: 8px;
  color: #0a0a0f;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
}

.login-card__btn:hover {
  background: linear-gradient(135deg, #d8c488, #c8b478);
  box-shadow: 0 4px 20px rgba(200, 180, 120, 0.3);
  transform: translateY(-1px);
}

.login-card__btn:active {
  transform: translateY(0);
}

.login-card__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.login-card__switch {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: #a09880;
}

.login-card__switch-link {
  color: #c8b478;
  cursor: pointer;
  transition: color 0.3s ease;
}

.login-card__switch-link:hover {
  color: #e6d7b4;
  text-decoration: underline;
}

.login-card__divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0 0;
  color: #6a6070;
  font-size: 0.8rem;
}

.login-card__divider::before,
.login-card__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(200, 180, 120, 0.1);
}

/* ============================================================
   4. 主大厅 (lobby-page)
   ============================================================ */

.lobby-page {
  position: relative;
  min-height: 100vh;
  background: url('../image/background/ol_bg.jpg') center center / cover no-repeat fixed, linear-gradient(180deg, #0a0a0f 0%, #1a1a2e 100%);
  padding-bottom: 70px;
  overflow: hidden;
}

.lobby-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.45);
  pointer-events: none;
  z-index: 0;
}

/* 网格背景装饰 */
.lobby-page__grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(200, 180, 120, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 180, 120, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* 浮动粒子 */
.lobby-page__particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.lobby-page__particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(200, 180, 120, 0.2);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

.lobby-page__particle:nth-child(1) { top: 10%; left: 5%; animation-delay: 0s; }
.lobby-page__particle:nth-child(2) { top: 25%; left: 90%; animation-delay: 1.2s; }
.lobby-page__particle:nth-child(3) { top: 50%; left: 15%; animation-delay: 2.5s; }
.lobby-page__particle:nth-child(4) { top: 70%; left: 75%; animation-delay: 0.8s; }
.lobby-page__particle:nth-child(5) { top: 35%; left: 45%; animation-delay: 3s; }
.lobby-page__particle:nth-child(6) { top: 80%; left: 30%; animation-delay: 1.8s; }
.lobby-page__particle:nth-child(7) { top: 15%; left: 55%; animation-delay: 4s; }
.lobby-page__particle:nth-child(8) { top: 60%; left: 85%; animation-delay: 0.5s; }
.lobby-page__particle:nth-child(9) { top: 90%; left: 50%; animation-delay: 2s; }
.lobby-page__particle:nth-child(10) { top: 45%; left: 8%; animation-delay: 3.5s; }

/* 顶部导航栏 */
.lobby-header {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(200, 180, 120, 0.08);
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lobby-header__left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.lobby-header__title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #c8b478;
  letter-spacing: 0.1em;
  user-select: none;
}

.lobby-header__right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lobby-header__user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.lobby-header__user:hover {
  background: rgba(200, 180, 120, 0.08);
}

.lobby-header__avatar {
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #c8b478, #a08060);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a0a0f;
  font-weight: 600;
  overflow: hidden;
}

.lobby-header__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lobby-header__username {
  font-size: 0.9rem;
  color: #e0d5c0;
}

.lobby-header__btn {
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #a09880;
  transition: all 0.3s ease;
}

.lobby-header__btn:hover {
  background: rgba(200, 180, 120, 0.1);
  color: #e0d5c0;
}

/* 主体区域 */
.lobby-main {
  position: relative;
  z-index: 5;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* 角色展示区 */
.lobby-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 1rem;
  border: 1px solid rgba(200, 180, 120, 0.08);
  border-radius: 16px;
  background: rgba(26, 26, 46, 0.3);
}

.lobby-hero__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid rgba(200, 180, 120, 0.3);
  background: linear-gradient(135deg, #1a1a2e, #2a1a3e);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #c8b478;
  overflow: hidden;
}

.lobby-hero__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lobby-hero__name {
  font-size: 1.5rem;
  font-weight: 600;
  color: #e6d7b4;
  margin-bottom: 0.3rem;
}

.lobby-hero__title {
  font-size: 0.9rem;
  color: #a09880;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.lobby-hero__stats {
  display: flex;
  gap: 2rem;
}

.lobby-hero__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lobby-hero__stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #c8b478;
}

.lobby-hero__stat-label {
  font-size: 0.78rem;
  color: #6a6070;
  letter-spacing: 0.05em;
}

/* 功能入口网格 */
.lobby-entries {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.lobby-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 0.8rem;
  border: 1px solid rgba(200, 180, 120, 0.1);
  border-radius: 12px;
  background: rgba(26, 26, 46, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  gap: 0.6rem;
}

.lobby-entry:hover {
  border-color: rgba(200, 180, 120, 0.3);
  background: rgba(26, 26, 46, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.lobby-entry:active {
  transform: translateY(0);
}

.lobby-entry__icon {
  font-size: 1.6rem;
  color: #c8b478;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(200, 180, 120, 0.08);
}

.lobby-entry__name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #e0d5c0;
  letter-spacing: 0.05em;
}

.lobby-entry__desc {
  font-size: 0.78rem;
  color: #6a6070;
  text-align: center;
}

/* 底部导航栏 */
.lobby-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.5rem 0;
  padding-bottom: env(safe-area-inset-bottom, 0.5rem);
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(200, 180, 120, 0.08);
}

.lobby-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  color: #6a6070;
}

.lobby-nav-item:hover {
  color: #a09880;
}

.lobby-nav-item--active {
  color: #c8b478;
}

.lobby-nav-item--active .lobby-nav-item__icon {
  transform: scale(1.05);
}

.lobby-nav-item__icon {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.lobby-nav-item__label {
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}

.lobby-nav-item__badge {
  position: absolute;
  top: 0;
  right: 0.2rem;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #e74c3c;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   5. 角色图鉴 (encyclopedia-page)
   ============================================================ */

.encyclopedia-page {
  position: relative;
  min-height: 100vh;
  background: url('../image/background/ol_bg.jpg') center center / cover no-repeat fixed, linear-gradient(180deg, #0a0a0f 0%, #1a1a2e 100%);
  padding-bottom: 70px;
}

.encyclopedia-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.5);
  pointer-events: none;
  z-index: 0;
}

.encyclopedia-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(200, 180, 120, 0.08);
}

.encyclopedia-header__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #c8b478;
  letter-spacing: 0.08em;
}

.encyclopedia-header__back {
  color: #a09880;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.encyclopedia-header__back:hover {
  color: #e0d5c0;
}

/* 阵营筛选标签 */
.encyclopedia-filters {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.encyclopedia-filters::-webkit-scrollbar {
  display: none;
}

.encyclopedia-filter {
  flex-shrink: 0;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(200, 180, 120, 0.15);
  border-radius: 20px;
  font-size: 0.8rem;
  color: #a09880;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.encyclopedia-filter:hover {
  border-color: rgba(200, 180, 120, 0.3);
  color: #e0d5c0;
}

.encyclopedia-filter--active {
  background: rgba(200, 180, 120, 0.15);
  border-color: #c8b478;
  color: #c8b478;
}

/* 角色卡片网格 */
.encyclopedia-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  padding: 0 1.5rem 1.5rem;
}

.character-card {
  position: relative;
  border: 1px solid rgba(200, 180, 120, 0.1);
  border-radius: 12px;
  background: rgba(26, 26, 46, 0.4);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.character-card:hover {
  border-color: rgba(200, 180, 120, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.character-card__avatar {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #1a1a2e, #2a1a3e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #c8b478;
  position: relative;
}

.character-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.character-card__rarity {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.character-card__rarity--common { background: rgba(128, 128, 128, 0.4); color: #b0b0b0; }
.character-card__rarity--uncommon { background: rgba(39, 174, 96, 0.3); color: #6ddb9a; }
.character-card__rarity--rare { background: rgba(52, 152, 219, 0.3); color: #6db3f0; }
.character-card__rarity--epic { background: rgba(155, 89, 182, 0.3); color: #c084d8; }
.character-card__rarity--legendary { background: rgba(200, 180, 120, 0.3); color: #e6d7b4; }

.character-card__info {
  padding: 0.6rem;
}

.character-card__name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e0d5c0;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.character-card__faction {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.1rem 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(200, 180, 120, 0.2);
  color: #a09880;
}

/* 角色详情弹窗 */
.character-detail {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.character-detail--visible {
  opacity: 1;
  visibility: visible;
}

.character-detail__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.character-detail__content {
  position: relative;
  width: 480px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  background: #1a1a2e;
  border: 1px solid rgba(200, 180, 120, 0.15);
  border-radius: 16px;
  padding: 2rem;
  animation: slideUp 0.3s ease;
}

.character-detail__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #a09880;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.character-detail__close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #e0d5c0;
}

.character-detail__header {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.character-detail__avatar {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2a1a3e, #1a1a2e);
  border: 2px solid rgba(200, 180, 120, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #c8b478;
  flex-shrink: 0;
  overflow: hidden;
}

.character-detail__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.character-detail__meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.character-detail__name {
  font-size: 1.4rem;
  font-weight: 700;
  color: #e6d7b4;
  margin-bottom: 0.3rem;
}

.character-detail__tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.character-detail__tag {
  font-size: 0.72rem;
  padding: 0.15rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(200, 180, 120, 0.2);
  color: #a09880;
}

.character-detail__tag--faction {
  border-color: rgba(200, 180, 120, 0.3);
  color: #c8b478;
}

.character-detail__section {
  margin-bottom: 1.2rem;
}

.character-detail__section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #c8b478;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.character-detail__text {
  font-size: 0.85rem;
  color: #a09880;
  line-height: 1.7;
}

.character-detail__skill {
  padding: 0.8rem;
  border: 1px solid rgba(200, 180, 120, 0.1);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  background: rgba(0, 0, 0, 0.15);
}

.character-detail__skill-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e0d5c0;
  margin-bottom: 0.2rem;
}

.character-detail__skill-desc {
  font-size: 0.8rem;
  color: #a09880;
  line-height: 1.6;
}

/* ============================================================
   6. 抽卡页面 (gacha-page)
   ============================================================ */

.gacha-page {
  position: relative;
  min-height: 100vh;
  background: url('../image/background/ol_bg.jpg') center center / cover no-repeat fixed, linear-gradient(180deg, #0a0a0f 0%, #1a1a2e 50%, #0f0a1a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem 70px;
  overflow: hidden;
}

.gacha-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.45);
  pointer-events: none;
  z-index: 0;
}

.gacha-page__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #c8b478;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  text-align: center;
}

.gacha-page__subtitle {
  font-size: 0.85rem;
  color: #a09880;
  margin-bottom: 2rem;
  text-align: center;
}

/* 抽卡统计 */
.gacha-stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.gacha-stats__item {
  text-align: center;
}

.gacha-stats__value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #c8b478;
}

.gacha-stats__label {
  font-size: 0.72rem;
  color: #6a6070;
  letter-spacing: 0.05em;
}

/* 抽卡结果展示区 */
.gacha-result {
  position: relative;
  width: 100%;
  max-width: 600px;
  min-height: 300px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 2rem;
  padding: 1rem;
  border: 1px solid rgba(200, 180, 120, 0.08);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.gacha-result__placeholder {
  color: #6a6070;
  font-size: 0.9rem;
  text-align: center;
  width: 100%;
}

/* 抽卡结果卡片 */
.gacha-card {
  width: 90px;
  height: 126px;
  border-radius: 10px;
  border: 2px solid rgba(200, 180, 120, 0.15);
  background: linear-gradient(135deg, #1a1a2e, #2a1a3e);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  animation: cardFlip 0.5s ease;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.gacha-card:hover {
  transform: translateY(-4px);
}

.gacha-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(transparent, rgba(200, 180, 120, 0.05), transparent 30%);
  animation: rotate 3s linear infinite;
}

.gacha-card__avatar {
  position: relative;
  z-index: 1;
  font-size: 2rem;
  color: #c8b478;
}

.gacha-card__avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.gacha-card__name {
  position: relative;
  z-index: 1;
  font-size: 0.7rem;
  color: #e0d5c0;
  font-weight: 600;
  text-align: center;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 稀有度边框颜色 */
.gacha-card--common { border-color: rgba(128, 128, 128, 0.4); }
.gacha-card--uncommon { border-color: rgba(39, 174, 96, 0.5); box-shadow: 0 0 15px rgba(39, 174, 96, 0.1); }
.gacha-card--rare { border-color: rgba(52, 152, 219, 0.5); box-shadow: 0 0 20px rgba(52, 152, 219, 0.15); }
.gacha-card--epic { border-color: rgba(155, 89, 182, 0.5); box-shadow: 0 0 25px rgba(155, 89, 182, 0.2); }
.gacha-card--legendary {
  border-color: rgba(200, 180, 120, 0.6);
  box-shadow: 0 0 30px rgba(200, 180, 120, 0.2), 0 0 60px rgba(200, 180, 120, 0.1);
  animation: cardFlip 0.5s ease, glow 2s ease-in-out infinite;
}

/* 抽卡按钮 */
.gacha-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.gacha-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 1.2rem 2rem;
  font-size: 1rem;
  border: 1px solid rgba(200, 180, 120, 0.2);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(200, 180, 120, 0.1), rgba(200, 180, 120, 0.05));
  color: #c8b478;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 140px;
}

.gacha-btn:hover {
  background: linear-gradient(135deg, rgba(200, 180, 120, 0.2), rgba(200, 180, 120, 0.1));
  border-color: rgba(200, 180, 120, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.gacha-btn:active {
  transform: translateY(0);
}

.gacha-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.gacha-btn--primary {
  background: linear-gradient(135deg, #c8b478, #b8a468);
  color: #0a0a0f;
  border-color: transparent;
  font-weight: 600;
}

.gacha-btn--primary:hover {
  background: linear-gradient(135deg, #d8c488, #c8b478);
  box-shadow: 0 4px 20px rgba(200, 180, 120, 0.3);
}

.gacha-btn__label {
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

.gacha-btn__cost {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* 彩纸/粒子特效 */
.gacha-confetti {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 300;
  overflow: hidden;
}

.gacha-confetti__piece {
  position: absolute;
  width: 8px;
  height: 8px;
  top: -10px;
  animation: confetti 3s ease-in forwards;
}

.gacha-confetti__piece:nth-child(1) { left: 10%; background: #c8b478; animation-delay: 0s; }
.gacha-confetti__piece:nth-child(2) { left: 20%; background: #e74c3c; animation-delay: 0.1s; }
.gacha-confetti__piece:nth-child(3) { left: 30%; background: #3498db; animation-delay: 0.2s; }
.gacha-confetti__piece:nth-child(4) { left: 40%; background: #27ae60; animation-delay: 0.15s; }
.gacha-confetti__piece:nth-child(5) { left: 50%; background: #e67e22; animation-delay: 0.3s; }
.gacha-confetti__piece:nth-child(6) { left: 60%; background: #9b59b6; animation-delay: 0.05s; }
.gacha-confetti__piece:nth-child(7) { left: 70%; background: #f1c40f; animation-delay: 0.25s; }
.gacha-confetti__piece:nth-child(8) { left: 80%; background: #1abc9c; animation-delay: 0.35s; }
.gacha-confetti__piece:nth-child(9) { left: 90%; background: #c8b478; animation-delay: 0.12s; }
.gacha-confetti__piece:nth-child(10) { left: 15%; background: #e74c3c; animation-delay: 0.4s; }
.gacha-confetti__piece:nth-child(11) { left: 35%; background: #3498db; animation-delay: 0.22s; }
.gacha-confetti__piece:nth-child(12) { left: 55%; background: #27ae60; animation-delay: 0.08s; }
.gacha-confetti__piece:nth-child(13) { left: 65%; background: #e67e22; animation-delay: 0.18s; }
.gacha-confetti__piece:nth-child(14) { left: 75%; background: #f1c40f; animation-delay: 0.28s; }
.gacha-confetti__piece:nth-child(15) { left: 85%; background: #9b59b6; animation-delay: 0.38s; }

/* ============================================================
   7. 对战页面 (battle-page)
   ============================================================ */

.battle-page {
  position: relative;
  min-height: 100vh;
  background: url('../image/background/ol_bg.jpg') center center / cover no-repeat fixed, linear-gradient(180deg, #0a0a0f 0%, #1a1a2e 100%);
  display: flex;
  flex-direction: column;
  padding-bottom: 70px;
  overflow: hidden;
}

.battle-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.4);
  pointer-events: none;
  z-index: 0;
}

/* 对战顶部栏 */
.battle-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(200, 180, 120, 0.08);
  flex-shrink: 0;
}

.battle-topbar__back {
  color: #a09880;
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.battle-topbar__back:hover {
  color: #e0d5c0;
}

.battle-topbar__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #c8b478;
  letter-spacing: 0.05em;
}

.battle-topbar__turn {
  font-size: 0.8rem;
  color: #c8b478;
  font-weight: 500;
}

/* 双方角色信息栏 */
.battle-info-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(200, 180, 120, 0.08);
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.battle-player {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex: 1;
}

.battle-player--opponent {
  flex-direction: row-reverse;
  text-align: right;
}

.battle-player__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(200, 180, 120, 0.2);
  background: linear-gradient(135deg, #1a1a2e, #2a1a3e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #c8b478;
  flex-shrink: 0;
  overflow: hidden;
}

.battle-player__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.battle-player__info {
  flex: 1;
  min-width: 0;
}

.battle-player__name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e0d5c0;
  margin-bottom: 0.15rem;
}

.battle-player__hand-count {
  font-size: 0.72rem;
  color: #6a6070;
}

.battle-player__meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.battle-player__meta--opponent {
  justify-content: flex-end;
}

/* 心气值 */
.battle-qi {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.battle-qi__icon {
  color: #e74c3c;
  font-size: 0.85rem;
  animation: pulse 2s ease-in-out infinite;
}

.battle-qi__value {
  font-size: 0.85rem;
  font-weight: 700;
  color: #e0d5c0;
}

.battle-qi__max {
  font-size: 0.7rem;
  color: #6a6070;
}

/* 装备栏 */
.battle-equipment {
  display: flex;
  gap: 0.3rem;
  margin-top: 0.3rem;
}

.battle-equipment__slot {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(200, 180, 120, 0.1);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: #6a6070;
}

.battle-equipment__slot--filled {
  border-color: rgba(155, 89, 182, 0.4);
  color: #9b59b6;
}

/* 场景牌展示区 */
.battle-scene {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  min-height: 80px;
}

.battle-scene__card {
  padding: 0.6rem 1.5rem;
  border: 1px solid rgba(26, 188, 156, 0.3);
  border-radius: 8px;
  background: rgba(26, 188, 156, 0.08);
  color: #1abc9c;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.battle-scene__card--empty {
  border-color: rgba(200, 180, 120, 0.08);
  background: transparent;
  color: #6a6070;
}

/* 对战日志区 */
.battle-log {
  flex: 1;
  padding: 0.5rem 1rem;
  overflow-y: auto;
  max-height: 200px;
  border-top: 1px solid rgba(200, 180, 120, 0.05);
  border-bottom: 1px solid rgba(200, 180, 120, 0.05);
  background: rgba(0, 0, 0, 0.15);
}

.battle-log__entry {
  font-size: 0.78rem;
  color: #a09880;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(200, 180, 120, 0.03);
  animation: fadeIn 0.3s ease;
}

.battle-log__entry:last-child {
  border-bottom: none;
}

.battle-log__entry--highlight {
  color: #c8b478;
}

.battle-log__entry--damage {
  color: #e74c3c;
}

.battle-log__entry--heal {
  color: #27ae60;
}

.battle-log__entry--system {
  color: #6a6070;
  font-style: italic;
}

/* 手牌区 */
.battle-hand {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-shrink: 0;
}

.battle-hand::-webkit-scrollbar {
  display: none;
}

.battle-hand__card {
  flex-shrink: 0;
  width: 80px;
  height: 110px;
  border: 1px solid rgba(200, 180, 120, 0.15);
  border-radius: 8px;
  background: linear-gradient(135deg, #1a1a2e, #2a1a3e);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.3rem;
  position: relative;
}

.battle-hand__card:hover {
  transform: translateY(-8px);
  border-color: rgba(200, 180, 120, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.battle-hand__card--selected {
  transform: translateY(-12px);
  border-color: #c8b478;
  box-shadow: 0 0 20px rgba(200, 180, 120, 0.15);
}

.battle-hand__card--disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.battle-hand__card--disabled:hover {
  transform: none;
}

.battle-hand__card-icon {
  font-size: 1.5rem;
  color: #c8b478;
}

.battle-hand__card-name {
  font-size: 0.6rem;
  color: #e0d5c0;
  text-align: center;
  font-weight: 600;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-hand__card-type {
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 卡牌类型颜色 */
.battle-hand__card--xinqi { border-color: rgba(231, 76, 60, 0.3); }
.battle-hand__card--xinqi .battle-hand__card-type { background: #e74c3c; }

.battle-hand__card--jiaojin { border-color: rgba(230, 126, 34, 0.3); }
.battle-hand__card--jiaojin .battle-hand__card-type { background: #e67e22; }

.battle-hand__card--zhouxuan { border-color: rgba(52, 152, 219, 0.3); }
.battle-hand__card--zhouxuan .battle-hand__card-type { background: #3498db; }

.battle-hand__card--meishi { border-color: rgba(39, 174, 96, 0.3); }
.battle-hand__card--meishi .battle-hand__card-type { background: #27ae60; }

.battle-hand__card--zhuangbei { border-color: rgba(155, 89, 182, 0.3); }
.battle-hand__card--zhuangbei .battle-hand__card-type { background: #9b59b6; }

.battle-hand__card--changjing { border-color: rgba(26, 188, 156, 0.3); }
.battle-hand__card--changjing .battle-hand__card-type { background: #1abc9c; }

.battle-hand__card--jinnang { border-color: rgba(241, 196, 15, 0.3); }
.battle-hand__card--jinnang .battle-hand__card-type { background: #f1c40f; }

/* 操作按钮区 */
.battle-actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  flex-shrink: 0;
  border-top: 1px solid rgba(200, 180, 120, 0.08);
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.battle-btn {
  padding: 0.6rem 1.2rem;
  border: 1px solid rgba(200, 180, 120, 0.15);
  border-radius: 8px;
  font-size: 0.85rem;
  color: #e0d5c0;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(26, 26, 46, 0.4);
  letter-spacing: 0.03em;
}

.battle-btn:hover {
  border-color: rgba(200, 180, 120, 0.3);
  background: rgba(26, 26, 46, 0.6);
}

.battle-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.battle-btn--primary {
  background: linear-gradient(135deg, #c8b478, #b8a468);
  color: #0a0a0f;
  border-color: transparent;
  font-weight: 600;
}

.battle-btn--primary:hover {
  background: linear-gradient(135deg, #d8c488, #c8b478);
  box-shadow: 0 4px 16px rgba(200, 180, 120, 0.25);
}

.battle-btn--danger {
  border-color: rgba(231, 76, 60, 0.3);
  color: #e74c3c;
}

.battle-btn--danger:hover {
  border-color: rgba(231, 76, 60, 0.5);
  background: rgba(231, 76, 60, 0.1);
}

.battle-btn--skill {
  border-color: rgba(200, 180, 120, 0.2);
  color: #c8b478;
}

.battle-btn--skill:hover {
  border-color: rgba(200, 180, 120, 0.4);
  background: rgba(200, 180, 120, 0.08);
}

.battle-btn--jiaojin {
  border-color: rgba(230, 126, 34, 0.3);
  color: #e67e22;
  font-weight: 600;
}

.battle-btn--jiaojin:hover {
  border-color: rgba(230, 126, 34, 0.5);
  background: rgba(230, 126, 34, 0.08);
}

.battle-btn--end-turn {
  border-color: rgba(52, 152, 219, 0.3);
  color: #3498db;
}

.battle-btn--end-turn:hover {
  border-color: rgba(52, 152, 219, 0.5);
  background: rgba(52, 152, 219, 0.08);
}

/* 游戏结束弹窗 */
.battle-result {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.battle-result--visible {
  opacity: 1;
  visibility: visible;
}

.battle-result__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.battle-result__content {
  position: relative;
  text-align: center;
  padding: 3rem;
  background: #1a1a2e;
  border: 1px solid rgba(200, 180, 120, 0.15);
  border-radius: 16px;
  animation: slideUp 0.4s ease;
  max-width: 400px;
  width: 90vw;
}

.battle-result__title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
}

.battle-result__title--win {
  color: #c8b478;
  text-shadow: 0 0 30px rgba(200, 180, 120, 0.3);
}

.battle-result__title--lose {
  color: #e74c3c;
  text-shadow: 0 0 30px rgba(231, 76, 60, 0.2);
}

.battle-result__subtitle {
  font-size: 0.9rem;
  color: #a09880;
  margin-bottom: 2rem;
}

.battle-result__btn {
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
}

.battle-result__btn--primary {
  background: linear-gradient(135deg, #c8b478, #b8a468);
  color: #0a0a0f;
  border: none;
}

.battle-result__btn--primary:hover {
  background: linear-gradient(135deg, #d8c488, #c8b478);
  box-shadow: 0 4px 20px rgba(200, 180, 120, 0.3);
}

.battle-result__btn--secondary {
  background: transparent;
  border: 1px solid rgba(200, 180, 120, 0.15);
  color: #a09880;
  margin-top: 0.5rem;
}

.battle-result__btn--secondary:hover {
  border-color: rgba(200, 180, 120, 0.3);
  color: #e0d5c0;
}

/* ============================================================
   8. 设置页面 (settings-page)
   ============================================================ */

.settings-page {
  position: relative;
  min-height: 100vh;
  background: url('../image/background/ol_bg.jpg') center center / cover no-repeat fixed, linear-gradient(180deg, #0a0a0f 0%, #1a1a2e 100%);
  padding-bottom: 70px;
}

.settings-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.5);
  pointer-events: none;
  z-index: 0;
}

.settings-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(200, 180, 120, 0.08);
}

.settings-header__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #c8b478;
  letter-spacing: 0.08em;
}

.settings-header__back {
  color: #a09880;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.settings-header__back:hover {
  color: #e0d5c0;
}

.settings-body {
  max-width: 600px;
  margin: 0 auto;
  padding: 1.5rem;
}

.settings-section {
  margin-bottom: 2rem;
}

.settings-section__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #c8b478;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(200, 180, 120, 0.08);
}

/* 头像选择区 */
.settings-avatar-preview {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a2a3e, #1a1a2e);
  border: 2px solid rgba(200, 180, 120, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #c8b478;
  overflow: hidden;
  flex-shrink: 0;
}

.settings-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 8px;
}

.settings-avatar-item {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s ease, transform 0.2s ease;
  background: #1a1a2e;
}

.settings-avatar-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-avatar-item:hover {
  border-color: rgba(200, 180, 120, 0.5);
  transform: scale(1.08);
}

.settings-avatar-item--selected {
  border-color: #c8b478;
  box-shadow: 0 0 8px rgba(200, 180, 120, 0.4);
}

.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(200, 180, 120, 0.04);
}

.settings-item:last-child {
  border-bottom: none;
}

.settings-item__label {
  font-size: 0.9rem;
  color: #e0d5c0;
}

.settings-item__desc {
  font-size: 0.75rem;
  color: #6a6070;
  margin-top: 0.15rem;
}

.settings-item__right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 开关 */
.settings-toggle {
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
}

.settings-toggle--active {
  background: rgba(200, 180, 120, 0.4);
}

.settings-toggle__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e0d5c0;
  transition: all 0.3s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.settings-toggle--active .settings-toggle__knob {
  left: 26px;
  background: #c8b478;
}

/* 音量滑块 */
.settings-slider {
  width: 120px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(200, 180, 120, 0.15);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.settings-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #c8b478;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.settings-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.settings-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #c8b478;
  cursor: pointer;
  border: none;
}

/* 关于信息 */
.settings-about {
  margin-top: 2rem;
  padding: 1.5rem;
  border: 1px solid rgba(200, 180, 120, 0.08);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.15);
}

.settings-about__title {
  font-size: 1rem;
  font-weight: 600;
  color: #c8b478;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.settings-about__version {
  font-size: 0.8rem;
  color: #6a6070;
  margin-bottom: 1rem;
}

.settings-about__text {
  font-size: 0.82rem;
  color: #a09880;
  line-height: 1.8;
  margin-bottom: 0.8rem;
}

.settings-about__link {
  color: #c8b478;
  transition: color 0.3s ease;
}

.settings-about__link:hover {
  color: #e6d7b4;
  text-decoration: underline;
}

/* ============================================================
   9. 通用组件样式
   ============================================================ */

/* 弹窗/模态框 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal--visible {
  opacity: 1;
  visibility: visible;
}

.modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal__content {
  position: relative;
  width: 480px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  background: #1a1a2e;
  border: 1px solid rgba(200, 180, 120, 0.15);
  border-radius: 16px;
  padding: 2rem;
  animation: slideUp 0.3s ease;
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #c8b478;
  letter-spacing: 0.05em;
}

.modal__close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #a09880;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.modal__close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #e0d5c0;
}

.modal__body {
  font-size: 0.9rem;
  color: #a09880;
  line-height: 1.7;
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(200, 180, 120, 0.08);
}

/* 按钮通用样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn--primary {
  background: linear-gradient(135deg, #c8b478, #b8a468);
  color: #0a0a0f;
  border-color: transparent;
  font-weight: 600;
}

.btn--primary:hover {
  background: linear-gradient(135deg, #d8c488, #c8b478);
  box-shadow: 0 4px 20px rgba(200, 180, 120, 0.25);
}

.btn--secondary {
  background: transparent;
  border-color: rgba(200, 180, 120, 0.15);
  color: #e0d5c0;
}

.btn--secondary:hover {
  border-color: rgba(200, 180, 120, 0.3);
  background: rgba(200, 180, 120, 0.05);
}

.btn--danger {
  background: transparent;
  border-color: rgba(231, 76, 60, 0.3);
  color: #e74c3c;
}

.btn--danger:hover {
  border-color: rgba(231, 76, 60, 0.5);
  background: rgba(231, 76, 60, 0.08);
}

.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: #a09880;
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #e0d5c0;
}

.btn--sm {
  font-size: 0.78rem;
  padding: 0.4rem 0.8rem;
}

.btn--lg {
  font-size: 1rem;
  padding: 0.8rem 2rem;
}

.btn--block {
  width: 100%;
}

/* 标签/徽章 */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.badge--gold {
  background: rgba(200, 180, 120, 0.2);
  color: #c8b478;
}

.badge--red {
  background: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
}

.badge--green {
  background: rgba(39, 174, 96, 0.2);
  color: #27ae60;
}

.badge--blue {
  background: rgba(52, 152, 219, 0.2);
  color: #3498db;
}

.badge--purple {
  background: rgba(155, 89, 182, 0.2);
  color: #9b59b6;
}

.badge--orange {
  background: rgba(230, 126, 34, 0.2);
  color: #e67e22;
}

.badge--gray {
  background: rgba(128, 128, 128, 0.2);
  color: #b0b0b0;
}

/* 工具提示 */
.tooltip {
  position: relative;
  display: inline-flex;
}

.tooltip__content {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.4rem 0.8rem;
  background: #1a1a2e;
  border: 1px solid rgba(200, 180, 120, 0.15);
  border-radius: 6px;
  font-size: 0.75rem;
  color: #e0d5c0;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 300;
}

.tooltip__content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(200, 180, 120, 0.15);
}

.tooltip:hover .tooltip__content {
  opacity: 1;
  visibility: visible;
}

/* 加载动画 */
.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(200, 180, 120, 0.1);
  border-top-color: #c8b478;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-spinner--sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

.loading-spinner--lg {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
}

.empty-state__icon {
  font-size: 3rem;
  color: #6a6070;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #a09880;
  margin-bottom: 0.5rem;
}

.empty-state__desc {
  font-size: 0.85rem;
  color: #6a6070;
  max-width: 300px;
}

/* 分隔线 */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 180, 120, 0.1), transparent);
  margin: 1rem 0;
}

/* 页面切换动画 */
.page-enter {
  animation: fadeIn 0.3s ease;
}

.page-exit {
  animation: fadeOut 0.3s ease;
}

/* 响应式容器 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ============================================================
   10. 动画关键帧
   ============================================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.7;
  }
}

@keyframes cardFlip {
  0% {
    transform: perspective(400px) rotateY(90deg) scale(0.8);
    opacity: 0;
  }
  40% {
    transform: perspective(400px) rotateY(-10deg) scale(1.02);
  }
  70% {
    transform: perspective(400px) rotateY(5deg);
  }
  100% {
    transform: perspective(400px) rotateY(0deg) scale(1);
    opacity: 1;
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-4px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(4px);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(200, 180, 120, 0.2), 0 0 40px rgba(200, 180, 120, 0.1);
  }
  50% {
    box-shadow: 0 0 30px rgba(200, 180, 120, 0.3), 0 0 60px rgba(200, 180, 120, 0.15);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(0);
    opacity: 0.3;
  }
  25% {
    transform: translateY(-20px) translateX(10px);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-10px) translateX(-5px);
    opacity: 0.4;
  }
  75% {
    transform: translateY(-30px) translateX(15px);
    opacity: 0.5;
  }
}

@keyframes confetti {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg) scale(0.5);
    opacity: 0;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ============================================================
   响应式设计
   ============================================================ */

/* 平板设备 (768px 及以上) */
@media (min-width: 768px) {
  .splash-screen__title {
    font-size: 5rem;
  }

  .splash-screen__subtitle {
    font-size: 1.1rem;
  }

  .lobby-entries {
    grid-template-columns: repeat(4, 1fr);
  }

  .encyclopedia-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  .battle-hand__card {
    width: 100px;
    height: 130px;
  }

  .battle-hand__card-icon {
    font-size: 2rem;
  }

  .battle-hand__card-name {
    font-size: 0.7rem;
  }

  .battle-log {
    max-height: 300px;
  }

  .gacha-card {
    width: 120px;
    height: 160px;
  }

  .gacha-card__avatar {
    font-size: 2.5rem;
  }

  .gacha-card__avatar img {
    width: 60px;
    height: 60px;
  }
}

/* 桌面设备 (1024px 及以上) */
@media (min-width: 1024px) {
  .lobby-main {
    padding: 3rem 2rem;
  }

  .lobby-entries {
    gap: 1.5rem;
  }

  .lobby-entry {
    padding: 2rem 1.5rem;
  }

  .encyclopedia-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 0 2rem 2rem;
  }

  .battle-page {
    flex-direction: row;
    flex-wrap: wrap;
    padding-bottom: 0;
  }

  .battle-info-bar {
    width: 100%;
  }

  .battle-scene {
    width: 100%;
  }

  .battle-main {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .battle-log {
    max-height: 400px;
    width: 300px;
    border-left: 1px solid rgba(200, 180, 120, 0.08);
    border-top: none;
    order: 1;
  }

  .battle-hand {
    order: 2;
  }

  .battle-actions {
    order: 3;
  }

  .settings-body {
    padding: 2rem;
  }
}

/* 大屏设备 (1440px 及以上) */
@media (min-width: 1440px) {
  .lobby-main {
    max-width: 1400px;
  }

  .encyclopedia-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

/* 手机小屏适配 */
@media (max-width: 360px) {
  .splash-screen__title {
    font-size: 2.5rem;
  }

  .login-card {
    padding: 2rem 1.5rem;
  }

  .lobby-header {
    padding: 0.8rem 1rem;
  }

  .lobby-entries {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }

  .lobby-entry {
    padding: 1rem;
  }

  .lobby-entry__icon {
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
  }

  .encyclopedia-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    padding: 0 0.8rem 0.8rem;
  }

  .battle-hand__card {
    width: 68px;
    height: 96px;
  }

  .battle-actions {
    gap: 0.5rem;
  }

  .battle-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.78rem;
  }

  .gacha-card {
    width: 80px;
    height: 112px;
  }
}

/* 暗色模式偏好支持 */
@media (prefers-color-scheme: dark) {
  body {
    background: #0a0a0f;
  }
}

/* 打印样式 */
@media print {
  .splash-screen,
  .lobby-bottom-nav,
  .battle-actions {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   11. 对战竞技场 Arena 样式 (参考 noname 布局)
   ============================================================ */

/* 选择界面样式 */
.battle-select__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-items: center;
  max-width: 420px;
  margin: 0 auto;
}

.battle-select__group {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.battle-select__label {
  font-size: 0.85rem;
  color: #a09880;
  letter-spacing: 0.05em;
}

.battle-select__input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(200,180,120,0.15);
  border-radius: 8px;
  color: #e0d5c0;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.battle-select__input:focus {
  border-color: rgba(200,180,120,0.5);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 20px rgba(200,180,120,0.05);
}

.battle-select__btn {
  margin-top: 0.5rem;
  width: 100%;
  max-width: 400px;
}

/* ============================================================
   Arena 容器
   ============================================================ */
.battle-arena {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 100vh;
  background: url('../image/background/ol_bg.jpg') center center / cover no-repeat, linear-gradient(180deg, #0a0a0f 0%, #0f0f1a 40%, #1a1a2e 100%);
  position: relative;
  overflow: hidden;
}

.battle-arena::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.55);
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   顶部栏
   ============================================================ */
.battle-arena__topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(10, 10, 15, 0.95);
  border-bottom: 1px solid rgba(200, 180, 120, 0.08);
  flex-shrink: 0;
  z-index: 10;
  min-height: 48px;
}

.battle-arena__back {
  color: #a09880;
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(200,180,120,0.08);
}

.battle-arena__back:hover {
  color: #e0d5c0;
  background: rgba(255,255,255,0.06);
}

.battle-arena__round-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.battle-arena__round-num {
  font-size: 0.8rem;
  color: #6a6070;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.battle-arena__turn-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #c8b478;
}

.battle-arena__turn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6a6070;
  display: inline-block;
  transition: all 0.3s ease;
}

.battle-arena__turn-dot--active {
  background: #c8b478;
  box-shadow: 0 0 8px rgba(200, 180, 120, 0.5);
  animation: pulse 1.5s ease-in-out infinite;
}

.battle-arena__turn-dot--ai {
  background: #3498db;
  box-shadow: 0 0 8px rgba(52, 152, 219, 0.5);
  animation: pulse 1.5s ease-in-out infinite;
}

/* ============================================================
   倒计时
   ============================================================ */
.battle-arena__timer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.battle-arena__timer-bar {
  width: 60px;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.battle-arena__timer-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #c8b478, #e6d7b4);
  border-radius: 2px;
  transition: width 0.5s linear;
}

.battle-arena__timer-bar--warning::after {
  background: linear-gradient(90deg, #e67e22, #e74c3c);
}

.battle-arena__timer-text {
  font-size: 0.9rem;
  font-weight: 700;
  color: #c8b478;
  min-width: 24px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.battle-arena__timer-text--warning {
  color: #e74c3c;
  animation: pulse 0.5s ease-in-out infinite;
}

/* ============================================================
   主区域
   ============================================================ */
.battle-arena__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* ============================================================
   双方角色区域
   ============================================================ */
.battle-arena__side {
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: relative;
}

.battle-arena__side--opponent {
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(200, 180, 120, 0.05);
}

.battle-arena__side--player {
  background: rgba(0, 0, 0, 0.15);
  border-top: 1px solid rgba(200, 180, 120, 0.05);
}

.battle-arena__character {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex: 1;
}

.battle-arena__char-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(200, 180, 120, 0.2);
  background: linear-gradient(135deg, #1a1a2e, #2a1a3e);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.battle-arena__char-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.battle-arena__char-avatar::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  border: 2px solid transparent;
  pointer-events: none;
}

.battle-arena__side--opponent .battle-arena__char-avatar::after {
  border-color: rgba(52, 152, 219, 0.3);
}

.battle-arena__side--player .battle-arena__char-avatar::after {
  border-color: rgba(200, 180, 120, 0.3);
}

.battle-arena__char-body {
  flex: 1;
  min-width: 0;
}

.battle-arena__char-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #e0d5c0;
  margin-bottom: 0.25rem;
  letter-spacing: 0.03em;
}

.battle-arena__char-hp-bar {
  width: 100%;
  max-width: 160px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.2rem;
}

.battle-arena__char-hp-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #27ae60, #2ecc71);
  transition: width 0.5s ease;
}

.battle-arena__char-hp-fill--low {
  background: linear-gradient(90deg, #e74c3c, #e67e22);
}

.battle-arena__char-hp-fill--mid {
  background: linear-gradient(90deg, #e67e22, #f1c40f);
}

.battle-arena__char-hp-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
}

.battle-arena__char-hp-icon {
  color: #e74c3c;
  font-size: 0.7rem;
}

.battle-arena__char-hp-text {
  color: #e0d5c0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.battle-arena__char-hand {
  color: #6a6070;
  margin-left: 0.5rem;
  font-size: 0.72rem;
}

.battle-arena__char-equip {
  font-size: 0.7rem;
  color: #9b59b6;
  margin-top: 0.1rem;
  letter-spacing: 0.02em;
}

/* ============================================================
   场景区
   ============================================================ */
.battle-arena__scene {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid rgba(26, 188, 156, 0.15);
  border-radius: 6px;
  background: rgba(26, 188, 156, 0.05);
  flex-shrink: 0;
  font-size: 0.75rem;
}

.battle-arena__scene-label {
  color: #1abc9c;
  font-weight: 600;
}

.battle-arena__scene-value {
  color: #a09880;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   技能按钮
   ============================================================ */
.battle-arena__skill-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid rgba(200, 180, 120, 0.2);
  border-radius: 8px;
  background: rgba(200, 180, 120, 0.08);
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.battle-arena__skill-btn:hover {
  background: rgba(200, 180, 120, 0.15);
  border-color: rgba(200, 180, 120, 0.4);
  transform: translateY(-1px);
}

.battle-arena__skill-btn:active {
  transform: translateY(0);
}

.battle-arena__skill-btn--disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.battle-arena__skill-btn--disabled:hover {
  transform: none;
  background: rgba(200, 180, 120, 0.08);
}

.battle-arena__skill-icon {
  font-size: 1rem;
}

.battle-arena__skill-name {
  font-size: 0.78rem;
  color: #c8b478;
  font-weight: 600;
  white-space: nowrap;
}

/* ============================================================
   日志区
   ============================================================ */
.battle-arena__log {
  flex: 1;
  overflow-y: auto;
  padding: 0.6rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  min-height: 80px;
  max-height: 180px;
  scrollbar-width: thin;
  scrollbar-color: rgba(200,180,120,0.15) transparent;
}

.battle-arena__log::-webkit-scrollbar {
  width: 4px;
}

.battle-arena__log::-webkit-scrollbar-thumb {
  background: rgba(200,180,120,0.15);
  border-radius: 2px;
}

.battle-arena__log-placeholder {
  color: #6a6070;
  font-size: 0.8rem;
  text-align: center;
  padding: 1rem;
  font-style: italic;
}

.battle-arena__log-entry {
  font-size: 0.85rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid rgba(200, 180, 120, 0.03);
  animation: fadeIn 0.3s ease;
  line-height: 1.5;
}

.battle-arena__log-entry:last-child {
  border-bottom: none;
}

.battle-arena__log-entry--highlight {
  color: #c8b478;
  font-weight: 600;
}

.battle-arena__log-entry--damage {
  color: #e74c3c;
}

.battle-arena__log-entry--heal {
  color: #27ae60;
}

.battle-arena__log-entry--system {
  color: #6a6070;
  font-style: italic;
}

/* ============================================================
   卡牌详情弹出
   ============================================================ */
.battle-arena__card-detail {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  pointer-events: none;
  animation: slideUp 0.2s ease;
}

.battle-arena__card-detail-body {
  background: #1a1a2e;
  border: 1px solid rgba(200, 180, 120, 0.2);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  min-width: 160px;
  max-width: 220px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.battle-arena__card-detail-type {
  font-size: 0.65rem;
  color: #6a6070;
  margin-bottom: 0.2rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.battle-arena__card-detail-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #e6d7b4;
  margin-bottom: 0.3rem;
}

.battle-arena__card-detail-desc {
  font-size: 0.72rem;
  color: #a09880;
  line-height: 1.5;
}

/* ============================================================
   手牌区
   ============================================================ */
.battle-arena__hand-tip {
  text-align: center;
  font-size: 0.72rem;
  color: rgba(200, 180, 120, 0.55);
  padding: 0.2rem 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

.battle-arena__hand {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0.4rem;
  padding: 0.6rem 0.8rem;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-shrink: 0;
  min-height: 100px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(200, 180, 120, 0.08);
  position: relative;
}

.battle-arena__hand::-webkit-scrollbar {
  display: none;
}

.battle-arena__hand-card {
  flex-shrink: 0;
  width: 64px;
  height: 90px;
  border: 1.5px solid rgba(200, 180, 120, 0.12);
  border-radius: 8px;
  background: linear-gradient(160deg, #1a1a2e 0%, #151520 100%);
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.3rem;
  position: relative;
  user-select: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.battle-arena__hand-card:hover {
  transform: translateY(-10px);
  border-color: rgba(200, 180, 120, 0.3);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 5;
}

.battle-arena__hand-card--selected {
  transform: translateY(-14px);
  border-color: #c8b478;
  box-shadow: 0 0 20px rgba(200, 180, 120, 0.2), 0 8px 24px rgba(0,0,0,0.4);
  z-index: 6;
}

.battle-arena__hand-card--disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.6);
}

.battle-arena__hand-card--disabled:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* 卡牌类型颜色 */
.battle-arena__hand-card--jiaojin {
  border-color: rgba(230, 126, 34, 0.3);
  background: linear-gradient(160deg, #1a1210 0%, #151520 100%);
}
.battle-arena__hand-card--jiaojin .battle-arena__hand-card-type-dot {
  background: #e67e22;
}

.battle-arena__hand-card--zhouxuan {
  border-color: rgba(52, 152, 219, 0.3);
  background: linear-gradient(160deg, #101820 0%, #151520 100%);
}
.battle-arena__hand-card--zhouxuan .battle-arena__hand-card-type-dot {
  background: #3498db;
}

.battle-arena__hand-card--meishi {
  border-color: rgba(39, 174, 96, 0.3);
  background: linear-gradient(160deg, #101a14 0%, #151520 100%);
}
.battle-arena__hand-card--meishi .battle-arena__hand-card-type-dot {
  background: #27ae60;
}

.battle-arena__hand-card--zhuangbei {
  border-color: rgba(155, 89, 182, 0.3);
  background: linear-gradient(160deg, #1a1020 0%, #151520 100%);
}
.battle-arena__hand-card--zhuangbei .battle-arena__hand-card-type-dot {
  background: #9b59b6;
}

.battle-arena__hand-card--changjing {
  border-color: rgba(26, 188, 156, 0.3);
  background: linear-gradient(160deg, #101a1a 0%, #151520 100%);
}
.battle-arena__hand-card--changjing .battle-arena__hand-card-type-dot {
  background: #1abc9c;
}

.battle-arena__hand-card--jinnang {
  border-color: rgba(241, 196, 15, 0.3);
  background: linear-gradient(160deg, #1a1a10 0%, #151520 100%);
}
.battle-arena__hand-card--jinnang .battle-arena__hand-card-type-dot {
  background: #f1c40f;
}

.battle-arena__hand-card-type-dot {
  position: absolute;
  top: 0.25rem;
  left: 0.25rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 4px currentColor;
}

.battle-arena__hand-card-icon {
  font-size: 1.4rem;
  line-height: 1;
  margin-bottom: 0.1rem;
}

.battle-arena__hand-card-name {
  font-size: 0.6rem;
  color: #c8b478;
  text-align: center;
  font-weight: 600;
  max-width: 62px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.battle-arena__hand-card-rarity {
  font-size: 0.5rem;
  color: #6a6070;
  text-align: center;
}

.battle-arena__hand-count {
  font-size: 0.7rem;
  color: #6a6070;
  padding: 0.5rem;
  text-align: center;
  width: 100%;
}

/* 空手牌提示 */
.battle-arena__hand-empty {
  color: #6a6070;
  font-size: 0.8rem;
  padding: 1rem;
  text-align: center;
  width: 100%;
  font-style: italic;
}

/* ============================================================
   操作按钮区
   ============================================================ */
.battle-arena__actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  padding: 0.6rem 1rem;
  flex-shrink: 0;
  border-top: 1px solid rgba(200, 180, 120, 0.08);
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(8px);
}

.battle-action-btn {
  padding: 0.8rem 1.5rem;
  border: 1px solid rgba(200, 180, 120, 0.15);
  border-radius: 8px;
  font-size: 0.95rem;
  color: #e0d5c0;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(26, 26, 46, 0.4);
  letter-spacing: 0.03em;
  font-weight: 500;
  white-space: nowrap;
}

.battle-action-btn:hover {
  border-color: rgba(200, 180, 120, 0.3);
  background: rgba(26, 26, 46, 0.6);
  transform: translateY(-1px);
}

.battle-action-btn:active {
  transform: translateY(0);
}

.battle-action-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

.battle-action-btn--end-turn {
  border-color: rgba(52, 152, 219, 0.3);
  color: #3498db;
}

.battle-action-btn--end-turn:hover {
  border-color: rgba(52, 152, 219, 0.5);
  background: rgba(52, 152, 219, 0.08);
}

.battle-action-btn--surrender {
  border-color: rgba(231, 76, 60, 0.3);
  color: #e74c3c;
}

.battle-action-btn--surrender:hover {
  border-color: rgba(231, 76, 60, 0.5);
  background: rgba(231, 76, 60, 0.08);
}

/* ============================================================
   回合提示 Toast
   ============================================================ */
.battle-turn-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 300;
  padding: 1rem 2.5rem;
  border-radius: 12px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  pointer-events: none;
  animation: turnToastAnim 1.5s ease forwards;
  text-align: center;
  background: rgba(10, 10, 15, 0.9);
  border: 1px solid rgba(200, 180, 120, 0.2);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  backdrop-filter: blur(12px);
}

.battle-turn-toast--player {
  color: #c8b478;
  text-shadow: 0 0 20px rgba(200, 180, 120, 0.3);
  border-color: rgba(200, 180, 120, 0.3);
}

.battle-turn-toast--ai {
  color: #3498db;
  text-shadow: 0 0 20px rgba(52, 152, 219, 0.3);
  border-color: rgba(52, 152, 219, 0.3);
}

.battle-turn-toast--action {
  color: #e6d7b4;
  font-size: 1.1rem;
  border-color: rgba(200, 180, 120, 0.15);
}

.battle-turn-toast--effect {
  color: #1abc9c;
  font-size: 1rem;
  border-color: rgba(26, 188, 156, 0.2);
}

@keyframes turnToastAnim {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
  }
  25% {
    transform: translate(-50%, -50%) scale(1);
  }
  75% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9) translateY(-20px);
  }
}

/* ============================================================
   出牌动画
   ============================================================ */
.battle-arena__hand-card--playing {
  animation: cardPlay 0.4s ease forwards;
}

@keyframes cardPlay {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateY(-40px) scale(1.1);
    opacity: 0.8;
  }
  100% {
    transform: translateY(-80px) scale(0.5);
    opacity: 0;
  }
}

/* ============================================================
   响应式 Arena
   ============================================================ */
@media (min-width: 768px) {
  .battle-arena__hand-card {
    width: 88px;
    height: 112px;
  }

  .battle-arena__hand-card-icon {
    font-size: 1.8rem;
  }

  .battle-arena__hand-card-name {
    font-size: 0.68rem;
  }

  .battle-arena__log {
    max-height: 220px;
  }

  .battle-arena__char-avatar {
    width: 56px;
    height: 56px;
  }

  .battle-arena__char-name {
    font-size: 1rem;
  }

  .battle-arena__char-hp-bar {
    max-width: 200px;
    height: 7px;
  }

  .battle-arena__timer-bar {
    width: 80px;
  }

  .battle-turn-toast {
    font-size: 1.8rem;
    padding: 1.2rem 3rem;
  }
}

@media (min-width: 1024px) {
  .battle-arena {
    max-width: 900px;
    margin: 0 auto;
    min-height: 100vh;
    border-left: 1px solid rgba(200, 180, 120, 0.08);
    border-right: 1px solid rgba(200, 180, 120, 0.08);
  }

  .battle-arena__hand-card {
    width: 100px;
    height: 130px;
  }

  .battle-arena__hand-card-icon {
    font-size: 2rem;
  }

  .battle-arena__hand-card-name {
    font-size: 0.72rem;
  }

  .battle-arena__log {
    max-height: 260px;
  }
}

@media (max-width: 360px) {
  .battle-arena__hand-card {
    width: 60px;
    height: 82px;
  }

  .battle-arena__hand-card-icon {
    font-size: 1.1rem;
  }

  .battle-arena__hand-card-name {
    font-size: 0.5rem;
    max-width: 52px;
  }

  .battle-arena__char-hp-bar {
    max-width: 100px;
  }

  .battle-arena__actions {
    gap: 0.4rem;
  }

  .battle-action-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.75rem;
  }

  .battle-arena__timer-bar {
    width: 40px;
  }
}

/* ============================================================
   横屏手机端基础字号适配
   ============================================================ */
@media (max-width: 932px) and (orientation: landscape) {
  html { font-size: 20px; }
}
@media (max-width: 480px) and (orientation: landscape) {
  html { font-size: 17px; }
}

/* ============================================================
   横屏手机端专用适配
   ============================================================ */
@media (max-width: 932px) and (orientation: landscape) {
  /* 预加载页 */
  .splash-screen__logo { width: 70px; height: 70px; }
  .splash-screen__title { font-size: 2.2rem; }
  
  /* 登录页 */
  .login-card { width: 360px; padding: 1.5rem 1.2rem; }
  .login-card__title { font-size: 1.4rem; }
  
  /* 大厅页 */
  .lobby-hero { padding: 1rem 0.5rem; margin-bottom: 1.5rem; }
  .lobby-hero__avatar { width: 64px; height: 64px; font-size: 2rem; }
  .lobby-hero__name { font-size: 1.2rem; }
  .lobby-entries { gap: 0.6rem; }
  .lobby-entry { padding: 0.8rem 0.5rem; }
  .lobby-entry__icon { width: 40px; height: 40px; font-size: 1.3rem; }
  .lobby-entry__name { font-size: 0.85rem; }
  .lobby-entry__desc { font-size: 0.7rem; }
  .lobby-bottom-nav { padding: 0.3rem 0; }
  .lobby-nav-item { padding: 0.3rem 0.6rem; }
  .lobby-nav-item__icon { font-size: 1.2rem; }
  .lobby-nav-item__label { font-size: 0.7rem; }
  
  /* 图鉴页 */
  .encyclopedia-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .character-card__avatar { aspect-ratio: 1; }
  
  /* 抽卡页 */
  .gacha-page { padding: 1rem 0.8rem 60px; }
  .gacha-page__title { font-size: 1.2rem; }
  .gacha-card { width: 75px; height: 105px; }
  .gacha-card__avatar img { width: 40px; height: 40px; }
  .gacha-card__name { font-size: 0.65rem; }
  .gacha-btn { padding: 0.8rem 1.5rem; min-width: 120px; }
  .gacha-btn__label { font-size: 0.95rem; }
  
  /* 对战页 */
  .battle-arena__topbar { padding: 0.3rem 0.6rem; min-height: 40px; }
  .battle-arena__back { font-size: 0.8rem; padding: 0.2rem 0.5rem; }
  .battle-arena__round-num { font-size: 0.75rem; }
  .battle-arena__turn-indicator { font-size: 0.75rem; }
  .battle-arena__timer-text { font-size: 0.8rem; }
  .battle-arena__timer-bar { width: 50px; }
  .battle-arena__side { padding: 0.4rem 0.6rem; }
  .battle-arena__character { gap: 0.5rem; }
  .battle-arena__char-avatar { width: 44px; height: 44px; }
  .battle-arena__char-name { font-size: 0.8rem; }
  .battle-arena__char-hp-bar { max-width: 120px; height: 5px; }
  .battle-arena__char-equip { font-size: 0.65rem; }
  .battle-arena__scene { font-size: 0.7rem; padding: 0.15rem 0.5rem; }
  .battle-arena__log { min-height: 50px; max-height: 100px; }
  .battle-arena__log-entry { font-size: 0.75rem; }
  .battle-arena__hand { min-height: 85px; gap: 0.3rem; }
  .battle-arena__hand-card { width: 56px; height: 80px; padding: 0.2rem; }
  .battle-arena__hand-card-icon { font-size: 1.1rem; }
  .battle-arena__hand-card-name { font-size: 0.55rem; max-width: 48px; }
  .battle-arena__hand-card-type-dot { width: 6px; height: 6px; }
  .battle-arena__actions { padding: 0.4rem 0.6rem; gap: 0.5rem; }
  .battle-action-btn { padding: 0.5rem 1rem; font-size: 0.8rem; }
  .battle-arena__skill-btn { padding: 0.3rem 0.6rem; font-size: 0.75rem; }
  .battle-turn-toast { font-size: 1.2rem; padding: 0.8rem 2rem; }
  
  /* 设置页 */
  .settings-body { padding: 1rem; }
  .settings-item { padding: 0.6rem 0; }
  .settings-slider { width: 140px; }
  
  /* 通用按钮 */
  .btn { padding: 0.7rem 1rem; font-size: 0.9rem; }
  
  /* 模态框 */
  .modal__content { width: 90vw; max-width: 400px; }
}

@media (max-width: 480px) and (orientation: landscape) {
  html { font-size: 16px; }
  .splash-screen__title { font-size: 1.8rem; }
  .login-card { width: 92vw; padding: 1rem; }
  .lobby-hero__avatar { width: 56px; height: 56px; }
  .lobby-entry__icon { width: 36px; height: 36px; font-size: 1.1rem; }
  .gacha-card { width: 65px; height: 91px; }
  .battle-arena__hand-card { width: 50px; height: 72px; }
  .battle-arena__char-avatar { width: 40px; height: 40px; }
  .battle-arena__char-hp-bar { max-width: 90px; }
  .battle-arena__log { max-height: 70px; }
  .settings-slider { width: 120px; }
}