/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.6;
  min-width: 320px;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: #1a73e8;
  transition: all 0.3s ease;
}

a:hover {
  color: #0d47a1;
  text-decoration: underline;
}

.container {
  width: 1200px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 15px;
}

/* 头部样式 */
.tech-header {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  margin-right: 10px;
}

.logo h1 {
  font-size: 24px;
  font-weight: 700;
  color: #1a73e8;
}

.search-box {
  flex: 1;
  max-width: 500px;
  margin: 0 30px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 30px;
  font-size: 14px;
  transition: all 0.3s;
}

.search-box input:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26,115,232,0.2);
}

.search-box button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
}

.main-nav ul {
  display: flex;
  list-style: none;
  flex-wrap: wrap;
}

.main-nav li {
  margin: 0 5px;
}

.main-nav a {
  display: block;
  padding: 8px 15px;
  font-weight: 500;
  color: #444;
  border-radius: 4px;
}

.main-nav a:hover, .main-nav .active a {
  background: #1a73e8;
  color: #fff;
  text-decoration: none;
}

.mobile-menu-btn {
  display: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
}

.mobile-menu-btn span {
  height: 3px;
  width: 100%;
  background-color: #444;
  border-radius: 10px;
  transition: all 0.3s;
}

/* 轮播图区域 */
.tech-slider {
  padding: 30px 0;
  background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
  color: #fff;
}

.slider-container {
  display: flex;
  gap: 30px;
}

.main-slider {
  flex: 7;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  position: relative;
  height: 400px;
}

.slider-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.slider-item.active {
  opacity: 1;
}

.slider-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slider-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
}

.slider-tag {
  background: #ff6d00;
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  display: inline-block;
  margin-bottom: 10px;
}

.slider-content h3 {
  font-size: 24px;
  margin-bottom: 10px;
  color: #fff;
}

.slider-content p {
  font-size: 16px;
  color: rgba(255,255,255,0.9);
  margin-bottom: 15px;
}

