通知与推荐功能,css样式优化

Change-Id: I33d934bfdca88b7a8e6742be2a3c7323d28ffbcf
diff --git a/src/components/TorrentDetail.css b/src/components/TorrentDetail.css
index f2b1ad2..ec708ee 100644
--- a/src/components/TorrentDetail.css
+++ b/src/components/TorrentDetail.css
@@ -1,30 +1,54 @@
-/* 基础布局样式 */

+/* 基础布局样式 - 现代化设计 */

 .torrent-detail-container {

   max-width: 1000px;

   margin: 0 auto;

-  padding: 20px;

+  padding: 25px;

+  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

   color: #333;

+  animation: fadeIn 0.5s ease-out forwards;

 }

 

+/* 返回按钮 - 渐变风格 */

 .back-button {

-  background: none;

+  display: inline-flex;

+  align-items: center;

+  gap: 8px;

+  padding: 8px 16px;

+  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);

+  color: white;

   border: none;

-  color: #3498db;

-  font-size: 16px;

+  border-radius: 6px;

+  font-weight: 600;

   cursor: pointer;

-  margin-bottom: 20px;

-  padding: 5px 10px;

+  transition: all 0.3s;

+  margin-bottom: 30px;

+  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.2);

 }

 

 .back-button:hover {

-  text-decoration: underline;

+  transform: translateY(-2px);

+  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.3);

 }

 

-/* 种子信息区域 */

+.back-button::before {

+  content: "←";

+}

+

+/* 种子信息区域 - 卡片式设计 */

 .torrent-main {

   display: flex;

   gap: 30px;

   margin-bottom: 40px;

+  background: white;

+  border-radius: 12px;

+  padding: 30px;

+  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);

+  transition: transform 0.3s, box-shadow 0.3s;

+}

+

+.torrent-main:hover {

+  transform: translateY(-5px);

+  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);

 }

 

 .torrent-cover {

@@ -34,42 +58,57 @@
 .cover-placeholder {

   width: 100%;

   height: 450px;

-  background-color: #eee;

+  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);

   display: flex;

   align-items: center;

   justify-content: center;

   font-size: 72px;

-  color: #999;

-  border-radius: 5px;

+  color: #1e3c72;

+  border-radius: 8px;

+  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);

+  transition: transform 0.3s;

+}

+

+.cover-placeholder:hover {

+  transform: scale(1.02);

 }

 

 .torrent-info {

   flex: 1;

 }

 

+/* 标题样式 - 渐变文字 */

 .torrent-title {

-  font-size: 28px;

+  font-size: 32px;

   margin-bottom: 20px;

-  color: #222;

+  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);

+  -webkit-background-clip: text;

+  -webkit-text-fill-color: transparent;

+  font-weight: 800;

 }

 

+/* 上传者信息 - 圆形头像 */

 .uploader-info {

   display: flex;

   align-items: center;

   gap: 15px;

-  margin-bottom: 20px;

+  margin-bottom: 25px;

+  position: relative;

 }

 

 .uploader-avatar {

-  width: 40px;

-  height: 40px;

+  width: 50px;

+  height: 50px;

   border-radius: 50%;

-  background-color: #3498db;

+  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

   color: white;

   display: flex;

   align-items: center;

   justify-content: center;

   font-weight: bold;

+  font-size: 20px;

+  flex-shrink: 0;

+  border: 3px solid rgba(30, 60, 114, 0.2);

 }

 

 .uploader-details {

@@ -77,142 +116,188 @@
 }

 

 .uploader-name {

-  font-weight: bold;

+  font-weight: 700;

+  color: #1e3c72;

+  font-size: 18px;

 }

 

 .upload-time {

   font-size: 14px;

   color: #777;

+  margin-top: 3px;

 }

 

+/* 种子元信息 - 网格布局 */

 .torrent-meta {

-  margin-bottom: 20px;

+  display: grid;

+  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));

+  gap: 15px;

+  margin-bottom: 25px;

+  padding: 15px;

+  background: #f9fafc;

+  border-radius: 8px;

 }

 

 .torrent-meta p {

-  margin: 5px 0;

+  margin: 0;

+  font-size: 15px;

 }

 

+.torrent-meta strong {

+  color: #1e3c72;

+  margin-right: 8px;

+}

+

+/* 描述区域 - 更好的阅读体验 */

 .torrent-description {

   margin-bottom: 30px;

-  line-height: 1.6;

+  line-height: 1.8;

+  font-size: 16px;

+  padding: 15px;

+  background: #f9fafc;

+  border-radius: 8px;

 }

 

+.torrent-description h3 {

+  color: #1e3c72;

+  margin-top: 0;

+  margin-bottom: 15px;

+  font-size: 20px;

+}

+

