/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: #f5f6fa;
  color: #333;
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: #f5f6fa;
  position: relative;
}

.page {
  display: none;
  min-height: 100vh;
}

.page.active {
  display: block;
}

.container {
  padding: 16px;
  padding-bottom: 20px;
}

/* 顶部栏 */
.app-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 40px 20px 30px;
  text-align: center;
}

.app-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 4px;
}

.app-subtitle {
  font-size: 14px;
  opacity: 0.85;
}

.nav-header {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 16px;
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-back {
  font-size: 24px;
  color: #333;
  padding: 8px 12px 8px 0;
  cursor: pointer;
}

.nav-title {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
}

.nav-right {
  width: 40px;
  text-align: right;
}

/* 卡片 */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #222;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.text-muted {
  color: #999;
  font-size: 13px;
}

/* 按钮 */
.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  transition: all 0.2s;
}

.btn-primary:active {
  transform: scale(0.98);
  opacity: 0.9;
}

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

.create-btn {
  margin-top: 20px;
}

/* 首页牌局列表 */
.game-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 最近对局 */
.recent-rounds {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recent-round-item {
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: transform 0.15s;
}

.recent-round-item:active {
  transform: scale(0.98);
}

.rr-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.rr-game-tag {
  font-size: 11px;
  color: #999;
  background: #f5f5f5;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

.rr-team {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.rr-avatars {
  display: flex;
}

.rr-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  margin-right: -6px;
  border: 2px solid #fff;
  overflow: hidden;
  background: #FFB74D;
}

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

.rr-score {
  font-weight: 700;
  font-size: 16px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.rr-score .rr-vs {
  color: #ccc;
  font-size: 12px;
  font-weight: 500;
}

.rr-score .rr-win {
  color: #FF6B35;
}

.rr-score .rr-lose {
  color: #999;
}

.rr-oin-tag {
  background: linear-gradient(135deg, #FF6B35, #FFB347);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: 600;
}

.rr-time {
  font-size: 11px;
  color: #bbb;
  margin-left: 8px;
}

.recent-empty {
  text-align: center;
  padding: 16px 0;
}

.game-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: all 0.2s;
}

.game-card:active {
  transform: scale(0.98);
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.game-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.game-name {
  font-size: 17px;
  font-weight: 600;
  color: #222;
}

.game-mode-tag {
  font-size: 11px;
  background: linear-gradient(135deg, #ff9800, #f57c00);
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: bold;
}

.game-status {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 12px;
}

.status-active {
  background: #e8f5e9;
  color: #4caf50;
}

.status-finished {
  background: #f5f5f5;
  color: #999;
}

/* 玩家头像组 */
.game-players {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.gp-team {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.gp-team.gp-b {
  justify-content: flex-end;
}

.gp-avatars {
  display: flex;
}

.gp-avatars-right {
  flex-direction: row-reverse;
}

.gp-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.gp-avatars .gp-avatar:first-child {
  margin-left: 0;
}

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

.gp-avatar-emoji {
  font-size: 16px;
}

.gp-label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.gp-vs {
  font-size: 12px;
  font-weight: bold;
  color: #999;
  padding: 0 10px;
}

/* 比分条 */
.score-bar {
  height: 28px;
  background: #e3f2fd;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
}

.score-bar-a {
  height: 100%;
  background: linear-gradient(90deg, #ef5350, #e53935);
  border-radius: 14px;
  transition: width 0.3s;
}

.score-bar-text {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.text-red { color: #fff; }
.text-blue { color: #fff; }
.text-divider { margin: 0 6px; opacity: 0.8; }

/* 牌局信息 */
.game-info {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-label {
  font-size: 12px;
  color: #999;
}

.info-value {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.game-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.game-time {
  font-size: 12px;
  color: #999;
}

.game-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 12px;
  background: #f5f5f5;
  color: #666;
  cursor: pointer;
  border: none;
}

.action-delete {
  color: #ff5722;
  background: #fbe9e7;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.empty-text {
  font-size: 16px;
  color: #666;
  margin-bottom: 6px;
}

.empty-sub {
  font-size: 13px;
  color: #999;
}

/* 设置页 */
.name-input {
  width: 100%;
  height: 44px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.name-input:focus {
  border-color: #667eea;
}

.option-row {
  display: flex;
  gap: 10px;
}

.option-item {
  flex: 1;
  background: #f5f5f5;
  border-radius: 10px;
  padding: 14px 8px;
  text-align: center;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.option-item.active {
  background: #e8eaf6;
  border-color: #667eea;
}

.option-value {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin-bottom: 2px;
}

.option-item.active .option-value {
  color: #667eea;
}

.option-desc {
  font-size: 12px;
  color: #888;
}

.tip {
  font-size: 12px;
  margin-top: 8px;
}

/* 计分模式 */
.mode-row {
  display: flex;
  gap: 12px;
}

.mode-item {
  flex: 1;
  background: #f5f5f5;
  border-radius: 12px;
  padding: 16px 10px;
  text-align: center;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.mode-item.active {
  background: #e3f2fd;
  border-color: #1e88e5;
}

.mode-item.mode-oin.active {
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  border-color: #ff9800;
}

.mode-icon {
  font-size: 32px;
  margin-bottom: 6px;
}

.mode-name {
  font-size: 15px;
  font-weight: bold;
  color: #333;
  margin-bottom: 4px;
}

.mode-item.active .mode-name {
  color: #1e88e5;
}

.mode-item.mode-oin.active .mode-name {
  color: #e65100;
}

.mode-desc {
  font-size: 12px;
  color: #888;
  line-height: 1.4;
}

/* 添加玩家按钮 */
.add-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.add-btn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px;
  background: #f0f7ff;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.add-btn-item:active {
  transform: scale(0.96);
}

.add-btn-manual {
  background: #fff8e1;
}

.add-btn-icon {
  font-size: 24px;
}

.add-btn-item text {
  font-size: 13px;
  color: #333;
  font-weight: 500;
}

/* 快速添加 */
.quick-add {
  margin-bottom: 12px;
}

.quick-label {
  font-size: 13px;
  color: #666;
  margin-right: 8px;
}

.quick-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-tag {
  padding: 4px 12px;
  background: #f5f5f5;
  border-radius: 14px;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-tag:active {
  background: #e0e0e0;
}

/* 队伍 */
.shuffle-btn {
  font-size: 13px;
  color: #ff9800;
  font-weight: normal;
  cursor: pointer;
}

.teams {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.team {
  padding: 12px;
  border-radius: 10px;
}

.team-a {
  background: #fff5f5;
}

.team-b {
  background: #f0f7ff;
}

.team-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.team-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: bold;
  color: #fff;
}

.badge-a {
  background: #e53935;
}

.badge-b {
  background: #1e88e5;
}

.team-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.team-players {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #fff;
  border-radius: 8px;
}

.player-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

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

.player-avatar-emoji {
  font-size: 18px;
}

.player-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.player-actions {
  display: flex;
  gap: 6px;
}

.player-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  background: #f5f5f5;
  color: #666;
}

.player-action-btn.move-btn {
  background: #e8f5e9;
  color: #4caf50;
}

.player-action-btn.delete-btn {
  background: #ffebee;
  color: #e53935;
}

/* 底部操作区 */
.bottom-actions {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  padding: 12px 16px 24px;
  background: #fff;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.05);
  z-index: 10;
}

.bottom-space {
  height: 120px;
}

.submit-btn {
  margin-bottom: 10px;
}

.bottom-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.link {
  font-size: 13px;
  color: #1e88e5;
  cursor: pointer;
}

.link-danger {
  color: #ff9800;
}

.divider {
  color: #ddd;
  font-size: 13px;
}

/* 记分页 */
.top-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.round-badge {
  background: #fff;
  padding: 6px 16px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.total-badge {
  background: #fff;
  padding: 6px 16px;
  border-radius: 16px;
  font-size: 13px;
  color: #666;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.badge-oin {
  background: linear-gradient(135deg, #ff9800, #f57c00);
  color: #fff;
}

/* 比分面板 */
.score-panel {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 16px;
  padding: 20px 12px;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
}

.score-panel::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 50%;
  background: linear-gradient(135deg, #fff5f5, #ffebee);
}

.score-panel::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 50%;
  background: linear-gradient(135deg, #f0f7ff, #e3f2fd);
}

.team-panel {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
}

.team-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 8px;
}

.team-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-a { background: #e53935; }
.dot-b { background: #1e88e5; }

.team-avatars {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.mini-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.team-avatars .mini-avatar:first-child {
  margin-left: 0;
}

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

.mini-avatar-emoji {
  font-size: 16px;
}

.score-input-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.score-btn-minus,
.score-btn-plus {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}

.team-panel-a .score-btn-minus,
.team-panel-a .score-btn-plus {
  background: #ffebee;
  color: #e53935;
}

.team-panel-b .score-btn-minus,
.team-panel-b .score-btn-plus {
  background: #e3f2fd;
  color: #1e88e5;
}

.score-input {
  width: 80px;
  height: 44px;
  border-radius: 10px;
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  background: #fff;
  border: 2px solid transparent;
  outline: none;
  -moz-appearance: textfield;
}

.score-input::-webkit-outer-spin-button,
.score-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.score-input-a {
  color: #e53935;
  border-color: #ffcdd2;
}

.score-input-b {
  color: #1e88e5;
  border-color: #bbdefb;
}

.score-big-display {
  margin-bottom: 10px;
}

.big-score {
  font-size: 40px;
  font-weight: bold;
  line-height: 1.2;
}

.team-total {
  font-size: 12px;
  color: #888;
}

.score-a {
  color: #e53935;
  font-weight: bold;
  font-size: 14px;
}

.score-b {
  color: #1e88e5;
  font-weight: bold;
  font-size: 14px;
}

/* VS 区域 */
.vs-section {
  position: relative;
  z-index: 2;
  padding: 0 8px;
  text-align: center;
}

.vs-text {
  font-size: 16px;
  font-weight: bold;
  color: #999;
  margin-bottom: 4px;
}

.diff-text {
  font-size: 11px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 12px;
  background: #fff;
  white-space: nowrap;
}

.diff-a {
  color: #e53935;
  background: #ffebee;
}

.diff-b {
  color: #1e88e5;
  background: #e3f2fd;
}

/* 快捷记分 */
.quick-scores {
  padding-bottom: 16px;
}

.quick-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.quick-row:last-child {
  margin-bottom: 0;
}

.quick-btn {
  flex: 1;
  padding: 12px 8px;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  background: #ffebee;
  color: #e53935;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-btn:active {
  transform: scale(0.96);
}

.quick-btn-mid {
  background: #f5f5f5;
  color: #666;
}

.quick-btn-blue {
  background: #e3f2fd;
  color: #1e88e5;
}

/* OIN快捷按钮 */
.quick-btn-oin {
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  color: #e65100;
  border: 2px solid #ffb74d;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 8px;
}

.quick-btn-oin:active {
  transform: scale(0.96);
}

.quick-btn-oin .oin-icon {
  font-size: 20px;
  animation: oinIconSpin 3s linear infinite;
}

@keyframes oinIconSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.quick-btn-oin .oin-score {
  font-size: 11px;
  opacity: 0.8;
  font-weight: normal;
}

.quick-btn-oin-blue {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  color: #1565c0;
  border-color: #64b5f6;
}

/* 每局记录表格 */
.rounds-list-card {
  padding-bottom: 16px;
}

.rounds-count-badge {
  font-size: 12px;
  font-weight: normal;
  background: #f5f5f5;
  color: #666;
  padding: 2px 10px;
  border-radius: 10px;
}

.rounds-table {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #eee;
}

.rounds-table-header {
  display: flex;
  background: #fafafa;
  font-size: 12px;
  color: #888;
  font-weight: 500;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.rth-no {
  flex: 0 0 50px;
  text-align: center;
}

.rth-score {
  flex: 1;
  text-align: center;
}

.rth-cum {
  flex: 0 0 90px;
  text-align: center;
}

.rounds-table-body {
  max-height: 280px;
  overflow-y: auto;
}

.round-row {
  display: flex;
  align-items: center;
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.2s;
}

.round-row:last-child {
  border-bottom: none;
}

.round-row:hover {
  background: #fafafa;
}

.round-row.current {
  background: #fff8e1;
  font-weight: 600;
}

.rr-no {
  flex: 0 0 50px;
  text-align: center;
  color: #666;
  font-size: 13px;
}

.rr-score {
  flex: 1;
  text-align: center;
  font-weight: 600;
}

.rr-score.rr-red { color: #e53935; }
.rr-score.rr-blue { color: #1e88e5; }

.rr-cum {
  flex: 0 0 90px;
  text-align: center;
  font-size: 12px;
  color: #888;
}

.rr-oin-tag {
  display: inline-block;
  font-size: 10px;
  background: linear-gradient(135deg, #ff9800, #f57c00);
  color: #fff;
  padding: 1px 5px;
  border-radius: 6px;
  margin-left: 3px;
  vertical-align: middle;
}

.empty-rounds-score {
  text-align: center;
  padding: 24px 0;
}

/* 战绩统计（已废弃，保留兼容） */
.stats {
  padding-bottom: 16px;
}

.stats-row {
  display: flex;
  align-items: center;
}

.stat-col {
  flex: 1;
  text-align: center;
  padding: 6px 0;
}

.stat-a .stat-big { color: #e53935; }
.stat-b .stat-big { color: #1e88e5; }

.stat-big {
  font-size: 36px;
  font-weight: bold;
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: #666;
  margin-bottom: 4px;
}

.stat-sub {
  font-size: 12px;
  color: #999;
}

.stat-vs {
  width: 70px;
  text-align: center;
  font-size: 13px;
  color: #999;
}

/* OIN大按钮 */
.oin-action-card {
  background: transparent;
  box-shadow: none;
  padding: 0;
  margin-bottom: 16px;
}

.oin-big-btn {
  background: linear-gradient(135deg, #ff9800, #f57c00);
  border-radius: 16px;
  padding: 36px 20px;
  text-align: center;
  color: #fff;
  box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
}

.oin-big-btn:active {
  transform: scale(0.98);
}

.oin-big-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
  animation: oinPulse 2s ease-in-out infinite;
}

@keyframes oinPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.oin-btn-icon {
  font-size: 56px;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
  animation: oinBounce 1s ease-in-out infinite;
}

@keyframes oinBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.oin-btn-text {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.oin-btn-desc {
  font-size: 14px;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

/* OIN弹窗 */
.oin-modal-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.25s ease-out;
}

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

.oin-modal-content {
  width: 320px;
  background: #fff;
  border-radius: 20px;
  padding: 32px 24px 24px;
  text-align: center;
  animation: oinModalPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes oinModalPop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.oin-modal-title {
  font-size: 22px;
  font-weight: bold;
  color: #333;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.oin-modal-icon {
  font-size: 28px;
  animation: oinSpin 2s linear infinite;
}

@keyframes oinSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.oin-modal-sub {
  font-size: 14px;
  color: #888;
  margin-bottom: 28px;
}

.oin-team-select {
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
}

.oin-team-btn {
  flex: 1;
  padding: 20px 10px;
  border-radius: 14px;
  border: 2px solid #e0e0e0;
  background: #fafafa;
  cursor: pointer;
  transition: all 0.2s;
}

.oin-team-btn.selected {
  border-color: transparent;
  transform: scale(1.05);
}

.oin-team-a.selected {
  background: linear-gradient(135deg, #ffebee, #ffcdd2);
  border-color: #e53935;
  box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
}

.oin-team-b.selected {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  border-color: #1e88e5;
  box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
}

.oin-team-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.oin-team-name {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin-bottom: 4px;
}

.oin-team-score {
  font-size: 12px;
  color: #888;
}

.oin-confirm-btn {
  width: 100%;
  font-size: 16px;
  padding: 14px 0;
  background: linear-gradient(135deg, #ff9800, #f57c00);
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.oin-modal-cancel {
  margin-top: 14px;
  font-size: 14px;
  color: #999;
  cursor: pointer;
}

/* 详情页 */
.overview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.game-name {
  font-size: 18px;
  font-weight: 600;
  color: #222;
}

.game-status {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 12px;
}

.overview-stats {
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-item {
  flex: 1;
  text-align: center;
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: #999;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: #e0e0e0;
}

.mode-tag {
  margin-top: 16px;
  display: inline-block;
  padding: 4px 16px;
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  color: #e65100;
  font-size: 13px;
  font-weight: bold;
  border-radius: 14px;
}

/* OIN仪式感弹窗 */
.oin-ceremony-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, rgba(255, 152, 0, 0.3) 0%, rgba(0, 0, 0, 0.85) 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: oinMaskFade 0.4s ease-out;
}

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

.oin-ceremony-content {
  width: 320px;
  background: linear-gradient(180deg, #fff8e1 0%, #fff3e0 50%, #ffe0b2 100%);
  border-radius: 24px;
  padding: 32px 24px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 3px solid #ffb74d;
  box-shadow: 
    0 0 40px rgba(255, 152, 0, 0.6),
    0 0 80px rgba(255, 152, 0, 0.3),
    inset 0 2px 10px rgba(255, 255, 255, 0.5);
  animation: oinCeremonyPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes oinCeremonyPop {
  0% {
    opacity: 0;
    transform: scale(0.3) rotate(-10deg);
  }
  60% {
    transform: scale(1.1) rotate(3deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* 粒子 */
.oin-particles {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

.oin-particle {
  position: absolute;
  font-size: 24px;
  animation: particleFloat 2s ease-in-out infinite;
}

.oin-particle.p1 { top: 10%; left: 8%; animation-delay: 0s; font-size: 28px; }
.oin-particle.p2 { top: 20%; right: 10%; animation-delay: 0.3s; font-size: 20px; }
.oin-particle.p3 { top: 60%; left: 6%; animation-delay: 0.6s; font-size: 24px; }
.oin-particle.p4 { top: 15%; right: 25%; animation-delay: 0.2s; font-size: 18px; }
.oin-particle.p5 { top: 70%; right: 8%; animation-delay: 0.8s; font-size: 22px; }
.oin-particle.p6 { top: 50%; left: 15%; animation-delay: 0.4s; font-size: 16px; }
.oin-particle.p7 { top: 80%; left: 30%; animation-delay: 0.7s; font-size: 20px; }
.oin-particle.p8 { top: 25%; left: 45%; animation-delay: 0.5s; font-size: 26px; }

@keyframes particleFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-15px) rotate(15deg);
    opacity: 1;
  }
}

/* 大Logo */
.oin-big-logo {
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #ff9800, #f57c00);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 4px 20px rgba(255, 152, 0, 0.5),
    0 0 0 8px rgba(255, 152, 0, 0.2),
    0 0 0 16px rgba(255, 152, 0, 0.1);
  animation: oinLogoPulse 1.5s ease-in-out infinite;
}

@keyframes oinLogoPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 
      0 4px 20px rgba(255, 152, 0, 0.5),
      0 0 0 8px rgba(255, 152, 0, 0.2),
      0 0 0 16px rgba(255, 152, 0, 0.1);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 
      0 6px 30px rgba(255, 152, 0, 0.7),
      0 0 0 12px rgba(255, 152, 0, 0.25),
      0 0 0 24px rgba(255, 152, 0, 0.15);
  }
}

.oin-logo-icon {
  font-size: 56px;
  animation: oinLogoSpin 3s linear infinite;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes oinLogoSpin {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(10deg) scale(1.1); }
  50% { transform: rotate(0deg) scale(1); }
  75% { transform: rotate(-10deg) scale(1.1); }
  100% { transform: rotate(0deg) scale(1); }
}

/* 标题 */
.oin-ceremony-title {
  font-size: 32px;
  font-weight: bold;
  color: #e65100;
  margin-bottom: 24px;
  text-shadow: 0 2px 4px rgba(255, 152, 0, 0.3);
  animation: titleBounce 0.6s ease-out 0.3s both;
}

@keyframes titleBounce {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  50% {
    transform: translateY(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 分数对比 */
.oin-ceremony-score {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 24px;
  border: 2px solid rgba(255, 152, 0, 0.3);
}

.oin-score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}

.oin-win-label {
  font-size: 16px;
  color: #2e7d32;
  font-weight: 600;
}

.oin-win-score {
  font-size: 28px;
  font-weight: bold;
  color: #2e7d32;
  animation: scorePop 0.5s ease-out 0.5s both;
}

.oin-lose-label {
  font-size: 16px;
  color: #c62828;
  font-weight: 600;
}

.oin-lose-score {
  font-size: 28px;
  font-weight: bold;
  color: #c62828;
  animation: scorePop 0.5s ease-out 0.7s both;
}

@keyframes scorePop {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  70% {
    transform: scale(1.2);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.oin-score-divider {
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  color: #ff9800;
  padding: 4px 0;
  border-top: 1px dashed rgba(255, 152, 0, 0.3);
  border-bottom: 1px dashed rgba(255, 152, 0, 0.3);
  margin: 4px 0;
}

/* 按钮 */
.oin-ceremony-actions {
  position: relative;
  z-index: 2;
}

.oin-ceremony-btn {
  width: 100%;
  padding: 14px 0;
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(135deg, #ff9800, #f57c00);
  border: none;
  border-radius: 24px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 152, 0, 0.5);
  transition: all 0.2s;
  animation: btnSlideUp 0.5s ease-out 0.8s both;
}

@keyframes btnSlideUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.oin-ceremony-btn:active {
  transform: scale(0.96);
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.4);
}

.oin-ceremony-cancel {
  margin-top: 12px;
  font-size: 14px;
  color: #999;
  cursor: pointer;
  animation: btnSlideUp 0.5s ease-out 0.9s both;
}

/* 红队主题 */
.oin-ceremony-content.theme-red {
  background: linear-gradient(180deg, #ffebee 0%, #ffcdd2 50%, #ef9a9a 100%);
  border-color: #e53935;
  box-shadow: 
    0 0 40px rgba(229, 57, 53, 0.5),
    0 0 80px rgba(229, 57, 53, 0.25),
    inset 0 2px 10px rgba(255, 255, 255, 0.5);
}

.oin-ceremony-content.theme-red .oin-big-logo {
  background: linear-gradient(135deg, #e53935, #c62828);
  box-shadow: 
    0 4px 20px rgba(229, 57, 53, 0.5),
    0 0 0 8px rgba(229, 57, 53, 0.2),
    0 0 0 16px rgba(229, 57, 53, 0.1);
}

.oin-ceremony-content.theme-red .oin-ceremony-title {
  color: #b71c1c;
  text-shadow: 0 2px 4px rgba(229, 57, 53, 0.3);
}

.oin-ceremony-content.theme-red .oin-ceremony-btn {
  background: linear-gradient(135deg, #e53935, #c62828);
  box-shadow: 0 4px 16px rgba(229, 57, 53, 0.5);
}

/* 蓝队主题 */
.oin-ceremony-content.theme-blue {
  background: linear-gradient(180deg, #e3f2fd 0%, #bbdefb 50%, #90caf9 100%);
  border-color: #1e88e5;
  box-shadow: 
    0 0 40px rgba(30, 136, 229, 0.5),
    0 0 80px rgba(30, 136, 229, 0.25),
    inset 0 2px 10px rgba(255, 255, 255, 0.5);
}

.oin-ceremony-content.theme-blue .oin-big-logo {
  background: linear-gradient(135deg, #1e88e5, #1565c0);
  box-shadow: 
    0 4px 20px rgba(30, 136, 229, 0.5),
    0 0 0 8px rgba(30, 136, 229, 0.2),
    0 0 0 16px rgba(30, 136, 229, 0.1);
}

.oin-ceremony-content.theme-blue .oin-ceremony-title {
  color: #0d47a1;
  text-shadow: 0 2px 4px rgba(30, 136, 229, 0.3);
}

.oin-ceremony-content.theme-blue .oin-ceremony-btn {
  background: linear-gradient(135deg, #1e88e5, #1565c0);
  box-shadow: 0 4px 16px rgba(30, 136, 229, 0.5);
}

/* 最终比分 */
.final-score {
  padding-bottom: 16px;
}

.score-board {
  display: flex;
  align-items: center;
  padding: 12px 0;
}

.score-team {
  flex: 1;
  text-align: center;
}

.final-team-name {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 6px;
}

.team-a-final .final-team-name { color: #e53935; }
.team-b-final .final-team-name { color: #1e88e5; }

.final-player-list {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.final-player-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 6px;
}

.final-player-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

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

.fp-avatar-emoji {
  font-size: 12px;
}

.fp-name {
  font-size: 12px;
  color: #555;
  font-weight: 500;
}

.final-score-value {
  font-size: 40px;
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 4px;
}

.score-red { color: #e53935; }
.score-blue { color: #1e88e5; }

.final-wins {
  font-size: 13px;
  color: #999;
}

.score-vs {
  width: 80px;
  text-align: center;
}

.vs-big {
  font-size: 18px;
  font-weight: bold;
  color: #999;
  margin-bottom: 4px;
}

.diff-display {
  font-size: 12px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 10px;
  background: #f5f5f5;
}

.diff-red { color: #e53935; background: #ffebee; }
.diff-blue { color: #1e88e5; background: #e3f2fd; }

.winner-badge {
  text-align: center;
  margin-top: 12px;
  padding: 10px;
  background: linear-gradient(135deg, #fff8e1, #ffecb3);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #f57c00;
}

.tie-badge {
  background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
  color: #666;
}

/* 每局详情 */
.round-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.round-item {
  background: #fafafa;
  border-radius: 10px;
  overflow: hidden;
}

.round-header {
  display: flex;
  align-items: center;
  padding: 12px;
  cursor: pointer;
}

.round-no {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  flex: 0 0 90px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.oin-badge {
  font-size: 10px;
  background: linear-gradient(135deg, #ff9800, #f57c00);
  color: #fff;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: bold;
}

.round-scores {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: bold;
}

.r-score {
  color: #666;
}

.r-score.winner {
  color: #e53935;
}

.r-colon {
  color: #ccc;
  margin: 0 4px;
}

.round-time {
  font-size: 12px;
  color: #999;
  flex: 0 0 45px;
  text-align: right;
  margin-right: 8px;
}

.round-arrow {
  font-size: 10px;
  color: #ccc;
  flex: 0 0 20px;
  text-align: right;
}

.round-detail {
  padding: 12px;
  border-top: 1px solid #eee;
  background: #fff;
}

.detail-teams {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.detail-team {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
}

.detail-team-a {
  background: #fff5f5;
}

.detail-team-b {
  background: #f0f7ff;
}

.dt-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
}

.dt-score {
  font-size: 20px;
  font-weight: bold;
}

.detail-team-a .dt-score { color: #e53935; }
.detail-team-b .dt-score { color: #1e88e5; }

.detail-diff {
  text-align: center;
  font-size: 13px;
  color: #666;
  margin-bottom: 10px;
}

.detail-actions {
  text-align: center;
}

.delete-btn {
  display: inline-block;
  padding: 6px 16px;
  background: #ffebee;
  color: #e53935;
  font-size: 13px;
  border-radius: 14px;
  cursor: pointer;
}

.empty-rounds {
  text-align: center;
  padding: 30px 0;
}

/* 弹窗 */
.modal-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.2s ease-out;
}

.modal-content {
  width: 300px;
  background: #fff;
  border-radius: 16px;
  padding: 24px 20px 20px;
  animation: oinModalPop 0.25s ease-out;
}

.modal-title {
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
  color: #333;
}

.modal-message {
  font-size: 14px;
  color: #666;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.5;
}

.modal-input {
  width: 100%;
  height: 42px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 15px;
  outline: none;
  margin-bottom: 16px;
}

.modal-input:focus {
  border-color: #667eea;
}

.avatar-upload-area {
  text-align: center;
  margin-bottom: 12px;
}

.avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 8px;
  overflow: hidden;
}

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

.avatar-upload-tip {
  font-size: 12px;
  color: #999;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.modal-btn {
  flex: 1;
  padding: 10px 0;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-btn-cancel {
  background: #f5f5f5;
  color: #666;
}

.modal-btn-confirm {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.modal-btn-delete {
  background: #ffebee;
  color: #c62828;
}

/* 编辑对局弹窗 */
.edit-round-content {
  width: 320px;
}

.edit-round-body {
  padding: 16px 0;
}

.edit-field {
  margin-bottom: 14px;
}

.edit-field-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 6px;
}

.edit-field-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
}

.edit-field-input:focus {
  border-color: #667eea;
}

.edit-oin-row {
  margin: 12px 0 4px;
}

.edit-oin-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: #333;
  cursor: pointer;
}

.edit-oin-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.edit-round-tip {
  margin-top: 8px;
  font-size: 13px;
  color: #ff9800;
  min-height: 18px;
}

/* 编辑模式下的行操作按钮 */
.round-row-actions {
  display: none;
  gap: 6px;
}

.rounds-list-card.edit-mode .round-row-actions {
  display: flex;
}

.rounds-list-card.edit-mode .rr-no {
  flex: 1;
}

.rounds-list-card.edit-mode .round-row {
  padding-right: 8px;
}

.rr-edit-btn {
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  background: #f3e5f5;
  color: #7b1fa2;
  flex-shrink: 0;
}

.rr-delete-btn {
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  background: #ffebee;
  color: #c62828;
  flex-shrink: 0;
}

/* 玩家库（设置页） */
.player-library {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.lib-player-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  border: 2px solid transparent;
}

.lib-player-item:hover {
  background: #f5f5f5;
}

.lib-player-item.selected {
  background: #fff3e0;
  border-color: #ff9800;
}

.lib-player-item.selected::after {
  content: '✓';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  background: #ff9800;
  color: #fff;
  font-size: 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lib-player-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  overflow: hidden;
  flex-shrink: 0;
}

.lib-player-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lib-player-name {
  font-size: 12px;
  color: #333;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lib-player-team {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 600;
}

.lib-player-team.team-a {
  background: #ffebee;
  color: #c62828;
}

.lib-player-team.team-b {
  background: #e3f2fd;
  color: #1565c0;
}

/* 管理玩家入口 */
.add-player-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border: 1.5px dashed #e0e0e0;
  border-radius: 10px;
  color: #999;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.add-player-row:hover {
  border-color: #667eea;
  color: #667eea;
  background: #f8f9ff;
}

.add-player-icon {
  font-size: 18px;
  font-weight: bold;
}

/* 玩家管理弹窗 */
.player-manager-mask {
  z-index: 150;
}

.player-manager-content {
  width: 340px;
  max-height: 80vh;
  background: #fff;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 0.3s ease-out;
}

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

.pm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.pm-title {
  font-size: 18px;
  font-weight: bold;
  color: #333;
}

.pm-close {
  font-size: 20px;
  color: #999;
  cursor: pointer;
  padding: 4px 8px;
}

.pm-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
}

.pm-player-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.pm-player-item:hover {
  background: #f5f5f5;
}

.pm-player-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  overflow: hidden;
  flex-shrink: 0;
}

.pm-player-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pm-player-name {
  flex: 1;
  font-size: 15px;
  color: #333;
  font-weight: 500;
}

.pm-player-edit {
  font-size: 14px;
  color: #667eea;
  padding: 4px 10px;
  background: #f0f0ff;
  border-radius: 6px;
}

.pm-footer {
  padding: 12px 20px;
  border-top: 1px solid #f0f0f0;
}

.pm-add-btn {
  width: 100%;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 600;
  color: #667eea;
  background: #f0f0ff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s;
}

.pm-add-btn:hover {
  background: #e0e0ff;
}

.pm-add-icon {
  font-size: 18px;
  font-weight: bold;
}

/* OIN 羞辱动画 */
.oin-shame-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 10px;
}

.oin-winner-side,
.oin-loser-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.oin-winner-avatars,
.oin-loser-avatars {
  display: flex;
  gap: -10px;
}

.oin-winner-avatars .oin-player-avatar,
.oin-loser-avatars .oin-player-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border: 3px solid #fff;
  margin-right: -10px;
  overflow: hidden;
  background: #FFB74D;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.oin-winner-avatars .oin-player-avatar img,
.oin-loser-avatars .oin-player-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.oin-winner-avatars .oin-player-avatar {
  animation: winnerBounce 1s ease-in-out infinite;
}

.oin-loser-avatars .oin-player-avatar {
  animation: loserShake 0.5s ease-in-out infinite;
  filter: grayscale(50%);
  opacity: 0.8;
}

@keyframes winnerBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.08); }
}

@keyframes loserShake {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  25% { transform: translateX(-3px) rotate(-3deg); }
  75% { transform: translateX(3px) rotate(3deg); }
}

.oin-winner-poses,
.oin-loser-poses {
  display: flex;
  gap: 4px;
  font-size: 18px;
}

.winner-pose {
  animation: winnerPosePop 2s ease-in-out infinite;
}

.winner-pose.wp1 { animation-delay: 0s; }
.winner-pose.wp2 { animation-delay: 0.3s; }
.winner-pose.wp3 { animation-delay: 0.6s; }

@keyframes winnerPosePop {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.3) rotate(10deg); }
}

.loser-pose {
  animation: loserPoseDrop 1.5s ease-in-out infinite;
}

.loser-pose.lp1 { animation-delay: 0s; }
.loser-pose.lp2 { animation-delay: 0.4s; }
.loser-pose.lp3 { animation-delay: 0.8s; }

@keyframes loserPoseDrop {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.6; }
  50% { transform: translateY(4px) rotate(-15deg); opacity: 1; }
}

.oin-vs-big {
  font-size: 28px;
  animation: vsPulse 1s ease-in-out infinite;
  flex-shrink: 0;
  padding: 0 8px;
}

@keyframes vsPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.oin-shame-text {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  margin: 8px 0 16px;
  animation: shameTextGlow 1.5s ease-in-out infinite;
  letter-spacing: 2px;
}

.theme-red .oin-shame-text {
  color: #FF6B35;
  text-shadow: 0 0 10px rgba(255,107,53,0.4);
}

.theme-blue .oin-shame-text {
  color: #4A90D9;
  text-shadow: 0 0 10px rgba(74,144,217,0.4);
}

@keyframes shameTextGlow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* 编辑玩家弹窗 */
.edit-player-mask {
  z-index: 200;
}

.edit-player-content {
  width: 320px;
}

.edit-player-body {
  padding: 16px 0;
}

.ep-avatar-section {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.ep-avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  border: 3px solid #e0e0e0;
  font-size: 36px;
  transition: border-color 0.2s;
}

.ep-avatar-preview:hover {
  border-color: #667eea;
}

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

.ep-avatar-preview span {
  font-size: 11px;
  color: #999;
  text-align: center;
  padding: 0 8px;
}

/* Toast */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 200;
  animation: toastIn 0.2s ease-out;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}
