/* 
 * 极致美化样式 - TG-Image
 * 现代化视觉效果和微交互系统
 */

:root {
  /* 极致美化颜色系统 */
  --beauty-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --beauty-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --beauty-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --beauty-success: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  --beauty-warning: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  --beauty-error: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%);
  
  /* 高级阴影系统 */
  --shadow-neo-xs: 4px 4px 8px rgba(163, 177, 198, 0.6), -4px -4px 8px rgba(255, 255, 255, 0.5);
  --shadow-neo-sm: 6px 6px 12px rgba(163, 177, 198, 0.6), -6px -6px 12px rgba(255, 255, 255, 0.5);
  --shadow-neo: 10px 10px 20px rgba(163, 177, 198, 0.6), -10px -10px 20px rgba(255, 255, 255, 0.5);
  --shadow-neo-lg: 15px 15px 30px rgba(163, 177, 198, 0.6), -15px -15px 30px rgba(255, 255, 255, 0.5);
  
  /* 发光效果 */
  --glow-primary: 0 0 20px rgba(102, 126, 234, 0.6), 0 0 40px rgba(102, 126, 234, 0.4), 0 0 60px rgba(102, 126, 234, 0.2);
  --glow-secondary: 0 0 20px rgba(245, 87, 108, 0.6), 0 0 40px rgba(245, 87, 108, 0.4), 0 0 60px rgba(245, 87, 108, 0.2);
  --glow-accent: 0 0 20px rgba(79, 172, 254, 0.6), 0 0 40px rgba(79, 172, 254, 0.4), 0 0 60px rgba(79, 172, 254, 0.2);
  
  /* 高级动画时间函数 */
  --easing-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --easing-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --easing-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --easing-sharp: cubic-bezier(0.4, 0, 0.6, 1);
}

/* 暗色模式下的新风格阴影 */
body.dark-mode {
  --shadow-neo-xs: 4px 4px 8px rgba(0, 0, 0, 0.4), -4px -4px 8px rgba(255, 255, 255, 0.05);
  --shadow-neo-sm: 6px 6px 12px rgba(0, 0, 0, 0.4), -6px -6px 12px rgba(255, 255, 255, 0.05);
  --shadow-neo: 10px 10px 20px rgba(0, 0, 0, 0.4), -10px -10px 20px rgba(255, 255, 255, 0.05);
  --shadow-neo-lg: 15px 15px 30px rgba(0, 0, 0, 0.4), -15px -15px 30px rgba(255, 255, 255, 0.05);
}

/* 极致美化按钮系统 */
.btn-beauty {
  position: relative;
  padding: 12px 24px;
  border: none;
  border-radius: 50px;
  background: var(--beauty-primary);
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s var(--easing-smooth);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-beauty::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.btn-beauty::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transition: all 0.6s ease;
  transform: translate(-50%, -50%);
}

.btn-beauty:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--glow-primary);
}

.btn-beauty:hover::before {
  left: 100%;
}

.btn-beauty:active::after {
  width: 200px;
  height: 200px;
}

.btn-beauty-secondary {
  background: var(--beauty-secondary);
  box-shadow: 0 8px 25px rgba(245, 87, 108, 0.3);
}

.btn-beauty-secondary:hover {
  box-shadow: var(--glow-secondary);
}

.btn-beauty-accent {
  background: var(--beauty-accent);
  box-shadow: 0 8px 25px rgba(79, 172, 254, 0.3);
}

.btn-beauty-accent:hover {
  box-shadow: var(--glow-accent);
}

.btn-beauty-error {
  background: var(--beauty-error);
  box-shadow: 0 8px 25px rgba(255, 117, 140, 0.3);
}

.btn-beauty-error:hover {
  box-shadow: 0 8px 25px rgba(255, 117, 140, 0.6);
}

/* 极致美化卡片系统 */
.card-beauty {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--shadow-neo);
  transition: all 0.4s var(--easing-elastic);
  position: relative;
  overflow: hidden;
}

.card-beauty::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, 
    rgba(102, 126, 234, 0.03) 0%, 
    rgba(118, 75, 162, 0.03) 50%, 
    rgba(102, 126, 234, 0.03) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-beauty:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2), var(--shadow-neo-lg);
}

.card-beauty:hover::before {
  opacity: 1;
}