+/* 交互按钮 - 现代化设计 */

 .interaction-buttons {

   display: flex;

   gap: 15px;

+  margin-top: 25px;

 }

 

 .interaction-buttons button {

-  padding: 8px 15px;

+  padding: 12px 24px;

   border: none;

-  border-radius: 4px;

+  border-radius: 6px;

   cursor: pointer;

-  font-size: 14px;

-  transition: background-color 0.2s;

+  font-size: 15px;

+  font-weight: 600;

+  transition: all 0.3s;

+  display: flex;

+  align-items: center;

+  gap: 8px;

 }

 

 .like-button {

-  background-color: #f0f0f0;

+  background: linear-gradient(135deg, #f6f7f9 0%, #e9ebee 100%);

+  color: #666;

 }

 

 .like-button:hover {

-  background-color: #e0e0e0;

+  background: linear-gradient(135deg, #ebedf0 0%, #d8dadf 100%);

+  transform: translateY(-2px);

+  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);

 }

 

 .download-button {

-  background-color: #3498db;

+  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);

   color: white;

 }

 

 .download-button:hover {

-  background-color: #2980b9;

+  background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);

+  transform: translateY(-2px);

+  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.3);

 }

 

-/* 评论区域样式 */

+/* 评论区域 - 卡片式设计 */

 .comments-section {

-  margin-top: 40px;

+  background: white;

+  border-radius: 12px;

+  padding: 30px;

+  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);

+  margin-top: 30px;

 }

 

 .comments-section h2 {

-  font-size: 22px;

+  font-size: 24px;

+  color: #1e3c72;

   margin-bottom: 20px;

   padding-bottom: 10px;

-  border-bottom: 1px solid #eee;

+  border-bottom: 2px solid #f0f2f5;

 }

 

+/* 评论表单 - 现代化设计 */

 .comment-form {

   margin-bottom: 30px;

 }

 

 .comment-form textarea {

   width: 100%;

-  padding: 10px;

-  border: 1px solid #ddd;

-  border-radius: 4px;

-  margin-bottom: 10px;

+  padding: 15px;

+  border: 2px solid #f0f2f5;

+  border-radius: 8px;

   resize: vertical;

-  min-height: 80px;

+  min-height: 100px;

+  margin-bottom: 15px;

+  font-size: 15px;

+  transition: all 0.3s;

+}

+

+.comment-form textarea:focus {

+  border-color: #1e3c72;

+  box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.2);

+  outline: none;

 }

 

 .comment-form button {

-  background-color: #3498db;

+  padding: 12px 24px;

+  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);

   color: white;

   border: none;

-  padding: 8px 15px;

-  border-radius: 4px;

+  border-radius: 6px;

+  font-weight: 600;

   cursor: pointer;

+  transition: all 0.3s;

 }

 

 .comment-form button:hover {

-  background-color: #2980b9;

+  transform: translateY(-2px);

+  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.3);

 }

 

+/* 评论列表 - 现代化设计 */

 .comment-list {

-  margin-top: 20px;

+  margin-top: 25px;

 }

 

-/* 评论项统一样式 */

 .comment-container {

-  margin-bottom: 15px;

+  margin-bottom: 20px;

 }

 

 .comment-item {

   display: flex;

   gap: 15px;

-  padding: 12px;

-  background: #fff;

-  border-radius: 8px;

-  border: 1px solid #eaeaea;

+  padding: 20px;

+  background: #f9fafc;

+  border-radius: 10px;

+  transition: all 0.3s;

 }

 

-/* 副评论统一缩进 */

-.comment-container.is-reply {

-  margin-left: 40px;

-  position: relative;

-}

-

-/* 副评论连接线 */

