/* BoboCW.com inspired styling */

/* Global styles */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #f8f9fa;
  color: #333;
  line-height: 1.5;
}

/* Main container */
.pageI {
  max-width: 1200px;
  margin: 0 auto;
  background: #fff;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

/* Navigation bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  backdrop-filter: none;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  border-bottom: 1px solid #e8e8e8;
  margin-bottom: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.navbar .links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar .links a {
  color: #666;
  font-size: 16px;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.navbar .links a:hover {
  color: #1890ff;
  background: rgba(24,144,255,0.1);
}

.navbar .links a.active {
  color: #1890ff;
  font-weight: 500;
}

.navbar .links a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -12px;
  width: 24px;
  height: 3px;
  background: #1890ff;
  border-radius: 2px;
}

.navbar .right {
  position: absolute;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.navbar .right a {
  color: #666;
  font-size: 16px;
  text-decoration: none;
}

/* Logo styling */
.navbar .links img {
  height: 40px;
  width: auto;
  margin-right: 24px;
  cursor: pointer;
}

/* Section headers */
h3 {
  color: #333;
  font-size: 24px;
  font-weight: 600;
  margin: 24px 0 16px 0;
  padding: 0 24px;
}

/* Card styling */
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 16px;
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: translateY(-2px);
  border-color: #e8e8e8;
}

/* Forum and knowledge cards */
#forum-slider .card,
#knowledge-slider .card {
  display: inline-block;
  width: 280px;
  margin: 8px;
  vertical-align: top;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 16px;
  transition: all 0.3s ease;
}

#forum-slider .card:hover,
#knowledge-slider .card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

/* Animal cards */
#animals-grid .card {
  text-align: center;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 16px;
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
}

#animals-grid .card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: translateY(-2px);
  border-color: #e8e8e8;
}

#animals-grid .card img {
  border-radius: 6px;
  margin-bottom: 12px;
  max-width: 100%;
  max-height: 160px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#animals-grid .card > div {
  margin: 8px 0;
  text-align: left;
  font-size: 14px;
  line-height: 1.5;
  color: #666;
}

#animals-grid .card > div:first-of-type {
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
  font-size: 16px;
}

/* Links in cards */
#animals-grid .card a {
  transition: all 0.3s ease;
  text-decoration: none;
  color: #1890ff;
  font-weight: 500;
  margin: 0 5px;
  padding: 6px 12px;
  border-radius: 4px;
  display: inline-block;
  background: rgba(24,144,255,0.1);
}

#animals-grid .card a:hover {
  background-color: #1890ff;
  color: white;
  transform: translateY(-1px);
}

/* Slider containers */
.slider {
  overflow-x: auto;
  white-space: nowrap;
  padding: 8px 24px;
  margin: 0;
  scrollbar-width: thin;
  scrollbar-color: #1890ff #f0f0f0;
}

.slider::-webkit-scrollbar {
  height: 6px;
}

.slider::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 3px;
}

.slider::-webkit-scrollbar-thumb {
  background: #1890ff;
  border-radius: 3px;
}

/* Background slideshow */
#bg-slideshow {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  transition: background-image 1s ease;
  background: #f8f9fa;
}

/* Page container */
.pageI {
  background: #f8f9fa;
  padding: 0;
  max-width: 1200px;
}

/* Hero section */
.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 80px 24px;
  text-align: center;
  margin-bottom: 32px;
}

.hero-content h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 16px;
  color: white;
}

.hero-content p {
  font-size: 20px;
  margin-bottom: 32px;
  color: rgba(255,255,255,0.9);
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
  padding: 12px 32px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  transition: all 0.3s ease;
  display: inline-block;
}

.btn-primary {
  background: #1890ff;
  color: white;
  border: 1px solid #1890ff;
}

.btn-primary:hover {
  background: #40a9ff;
  border-color: #40a9ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(24,144,255,0.3);
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.5);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: white;
  transform: translateY(-2px);
}

/* Section spacing */
.section-header {
  background: #fff;
  margin: 0;
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
}

/* Card grid for animals */
#animals-grid {
  background: #fff;
  padding: 24px;
  margin: 0;
}

/* Forum and knowledge sliders */
#forum-slider, #knowledge-slider {
  background: #fff;
  padding: 24px;
  margin: 0;
}

/* Card styling */
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: translateY(-2px);
  border-color: #e8e8e8;
}

/* Pagination */
.pager {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 24px 0;
  padding: 0 24px;
}

.page-btn {
  min-width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  color: #666;
  cursor: pointer;
  padding: 0 8px;
  transition: all 0.3s ease;
  font-size: 14px;
}

.page-btn:hover {
  border-color: #1890ff;
  color: #1890ff;
}

.page-btn.active {
  background: #1890ff;
  border-color: #1890ff;
  color: #ffffff;
}

.page-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* HR styling */
hr {
  border: none;
  height: 1px;
  background: #f0f0f0;
  margin: 24px 0;
}

/* Avatar styling */
.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #f0f0f0;
}

