/* 
 * 文字武侠 - 响应式样式
 */

/* 移动端导航栏 */
.mobile-nav {
  display: none;  /* 默认在桌面端隐藏 */
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: white;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 100;
  padding: 0.5rem 0;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

/* 移动端导航链接样式 */
.mobile-nav .nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #666;
  padding: 0.5rem 0.25rem;
  transition: all 0.3s;
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  min-height: 40px;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-nav .nav-link.active {
  color: #8B4513;
  font-weight: bold;
}

.mobile-nav .nav-link:hover {
  color: #8B4513;
}

/* 移动端语言切换器容器 */
.mobile-nav .mobile-language-container {
  flex: 0.8;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 2px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #666;
  padding: 0.5rem;
  transition: all 0.3s;
  flex: 1;
  text-align: center;
}

.nav-item.active {
  color: #8B4513;
}

.nav-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.nav-text {
  font-size: 0.8rem;
}

/* 平板电脑 */
@media (max-width: 992px) {
  .game-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .container {
    padding: 0.5rem;
  }
  
  h1 {
    font-size: 1.75rem;
  }

  /* 平板上首屏战斗日志高度调整 */
  .battle-logs {
    height: 400px;
  }

  .battle-log {
    height: 450px;
  }

  /* 调整顶部导航 */
  .main-nav {
    gap: 1rem;
  }
  
  .nav-link {
    font-size: 0.9rem;
  }
}

/* 移动设备 */
@media (max-width: 768px) {
  /* 显示移动导航 */
  .mobile-nav {
    display: flex;
  }
  
  /* 页面内容添加底部填充，避免被导航覆盖 */
  main {
    padding-bottom: 0 rem;
  }
  
  /* 修改消息提示位置 */
  .message-box {
    bottom: 80px;
    max-width: 90%;
  }
  
  /* 调整各区域大小 */
  .section, .game-section {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  /* 修改游戏容器布局为垂直排列 */
  .game-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  /* 调整战斗界面 */
  .battle-header {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .battle-vs {
    margin: 0.5rem 0;
  }
  
  /* 调整战斗日志高度 */
  .battle-logs {
    height: 300px;
  }
  
  .battle-log {
    height: 350px;
  }
  
  /* 调整表格样式 */
  th, td {
    padding: 0.5rem;
    font-size: 0.9rem;
  }
  
  /* 调整角色卡片 */
  .-container {
    grid-template-columns: 1fr;
  }
  
  /* 调整角色详情 */
  .stat-label {
    width: 60px;
  }
  
  progress {
    width: 120px;
  }
  
  /* 模态框调整 */
  .modal-content {
    width: 90%;
    margin: 15% auto;
    padding: 1.5rem;
  }

  /* 移动端标题调整 */
  h2 {
    font-size: 1.3rem;
    margin-left: 1rem;
    margin-top: 1rem;
  }

  /* 增强移动导航可见性 */
  .mobile-nav {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
  }

  .nav-item.active {
    color: #8B4513;
    font-weight: bold;
  }

  .nav-item.active .nav-icon {
    transform: scale(1.1);
  }

  /* 隐藏顶部导航，只在移动设备上显示底部导航 */
  .main-nav {
    display: none;
  }
}

/* 超小屏幕设备 */
@media (max-width: 480px) {
  header {
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
    text-align: center;
    margin-bottom: 1rem;
  }
  
  h1 {
    font-size: 1.5rem;
  }
  
  /* 小屏幕上的战斗日志高度 */
  .battle-logs {
    height: 250px;
  }

  .battle-log {
    height: 300px;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .character-actions {
    flex-direction: column;
  }
  
  .form-actions .btn, .character-actions .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  /* 导航文字更小 */
  .nav-text {
    font-size: 0.7rem;
  }

  /* 角色和战斗区域内边距减小 */
  .game-section {
    padding: 0.8rem;
  }

  /* 表格字体缩小 */
  th, td {
    padding: 0.4rem;
    font-size: 0.8rem;
  }
} 