.tx-user-avatar {
  position: relative;
}

.tx-avatar-ring {
  animation: tx-avatar-pulse 3s ease-in-out infinite;
}

@keyframes tx-avatar-pulse {
  0%, 100% { 
    opacity: 0.5;
    transform: scale(1);
  }
  50% { 
    opacity: 1;
    transform: scale(1.1);
  }
}

.tx-user-avatar:hover {
  transform: scale(1.05);
  transition: all 0.3s ease;
}

/* 在线状态指示器 */
.tx-online-badge {
  animation: tx-online-blink 2s ease-in-out infinite;
}

@keyframes tx-online-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Tab 切换动画 */
.tx-user-tabs .tx-tab-btn.active {
  box-shadow: 0 8px 25px rgba(147, 51, 234, 0.4);
}

.tx-user-tabs .tx-tab-btn:not(.active):hover {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.1), rgba(236, 72, 153, 0.1));
  transform: translateY(-2px);
}

/* 观看历史卡片特效 */
.tx-history-item {
  position: relative;
  overflow: hidden;
}

.tx-history-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.6s ease;
}

.tx-history-item:hover::before {
  left: 100%;
}

/* 进度条动画 */
.tx-progress-bar {
  overflow: hidden;
  position: relative;
}

.tx-progress-fill {
  position: relative;
  transition: width 1s ease;
}

.tx-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(45deg, transparent 33%, rgba(255, 255, 255, 0.3) 33%, rgba(255, 255, 255, 0.3) 66%, transparent 66%);
  background-size: 10px 10px;
  animation: tx-progress-shine 2s linear infinite;
}

@keyframes tx-progress-shine {
  0% { background-position-x: -10px; }
  100% { background-position-x: 10px; }
}

/* 收藏夹卡片动画 */
.tx-favorite-card {
  transition: all 0.4s ease;
  position: relative;
}

.tx-favorite-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(236, 72, 153, 0.1), rgba(239, 68, 68, 0.1));
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: inherit;
}

.tx-favorite-card:hover::before {
  opacity: 1;
}

.tx-favorite-card:hover {
  transform: translateY(-10px) rotateY(5deg);
}

/* 设置表单特效 */
.tx-settings-form .tx-form-group {
  transition: all 0.3s ease;
}

.tx-settings-form .tx-form-group:hover {
  transform: translateX(10px);
}

.tx-form-group input:focus {
  box-shadow: 0 0 20px rgba(147, 51, 234, 0.3);
  transform: scale(1.02);
}

/* 会员徽章动画 */
.tx-membership-badge {
  animation: tx-vip-glow 3s ease-in-out infinite;
}

@keyframes tx-vip-glow {
  0%, 100% { 
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
  }
  50% { 
    box-shadow: 0 0 40px rgba(251, 191, 36, 0.6);
    transform: scale(1.05);
  }
}

/* 会员权益图标动画 */
.tx-benefit-item {
  transition: all 0.3s ease;
  cursor: pointer;
}

.tx-benefit-item:hover {
  transform: scale(1.2) translateY(-5px);
}

.tx-benefit-item:nth-child(1) { transition-delay: 0.1s; }
.tx-benefit-item:nth-child(2) { transition-delay: 0.2s; }
.tx-benefit-item:nth-child(3) { transition-delay: 0.3s; }
.tx-benefit-item:nth-child(4) { transition-delay: 0.4s; }

/* 统计数字动画 */
.tx-user-stats .tx-stat-item:hover .tx-stat-number {
  animation: tx-stat-jump 0.6s ease;
}

@keyframes tx-stat-jump {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.1); }
}

/* 动作按钮组特效 */
.tx-action-buttons button {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.tx-action-buttons button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.4s ease;
}

.tx-action-buttons button:hover::before {
  width: 200%;
  height: 200%;
}

.tx-action-buttons button:hover {
  transform: translateY(-3px);
}

/* Tab 内容切换动画 */
.tx-tab-content {
  animation: tx-tab-slide-in 0.5s ease forwards;
}

@keyframes tx-tab-slide-in {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 响应式设计优化 */
@media (max-width: 768px) {
  .tx-user-profile-header {
    text-align: center;
  }
  
  .tx-user-stats {
    grid-template-columns: 2fr 2fr;
  }
  
  .tx-history-item {
    flex-direction: column;
    text-align: center;
  }
  
  .tx-history-item img {
    margin-bottom: 1rem;
    width: 100%;
    height: auto;
  }
  
  .tx-action-buttons {
    flex-direction: column;
    space-x: 0;
    space-y: 1rem;
  }
}

@media (max-width: 480px) {
  .tx-user-avatar {
    width: 6rem;
    height: 6rem;
  }
  
  .tx-user-name {
    font-size: 1.5rem;
  }
  
  .tx-user-tabs {
    flex-direction: column;
    width: 100%;
  }
  
  .tx-tab-btn {
    margin-bottom: 0.5rem;
  }
}

/* 页面加载动画 */
.tx-user-layout .tx-user-profile-header {
  animation: tx-profile-slide-up 0.8s ease forwards;
  opacity: 0;
  transform: translateY(50px);
}

@keyframes tx-profile-slide-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tx-user-layout .tx-history-item {
  animation: tx-history-fade-in 0.6s ease forwards;
  opacity: 0;
  transform: translateX(-50px);
}

.tx-history-item:nth-child(1) { animation-delay: 0.1s; }
.tx-history-item:nth-child(2) { animation-delay: 0.2s; }
.tx-history-item:nth-child(3) { animation-delay: 0.3s; }

@keyframes tx-history-fade-in {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}