.ng-xiaohongshu-parser-container {
  width: 100%;
  max-width: 900px;
  margin: 10px auto;
  padding: 0 10px;
}

.ng-note-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 25px rgba(0,0,0,0.1);
  margin-bottom: 10px;
  /* transition: transform 0.3s; */
  display: flex;
  aspect-ratio: 16 / 9; /* 16:9 比例 */
  width: 100%;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.ng-note-card:hover {
  /* transform: translateY(-5px); */
}

.ng-card-content {
  display: flex;
  width: 100%;
  height: 100%;
}

.ng-cover-image {
  flex: 0 0 50%; /* 左边图片占50%宽度 */
  height: 100%;
  overflow: hidden;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.ng-cover-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 自适应裁剪 */
}

/* 小红书角标 */
.ng-redbook-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ff2442;
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 3px;
}

.ng-redbook-badge::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

.ng-cover-image .ng-placeholder {
  color: #999;
  font-size: 0.9rem;
}

.ng-card-info {
  flex: 0 0 50%; /* 右边信息占50%宽度 */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  height: 100%;
  overflow: auto;
}

.ng-card-header {
  margin-bottom: 8px;
}
  
.ng-note-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin: 0 0 6px 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
  
.ng-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ng-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.ng-user-name {
  font-weight: 500;
  color: #333;
  font-size: 0.9rem;
}

.ng-note-desc {
  color: #666;
  line-height: 1.4;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1; /* 占据剩余空间 */
}

.ng-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  flex-wrap: nowrap;
  gap: 15px;
}
  
.ng-view-original {
  background: #ff2442;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.75rem;
  transition: background 0.3s;
  display: inline-block;
}

.ng-view-original:hover {
  background: #e01e3c;
  text-decoration: none;
}

.ng-image-gallery-section {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin-top: 20px;
}

.ng-gallery-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: #333;
}

.ng-image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.ng-gallery-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.3s;
  background: #f5f5f5;
}

.ng-gallery-image:hover {
  transform: scale(1.05);
}

.ng-loading {
  text-align: center;
  padding: 20px;
}

.ng-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 36, 66, 0.2);
  border-left: 4px solid #ff2442;
  border-radius: 50%;
  animation: ng-spin 1s linear infinite;
  margin: 0 auto 10px;
}

@keyframes ng-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.ng-error-message {
  background: #ffebee;
  color: #d32f2f;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.ng-xiaohongshu-parser-placeholder {
  padding: 20px;
  text-align: center;
  color: #999;
  border: 2px dashed #ddd;
  border-radius: 8px;
  background-color: #f9f9f9;
}

@media (max-width: 768px) {
  .ng-note-card {
    flex-direction: row; /* 保持水平布局 */
    aspect-ratio: 16 / 9; /* 保持16:9比例 */
    max-height: 30vh; /* 使用视口高度，确保保持比例 */
  }
  
  .ng-cover-image {
    flex: 0 0 50%;
    height: 100%;
  }
  
  .ng-card-info {
    flex: 0 0 50%;
    height: 100%;
    overflow-y: hidden; /* 移除滚动条 */
    padding: 10px;
    min-width: 0; /* 确保flex项目可以收缩 */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  
  .ng-note-title {
    font-size: 0.9rem;
    margin-bottom: 6px;
    -webkit-line-clamp: 2;
  }
  
  .ng-user-info {
    margin-right: 10px;
  }
  
  .ng-user-avatar {
    width: 20px;
    height: 20px;
  }
  
  .ng-user-name {
    font-size: 0.75rem;
  }
  
  .ng-note-desc {
    font-size: 0.75rem;
    -webkit-line-clamp: 2;
    margin-bottom: 8px;
    flex: 1; /* 占据剩余空间 */
    overflow: hidden;
  }
  
  .ng-view-original {
    padding: 4px 8px !important;
    font-size: 0.7rem;
  }
  
  .ng-image-gallery {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  
  .ng-gallery-image {
    height: 100px;
  }
}

@media (max-width: 480px) {
  .ng-note-card {
    aspect-ratio: 16 / 9;
    max-height: 25vh; /* 在更小屏幕上也保持16:9比例 */
  }
  
  .ng-card-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  
  .ng-note-title {
    font-size: 0.85rem;
    margin-bottom: 5px;
    -webkit-line-clamp: 2;
  }
  
  .ng-user-info {
    margin-right: 8px;
  }
  
  .ng-user-avatar {
    width: 18px;
    height: 18px;
  }
  
  .ng-user-name {
    font-size: 0.7rem;
  }
  
  .ng-note-desc {
    display: none;
  }
}

@media (max-width: 480px) {
  .ng-card-footer {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .ng-stats {
    width: 100%;
    justify-content: space-between;
  }
}