/**
 * 雪主题 (Snow Theme)
 * 冰雪晶莹的冬日风格
 */

:root[data-color-theme="snow"],
body.snow-theme {
  /* 背景色 */
  --bg: #0a1628;
  --card: #132240;
  --card2: #1a2d4d;
  --card3: #264066;

  /* 强调色 */
  --accent: #87CEEB;
  --accent2: #B0E0E6;
  --accent-rgb: 135, 206, 235;

  /* 文字色 */
  --text: #F0F8FF;
  --text2: #B0E0E6;
  --text3: #87CEEB;

  /* 边框 */
  --border: #2E5A8B;
  --border-light: #1a3a5c;

  /* 功能色 */
  --success: #48BB78;
  --warn: #FFD700;
  --danger: #FF6B8A;

  /* 渐变 */
  --bg-gradient: linear-gradient(135deg, #0a1628 0%, #132240 50%, #1a2d4d 100%);

  /* 阴影 */
  --shadow: 0 4px 20px rgba(135, 206, 235, 0.2);
  --shadow-lg: 0 8px 32px rgba(135, 206, 235, 0.3);

  /* 圆角 */
  --radius: 12px;
  --radius-lg: 16px;
}

/* 背景装饰 - 雪花光点 */
body.snow-theme::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(135, 206, 235, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(176, 224, 230, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* 侧边栏 */
body.snow-theme .sidebar {
  background: linear-gradient(180deg, #132240 0%, #0a1628 100%);
  border-color: var(--border);
}

/* 按钮 */
body.snow-theme .btn {
  background: linear-gradient(135deg, var(--accent) 0%, #5DADE2 100%);
  box-shadow: 0 4px 15px rgba(135, 206, 235, 0.3);
}

body.snow-theme .btn:hover {
  box-shadow: 0 6px 20px rgba(135, 206, 235, 0.4);
}

/* 卡片 */
body.snow-theme .card {
  background: rgba(19, 34, 64, 0.8);
  backdrop-filter: blur(10px);
  border-color: rgba(135, 206, 235, 0.3);
  box-shadow: var(--shadow);
}

body.snow-theme .card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

/* 进度条 */
body.snow-theme .progress {
  background: rgba(135, 206, 235, 0.2);
}

body.snow-theme .progress-bar {
  background: linear-gradient(90deg, var(--accent), #B0E0E6);
}

/* 滚动条 */
body.snow-theme ::-webkit-scrollbar-track {
  background: var(--bg);
}

body.snow-theme ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), #5DADE2);
  border-color: var(--bg);
}

/* Toast */
body.snow-theme .toast {
  background: linear-gradient(135deg, #5DADE2 0%, var(--accent) 100%);
  box-shadow: 0 4px 20px rgba(135, 206, 235, 0.4);
}

/* 输入框 */
body.snow-theme input,
body.snow-theme select,
body.snow-theme textarea {
  background: rgba(19, 34, 64, 0.8);
  backdrop-filter: blur(10px);
  border-color: var(--border);
  color: var(--text);
}

body.snow-theme input:focus,
body.snow-theme select:focus,
body.snow-theme textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.2);
}

/* ============================================
   雪花飘落效果
   ============================================ */
body.snow-theme .snow-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

body.snow-theme .snowflake {
  position: absolute;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  opacity: 0;
  animation: snowfall linear infinite;
  text-shadow: 0 0 5px rgba(135, 206, 235, 0.5);
}

body.snow-theme .snowflake:nth-child(1) { left: 5%; animation-duration: 15s; animation-delay: 0s; font-size: 10px; }
body.snow-theme .snowflake:nth-child(2) { left: 15%; animation-duration: 12s; animation-delay: -2s; font-size: 16px; }
body.snow-theme .snowflake:nth-child(3) { left: 25%; animation-duration: 18s; animation-delay: -4s; font-size: 12px; }
body.snow-theme .snowflake:nth-child(4) { left: 35%; animation-duration: 14s; animation-delay: -6s; font-size: 8px; }
body.snow-theme .snowflake:nth-child(5) { left: 45%; animation-duration: 16s; animation-delay: -8s; font-size: 14px; }
body.snow-theme .snowflake:nth-child(6) { left: 55%; animation-duration: 13s; animation-delay: -1s; font-size: 10px; }
body.snow-theme .snowflake:nth-child(7) { left: 65%; animation-duration: 17s; animation-delay: -3s; font-size: 12px; }
body.snow-theme .snowflake:nth-child(8) { left: 75%; animation-duration: 15s; animation-delay: -5s; font-size: 16px; }
body.snow-theme .snowflake:nth-child(9) { left: 85%; animation-duration: 11s; animation-delay: -7s; font-size: 8px; }
body.snow-theme .snowflake:nth-child(10) { left: 95%; animation-duration: 19s; animation-delay: -9s; font-size: 14px; }
body.snow-theme .snowflake:nth-child(11) { left: 10%; animation-duration: 14s; animation-delay: -11s; font-size: 12px; }
body.snow-theme .snowflake:nth-child(12) { left: 30%; animation-duration: 16s; animation-delay: -13s; font-size: 10px; }
body.snow-theme .snowflake:nth-child(13) { left: 50%; animation-duration: 13s; animation-delay: -15s; font-size: 14px; }
body.snow-theme .snowflake:nth-child(14) { left: 70%; animation-duration: 18s; animation-delay: -17s; font-size: 8px; }
body.snow-theme .snowflake:nth-child(15) { left: 90%; animation-duration: 15s; animation-delay: -19s; font-size: 12px; }

@keyframes snowfall {
  0% {
    transform: translateY(-20px) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

/* 卡片顶部装饰线 - 冰雪渐变 */
body.snow-theme .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent2), var(--accent), #B0E0E6, var(--accent), var(--accent2));
  background-size: 200% 100%;
  animation: shimmer 4s linear infinite;
}

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