/* 验证码标签页 */
.captcha-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.captcha-tab {
  flex: 1;
  padding: 8px 6px;
  background: rgba(248, 248, 248, 0.6);
  border: none;
  border-radius: 8px;
  color: #666;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.captcha-tab::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #ff7a45, #ff4d4f);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.captcha-tab:hover {
  background: rgba(255, 245, 242, 0.9);
  color: #ff7a45;
  transform: translateY(-1px);
}

.captcha-tab.active {
  background: linear-gradient(135deg, #ff7a45 0%, #ff4d4f 100%);
  color: white;
  box-shadow: 0 2px 12px rgba(255, 122, 69, 0.4);
  transform: translateY(-1px);
}

.captcha-tab.active::before {
  transform: scaleX(1);
}

/* 验证码容器 */
.captcha-container {
  background: transparent;
  padding: 8px;
  border-radius: 8px;
  box-shadow: none;
  border: none;
}

.captcha-container.hidden {
  display: none;
}

/* 文字验证码 */
.captcha-display {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  align-items: center;
  justify-content: center;
}

#captchaCanvas {
  background: rgba(232, 232, 232, 0.5);
  border-radius: 6px;
  box-shadow: none;
  cursor: not-allowed;
  width: 180px;
  height: 35px;
  border: none;
}

.refresh-btn {
  padding: 8px;
  background: rgba(255, 245, 242, 0.6);
  border: none;
  border-radius: 6px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: none;
}

