/* 设计工作室主题色 */
:root {
  --primary-color: #6366f1; /* 主色调 - 靛蓝色 */
  --secondary-color: #8b5cf6; /* 辅助色 - 紫色 */
  --accent-color: #ec4899; /* 强调色 - 粉红色 */
  --dark-color: #1f2937; /* 深色文本 */
  --light-color: #f9fafb; /* 浅色背景 */
  --gray-color: #6b7280; /* 灰色文本 */
  --border-color: #e5e7eb; /* 边框颜色 */
  --success-color: #10b981; /* 成功色 */
  --warning-color: #f59e0b; /* 警告色 */
  --error-color: #ef4444; /* 错误色 */
  --bg-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%); /* 背景渐变 */
}

/* 全局样式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background-color: var(--light-color);
  overflow-x: hidden;
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 导航栏样式 */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0;
}

/* Logo样式 */
.navbar .logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

/* 导航链接样式 */
.nav-link {
  position: relative;
  padding: 0.5rem 0;
  transition: all 0.3s ease;
  font-weight: 500;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--bg-gradient);
  transition: width 0.3s ease;
}

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

.nav-link.active {
  color: var(--primary-color);
}

.nav-link.active::after {
  width: 100%;
}

/* 下拉菜单样式 */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  min-width: 200px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(-10px);
}

.dropdown:hover .dropdown-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-item {
  padding: 0.75rem 1rem;
  display: block;
  color: var(--dark-color);
  text-decoration: none;
  transition: all 0.2s ease;
  border-radius: 4px;
  margin: 0.25rem;
}

.dropdown-item:hover {
  background: var(--bg-gradient);
  color: white;
  transform: translateX(5px);
}

/* 搜索样式 */
.search-container {
  position: relative;
  width: 250px;
}

.search-input {
  width: 100%;
  padding: 0.5rem 2.5rem 0.5rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 50px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  background: white;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  width: 300px;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  margin-top: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
}

/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  outline: none;
}

.btn-primary {
  background: var(--bg-gradient);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--dark-color);
  border: 2px solid var(--border-color);
}

.btn-outline:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

/* 移动端菜单 */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 350px;
  height: 100vh;
  background: white;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  z-index: 1001;
  transition: all 0.3s ease;
  overflow-y: auto;
}

.mobile-menu.open {
  right: 0;
}

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
  cursor: pointer;
}

.menu-overlay.active {
  display: block;
}

.mobile-dropdown {
  display: none;
  padding-left: 1rem;
}

.mobile-dropdown.open {
  display: block;
}

/* 英雄区域样式 */
.hero {
  background: var(--bg-gradient);
  color: white;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><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.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 600px;
}

/* 服务卡片样式 */
.service-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
  border-color: var(--primary-color);
}

.service-card .icon {
  width: 60px;
  height: 60px;
  background: var(--bg-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: white;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.service-card:hover .icon {
  transform: scale(1.1) rotate(5deg);
}

/* 作品集卡片样式 */
.portfolio-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 4/3;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 4px solid transparent;
}

.portfolio-card:hover {
  transform: scale(1.05);
  border-color: var(--primary-color);
}

.portfolio-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s ease;
}

.portfolio-card:hover img {
  transform: scale(1.1);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  color: white;
  opacity: 0;
  transition: all 0.3s ease;
}

.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-category {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.5rem;
}

/* 统计数据样式 */
.stat-number {
  font-size: 3rem;
  font-weight: 800;
  background: var(--bg-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1.1rem;
  color: var(--gray-color);
  font-weight: 500;
}

/* 团队成员样式 */
.team-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.team-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
  border-color: var(--primary-color);
}

.team-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.team-info {
  padding: 1.5rem;
  text-align: center;
}

.team-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.team-social a {
  width: 40px;
  height: 40px;
  background: var(--light-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-color);
  transition: all 0.3s ease;
}

.team-social a:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

/* 博客卡片样式 */
.blog-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(99, 102, 241, 0.12);
  border-color: var(--primary-color);
}

.blog-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.blog-info {
  padding: 1.5rem;
}

.blog-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--gray-color);
  margin-bottom: 1rem;
}

.blog-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--dark-color);
  transition: all 0.3s ease;
}

.blog-card:hover .blog-title {
  color: var(--primary-color);
}

/* 联系表单样式 */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--dark-color);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

/* 页脚样式 */
.footer {
  background: var(--dark-color);
  color: white;
  padding: 3rem 0 1.5rem;
}

.footer h3 {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.footer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.3s ease;
  display: block;
  margin-bottom: 0.5rem;
}

.footer a:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

.footer-logo {
  max-width: 150px;
  margin-bottom: 1rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

/* 回到顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--bg-gradient);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
  opacity: 0;
  visibility: hidden;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

/* 标签云样式 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.category-tag {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.category-tag:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
}

/* 产品卡片样式 */
.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(99, 102, 241, 0.12);
  border-color: var(--primary-color);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-info {
  padding: 1.5rem;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-right: 0.5rem;
}

.product-old-price {
  font-size: 1rem;
  color: var(--gray-color);
  text-decoration: line-through;
}

.discount-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--accent-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* 星级评分 */
.stars {
  color: var(--warning-color);
}

/* 动画效果 */
.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

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

.fade-in {
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.slide-in {
  animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 滚动动画 */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 计数器动画 */
.counter {
  counter-reset: count 0;
  animation: countUp 2s ease-out forwards;
}

@keyframes countUp {
  from {
    counter-reset: count 0;
  }
  to {
    counter-reset: count var(--target);
  }
}

/* 响应式设计 */
@media (max-width: 1023px) {
  /* 平板设备 */
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .search-container {
    width: 200px;
  }
  
  .search-input:focus {
    width: 250px;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
}

@media (max-width: 767px) {
  /* 移动设备 */
  .mobile-menu-btn {
    display: block;
  }
  
  .nav-links {
    display: none;
  }
  
  .hero {
    padding: 4rem 0;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .search-container {
    display: none;
  }
  
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .service-card,
  .portfolio-card,
  .blog-card,
  .team-card,
  .product-card {
    margin-bottom: 1.5rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .stat-label {
    font-size: 0.9rem;
  }
  
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 479px) {
  /* 小屏移动设备 */
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .service-card,
  .portfolio-card,
  .blog-card,
  .team-card,
  .product-card {
    padding: 1rem;
  }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  :root {
    --light-color: #111827;
    --dark-color: #f9fafb;
    --gray-color: #9ca3af;
    --border-color: #374151;
  }
  
  body {
    background-color: var(--light-color);
    color: var(--dark-color);
  }
  
  .navbar {
    background: rgba(17, 24, 39, 0.95);
  }
  
  .dropdown-menu,
  .mobile-menu,
  .search-results {
    background: #1f2937;
    border-color: #374151;
  }
  
  .dropdown-item,
  .nav-link {
    color: var(--dark-color);
  }
  
  .search-input,
  .form-control {
    background: #1f2937;
    color: var(--dark-color);
    border-color: #374151;
  }
  
  .service-card,
  .blog-card,
  .team-card,
  .product-card {
    background: #1f2937;
    border-color: #374151;
  }
  
  .blog-title {
    color: var(--dark-color);
  }
}

/* 打印样式 */
@media print {
  .navbar,
  .footer,
  .back-to-top,
  .mobile-menu,
  .menu-overlay {
    display: none !important;
  }
  
  main {
    padding-top: 0 !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
}