body.dark-mode .card-beauty {
  background: linear-gradient(145deg, #1a1b23 0%, #242530 100%);
}

/* 极致美化输入框系统 */
.input-beauty {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid transparent;
  border-radius: 15px;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: var(--shadow-neo-sm);
  font-size: 16px;
  color: var(--text-color);
  transition: all 0.3s var(--easing-smooth);
  position: relative;
}

.input-beauty::placeholder {
  color: var(--text-light);
  transition: all 0.3s ease;
}

.input-beauty:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: var(--glow-primary), var(--shadow-neo);
  transform: translateY(-2px);
}

.input-beauty:focus::placeholder {
  color: transparent;
  transform: translateX(10px);
}

body.dark-mode .input-beauty {
  background: linear-gradient(145deg, #1a1b23 0%, #242530 100%);
  color: var(--dark-text);
}

/* 极致美化加载动画 */
.loader-beauty {
  position: relative;
  width: 60px;
  height: 60px;
  margin: 0 auto;
}

.loader-beauty::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top: 3px solid #667eea;
  border-right: 3px solid #764ba2;
  border-radius: 50%;
  animation: spin-beauty 1s linear infinite;
}

.loader-beauty::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  border: 3px solid transparent;
  border-bottom: 3px solid #f093fb;
  border-left: 3px solid #f5576c;
  border-radius: 50%;
  animation: spin-beauty-reverse 0.8s linear infinite;
}

@keyframes spin-beauty {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes spin-beauty-reverse {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

/* 极致美化图片效果 */
.image-beauty {
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  transition: all 0.4s var(--easing-elastic);
  box-shadow: var(--shadow-neo);
}

.image-beauty::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, 
    rgba(102, 126, 234, 0.2), 
    rgba(118, 75, 162, 0.2));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.image-beauty::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  transition: all 0.5s ease;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.image-beauty:hover {
  transform: scale(1.05) rotateZ(2deg);
  box-shadow: var(--glow-primary), 0 25px 50px rgba(102, 126, 234, 0.3);
}

.image-beauty:hover::before {
  opacity: 1;
}

.image-beauty:hover::after {
  width: 100px;
  height: 100px;
}

.image-beauty img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.4s var(--easing-smooth);
}

.image-beauty:hover img {
  transform: scale(1.1);
}

/* 极致美化进度条 */
.progress-beauty {
  width: 100%;
  height: 8px;
  background: linear-gradient(145deg, #e2e8f0 0%, #cbd5e1 100%);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: inset var(--shadow-neo-xs);
}

.progress-beauty-bar {
  height: 100%;
  background: var(--beauty-primary);
  border-radius: 10px;
  position: relative;
  transition: width 0.6s var(--easing-elastic);
  overflow: hidden;
}

.progress-beauty-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
  0% { left: -100%; }
  100% { left: 100%; }
}

body.dark-mode .progress-beauty {
  background: linear-gradient(145deg, #1a1b23 0%, #242530 100%);
}

/* 极致美化图标系统 */
.icon-beauty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: var(--beauty-primary);
  color: white;
  font-size: 24px;
  box-shadow: var(--shadow-neo-sm);
  transition: all 0.3s var(--easing-elastic);
  position: relative;
  overflow: hidden;
}

.icon-beauty::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  opacity: 0;
  transition: all 0.5s ease;
  animation: icon-rotate 3s linear infinite paused;
}

.icon-beauty:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: var(--glow-primary);
}

.icon-beauty:hover::before {
  opacity: 1;
  animation-play-state: running;
}

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

/* 极致美化模态框 */
.modal-beauty {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s var(--easing-elastic);
}

.modal-beauty.active {
  opacity: 1;
  visibility: visible;
}

.modal-beauty-content {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 25px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  box-shadow: var(--shadow-neo-lg), var(--glow-primary);
  transform: scale(0.5) translateY(50px);
  transition: all 0.4s var(--easing-elastic);
  position: relative;
  overflow: hidden;
}

.modal-beauty.active .modal-beauty-content {
  transform: scale(1) translateY(0);
}

.modal-beauty-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, 
    rgba(102, 126, 234, 0.02) 0%, 
    rgba(118, 75, 162, 0.02) 100%);
}

body.dark-mode .modal-beauty-content {
  background: linear-gradient(145deg, #1a1b23 0%, #242530 100%);
}

/* 极致美化标签系统 */
.tag-beauty {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--beauty-accent);
  color: white;
  border-radius: 25px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
  transition: all 0.3s var(--easing-smooth);
  position: relative;
  overflow: hidden;
}

