/**
 * ATXC 组件库 v2.0
 * 基于设计系统的可复用组件
 */

/* ========================================
   按钮组件
   ======================================== */

.btn-primary {
  background: var(--gradient-button);
  color: white;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-weight: var(--font-semibold);
  border: none;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-blue);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-600);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-weight: var(--font-semibold);
  border: 2px solid var(--primary-600);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
}

.btn-secondary:hover {
  background: var(--primary-600);
  color: white;
}

.btn-text {
  background: none;
  border: none;
  color: var(--accent-blue-500);
  font-weight: var(--font-medium);
  cursor: pointer;
  position: relative;
  padding: var(--space-2) 0;
}

.btn-text::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-blue-500);
  transition: width var(--duration-base) var(--ease-out);
}

.btn-text:hover::after {
  width: 100%;
}

/* ========================================
   卡片组件
   ======================================== */

.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-base) var(--ease-out);
}

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

.card-gradient {
  background: var(--gradient-card);
  color: white;
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
}

.card-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: var(--gradient-gold);
  opacity: 0.2;
  border-radius: 50%;
  transform: translate(30%, -30%);
}

.card-image {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slower) var(--ease-out);
}

.card-image:hover img {
  transform: scale(1.05);
}

.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(10, 25, 41, 0.9), transparent);
  padding: var(--space-6);
  color: white;
  transform: translateY(20px);
  opacity: 0;
  transition: all var(--duration-base) var(--ease-out);
}

.card-image:hover .card-overlay {
  transform: translateY(0);
  opacity: 1;
}

/* ========================================
   导航组件
   ======================================== */

.navbar-modern {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-base) var(--ease-out);
}

.navbar-modern.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-md);
}

.nav-link-modern {
  color: var(--gray-700);
  font-weight: var(--font-medium);
  padding: var(--space-2) var(--space-4);
  position: relative;
  transition: color var(--duration-fast) var(--ease-out);
}

.nav-link-modern::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent-blue-500);
  transition: width var(--duration-base) var(--ease-out);
}

.nav-link-modern:hover {
  color: var(--accent-blue-500);
}

.nav-link-modern:hover::after {
  width: 80%;
}

/* ========================================
   英雄区组件
   ======================================== */

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  color: white;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: var(--space-8);
}

.hero-title {
  font-size: var(--text-6xl);
  font-weight: var(--font-black);
  margin-bottom: var(--space-6);
  line-height: 1.1;
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: var(--gray-200);
  margin-bottom: var(--space-8);
  line-height: 1.6;
}

/* ========================================
   标签组件
   ======================================== */

.tag {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  background: var(--gray-100);
  color: var(--gray-700);
  transition: all var(--duration-fast) var(--ease-out);
}

.tag:hover {
  background: var(--accent-blue-500);
  color: white;
  cursor: pointer;
}

.tag-gold {
  background: var(--gradient-gold);
  color: white;
  box-shadow: var(--shadow-gold);
}

/* ========================================
   分割线组件
   ======================================== */

.divider-slant {
  position: relative;
  height: 100px;
  background: white;
}

.divider-slant::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: var(--gray-50);
  transform: skewY(-2deg);
  transform-origin: top left;
}

/* ========================================
   加载动画
   ======================================== */

.skeleton {
  background: linear-gradient(
    90deg,
    var(--gray-200) 0%,
    var(--gray-100) 50%,
    var(--gray-200) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

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

@media (max-width: 768px) {
  .hero-title {
    font-size: var(--text-4xl);
  }
  
  .hero-subtitle {
    font-size: var(--text-lg);
  }
  
  .card {
    padding: var(--space-4);
  }
}