.side-news {
  flex: 3;
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.section-title {
  font-size: 20px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #1a73e8;
  display: inline-block;
  color: #333;
}

.side-news ul {
  list-style: none;
}

.side-news li {
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.side-news li:last-child {
  border-bottom: none;
}

.side-news a {
  display: block;
  color: #333;
  font-weight: 500;
}

.side-news a:hover {
  color: #1a73e8;
}

.side-news span {
  display: block;
  font-size: 12px;
  color: #777;
  margin-top: 5px;
}

/* 主要内容区域 */
.tech-main {
  display: flex;
  gap: 30px;
  padding: 40px 0;
  flex-wrap: wrap;
}

.tech-content {
  flex: 7;
  min-width: 300px;
}

.tech-sidebar {
  flex: 3;
  min-width: 300px;
}

.tech-section {
  margin-bottom: 40px;
  background: #fff;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.more-link {
  font-size: 14px;
  color: #666;
}

.more-link:hover {
  color: #1a73e8;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.article-card {
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s;
  border: 1px solid #eee;
  background: #fff;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.article-img {
  display: block;
  height: 180px;
  overflow: hidden;
}

.article-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.article-card:hover .article-img img {
  transform: scale(1.05);
}

.article-content {
  padding: 15px;
}

.article-cat {
  display: inline-block;
  background: #e8f0fe;
  color: #1a73e8;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 30px;
  margin-bottom: 10px;
}

.article-content h3 {
  font-size: 18px;
  margin-bottom: 10px;
  height: 50px;
  overflow: hidden;
  line-height: 1.4;
}

.article-content p {
  font-size: 14px;
  color: #666;
  height: 60px;
  overflow: hidden;
  margin-bottom: 15px;
  line-height: 1.5;
}

.article-meta {
  display: flex;
  font-size: 12px;
  color: #888;
  flex-wrap: wrap;
}

.article-meta span {
  margin-right: 15px;
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}

.article-meta i {
  margin-right: 5px;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.article-item {
  display: flex;
  gap: 15px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.article-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.article-item .article-img {
  flex: 0 0 200px;
  height: 120px;
  border-radius: 6px;
  overflow: hidden;
}

.article-info {
  flex: 1;
}

.article-info h3 {
  font-size: 18px;
  margin-bottom: 10px;
  line-height: 1.4;
}

.article-info p {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
  height: 40px;
  overflow: hidden;
  line-height: 1.5;
}

/* 侧边栏样式 */
.sidebar-widget {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.widget-title {
  font-size: 18px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #1a73e8;
  display: inline-block;
  color: #333;
}

.about-content {
  text-align: center;
}

.about-content img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
  border: 3px solid #e8f0fe;
}

.about-content p {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
  line-height: 1.6;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f8ff;
  color: #1a73e8;
  font-size: 18px;
  transition: all 0.3s;
}

.social-links a:hover {
  background: #1a73e8;
  color: #fff;
  transform: translateY(-3px);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-cloud a {
  display: inline-block;
  padding: 5px 12px;
  background: #f1f8ff;
  color: #1a73e8;
  border-radius: 30px;
  font-size: 13px;
}

.tag-cloud a:hover {
  background: #1a73e8;
  color: #fff;
}

.popular-list {
  list-style: none;
}

.popular-list li {
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
}

.popular-list li:last-child {
  border-bottom: none;
}

.top-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #e8f0fe;
  color: #1a73e8;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  margin-right: 10px;
  flex-shrink: 0;
}

.popular-list li:nth-child(1) .top-num {
  background: #ff6d00;
  color: #fff;
}

.popular-list li:nth-child(2) .top-num {
  background: #1a73e8;
  color: #fff;
}

.popular-list li:nth-child(3) .top-num {
  background: #0d47a1;
  color: #fff;
}

.friend-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.friend-links a {
  display: inline-block;
  padding: 5px 15px;
  background: #f8f9fa;
  border-radius: 4px;
  font-size: 14px;
  white-space: nowrap;
}

.friend-links a:hover {
  background: #e8f0fe;
  color: #1a73e8;
}

/* 专题区域 */
.tech-special {
  background: #fff;
  padding: 40px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.special-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.special-item {
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  height: 250px;
}

.special-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.special-item:hover img {
  transform: scale(1.05);
}

.special-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: #fff;
}

.special-content h3 {
  font-size: 18px;
  margin-bottom: 5px;
}

.special-content span {
  font-size: 14px;
  opacity: 0.9;
}

/* 页脚区域 */
.tech-footer {
  background: #2c3e50;
  color: #ecf0f1;
  padding: 60px 0 20px;
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

.footer-widget h3 {
  font-size: 18px;
  margin-bottom: 20px;
  color: #fff;
  padding-bottom: 10px;
  border-bottom: 2px solid #1a73e8;
  display: inline-block;
}

.footer-widget p {
  font-size: 14px;
  margin-bottom: 15px;
  opacity: 0.8;
  line-height: 1.6;
}

.footer-category {
  list-style: none;
}

.footer-category li {
  margin-bottom: 10px;
}

.footer-category a {
  color: #ecf0f1;
  opacity: 0.8;
}

.footer-category a:hover {
  opacity: 1;
  color: #fff;
}

.contact-info {
  list-style: none;
}

.contact-info li {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
}

.contact-info i {
  margin-right: 10px;
  width: 24px;
  height: 24px;
  background: #1a73e8;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.footer-social {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-social a {
  display: flex;
  align-items: center;
  color: #ecf0f1;
  opacity: 0.8;
  padding: 8px 12px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  transition: all 0.3s;
}

.footer-social a:hover {
  opacity: 1;
  background: rgba(255,255,255,0.1);
}

.footer-social i {
  margin-right: 8px;
  font-size: 18px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
}

.copyright {
  margin-bottom: 15px;
  font-size: 14px;
  opacity: 0.7;
}

.copyright a {
  color: #ecf0f1;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
}

.footer-nav a {
  color: #ecf0f1;
  opacity: 0.8;
  white-space: nowrap;
}

.footer-nav a:hover {
  opacity: 1;
}

/* 返回顶部 */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #1a73e8;
  color: #fff;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.3s;
  z-index: 999;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.back-to-top:hover {
  opacity: 1;
  transform: translateY(-5px);
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .special-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .special-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-widgets {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .header-content {
    position: relative;
  }
  
  .search-box {
    order: 3;
    margin: 15px 0 0;
    max-width: 100%;
    flex: 0 0 100%;
  }
}

@media (max-width: 768px) {
  .logo h1 {
    font-size: 20px;
  }
  
  .main-nav {
    display: none;
    width: 100%;
    margin-top: 15px;
    order: 4;
  }
  
  .main-nav.show {
    display: block;
  }
  
  .main-nav ul {
    flex-direction: column;
  }
  
  .main-nav li {
    margin: 5px 0;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .slider-container {
    flex-direction: column;
  }
  
  .main-slider {
    height: 300px;
  }
  
  .tech-main {
    flex-direction: column;
  }
  
  .article-grid {
    grid-template-columns: 1fr;
  }
  
  .special-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-widgets {
    grid-template-columns: 1fr;
  }
  
  .article-item {
    flex-direction: column;
  }
  
  .article-item .article-img {
    width: 100%;
    flex: none;
  }
}

/* 图标样式 */
.icon-search:before { content: "🔍"; }
.icon-arrow:before { content: "→"; }
.icon-author:before { content: "👤"; }
.icon-time:before { content: "🕒"; }
.icon-view:before { content: "👁️"; }
.icon-comment:before { content: "💬"; }
.icon-email:before { content: "✉️"; }
.icon-phone:before { content: "📱"; }
.icon-location:before { content: "📍"; }
.icon-wechat:before { content: "💬"; }
.icon-weibo:before { content: "🔊"; }
.icon-twitter:before { content: "🐦"; }
.icon-github:before { content: "🐙"; }
.icon-arrow-up:before { content: "↑"; }