/* 自定义CSS样式增强 */

/* 主色调定义 */
:root {
  --primary: #165DFF;
  --primary-light: #4080FF;
  --primary-dark: #0E42D2;
  --success: #00B42A;
  --warning: #FF7D00;
  --danger: #F53F3F;
  --text-primary: #1D2129;
  --text-secondary: #4E5969;
  --text-tertiary: #86909C;
  --bg-primary: #FFFFFF;
  --bg-secondary: #F2F3F5;
  --bg-tertiary: #E5E6EB;
  --border-color: #DCDFE6;
  --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-heavy: 0 8px 32px rgba(0, 0, 0, 0.16);
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes slideInDown {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

@keyframes bounce {
  0%, 100% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes zoomIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* 通用类 */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

.slide-in-up {
  animation: slideInUp 0.5s ease-out;
}

.slide-in-down {
  animation: slideInDown 0.5s ease-out;
}

.pulse {
  animation: pulse 2s infinite;
}

.bounce {
  animation: bounce 1s infinite;
}

.spin {
  animation: spin 1s linear infinite;
}

.zoom-in {
  animation: zoomIn 0.3s ease-out;
}

/* 渐变边框 */
.gradient-border {
  position: relative;
  border-radius: 0.75rem;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: 0.875rem;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gradient-border:hover::before {
  opacity: 1;
}

/* 卡片样式 */
.image-card {
  transition: all 0.3s ease;
}

.image-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

/* 输入框聚焦效果 */
.input-focus {
  transition: all 0.2s ease;
}

.input-focus:focus {
  box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.1);
  border-color: var(--primary);
}

/* 按钮悬停效果 */
.btn-hover {
  transition: all 0.3s ease;
}

.btn-hover:hover {
  transform: translateY(-1px);
}

.btn-hover:active {
  transform: translateY(0);
}

/* 滚动条样式 */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* 骨架屏动画 */
.skeleton-loader {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* 文字渐变色 */
.text-gradient {
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  background-image: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
}

/* 背景模糊效果 */
.backdrop-blur {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* 自定义复选框样式 */
.checkbox-custom {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox-custom:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.checkbox-custom:checked::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: bold;
}

/* 自定义单选按钮样式 */
.radio-custom {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  background-color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.radio-custom:checked {
  border-color: var(--primary);
}

.radio-custom:checked::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--primary);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* 进度条动画 */
.progress-animation {
  transition: width 0.3s ease;
}

/* 提示词高亮效果 */
.prompt-highlight {
  background-color: rgba(22, 93, 255, 0.05);
  border-left: 3px solid var(--primary);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin: 8px 0;
  transition: all 0.2s ease;
}

.prompt-highlight:hover {
  background-color: rgba(22, 93, 255, 0.1);
  transform: translateX(4px);
}

/* 响应式字体大小 */
@media (max-width: 768px) {
  .text-responsive {
    font-size: clamp(1rem, 4vw, 1.5rem);
  }
}

/* 移动端优化 */
@media (max-width: 640px) {
  .mobile-visible {
    display: block !important;
  }
  
  .mobile-hidden {
    display: none !important;
  }
  
  .mobile-full-width {
    width: 100% !important;
  }
}