/* 现代化UI样式 - 参考高端商务风格 */
:root {
  /* 主要色彩方案 - 高端商务色调 */
  --primary-color: #1a2a6c;
  --primary-dark: #0f1941;
  --primary-light: #2a4298;
  --secondary-color: #7b68ee;
  --accent-color: #6c5ce7;
  --success-color: #00b894;
  --warning-color: #fdcb6e;
  --error-color: #d63031;
  
  /* 中性色彩 */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  /* 背景与文字 */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  /* 边框与阴影 */
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* 圆角 */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  
  /* 间距 */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  /* 字体 */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  
  /* 过渡动画 */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
}

/* 暗色模式 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --border-light: #1e293b;
  }
}

/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 现代化容器 */
.modern-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

@media (max-width: 768px) {
  .modern-container {
    padding: 0 var(--space-md);
  }
}

/* 现代化按钮 - 高端商务风格 */
.btn-modern {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  /* 添加微妙的阴影效果 */
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn-modern-sm {
  padding: 0.5rem 1rem;
  font-size: var(--font-size-xs);
}

.btn-modern:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.btn-modern:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 添加按钮加载状态 */
.btn-modern.is-loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}
.btn-modern.is-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn-modern-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  box-shadow: 0 5px 15px rgba(26, 42, 108, 0.3);
}

.btn-modern-primary:hover {
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-color));
  box-shadow: 0 8px 25px rgba(26, 42, 108, 0.4);
}