.tag-beauty::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.4s ease;
}

.tag-beauty:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--glow-accent);
}

.tag-beauty:hover::before {
  left: 100%;
}

/* 极致美化通知系统 */
.notification-beauty {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  color: white;
  padding: 20px 25px;
  border-radius: 15px;
  box-shadow: var(--shadow-neo), 0 10px 30px rgba(67, 233, 123, 0.3);
  transform: translateX(400px);
  transition: all 0.5s var(--easing-elastic);
  z-index: 9998;
  max-width: 350px;
  position: relative;
  overflow: hidden;
}

.notification-beauty.show {
  transform: translateX(0);
}

.notification-beauty::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: rgba(255, 255, 255, 0.5);
  animation: notification-pulse 2s ease-in-out infinite;
}

@keyframes notification-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.notification-beauty-error {
  background: var(--beauty-error);
  box-shadow: var(--shadow-neo), 0 10px 30px rgba(255, 117, 140, 0.3);
}

.notification-beauty-warning {
  background: var(--beauty-warning);
  box-shadow: var(--shadow-neo), 0 10px 30px rgba(250, 112, 154, 0.3);
}

/* 极致美化动画类 */
.animate-beauty-fadeIn {
  animation: beauty-fadeIn 0.6s var(--easing-smooth) forwards;
}

.animate-beauty-slideUp {
  animation: beauty-slideUp 0.8s var(--easing-elastic) forwards;
}

.animate-beauty-scaleIn {
  animation: beauty-scaleIn 0.5s var(--easing-bounce) forwards;
}

.animate-beauty-bounce {
  animation: beauty-bounce 0.6s var(--easing-bounce) forwards;
}

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

@keyframes beauty-slideUp {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes beauty-scaleIn {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes beauty-bounce {
  0% { transform: scale(0.3); }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* 极致美化滚动条 */
.beauty-scrollbar::-webkit-scrollbar {
  width: 8px;
}

.beauty-scrollbar::-webkit-scrollbar-track {
  background: linear-gradient(145deg, #e2e8f0 0%, #cbd5e1 100%);
  border-radius: 10px;
}

.beauty-scrollbar::-webkit-scrollbar-thumb {
  background: var(--beauty-primary);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.beauty-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--beauty-secondary);
  box-shadow: var(--glow-primary);
}

/* 响应式美化 */
@media (max-width: 768px) {
  .btn-beauty {
    padding: 10px 20px;
    font-size: 12px;
  }
  
  .card-beauty {
    padding: 20px;
    border-radius: 15px;
  }
  
  .input-beauty {
    padding: 12px 16px;
    border-radius: 12px;
  }
  
  .modal-beauty-content {
    padding: 30px 20px;
    border-radius: 20px;
    margin: 20px;
  }
  
  .notification-beauty {
    right: 10px;
    left: 10px;
    max-width: none;
    transform: translateY(-100px);
  }
  
  .notification-beauty.show {
    transform: translateY(0);
  }
}

/* 极致美化工具提示 */
.tooltip-beauty {
  position: relative;
  display: inline-block;
}

.tooltip-beauty::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #1a1b23 0%, #242530 100%);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s var(--easing-smooth);
  box-shadow: var(--shadow-neo-sm);
  z-index: 1000;
  margin-bottom: 5px;
}

.tooltip-beauty::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #1a1b23;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s var(--easing-smooth);
  z-index: 1000;
}

.tooltip-beauty:hover::before,
.tooltip-beauty:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-5px);
}

/* 极致美化粒子背景 */
.particles-beauty {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.8) 0%, transparent 70%);
  border-radius: 50%;
  animation: float-particle 6s ease-in-out infinite;
}

.particle:nth-child(2n) {
  background: radial-gradient(circle, rgba(118, 75, 162, 0.6) 0%, transparent 70%);
  animation-duration: 8s;
  animation-delay: -2s;
}

.particle:nth-child(3n) {
  background: radial-gradient(circle, rgba(79, 172, 254, 0.4) 0%, transparent 70%);
  animation-duration: 10s;
  animation-delay: -4s;
}

@keyframes float-particle {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  50% {
    transform: translateY(-100px) rotate(180deg);
  }
} 