/* 全局样式重置与基础配置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", "Microsoft Yahei", Arial, sans-serif;
}

:root {
  --primary-color: #0066cc;
  --primary-gradient: linear-gradient(135deg, #0066cc 0%, #00aaff 100%);
  --secondary-color: #f0f7ff;
  --text-color: #333;
  --text-light: #666;
  --white: #fff;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 20px rgba(0, 102, 204, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 102, 204, 0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  color: var(--text-color);
  background-color: #f9fafb;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

.container {
  width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 动画定义 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

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

/* 导航栏样式 - 互联网风格增强 */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.header.scroll {
  background-color: var(--white);
  box-shadow: var(--shadow-md);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 88px;
}

.logo {
  font-size: 28px;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.5px;
}

.nav-menu {
  display: flex;
  align-items: center;
}

.nav-item {
  position: relative;
  margin: 0 20px;
}

.nav-link {
  font-size: 16px;
  font-weight: 500;
  padding: 10px 0;
  display: block;
  position: relative;
}

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

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-gradient);
  transition: var(--transition);
}

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

/* 下拉菜单 - 毛玻璃+动画 */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  border-radius: 8px;
  width: 220px;
  padding: 15px 0;
  display: none;
  transform: translateY(10px);
  opacity: 0;
  transition: var(--transition);
}

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

.dropdown-item {
  padding: 10px 25px;
}

.dropdown-link:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  padding-left: 30px;
}

/* 按钮样式 - 渐变+悬浮效果 */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--primary-gradient);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 102, 204, 0.4);
}

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

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

.btn-outline:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* 移动端汉堡菜单 */
.hamburger {
  display: none;
  font-size: 24px;
  color: var(--primary-color);
  cursor: pointer;
}

/* 内容发布页面样式 - 现代化表单 */
.publish-page {
  padding: 120px 0 60px;
}

.publish-container {
  background-color: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 40px;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.form-group {
  margin-bottom: 25px;
}

.form-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--text-color);
  font-size: 15px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #eee;
  border-radius: 8px;
  font-size: 15px;
  transition: var(--transition);
}

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

/* 原生富文本编辑器样式增强 */
.editor-toolbar {
  background: var(--secondary-color);
  border: none;
  border-radius: 8px 8px 0 0;
  padding: 12px 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.editor-toolbar button {
  padding: 8px 12px;
  border: none;
  background: var(--white);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.editor-toolbar button:hover {
  background: var(--primary-gradient);
  color: var(--white);
  transform: translateY(-1px);
}

.editor-content {
  border: none;
  border-radius: 0 0 8px 8px;
  min-height: 450px;
  padding: 20px;
  outline: none;
  overflow-y: auto;
  background: var(--white);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 模态框样式增强 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

.modal-content {
  background: var(--white);
  padding: 30px;
  border-radius: 12px;
  width: 450px;
  max-width: 90%;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  opacity: 0;
  transition: var(--transition);
}

.modal.show .modal-content {
  transform: scale(1);
  opacity: 1;
}

/* 内容列表页面样式 - 卡片悬浮动画 */
.list-page {
  padding: 120px 0 60px;
}

.filter-bar {
  background-color: var(--white);
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.content-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.content-card {
  background-color: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  transform: translateY(0);
}

.content-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: var(--transition);
}

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

.card-body {
  padding: 25px;
}

.card-title {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.card-meta {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 12px;
  display: flex;
  gap: 10px;
}

.card-desc {
  font-size: 14px;
  color: var(--text-light);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 内容详情页样式 - 科技感排版 */
.detail-page {
  padding: 120px 0 60px;
}

.detail-container {
  background-color: var(--white);
  border-radius: 16px;
  padding: 50px;
  box-shadow: var(--shadow-md);
}

.detail-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 25px;
  color: var(--text-color);
  line-height: 1.3;
}

.detail-meta {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 35px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  gap: 15px;
  align-items: center;
}

.detail-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-color);
}

.detail-content img,
.detail-content video {
  max-width: 100%;
  margin: 25px 0;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

/* 首页样式增强 - 全屏渐变+动画 */
.hero-section {
  height: 100vh;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding-top: 88px;
}

.hero-content {
  max-width: 800px;
  padding: 0 20px;
}

.hero-title {
  font-size: 56px;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

.hero-desc {
  font-size: 20px;
  margin-bottom: 40px;
  opacity: 0.9;
  animation: fadeInUp 0.8s ease 0.2s forwards;
  opacity: 0;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  animation: fadeInUp 0.8s ease 0.4s forwards;
  opacity: 0;
}

.hero-btn {
  padding: 15px 30px;
  font-size: 16px;
  border-radius: 10px;
}

.advantage-section {
  padding: 100px 0;
  background-color: var(--white);
}

.section-title {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 70px;
  position: relative;
  padding-bottom: 20px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--primary-gradient);
  border-radius: 2px;
}

.advantage-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.advantage-card {
  padding: 30px;
  border-radius: 12px;
  background-color: var(--secondary-color);
  text-align: center;
  transition: var(--transition);
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.advantage-card:nth-child(1) { animation-delay: 0.1s; }
.advantage-card:nth-child(2) { animation-delay: 0.2s; }
.advantage-card:nth-child(3) { animation-delay: 0.3s; }
.advantage-card:nth-child(4) { animation-delay: 0.4s; }

.advantage-card:hover {
  background: var(--primary-gradient);
  color: var(--white);
  transform: translateY(-10px);
}

.advantage-icon {
  font-size: 48px;
  margin-bottom: 20px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: var(--transition);
}

.advantage-card:hover .advantage-icon {
  color: var(--white);
  background: none;
  transform: scale(1.2);
}

.advantage-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 15px;
}

.advantage-desc {
  font-size: 14px;
  color: var(--text-light);
  transition: var(--transition);
}

.advantage-card:hover .advantage-desc {
  color: rgba(255, 255, 255, 0.9);
}

/* 响应式适配 */
@media (max-width: 1200px) {
  .container {
    width: 960px;
  }
  .content-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .advantage-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .container {
    width: 100%;
  }
  .nav-menu {
    display: none;
  }
  .hamburger {
    display: block;
  }
  .content-list {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 36px;
  }
  .advantage-grid {
    grid-template-columns: 1fr;
  }
  .detail-container {
    padding: 30px 20px;
  }
  .detail-title {
    font-size: 28px;
  }
}
