* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

body {
  font-family: 'Microsoft YaHei', Arial, sans-serif;
  line-height: 1.6;
}

.navbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 1rem 200px;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 1rem;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: #333;
  padding-right: 0.5rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-item {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0.5rem 0.8rem;
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-item:hover {
  color: #007bff;
}

.dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  min-width: 150px;
  z-index: 100;
}

.dropdown-content a {
  display: block;
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: #333;
}

.dropdown-content a:hover {
  background-color: #f8f9fa;
  color: #007bff;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.auth-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0;
  background-color: #f5f5f5;
  border-radius: 20px;
  padding: 0.2rem;
  height: 36px;
}

.search-box input {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.9rem;
  width: 220px;
}

.search-box button {
  display: none;
}

.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-primary {
  background-color: #007bff;
  color: #fff;
}

.btn-outline {
  border: 1px solid #007bff;
  color: #007bff;
  background-color: #fff;
}

.btn-outline:hover {
  background-color: #007bff;
  color: #fff;
}

.menu-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-btn span {
  width: 25px;
  height: 3px;
  background-color: #333;
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.mobile-menu a {
  display: block;
  padding: 1rem;
  text-decoration: none;
  color: #333;
  border-bottom: 1px solid #eee;
}

.mobile-dropdown-header {
  font-weight: bold;
}

.mobile-dropdown-content {
  display: none;
  background-color: #f8f9fa;
}

.mobile-dropdown-content a {
  padding-left: 2rem;
}

.banner {
  position: relative;
  overflow: hidden;
}

.banner-slider {
  position: relative;
  width: 100%;
  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;
}

.slider-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.dot.active {
  background-color: #fff;
}

.banner-tags-mobile {
  display: none;
}

.content {
  display: flex;
  gap: 0;
  padding: 2rem 200px;
  max-width: none;
  margin: 0 auto;
}

.main-section {
  flex: 3;
  display: flex;
  gap: 0.8rem;
}

.side-section {
  flex: 0.8;
}

.main-section .section {
  flex: 1;
  min-width: 0;
}

.section {
  margin-bottom: 2rem;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background-color: #f8f9fa;
  border-bottom: 1px solid #eee;
}

.section-header h2 {
  font-size: 1.2rem;
  color: #333;
}

.view-more {
  text-decoration: none;
  color: #007bff;
  font-size: 0.9rem;
}

.section-content {
  padding: 1rem;
}

.content-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}

.content-item:last-child {
  border-bottom: none;
}

.content-item:hover {
  background-color: #f8f9fa;
}

.content-item img {
  width: 120px;
  height: 80px;
  object-fit: cover;
}

.content-item-info {
  flex: 1;
}

.content-item-title {
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #333;
}

.content-item-desc {
  font-size: 0.9rem;
  color: #666;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-content {
  display: block !important;
  flex: none !important;
  width: 100%;
}

.list-content #list-content {
  margin-top: 1rem;
}

.list-content .content-item {
  flex-direction: row;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #eee;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.list-content .content-item img {
  width: 200px;
  height: 150px;
  object-fit: cover;
}

.hot-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}

.hot-item:last-child {
  border-bottom: none;
}

.hot-item:hover {
  color: #007bff;
}

footer {
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 2rem;
}