/* Status badges */
.status-bad {
  color: #ff4d4f;
  background: #fff1f0;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.status-ok {
  color: #52c41a;
  background: #f6ffed;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

/* Responsive design */
@media (max-width: 768px) {
  .navbar .links {
    gap: 16px;
  }
  
  .navbar .links a {
    font-size: 14px;
    padding: 6px 12px;
  }
  
  .forum-card, .knowledge-card {
    width: 260px;
  }
  
  #animals-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    padding: 16px;
  }
  
  .section-header {
    padding: 16px;
  }
  
  .section-header h3 {
    font-size: 18px;
  }
  
  .animal-image {
    height: 160px;
  }
  
  .animal-name {
    font-size: 16px;
  }
  
  .animal-details {
    font-size: 12px;
  }
  
  .animal-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .btn-detail, .btn-adopt {
    font-size: 12px;
    padding: 6px 10px;
  }
  
  /* Hero section responsive */
  .hero-section {
    padding: 60px 16px;
  }
  
  .hero-content h1 {
    font-size: 32px;
  }
  
  .hero-content p {
    font-size: 16px;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .btn-primary, .btn-secondary {
    width: 200px;
    text-align: center;
  }
}

/* Loading states */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  color: #999;
  font-size: 14px;
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 16px;
}

.empty-state img {
  width: 120px;
  height: 120px;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.status-available {
  background: #f6ffed;
  color: #52c41a;
  border: 1px solid #b7eb8f;
}

.status-adopted {
  background: #fff1f0;
  color: #ff4d4f;
  border: 1px solid #ffccc7;
}

.status-pending {
  background: #fffbe6;
  color: #faad14;
  border: 1px solid #ffe58f;
}

/* Section headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 16px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 16px;
}

.section-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.more-link {
  color: #1890ff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.more-link:hover {
  color: #40a9ff;
}

/* Navigation avatar */
.nav-avatar {
  position: relative;
}

.nav-avatar img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  border: 2px solid #f0f0f0;
}

.logout-pop {
  position: absolute;
  right: 0;
  top: 44px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 8px 0;
  display: none;
  flex-direction: column;
  gap: 0;
  white-space: nowrap;
  min-width: 120px;
}

.logout-pop a {
  color: #666;
  padding: 8px 16px;
  text-decoration: none;
  display: block;
  transition: all 0.3s ease;
}

.logout-pop a:hover {
  background: #f5f5f5;
  color: #1890ff;
}

.nav-avatar:hover .logout-pop {
  display: flex;
}

.nav-avatar.open .logout-pop {
  display: flex;
}

/* Sub navigation */
.subnav {
  position: sticky;
  top: 60px;
  z-index: 999;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
  padding: 12px 24px;
  margin-bottom: 16px;
}

.subnav a {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 8px 16px;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  color: #1890ff;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
}

.subnav a:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}

.subnav .sep {
  color: #d9d9d9;
  margin: 0 8px;
}

/* Form elements */
input, select, textarea {
  padding: 10px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  outline: none;
  transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24,144,255,0.2);
}

button {
  background: #1890ff;
  border: 0;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(24,144,255,0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover {
  background: #40a9ff;
  box-shadow: 0 4px 12px rgba(24,144,255,0.4);
  transform: translateY(-1px);
}

/* Forum and knowledge cards */
.forum-card, .knowledge-card {
  display: inline-block;
  width: 320px;
  margin: 8px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  overflow: hidden;
  vertical-align: top;
  border: 1px solid #f0f0f0;
}

.forum-card:hover, .knowledge-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: translateY(-2px);
  border-color: #e8e8e8;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.user-info {
  flex: 1;
}

.username {
  font-weight: 500;
  color: #333;
  font-size: 14px;
  margin-bottom: 4px;
}

.post-time {
  color: #999;
  font-size: 12px;
}

.card-content {
  padding: 16px;
}

.post-title {
  color: #333;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #999;
}

.post-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Animals grid */
#animals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 0 24px;
  margin-bottom: 24px;
}

/* Animal card specific styling */
.animal-card {
  padding: 0;
  overflow: hidden;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
}

.animal-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: translateY(-2px);
  border-color: #e8e8e8;
}

.animal-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #f8f9fa;
}

.animal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.animal-info {
  padding: 16px;
}

.animal-name {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.animal-details {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  color: #666;
}

.animal-details span {
  background: #f5f5f5;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.animal-health {
  font-size: 14px;
  color: #52c41a;
  margin-bottom: 12px;
}

.animal-actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
}

.btn-detail, .btn-adopt {
  flex: 1;
  text-align: center;
  padding: 8px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-detail {
  background: #fff;
  border: 1px solid #d9d9d9;
  color: #666;
}

.btn-detail:hover {
  border-color: #1890ff;
  color: #1890ff;
}

.btn-adopt {
  background: #1890ff;
  border: 1px solid #1890ff;
  color: #fff;
}

.btn-adopt:hover {
  background: #40a9ff;
  border-color: #40a9ff;
}