﻿/* ============ 橡小图AI UI优化 - 星妈风格（仅视觉，绝对不动布局） ============ */

/* ========== 浅色主题柔和渐变背景 ========== */
html body:not(.theme-dark) {
  background: linear-gradient(135deg, #e0e7ff 0%, #fce7f3 100%) !important;
  background-attachment: fixed !important;
}

/* ========== 卡片圆角优化（只改border-radius，不改布局） ========== */
.card, .panel, .gen-task-panel, .vz-options-panel, .vz-canvas-col, .home-card, .home-search {
  border-radius: 16px !important;
  transition: box-shadow 0.3s ease !important;
}

.home-card:hover {
  box-shadow: 0 8px 30px rgba(99,102,241,0.2) !important;
  transform: translateY(-3px) !important;
}

/* ========== 按钮圆角和悬停效果 ========== */
.btn-primary {
  border-radius: 12px !important;
  transition: all 0.2s ease !important;
}

.btn-primary:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 15px rgba(99,102,241,0.3) !important;
}

/* ========== 输入框圆角 ========== */
input[type="text"], input[type="password"], textarea, select {
  border-radius: 10px !important;
  transition: all 0.2s ease !important;
}

input[type="text"]:focus, textarea:focus, select:focus {
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15) !important;
}

/* ========== 首页纸屑飘落动画 ========== */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 8px;
  height: 8px;
  opacity: 0;
  animation: confetti-fall 8s linear infinite;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

.confetti-piece:nth-child(1) { background: #6366f1; left: 10%; animation-delay: 0s; }
.confetti-piece:nth-child(2) { background: #ec4899; left: 20%; animation-delay: 1s; width: 6px; height: 6px; }
.confetti-piece:nth-child(3) { background: #f59e0b; left: 30%; animation-delay: 2s; }
.confetti-piece:nth-child(4) { background: #10b981; left: 40%; animation-delay: 0.5s; width: 10px; height: 10px; }
.confetti-piece:nth-child(5) { background: #3b82f6; left: 50%; animation-delay: 1.5s; }
.confetti-piece:nth-child(6) { background: #8b5cf6; left: 60%; animation-delay: 2.5s; width: 6px; height: 6px; }
.confetti-piece:nth-child(7) { background: #ef4444; left: 70%; animation-delay: 3s; }
.confetti-piece:nth-child(8) { background: #06b6d4; left: 80%; animation-delay: 1.2s; width: 8px; height: 8px; }
.confetti-piece:nth-child(9) { background: #f97316; left: 90%; animation-delay: 2.2s; }
.confetti-piece:nth-child(10) { background: #84cc16; left: 15%; animation-delay: 3.5s; width: 7px; height: 7px; }
.confetti-piece:nth-child(11) { background: #d946ef; left: 25%; animation-delay: 4s; }
.confetti-piece:nth-child(12) { background: #0ea5e9; left: 35%; animation-delay: 0.8s; width: 9px; height: 9px; }

/* ========== 页面切换淡入动画 ========== */
.page {
  animation: fadeInUp 0.3s ease;
}

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

/* ========== 滚动条优化 ========== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: rgba(99,102,241,0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(99,102,241,0.35);
}

/* ========== 点击烟花/光晕效果 ========== */
.click-effect {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
}

/* 光晕效果（日间模式） */
.light-halo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.3) 0%, rgba(99,102,241,0) 70%);
  transform: translate(-50%, -50%) scale(0);
  animation: halo-expand 0.6s ease-out forwards;
}

@keyframes halo-expand {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }
}

/* 烟花粒子（夜间模式） */
.firework-particle {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%, -50%);
  animation: firework-fly 0.8s ease-out forwards;
}

@keyframes firework-fly {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) scale(0);
  }
}