.footer-content {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

.footer-btn {
  padding: 0.5rem 1.5rem;
  background-color: transparent;
  border: 1px solid #fff;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.footer-btn:hover {
  background-color: #fff;
  color: #333;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: #fff;
  padding: 2rem;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  position: relative;
}

.close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-content h3 {
  margin-bottom: 1rem;
}

.modal-content form input {
  display: block;
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.modal-content p {
  margin-bottom: 0.5rem;
}

.detail-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.detail-content h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.detail-meta {
  color: #666;
  margin-bottom: 1.5rem;
}

.detail-content img {
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
}

.detail-content video {
  width: 100%;
  height: auto;
}

.back-btn {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.5rem 1rem;
  background-color: #007bff;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.admin-panel {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.admin-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.admin-tab {
  padding: 0.5rem 1.5rem;
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
}

.admin-tab.active {
  background-color: #007bff;
  color: #fff;
  border-color: #007bff;
}

.admin-form {
  background-color: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-form input,
.admin-form textarea {
  display: block;
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.admin-form textarea {
  height: 200px;
}

.form-actions {
  display: flex;
  gap: 1rem;
}

.history-section {
  margin-top: 2rem;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
}

.history-table th,
.history-table td {
  padding: 1rem;
  border: 1px solid #ddd;
  text-align: left;
}

.history-table th {
  background-color: #f8f9fa;
}

.edit-btn, .delete-btn {
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9rem;
}

.edit-btn {
  background-color: #28a745;
  color: #fff;
}

.delete-btn {
  background-color: #dc3545;
  color: #fff;
}

@media (max-width: 768px) {
  .navbar {
    padding: 1rem 1rem;
  }
  
  .nav-links {
    display: none;
  }
  
  .menu-btn {
    display: flex;
  }
  
  .auth-section {
    gap: 0.5rem;
  }
  
  .search-box {
    display: none;
  }
  
  .btn {
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
  }
  
  .banner img {
    height: 200px;
  }
  
  .banner-tags {
    right: 1rem;
    bottom: 1rem;
    gap: 0.5rem;
  }
  
  .banner {
    position: relative;
    max-height: 200px;
    overflow: hidden;
  }
  
  .banner-slider {
    height: 200px !important;
  }
  
  .banner-tags-mobile {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #f8f9fa;
  }
  
  .banner-tag {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    background-color: #fff;
    border-radius: 20px;
    cursor: pointer;
    border: 1px solid #ddd;
  }
  
  .content {
    flex-direction: column !important;
    padding: 0.3rem !important;
    gap: 0.3rem !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .main-section {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 0.3rem !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .main-section .section {
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .main-section {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .main-section .section {
    width: 100% !important;
    flex: none !important;
  }

  .mobile-tabs {
    display: flex !important;
    justify-content: space-around;
    gap: 0;
    padding: 0.5rem 1rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
  }

  .mobile-tab {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
  }

  .mobile-tab.active {
    color: #007bff;
    border-bottom-color: #007bff;
  }

  #videos-section,
  #encyclopedias-section {
    display: none !important;
  }

  .side-section {
    display: none !important;
  }

  .content-item {
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 0.3rem !important;
    padding: 0.3rem !important;
  }

  .content-item img {
    width: 70px !important;
    height: 55px !important;
    flex-shrink: 0 !important;
  }

  .section-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.2rem !important;
    padding: 0.5rem !important;
  }
  
  .section-header h2 {
    font-size: 0.9rem !important;
    margin: 0 !important;
  }
  
  .view-more {
    font-size: 0.7rem !important;
  }
  
  .section-content {
    padding: 0.3rem !important;
  }

/* 详情页点赞、评论、分享 */
.action-bar {
  display: flex;
  gap: 1rem;
  padding: 1rem 200px;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.action-btn:hover {
  background-color: #007bff;
  color: #fff;
  border-color: #007bff;
}

.action-btn.liked {
  background-color: #ff4757;
  color: #fff;
  border-color: #ff4757;
}

.action-btn.liked #like-icon {
  color: #fff;
}

.comment-section {
  padding: 1rem 200px;
}

.comment-section h3 {
  margin-bottom: 1rem;
}

.comment-input {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.comment-input input {
  flex: 1;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.comment-input button {
  padding: 0.8rem 1.5rem;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#comment-list {
  max-height: 400px;
  overflow-y: auto;
}

.comment-item {
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.comment-username {
  font-weight: bold;
  color: #007bff;
}

.comment-date {
  color: #999;
  font-size: 0.85rem;
}

.comment-text {
  color: #333;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .action-bar {
    padding: 1rem;
    justify-content: center;
  }
  
  .comment-section {
    padding: 1rem;
  }
}