-.comment-container.is-reply:before {

-  content: "";

-  position: absolute;

-  left: -20px;

-  top: 20px;

-  width: 15px;

-  height: 1px;

-  background: #ddd;

+.comment-item:hover {

+  background: #f0f4f8;

+  transform: translateX(5px);

 }

 

 .comment-avatar {

-  flex: 0 0 40px;

-  height: 40px;

+  width: 50px;

+  height: 50px;

   border-radius: 50%;

-  background-color: #e74c3c;

+  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

   color: white;

   display: flex;

   align-items: center;

   justify-content: center;

   font-weight: bold;

+  font-size: 20px;

+  flex-shrink: 0;

 }

 

 .comment-content {

@@ -220,28 +305,29 @@
 }

 

 .comment-header {

-  margin-bottom: 8px;

+  margin-bottom: 10px;

 }

 

 .comment-user {

-  font-weight: bold;

+  font-weight: 700;

+  color: #1e3c72;

   margin-right: 10px;

 }

 

 .reply-to {

   color: #666;

   font-size: 14px;

-  margin: 0 5px;

 }

 

 .comment-time {

   font-size: 14px;

-  color: #777;

+  color: #888;

 }

 

 .comment-text {

-  margin-bottom: 10px;

-  line-height: 1.5;

+  margin-bottom: 15px;

+  line-height: 1.7;

+  color: #333;

 }

 

 .comment-actions {

@@ -252,180 +338,106 @@
 .comment-actions button {

   background: none;

   border: none;

-  color: #3498db;

+  color: #666;

   cursor: pointer;

   font-size: 14px;

-  padding: 0;

+  padding: 5px 10px;

+  border-radius: 4px;

+  transition: all 0.3s;

+  display: flex;

+  align-items: center;

+  gap: 5px;

 }

 

 .comment-actions button:hover {

-  text-decoration: underline;

+  color: #1e3c72;

+  background: rgba(30, 60, 114, 0.1);

 }

 

-/* 回复列表容器 */

-.replies-container {

-  margin-top: 15px;

+/* 副评论样式 */

+.comment-container.is-reply {

+  margin-left: 60px;

+  position: relative;

 }

 

-/* 副评论背景色 */

+.comment-container.is-reply:before {

+  content: "";

+  position: absolute;

+  left: -30px;

+  top: 30px;

+  width: 20px;

+  height: 1px;

+  background: #ddd;

+}

+

 .comment-container.is-reply .comment-item {

-  background: #f9f9f9;

+  background: #f5f7fa;

 }

 

 /* 回复表单样式 */

 .reply-form {

+  margin-left: 65px;

   margin-top: 15px;

-}

-

-.reply-form textarea {

-  width: 100%;

-  padding: 8px;

-  border: 1px solid #ddd;

-  border-radius: 4px;

-  margin-bottom: 10px;

-  resize: vertical;

-  min-height: 60px;

-}

-

-.reply-actions {

-  display: flex;

-  gap: 10px;

-  justify-content: flex-end;

-}

-

-.reply-actions button {

-  padding: 5px 10px;

-  border: none;

-  border-radius: 3px;

-  cursor: pointer;

-  font-size: 13px;

-}

-

-.reply-actions button[type="button"] {

-  background-color: #f0f0f0;

-}

-

-.reply-actions button[type="submit"] {

-  background-color: #3498db;

-  color: white;

-}

-

-/* 加载和错误状态 */

-.loading {

-  text-align: center;

-  padding: 50px;

-  font-size: 18px;

-}

-

-.error {

-  color: #e74c3c;

-  text-align: center;

-  padding: 50px;

-  font-size: 18px;

-}

-/* 回复表单样式 */

-.reply-form {

-  margin-left: 50px;

-  margin-top: 10px;

-  background: #f5f5f5;

-  padding: 10px;

-  border-radius: 4px;

-}

-

-.reply-form textarea {

-  width: 100%;

-  padding: 8px;

-  border: 1px solid #ddd;

-  border-radius: 4px;

-  resize: vertical;

-}

-

-.reply-form-buttons {

-  display: flex;

-  gap: 10px;

-  margin-top: 8px;

-}

-

-.reply-form-buttons button {

-  padding: 5px 10px;

-  border: none;

-  border-radius: 4px;

-  cursor: pointer;

-}

-

-.reply-form-buttons button[type="submit"] {

-  background-color: #1890ff;

-  color: white;

-}

-

-.reply-form-buttons .cancel-reply {

-  background-color: #f5f5f5;

-  border: 1px solid #d9d9d9;

-}

-

-.comment-list {

-  margin-top: 20px;

-  border-top: 1px solid #eee;

-  padding-top: 20px;

-}

-

-.reply-form {

-  margin-left: 50px;

-  margin-top: 10px;

   margin-bottom: 15px;

-  background: #f9f9f9;

-  padding: 12px;

-  border-radius: 6px;

+  background: #f5f7fa;

+  padding: 15px;

+  border-radius: 8px;

   border: 1px solid #eee;

 }

 

-.reply-form.nested-reply {

-  margin-left: 80px;

-}

-

 .reply-form textarea {

   width: 100%;

-  padding: 10px;

+  padding: 12px;

   border: 1px solid #ddd;

   border-radius: 4px;

   resize: vertical;

-  min-height: 60px;

+  min-height: 80px;

   font-family: inherit;

   font-size: 14px;

+  transition: all 0.3s;

+}

+

+.reply-form textarea:focus {

+  border-color: #1e3c72;

+  box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.2);

+  outline: none;

 }

 

 .reply-form-buttons {

   display: flex;

   gap: 10px;

   margin-top: 10px;

+  justify-content: flex-end;

 }

 

 .reply-form-buttons button {

-  padding: 6px 12px;

-  border-radius: 4px;

+  padding: 8px 16px;

+  border-radius: 6px;

   cursor: pointer;

-  font-size: 13px;

-  transition: all 0.2s;

+  font-size: 14px;

+  font-weight: 600;

+  transition: all 0.3s;

 }

 

 .reply-form-buttons button[type="submit"] {

-  background-color: #1890ff;

+  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);

   color: white;

   border: none;

 }

 

 .reply-form-buttons button[type="submit"]:hover {

-  background-color: #40a9ff;

+  transform: translateY(-2px);

+  box-shadow: 0 4px 8px rgba(30, 60, 114, 0.2);

 }

 

 .reply-form-buttons .cancel-reply {

-  background-color: #f5f5f5;

+  background: #f5f5f5;

   border: 1px solid #d9d9d9;

   color: #666;

 }

 

 .reply-form-buttons .cancel-reply:hover {

-  background-color: #e8e8e8;

+  background: #e8e8e8;

 }

 

 /* 回复弹窗样式 */

@@ -435,82 +447,155 @@
   left: 0;

   right: 0;

   bottom: 0;

-  background-color: rgba(0, 0, 0, 0.5);

+  background: rgba(0, 0, 0, 0.5);

   display: flex;

   justify-content: center;

   align-items: center;

   z-index: 1000;

+  backdrop-filter: blur(5px);

 }

 

 .reply-modal {

   background: white;

-  border-radius: 8px;

-  width: 90%;

-  max-width: 500px;

-  padding: 20px;

-  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);

