/**
 * 金宝典全局主题样式
 * 从 theme.js 提取，确保样式独立于 JavaScript 加载
 */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap');

:root {
  --gold: #FFD700;
  --gold-glow: rgba(255, 215, 0, 0.3);
  --dark: #0f0f1a;
  --dark-light: #1a1a2e;
}

/* Vue v-cloak - 隐藏未编译的模板 */
[v-cloak] {
  display: none !important;
}

* {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: #0f0f1a;
}

body {
  background-color: #0f0f1a;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(255, 215, 0, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 0% 50%, rgba(26, 26, 46, 1) 0%, transparent 50%);
  color: #ffffff;
  overflow-x: hidden;
  min-height: 100vh;
}

/* 深色渐变背景类 */
.dark-gradient {
  background: radial-gradient(circle at top center, #1a1a2e 0%, #0f0f1a 100%);
}

/* ==================== 关键帧动画 ==================== */

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

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

@keyframes slideUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  0% { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  0% { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes bounceSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes pulseGold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4); }
  50% { box-shadow: 0 0 0 15px rgba(255, 215, 0, 0); }
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

@keyframes pulseSlow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

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

/* ==================== 文本样式 ==================== */

.gold-text {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FFD700 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shine 5s linear infinite;
}

.gold-text-static {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==================== 按钮样式 ==================== */

.gold-btn {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #000;
  font-weight: 700;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
  cursor: pointer;
  border: none;
}

.gold-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #FFA500 0%, #FFD700 100%);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}

.gold-btn:hover::before {
  opacity: 1;
}

.gold-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px var(--gold-glow);
}

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

.gold-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.gold-btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

.gold-btn:disabled::before {
  opacity: 0;
}

/* 次要按钮 */
.btn-secondary {
  background: transparent;
  border: 1px solid rgba(255, 215, 0, 0.5);
  color: #FFD700;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(255, 215, 0, 0.1);
  border-color: #FFD700;
  transform: translateY(-1px);
}

/* 幽灵按钮 */
.btn-ghost {
  background: transparent;
  color: #9ca3af;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-ghost:hover {
  color: #FFD700;
  background: rgba(255, 215, 0, 0.05);
}

/* 金色渐变背景 */
.gold-gradient {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #000;
  font-weight: 700;
}

/* ==================== 卡片样式 ==================== */

.glass-card {
  background: rgba(26, 26, 46, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.glass-card:hover {
  background: rgba(26, 26, 46, 0.95);
  border-color: rgba(255, 215, 0, 0.3);
  box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.5), 0 0 20px -5px var(--gold-glow);
  transform: translateY(-4px);
}

.glass-card-static {
  background: rgba(26, 26, 46, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* 高亮卡片 */
.card-highlight {
  background: rgba(26, 26, 46, 0.9);
  border: 2px solid rgba(255, 215, 0, 0.5);
  box-shadow: 0 0 30px -10px rgba(255, 215, 0, 0.3);
}

.card-highlight:hover {
  border-color: #FFD700;
  box-shadow: 0 0 40px -10px rgba(255, 215, 0, 0.5);
}

/* ==================== 输入框样式 ==================== */

.input-modern {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  transition: all 0.3s ease;
}

.input-modern:focus {
  background: rgba(0, 0, 0, 0.5);
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
  outline: none;
}

.input-modern::placeholder {
  color: #6b7280;
}

.input-modern:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==================== 表单样式 ==================== */

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #9ca3af;
  margin-bottom: 0.5rem;
}

.input-wrapper {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  cursor: pointer;
  transition: color 0.2s ease;
}

.toggle-password:hover {
  color: #9ca3af;
}

/* Tab按钮 */
.tab-btn {
  flex: 1;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

/* ==================== 模态框样式 ==================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
  opacity: 0;
  animation: fadeIn 0.2s ease-out forwards;
}

.modal-content {
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  max-width: 28rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: scaleIn 0.3s ease-out forwards;
  position: relative;
  z-index: 210;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-close {
  color: #6b7280;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease;
  padding: 0.25rem;
  background: none;
  border: none;
}

.modal-close:hover {
  color: white;
}

/* ==================== 通知样式 ==================== */

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a2e;
  border: 1px solid rgba(255, 215, 0, 0.3);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  z-index: 300;
  animation: slideUp 0.3s ease-out forwards;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.toast-success {
  border-color: rgba(34, 197, 94, 0.5);
  color: #22c55e;
}

.toast-error {
  border-color: rgba(239, 68, 68, 0.5);
  color: #ef4444;
}

/* 实时通知条 */
.live-notification {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  background: rgba(26, 26, 46, 0.95);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  z-index: 100;
  animation: slideUp 0.4s ease-out forwards;
  max-width: 280px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

@media (max-width: 640px) {
  .live-notification {
    left: 1rem;
    right: 1rem;
    max-width: none;
  }
}

/* ==================== 进度条样式 ==================== */

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #FFD700 0%, #FFA500 100%);
  z-index: 1000;
  transition: width 0.2s ease;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-circle {
  stroke: #FFD700;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.3s ease;
}

/* ==================== 动画类 ==================== */

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-fade-up {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-slide-up {
  animation: slideUp 0.4s ease-out forwards;
}

.animate-slide-down {
  animation: slideDown 0.3s ease-out forwards;
}

.animate-scale-in {
  animation: scaleIn 0.3s ease-out forwards;
}

.animate-bounce-soft {
  animation: bounceSoft 2s ease-in-out infinite;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* 淡入动画 */
.fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

/* 淡入淡出过渡 */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

/* ==================== 脉冲效果 ==================== */

.pulse-gold {
  animation: pulseGold 2s ease-in-out infinite;
}

.pulse-dot {
  animation: pulseDot 2s ease-in-out infinite;
}

.animate-pulse-slow {
  animation: pulseSlow 3s ease-in-out infinite;
}

/* ==================== 骨架屏 ==================== */

.skeleton {
  background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

/* ==================== 滚动条 ==================== */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #0f0f1a;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* ==================== 可访问性 ==================== */

:focus-visible {
  outline: 2px solid rgba(255, 215, 0, 0.5);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(255, 215, 0, 0.5);
  outline-offset: 2px;
}

/* 跳过链接 */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: #FFD700;
  color: #000;
  padding: 0.5rem 1rem;
  z-index: 1000;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* ==================== 响应式工具类 ==================== */

.container-narrow {
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.container-medium {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.container-wide {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* ==================== 特殊效果 ==================== */

/* 边框流光 */
.border-glow {
  position: relative;
}

.border-glow::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(45deg, transparent, var(--gold), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.5;
}

/* 光晕背景 */
.glow-bg {
  position: relative;
}

.glow-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

/* 渐变边框 */
.gradient-border {
  position: relative;
  background: #1a1a2e;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* ==================== 徽章样式 ==================== */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
}

.badge-gold {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #000;
}

.badge-success {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-warning {
  background: rgba(234, 179, 8, 0.2);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.badge-error {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* ==================== 价格样式 ==================== */

.price-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
}

.price-currency {
  font-size: 1rem;
  font-weight: 600;
}

.price-amount {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}

.price-period {
  font-size: 0.875rem;
  color: #9ca3af;
}

.price-original {
  text-decoration: line-through;
  color: #6b7280;
  font-size: 0.875rem;
}

/* ==================== 列表样式 ==================== */

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.feature-list li::before {
  content: '✓';
  color: #22c55e;
  font-weight: 700;
  flex-shrink: 0;
}

.feature-list li.disabled::before {
  content: '✗';
  color: #6b7280;
}

.feature-list li.disabled {
  color: #6b7280;
}

.feature-list li.highlight {
  color: #FFD700;
}

.feature-list li.highlight::before {
  color: #FFD700;
}

/* ==================== 分割线 ==================== */

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #6b7280;
  font-size: 0.875rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

/* ==================== 倒计时样式 ==================== */

.countdown {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: 'Courier New', monospace;
  font-weight: 700;
}

.countdown-unit {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  min-width: 2.5rem;
  text-align: center;
}

.countdown-separator {
  color: #FFD700;
}

/* ==================== 平台徽章样式 ==================== */

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  font-size: 0.8125rem;
  color: #9ca3af;
  transition: all 0.3s ease;
  cursor: default;
}

.platform-badge:hover {
  background: rgba(255, 215, 0, 0.08);
  border-color: rgba(255, 215, 0, 0.3);
  color: #FFD700;
  transform: translateY(-2px);
}

.platform-badge svg,
.platform-badge span:first-child {
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.platform-badge:hover svg,
.platform-badge:hover span:first-child {
  opacity: 1;
}

/* 平台展示项 */
.platform-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: #9ca3af;
  transition: all 0.2s ease;
}

.platform-item:hover {
  color: #ffffff;
}

.platform-item:hover .platform-logo {
  transform: scale(1.1);
}

/* 平台首字母logo */
.platform-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.375rem;
  font-size: 0.625rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

/* 平台徽章滚动动画（可选） */
@keyframes scrollPlatforms {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.platforms-scroll {
  animation: scrollPlatforms 30s linear infinite;
}

.platforms-scroll:hover {
  animation-play-state: paused;
}

/* ==================== 减少动画偏好 ==================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .animate-fade-up {
    opacity: 1;
    transform: none;
  }
  
  .platforms-scroll {
    animation: none;
  }
}
