/* iPhone 简洁设计风格 - iOS 17 风格 */

/* 全局样式 - iOS 17 设计语言 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(180deg, #F2F2F7 0%, #E5E5EA 100%);
  color: #000000;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hidden {
  display: none !important;
}

/* 页面容器 */
.page {
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom, 20px);
}

/* ========== 登录页面 - iOS 风格 ========== */
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 24px;
  background: linear-gradient(180deg, #F2F2F7 0%, #FFFFFF 100%);
}

.logo-area {
  text-align: center;
  margin-bottom: 60px;
  animation: fadeInUp 0.6s ease-out;
}

.poker-icon {
  font-size: 64px;
  display: block;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #FF3B30 0%, #FF6B6B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 4px 8px rgba(255, 59, 48, 0.3));
}

.title {
  font-size: 32px;
  font-weight: 700;
  color: #000000;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 16px;
  color: #8E8E93;
  font-weight: 400;
}

/* 加载状态 */
.loading-container {
  text-align: center;
  padding: 40px 20px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #E5E5EA;
  border-top-color: #007AFF;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

.loading-text {
  font-size: 16px;
  color: #8E8E93;
  font-weight: 400;
}

/* 按钮 - iOS 风格 */
.btn-primary {
  width: 100%;
  max-width: 280px;
  padding: 16px 24px;
  background: #007AFF;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
  margin-bottom: 12px;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 122, 255, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.btn-secondary {
  width: 100%;
  max-width: 280px;
  padding: 16px 24px;
  background: #FFFFFF;
  color: #007AFF;
  border: 1px solid #C7C7CC;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.btn-secondary:hover {
  background: #F2F2F7;
  border-color: #007AFF;
}

/* ========== 导航栏 - iOS 风格 ========== */
.nav-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-title {
  font-size: 17px;
  font-weight: 700;
  color: #000000;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-button {
  background: none;
  border: none;
  color: #007AFF;
  font-size: 17px;
  font-weight: 400;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.nav-button:hover {
  background: rgba(0, 122, 255, 0.1);
}

/* 用户信息卡片 */
.user-card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 16px;
  margin: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 0.5px solid rgba(0, 0, 0, 0.05);
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.user-info-text {
  flex: 1;
}

.user-name {
  font-size: 17px;
  font-weight: 600;
  color: #000000;
  margin-bottom: 4px;
}

.user-status {
  font-size: 14px;
  color: #8E8E93;
}

/* ========== 标签页 - iOS 风格 ========== */
.tab-bar {
  display: flex;
  background: #FFFFFF;
  border-radius: 12px;
  margin: 16px;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 0.5px solid rgba(0, 0, 0, 0.05);
}

.tab-item {
  flex: 1;
  padding: 12px 16px;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  color: #8E8E93;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

.tab-item.active {
  background: #007AFF;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

/* ========== 房间列表 - iOS 风格 ========== */
.room-list {
  padding: 0 16px;
}

.room-cell {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 0.5px solid rgba(0, 0, 0, 0.05);
}

.room-cell:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.room-cell:active {
  transform: translateY(0);
}

.room-details {
  flex: 1;
}

.room-name {
  font-size: 17px;
  font-weight: 600;
  color: #000000;
  margin-bottom: 4px;
}

.room-meta {
  font-size: 14px;
  color: #8E8E93;
}

.room-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.status-waiting {
  background: #34C759;
  color: white;
}

.status-playing {
  background: #FF9500;
  color: white;
}

.status-full {
  background: #FF3B30;
  color: white;
}

/* ========== 输入表单 - iOS 风格 ========== */
.form-section {
  background: #FFFFFF;
  border-radius: 16px;
  margin: 16px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 0.5px solid rgba(0, 0, 0, 0.05);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #000000;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  background: #F2F2F7;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 16px;
  color: #000000;
  transition: all 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: #007AFF;
  background: #FFFFFF;
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

.form-input::placeholder {
  color: #8E8E93;
}

/* ========== 游戏界面 - iOS 风格 ========== */
.game-table {
  background: linear-gradient(180deg, #0A4D2A 0%, #0D2818 100%);
  min-height: 100vh;
  position: relative;
}

.game-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
}

.pot-info {
  text-align: center;
  padding: 16px;
  color: white;
  font-size: 18px;
  font-weight: 600;
}

.community-cards {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  min-height: 100px;
}

.card {
  width: 50px;
  height: 70px;
  background: #FFFFFF;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 0.5px solid rgba(0, 0, 0, 0.1);
}

.card.red {
  color: #FF3B30;
}

.card.black {
  color: #000000;
}

/* 玩家座位 */
.player-seat {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 12px;
  min-width: 120px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border: 0.5px solid rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
}

.player-seat.active {
  border: 2px solid #007AFF;
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
}

.player-seat.dealer {
  border-color: #FF9500;
}

.seat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 16px;
  margin: 0 auto 8px;
}

.seat-name {
  font-size: 14px;
  font-weight: 600;
  color: #000000;
  text-align: center;
  margin-bottom: 4px;
}

.seat-chips {
  font-size: 12px;
  color: #34C759;
  text-align: center;
  font-weight: 500;
}

.seat-bet {
  font-size: 12px;
  color: #FF9500;
  text-align: center;
  font-weight: 500;
}

/* 动作按钮 */
.action-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 16px;
  border-top: 0.5px solid rgba(0, 0, 0, 0.1);
}

.action-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.btn-game {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-check {
  background: #34C759;
  color: white;
}

.btn-call {
  background: #007AFF;
  color: white;
}

.btn-raise {
  background: #FF9500;
  color: white;
}

.btn-fold {
  background: #FF3B30;
  color: white;
}

.btn-game:hover {
  transform: translateY(-1px);
}

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

/* 滑块 */
.slider-container {
  padding: 0 8px;
}

.bet-slider {
  width: 100%;
  height: 4px;
  background: #E5E5EA;
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
  margin: 16px 0;
}

.bet-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: #007AFF;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.bet-amount {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: #007AFF;
  margin-bottom: 8px;
}

/* ========== 个人中心 - iOS 风格 ========== */
.profile-header {
  background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
  padding: 60px 20px 40px;
  text-align: center;
  color: white;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 600;
  margin: 0 auto 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.profile-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.profile-id {
  font-size: 14px;
  opacity: 0.8;
}

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
}

.stat-card {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 0.5px solid rgba(0, 0, 0, 0.05);
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #007AFF;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: #8E8E93;
  font-weight: 500;
}

/* 菜单列表 */
.menu-section {
  background: #FFFFFF;
  border-radius: 16px;
  margin: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 0.5px solid rgba(0, 0, 0, 0.05);
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 0.5px solid #F2F2F7;
  cursor: pointer;
  transition: background 0.2s;
}

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

.menu-item:hover {
  background: #F2F2F7;
}

.menu-item-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.menu-text {
  font-size: 16px;
  color: #000000;
  font-weight: 400;
}

.menu-arrow {
  color: #C7C7CC;
  font-size: 16px;
}

/* ========== 模态框 - iOS 风格 ========== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.modal-content {
  background: #FFFFFF;
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 500px;
  padding: 24px;
  animation: slideUp 0.3s ease-out;
}

.modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 8px;
}

.modal-subtitle {
  font-size: 14px;
  color: #8E8E93;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn-modal {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-modal-primary {
  background: #007AFF;
  color: white;
}

.btn-modal-secondary {
  background: #F2F2F7;
  color: #007AFF;
}

/* 版本信息 ========== */
.version-info {
  text-align: center;
  padding: 20px;
  color: #8E8E93;
  font-size: 12px;
  font-weight: 400;
}

.version-text {
  opacity: 0.8;
}

/* 版本号 */
.version-footer {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 8px 16px;
  z-index: 1000;
}

.version-text {
  font-size: 12px;
  color: #8e8e93;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ========== 动画效果 ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

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

/* 响应式设计 */
@media (max-width: 375px) {
  .title {
    font-size: 28px;
  }
  
  .btn-primary,
  .btn-secondary {
    font-size: 16px;
    padding: 14px 20px;
  }
  
  .room-cell {
    padding: 14px;
  }
  
  .card {
    width: 45px;
    height: 63px;
    font-size: 20px;
  }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(180deg, #1C1C1E 0%, #2C2C2E 100%);
    color: #FFFFFF;
  }
  
  .login-container {
    background: linear-gradient(180deg, #1C1C1E 0%, #000000 100%);
  }
  
  .nav-header {
    background: rgba(28, 28, 30, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
  
  .nav-title {
    color: #FFFFFF;
  }
  
  .user-card,
  .room-cell,
  .form-section,
  .stat-card,
  .menu-section {
    background: #2C2C2E;
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .room-name,
  .user-name,
  .modal-title,
  .menu-text {
    color: #FFFFFF;
  }
  
  .subtitle,
  .user-status,
  .room-meta,
  .modal-subtitle {
    color: #8E8E93;
  }
  
  .form-input {
    background: #1C1C1E;
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .btn-secondary {
    background: #2C2C2E;
    color: #0A84FF;
    border-color: rgba(255, 255, 255, 0.2);
  }
  
  .tab-item {
    color: #8E8E93;
  }
  
  .tab-item.active {
    background: #0A84FF;
    color: white;
  }
}