+  padding: 25px;

+  border-radius: 12px;

+  width: 500px;

+  max-width: 90%;

+  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);

 }

 

 .modal-header {

   display: flex;

   justify-content: space-between;

   align-items: center;

-  margin-bottom: 15px;

+  margin-bottom: 20px;

 }

 

 .modal-header h3 {

   margin: 0;

-  font-size: 18px;

+  color: #1e3c72;

+  font-size: 20px;

 }

 

 .close-modal {

   background: none;

   border: none;

   font-size: 24px;

-  cursor: pointer;

   color: #666;

+  cursor: pointer;

+  transition: all 0.3s;

+}

+

+.close-modal:hover {

+  color: #1e3c72;

+  transform: rotate(90deg);

 }

 

 .reply-modal textarea {

   width: 100%;

-  padding: 12px;

-  border: 1px solid #ddd;

-  border-radius: 4px;

+  padding: 15px;

+  border: 2px solid #f0f2f5;

+  border-radius: 8px;

   resize: vertical;

-  min-height: 120px;

-  font-size: 14px;

-  margin-bottom: 15px;

+  min-height: 150px;

+  margin-bottom: 20px;

+  font-size: 15px;

+  transition: all 0.3s;

+}

+

+.reply-modal textarea:focus {

+  border-color: #1e3c72;

+  box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.2);

+  outline: none;

 }

 

 .modal-actions {

   display: flex;

   justify-content: flex-end;

-  gap: 10px;

-}

-

-.modal-actions button {

-  padding: 8px 16px;

-  border-radius: 4px;

-  cursor: pointer;

-  font-size: 14px;

+  gap: 15px;

 }

 

 .cancel-btn {

+  padding: 10px 20px;

   background: #f5f5f5;

-  border: 1px solid #d9d9d9;

   color: #666;

+  border: none;

+  border-radius: 6px;

+  font-weight: 600;

+  cursor: pointer;

+  transition: all 0.3s;

 }

 

 .cancel-btn:hover {

-  background: #e8e8e8;

+  background: #e0e0e0;

 }

 

 .submit-btn {

-  background: #1890ff;

+  padding: 10px 20px;

+  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);

   color: white;

   border: none;

+  border-radius: 6px;

+  font-weight: 600;

+  cursor: pointer;

+  transition: all 0.3s;

 }

 

 .submit-btn:hover {

-  background: #40a9ff;

+  transform: translateY(-2px);

+  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.3);

 }

+

+/* 加载和错误状态 */

+.loading, .error {

+  text-align: center;

+  padding: 50px;

+  font-size: 18px;

+  background: white;

+  border-radius: 12px;

+  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);

+  margin: 20px 0;

+}

+

+.error {

+  color: #ff4d4f;

+}

+

+/* 动画效果 */

+@keyframes fadeIn {

+  from { opacity: 0; transform: translateY(10px); }

+  to { opacity: 1; transform: translateY(0); }

+}

+

+/* 响应式设计 */

+@media (max-width: 768px) {

+  .torrent-detail-container {

+    padding: 15px;

+  }

+  

+  .torrent-main {

+    flex-direction: column;

+    padding: 20px;

+  }

+  

+  .torrent-cover {

+    flex: 1 1 100%;

+    margin-bottom: 20px;

+  }

+  

+  .torrent-title {

+    font-size: 24px;

+  }

+  

+  .torrent-meta {

+    grid-template-columns: 1fr;

+  }

+  

+  .comment-container.is-reply {

+    margin-left: 30px;

+  }

+  

+  .reply-form {

+    margin-left: 45px;

+  }

+}
\ No newline at end of file