.refresh-btn:hover {
  background: linear-gradient(135deg, #ff7a45 0%, #ff4d4f 100%);
  transform: rotate(180deg);
  color: white;
  box-shadow: 0 2px 8px rgba(255, 122, 69, 0.3);
}

.captcha-input {
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 8px;
  box-sizing: border-box;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05), inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.captcha-input::placeholder {
  color: #999;
  transition: all 0.3s ease;
}

.captcha-input:hover {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.captcha-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 2px 12px rgba(255, 122, 69, 0.2), 0 0 0 2px rgba(255, 122, 69, 0.1);
  transform: translateY(-1px);
}

.captcha-input:focus::placeholder {
  color: #ccc;
  transform: translateX(5px);
}

.verify-btn {
  width: 100%;
  padding: 8px;
  background: linear-gradient(135deg, #ff7a45 0%, #ff4d4f 100%);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(255, 122, 69, 0.3);
  position: relative;
  overflow: hidden;
}

.verify-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.verify-btn:hover::before {
  width: 300px;
  height: 300px;
}

.verify-btn:hover {
  background: linear-gradient(135deg, #ff6933 0%, #ff3a3d 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 122, 69, 0.5);
}

.verify-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(255, 122, 69, 0.4);
}

.captcha-message {
  margin-top: 6px;
  padding: 6px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.captcha-message.show {
  opacity: 1;
}

.captcha-message.error {
  background: rgba(255, 230, 230, 0.8);
  color: #e74c3c;
  border: none;
}

.captcha-message.success {
  background: rgba(230, 255, 230, 0.8);
  color: #27ae60;
  border: none;
}

/* 滑动验证码 */
.slide-track {
  position: relative;
  width: 100%;
  height: 85px;
  background: rgba(232, 232, 232, 0.5);
  border-radius: 6px;
  margin-bottom: 8px;
  overflow: hidden;
  border: none;
}

.slide-puzzle {
  position: absolute;
  width: 35px;
  height: 35px;
  background: white;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 2;
  transition: left 0.1s ease;
}

.slide-gap {
  position: absolute;
  width: 35px;
  height: 35px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  border: 2px dashed rgba(255, 255, 255, 0.5);
}

.slide-control {
  position: relative;
}

.slide-bar {
  position: relative;
  height: 30px;
  background: #f0f0f0;
  border-radius: 6px;
  overflow: hidden;
  user-select: none;
}

.slide-btn {
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #ff7a45 0%, #ff4d4f 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(255, 122, 69, 0.4), 0 0 0 2px rgba(255, 255, 255, 0.5);
  z-index: 10;
}

.slide-btn:hover {
  box-shadow: 0 4px 12px rgba(255, 122, 69, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.8);
  transform: scale(1.05);
}

.slide-btn:active {
  cursor: grabbing;
  background: linear-gradient(135deg, #ff6933 0%, #ff3a3d 100%);
  transform: scale(0.95);
  box-shadow: 0 2px 4px rgba(255, 122, 69, 0.4), 0 0 0 2px rgba(255, 255, 255, 0.8);
}

.slide-icon {
  font-size: 16px;
  color: white;
  font-weight: bold;
}

.slide-text {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 12px;
  pointer-events: none;
}

/* 图片验证码 */
.image-instruction {
  text-align: center;
  margin-bottom: 6px;
  font-size: 12px;
  color: #555;
}

.image-instruction strong {
  color: #e74c3c;
  font-size: 13px;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.image-cell {
  aspect-ratio: 1;
  background: #f5f5f5;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  user-select: none;
}

.image-cell:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.image-cell.selected {
  border-color: #ff7a45;
  background: #fff5f2;
}

/* 崩溃提示 */
.rage-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: overlayFadeIn 0.3s ease;
}

.rage-overlay.show {
  display: flex;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.rage-content {
  background: white;
  padding: 32px 24px;
  border-radius: 16px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  animation: rageShake 0.5s ease forwards;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 10001;
}

@keyframes rageShake {
  0% { transform: translateX(0); }
  10% { transform: translateX(-10px); }
  20% { transform: translateX(10px); }
  30% { transform: translateX(-10px); }
  40% { transform: translateX(10px); }
  50% { transform: translateX(-10px); }
  60% { transform: translateX(10px); }
  70% { transform: translateX(-10px); }
  80% { transform: translateX(10px); }
  90% { transform: translateX(-10px); }
  100% { transform: translateX(0); }
}

.rage-emoji {
  font-size: 64px;
  margin-bottom: 16px;
  animation: rageBounce 1s ease-in-out infinite;
}

@keyframes rageBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.rage-title {
  font-size: 28px;
  color: #e74c3c;
  margin: 0 0 16px 0;
  font-weight: 700;
}

.rage-text {
  font-size: 16px;
  color: #555;
  margin: 12px 0;
}

.rage-text span {
  color: #e74c3c;
  font-weight: 700;
  font-size: 20px;
}

.rage-hint {
  font-size: 14px;
  color: #7f8c8d;
  font-style: italic;
  margin: 16px 0;
}

.rage-close-btn {
  padding: 12px 32px;
  background: linear-gradient(135deg, #ff7a45 0%, #ff4d4f 100%);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 122, 69, 0.3);
  position: relative;
  z-index: 10001;
  pointer-events: auto;
}

.rage-close-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 122, 69, 0.4);
  background: linear-gradient(135deg, #ff6933 0%, #ff3a3d 100%);
}

.rage-close-btn:active {
  transform: translateY(0);
}

/* 手机端优化 */
@media (max-width: 768px) {
  .captcha-game-section {
    padding: 6px 14px;
    margin: 10px 8px;
  }
  
  .game-title {
    font-size: 16px;
  }
  
  .game-subtitle {
    font-size: 10px;
  }
  
  .stat-item {
    padding: 5px;
  }
  
  .stat-icon {
    font-size: 16px;
  }
  
  .stat-value {
    font-size: 18px;
  }
  
  .stat-label {
    font-size: 9px;
  }
  
  .captcha-tab {
    font-size: 10px;
    padding: 5px;
  }
  
  .captcha-container {
    padding: 6px;
  }
  
  #captchaCanvas {
    width: 140px;
    height: 28px;
  }
  
  .refresh-btn {
    padding: 6px;
    font-size: 16px;
  }
  
  .captcha-input {
    padding: 6px;
    font-size: 13px;
  }
  
  .verify-btn {
    padding: 6px;
    font-size: 13px;
  }
  
  .captcha-message {
    padding: 5px;
    font-size: 11px;
  }
  
  .slide-track {
    height: 70px;
  }
  
  .slide-puzzle, .slide-gap {
    width: 30px;
    height: 30px;
  }
  
  .slide-bar {
    height: 25px;
  }
  
  .slide-btn {
    width: 25px;
    height: 25px;
  }
  
  .slide-icon {
    font-size: 14px;
  }
  
  .image-grid {
    gap: 3px;
  }
  
  .image-cell {
    font-size: 24px;
  }
  
  .rage-emoji {
    font-size: 40px;
  }
  
  .rage-title {
    font-size: 20px;
  }
  
  .rage-text {
    font-size: 14px;
  }
}
