/* 逆转俄罗斯 - 前端样式 */

.rt-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px;
  font-family: 'Microsoft YaHei', sans-serif;
}

.rt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.rt-back-btn {
  background: #333;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.rt-title {
  color: #e0e0e0;
  font-size: 24px;
  margin: 0;
}

.rt-coins {
  color: #ffd700;
  font-size: 18px;
  font-weight: bold;
}

/* 模式选择 */
.rt-mode-select {
  background: #1e1e2e;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

.rt-mode-select h3 {
  color: #e0e0e0;
  margin-bottom: 20px;
}

.rt-mode-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.rt-mode-btn {
  background: #2d2d44;
  border: 2px solid #3d3d55;
  border-radius: 10px;
  padding: 20px 24px;
  cursor: pointer;
  transition: all 0.3s;
  min-width: 160px;
}

.rt-mode-btn:hover {
  border-color: #7c4dff;
  transform: translateY(-2px);
}

.rt-mode-btn.active {
  border-color: #7c4dff;
  background: #3d2d5d;
  box-shadow: 0 0 20px rgba(124, 77, 255, 0.3);
}

.rt-mode-btn {
  color: #e0e0e0;
  font-size: 18px;
  font-weight: bold;
}

.rt-mode-btn p {
  font-size: 12px;
  color: #999;
  margin-top: 8px;
  font-weight: normal;
}

.rt-bet-section {
  margin-bottom: 20px;
  color: #e0e0e0;
}

.rt-bet-section label {
  font-size: 16px;
}

.rt-bet-section select {
  background: #2d2d44;
  color: #e0e0e0;
  border: 1px solid #3d3d55;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 16px;
  cursor: pointer;
}

.rt-start-btn {
  background: linear-gradient(135deg, #7c4dff, #536dfe);
  color: #fff;
  border: none;
  padding: 14px 48px;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.rt-start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(124, 77, 255, 0.4);
}

/* 游戏区域 */
.rt-game-area {
  background: #1a1a2e;
  border-radius: 12px;
  padding: 20px;
}

.rt-info-bar {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.rt-info-item {
  color: #e0e0e0;
  font-size: 16px;
  background: #2d2d44;
  padding: 6px 16px;
  border-radius: 6px;
}

.rt-info-item span {
  color: #7c4dff;
  font-weight: bold;
}

/* 游戏场地 */
.rt-playfield-wrapper {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: flex-start;
}

.rt-playfield {
  flex-shrink: 0;
}

.rt-grid {
  display: grid;
  gap: 1px;
  background: #111;
  border: 2px solid #333;
  border-radius: 4px;
  padding: 2px;
}

.rt-cell {
  width: 26px;
  height: 26px;
  background: #1a1a2e;
  border-radius: 2px;
  transition: background 0.1s;
}

.rt-cell.rt-filled {
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: inset 0 0 4px rgba(255,255,255,0.15);
}

.rt-cell.rt-ceiling {
  border-top: 2px dashed #ff5252;
}

/* 下一个方块 */
.rt-next-piece {
  text-align: center;
}

.rt-next-piece h4 {
  color: #e0e0e0;
  margin-bottom: 8px;
}

.rt-next-grid {
  display: grid;
  gap: 1px;
  background: #111;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 2px;
}

.rt-next-grid .rt-cell {
  width: 20px;
  height: 20px;
}

/* 对手区域 */
.rt-opponent-area {
  text-align: center;
}

.rt-opponent-area h4 {
  color: #e0e0e0;
  margin-bottom: 8px;
}

.rt-opp-grid .rt-cell {
  width: 18px;
  height: 18px;
}

.rt-opp-info {
  color: #999;
  font-size: 12px;
  margin-top: 4px;
}

/* 控制按钮 */
.rt-controls {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

.rt-ctrl-btn {
  background: #2d2d44;
  color: #e0e0e0;
  border: 2px solid #3d3d55;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 60px;
}

.rt-ctrl-btn:hover {
  background: #3d3d55;
  border-color: #7c4dff;
}

.rt-ctrl-btn:active {
  transform: scale(0.95);
}

.rt-hard-drop {
  background: linear-gradient(135deg, #7c4dff, #536dfe);
  border-color: #7c4dff;
}

.rt-hint {
  text-align: center;
  color: #666;
  font-size: 12px;
  margin-top: 12px;
}

/* 结果 */
.rt-result {
  margin-top: 20px;
  text-align: center;
}

.rt-result-card {
  background: #1e1e2e;
  border-radius: 12px;
  padding: 32px;
  display: inline-block;
  min-width: 300px;
}

.rt-result-card.rt-win {
  border: 2px solid #4caf50;
  box-shadow: 0 0 30px rgba(76, 175, 80, 0.3);
}

.rt-result-card.rt-lose {
  border: 2px solid #f44336;
  box-shadow: 0 0 30px rgba(244, 67, 54, 0.3);
}

.rt-result-card h2 {
  font-size: 28px;
  margin-bottom: 20px;
}

.rt-win h2 { color: #4caf50; }
.rt-lose h2 { color: #f44336; }

.rt-result-stats {
  text-align: left;
  color: #e0e0e0;
  margin-bottom: 20px;
}

.rt-result-stats p {
  margin: 6px 0;
  font-size: 15px;
}

.rt-profit { color: #4caf50; font-weight: bold; }
.rt-loss { color: #f44336; font-weight: bold; }

.rt-play-again {
  background: linear-gradient(135deg, #7c4dff, #536dfe);
  color: #fff;
  border: none;
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.rt-play-again:hover {
  transform: translateY(-2px);
}

/* 通知 */
.rt-notification {
  position: fixed;
  top: 60%;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  z-index: 9999;
  animation: rtFadeIn 0.3s, rtFadeOut 0.3s 1.7s forwards;
}

.rt-notif-success { background: #4caf50; color: #fff; }
.rt-notif-warning { background: #ff9800; color: #fff; }
.rt-notif-error { background: #f44336; color: #fff; }
.rt-notif-info { background: #2196f3; color: #fff; }

@keyframes rtFadeIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes rtFadeOut {
  to { opacity: 0; }
}

/* 响应式 */
@media (max-width: 600px) {
  .rt-mode-buttons { flex-direction: column; }
  .rt-mode-btn { min-width: 100%; }
  .rt-cell { width: 20px; height: 20px; }
  .rt-info-bar { gap: 8px; }
  .rt-info-item { font-size: 13px; padding: 4px 10px; }
  .rt-controls { flex-wrap: wrap; }
  .rt-ctrl-btn { padding: 8px 14px; font-size: 16px; min-width: 48px; }
}