.btn-modern-secondary {
  background: var(--bg-primary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.btn-modern-secondary:hover {
  background: var(--bg-tertiary);
  color: var(--primary-color);
  box-shadow: var(--shadow-lg);
}

.btn-modern-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-modern-outline:hover {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 5px 15px rgba(26, 42, 108, 0.3);
}

/* 现代化卡片 - 高端商务风格 */
.card-modern {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: none;
  overflow: hidden;
  transition: all var(--transition-normal);
  /* 添加微妙的光泽效果 */
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    rgba(255,255,255,0) 0%, 
    rgba(255,255,255,0.5) 50%, 
    rgba(255,255,255,0) 100%);
  opacity: 0.6;
}

.card-modern:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-modern-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card-modern:hover .card-modern-image {
  transform: scale(1.05);
}

.card-modern-content {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-modern-article {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--space-md);
}

.card-modern-article .card-modern-image {
  width: 120px;
  height: 90px;
  flex-shrink: 0;
}

.card-modern-article .card-modern-content {
  padding: 0;
  flex: 1;
}

/* 产品价格样式 */
.product-price {
  display: flex;
  align-items: baseline;
  margin: var(--space-sm) 0;
  color: var(--primary-color);
  font-weight: 700;
}

.price-symbol {
  font-size: var(--font-size-sm);
  margin-right: 0.2rem;
}

.price-amount {
  font-size: var(--font-size-xl);
}

/* 产品操作区域 */
.product-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

/* 游戏标签样式 */
.game-tags {
  display: flex;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  flex-wrap: wrap;
}

.game-tag {
  padding: 0.2rem 0.5rem;
  font-size: var(--font-size-xs);
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: white;
}

.game-tag-rebate {
  background: linear-gradient(135deg, var(--success-color), #059669);
}

.game-tag-discount {
  background: linear-gradient(135deg, var(--warning-color), #d97706);
}

/* 文章元数据样式 */
.article-title {
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.article-excerpt {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  line-height: 1.4;
}

.article-meta {
  display: flex;
  gap: var(--space-md);
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.article-date,
.article-views {
  display: flex;
  align-items: center;
}

/* 徽章样式 */
.corner-badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  padding: 0.2rem 0.5rem;
  font-size: var(--font-size-xs);
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: white;
  z-index: 1;
}

.badge-featured {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

.badge-new {
  background: linear-gradient(135deg, var(--success-color), #059669);
}

/* 角落丝带样式 */
.corner-ribbon {
  position: absolute;
  top: var(--space-md);
  right: -2rem;
  transform: rotate(45deg);
  padding: 0.2rem 2rem;
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: white;
  z-index: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ribbon-red {
  background: linear-gradient(135deg, var(--error-color), #b91c1c);
}

.ribbon-blue {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

/* Hero装饰元素 */
.hero-decoration {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 0;
}

.hero-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
  background: white;
}

.hero-circle-1 {
  width: 300px;
  height: 300px;
  top: -150px;
  right: -100px;
}

.hero-circle-2 {
  width: 200px;
  height: 200px;
  bottom: -100px;
  left: -50px;
}

.hero-circle-3 {
  width: 150px;
  height: 150px;
  top: 50%;
  left: 10%;
  transform: translateY(-50%);
}

/* 添加卡片内容溢出处理 */
.card-modern-body {
  padding: var(--space-lg);
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 添加卡片加载状态 */
.card-modern.is-loading {
  position: relative;
  overflow: hidden;
}
.card-modern.is-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255,255,255,0.2), 
    transparent);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.card-modern-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-secondary);
}

.card-modern-body {
  padding: var(--space-lg);
}

.card-modern-footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--border-light);
  background: var(--bg-secondary);
}

/* 现代化输入框 */
.input-modern {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: var(--font-size-base);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.input-modern:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-modern::placeholder {
  color: var(--text-muted);
}

/* 现代化导航栏 - 高端商务风格 */
.navbar-modern {
  background: rgba(26, 42, 108, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-modern-brand {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: white;
  text-decoration: none;
}

.navbar-modern-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.navbar-modern-nav a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  position: relative;
}

.navbar-modern-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.navbar-modern-nav a:hover::after,
.navbar-modern-nav a.active::after {
  width: 80%;
}

.navbar-modern-nav a:hover,
.navbar-modern-nav a.active {
  color: white;
}

/* Hero区域现代化 - 高端商务风格 */
.hero-modern {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 50%, var(--secondary-color) 100%);
  color: white;
  padding: var(--space-2xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.6;
}

.hero-modern-content {
  position: relative;
  z-index: 1;
}

.hero-modern-title {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  margin-bottom: var(--space-md);
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-modern-subtitle {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-xl);
  opacity: 0.9;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.hero-modern-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* 产品卡片现代化 - 高端商务风格 */
.product-card-modern {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: none;
  overflow: hidden;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.product-card-modern:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-card-modern-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-card-modern:hover .product-card-modern-image {
  transform: scale(1.05);
}

.product-card-modern-content {
  padding: var(--space-lg);
}

.product-card-modern-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.product-card-modern-description {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-md);
  line-height: 1.5;
}

.product-card-modern-price {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: var(--space-md);
}

.product-card-modern-actions {
  display: flex;
  gap: var(--space-sm);
}

/* 网格布局现代化 */
.grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
  padding: var(--space-lg) 0;
}

@media (max-width: 768px) {
  .grid-modern {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

/* 底部导航现代化 - 高端商务风格 */
.bottom-nav-modern {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(26, 42, 108, 0.95);
  backdrop-filter: blur(10px);
  border-top: none;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: var(--space-sm) 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.nav-item-modern {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: var(--space-xs);
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all var(--transition-fast);
  border-radius: var(--radius-md);
  flex: 1;
}

.nav-item-modern:hover,
.nav-item-modern.active {
  color: white;
  background: rgba(123, 104, 238, 0.2);
}

.nav-icon-modern {
  font-size: 1.5rem;
  line-height: 1;
  transition: transform var(--transition-fast);
}

.nav-item-modern:hover .nav-icon-modern {
  transform: scale(1.1);
}

.nav-text-modern {
  font-size: var(--font-size-xs);
  font-weight: 500;
}

/* 加载动画 */
.loading-modern {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--border-color);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 徽章现代化 */
.badge-modern {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: var(--font-size-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-modern-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
}

.badge-modern-success {
  background: linear-gradient(135deg, var(--success-color), #059669);
  color: white;
}

.badge-modern-warning {
  background: linear-gradient(135deg, var(--warning-color), #d97706);
  color: white;
}

/* 响应式优化 */
@media (max-width: 768px) {
  .hero-modern-title {
    font-size: var(--font-size-3xl);
  }
  
  .hero-modern-subtitle {
    font-size: var(--font-size-lg);
  }
  
  .hero-modern-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .btn-modern {
    width: 100%;
    max-width: 280px;
  }
}

/* 工具类 */
.text-gradient {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 移动端优化 */
@media (max-width: 768px) {
  body {
    padding-bottom: 80px;
  }
  
  .modern-container {
    padding: 0 var(--space-md);
  }
  
  .grid-modern {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .hero-modern {
    padding: var(--space-xl) 0;
  }
  
  .hero-modern-title {
    font-size: var(--font-size-3xl);
  }
}