From 24c15fb4a2d7f400a7a967098179f60ee73d611a Mon Sep 17 00:00:00 2001
From: hongjli <3117313295@qq.com>
Date: 星期三, 09 四月 2025 14:24:16 +0800
Subject: [PATCH] AI场景页面优化

---
 src/components/Card.tsx |   88 ++++++++++++++------------------------------
 1 files changed, 28 insertions(+), 60 deletions(-)

diff --git a/src/components/Card.tsx b/src/components/Card.tsx
index f95594d..97adf32 100644
--- a/src/components/Card.tsx
+++ b/src/components/Card.tsx
@@ -14,80 +14,48 @@
   return (
     <motion.div
       initial={{ opacity: 0, y: 20 }}
-      animate={{ opacity: 1, y: 0 }}
+      whileInView={{ opacity: 1, y: 0 }}
+      viewport={{ once: false, margin: "-100px" }}
       transition={{ duration: 0.5 }}
-      whileHover={{ 
-        y: -5,
-        transition: { duration: 0.2, ease: 'easeOut' }
-      }}
-      whileTap={{ 
-        y: 0,
-        scale: 0.98,
-        transition: { duration: 0.1 }
-      }}
-      className="group relative bg-white backdrop-blur-sm bg-opacity-90 rounded-xl overflow-hidden cursor-pointer"
-      onClick={onClick}
+      className="h-full"
     >
-      {/* 闂厜鏁堟灉杈规 */}
-      <div className="absolute -inset-0.5 rounded-xl bg-gradient-to-r from-[var(--ai-secondary)] to-[var(--ai-highlight)] opacity-0 blur group-hover:opacity-70 group-hover:blur-md transition-all duration-500"></div>
-      
-      {/* 鍗$墖鍐呭 */}
-      <div className="relative z-10 bg-white border border-[var(--ai-secondary)]/20 rounded-xl overflow-hidden shadow-lg shadow-[var(--ai-secondary)]/5 group-hover:shadow-[var(--ai-secondary)]/20 transition-all duration-300">
-        {/* 鍥剧墖鍖哄煙 */}
-        <div className="relative h-48 overflow-hidden">
-          {/* 娓愬彉閬僵 */}
-          <div className="absolute inset-0 bg-gradient-to-tr from-[var(--ai-primary)]/20 to-transparent z-10"></div>
+      <div 
+        onClick={onClick}
+        className="group cursor-pointer h-full flex flex-col bg-white/5 backdrop-blur-sm rounded-xl border border-[var(--ai-secondary)]/10 overflow-hidden transition-all duration-300 hover:shadow-[0_0_20px_rgba(106,219,255,0.15)] hover:border-[var(--ai-secondary)]/30 hover:translate-y-[-2px]"
+      >
+        {/* 鍥剧墖瀹瑰櫒 - 鍥哄畾楂樺害 */}
+        <div className="relative h-[200px] overflow-hidden">
+          <img
+            src={imageUrl}
+            alt={title}
+            className="w-full h-full object-cover transition-transform duration-500 group-hover:scale-110"
+          />
+          {/* 鍥剧墖閬僵灞� */}
+          <div className="absolute inset-0 bg-gradient-to-t from-[#131C41]/80 to-transparent opacity-60"></div>
           
-          {/* 鍥剧墖 */}
-          <div className="relative h-full w-full transform group-hover:scale-105 transition-transform duration-700 ease-out">
-            <Image
-              src={imageUrl}
-              alt={title}
-              fill
-              className="object-contain p-4"
-              sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
-            />
-          </div>
-          
-          {/* 鎶�鏈劅瑁呴グ鍏冪礌 */}
-          <div className="absolute top-2 right-2 w-6 h-6 opacity-70 group-hover:opacity-100 transition-opacity duration-300">
-            <div className="absolute top-0 right-0 w-full h-[1px] bg-[var(--ai-secondary)]"></div>
-            <div className="absolute top-0 right-0 h-full w-[1px] bg-[var(--ai-secondary)]"></div>
-          </div>
-          
-          <div className="absolute bottom-2 left-2 w-6 h-6 opacity-70 group-hover:opacity-100 transition-opacity duration-300">
-            <div className="absolute bottom-0 left-0 w-full h-[1px] bg-[var(--ai-highlight)]"></div>
-            <div className="absolute bottom-0 left-0 h-full w-[1px] bg-[var(--ai-highlight)]"></div>
-          </div>
+          {/* 瑁呴グ鎬ц竟瑙� */}
+          <div className="absolute top-3 right-3 w-8 h-8 border-t-2 border-r-2 border-[var(--ai-secondary)]/50 opacity-70"></div>
+          <div className="absolute bottom-3 left-3 w-8 h-8 border-b-2 border-l-2 border-[var(--ai-secondary)]/50 opacity-70"></div>
         </div>
-        
-        {/* 鍐呭鍖哄煙 */}
-        <div className="p-5 border-t border-[var(--ai-secondary)]/10 relative overflow-hidden">
-          {/* 鍐呭鑳屾櫙鍔ㄦ晥 */}
-          <div className="absolute -inset-1 opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none">
-            <div className="absolute right-0 top-0 h-20 w-20 bg-gradient-to-bl from-[var(--ai-secondary)]/5 to-transparent rounded-full blur-xl"></div>
-          </div>
-          
+
+        {/* 鍐呭鍖哄煙 - 鍥哄畾楂樺害 */}
+        <div className="flex flex-col flex-grow p-6">
           {/* 鏍囬 */}
-          <h3 className="text-lg font-semibold text-[var(--ai-primary)] mb-2 relative">
+          <h3 className="text-xl font-semibold text-[var(--ai-primary)] mb-3 relative">
             {title}
             <div className="absolute -bottom-1 left-0 w-0 h-0.5 bg-gradient-to-r from-[var(--ai-secondary)] to-[var(--ai-highlight)] group-hover:w-full transition-all duration-300 ease-out"></div>
           </h3>
           
-          {/* 鎻忚堪 */}
-          <p className="text-gray-600 text-sm relative z-10">{description}</p>
+          {/* 鎻忚堪鏂囧瓧 - 鍥哄畾楂樺害锛岃秴鍑烘樉绀虹渷鐣ュ彿 */}
+          <p className="text-gray-200 text-sm line-clamp-3 mb-4 transition-colors duration-300 group-hover:text-gray-400">{description}</p>
           
           {/* 搴曢儴瑁呴グ */}
-          <div className="mt-4 flex items-center justify-between">
+          <div className="mt-auto flex items-center justify-between">
             <div className="h-1 w-12 bg-gradient-to-r from-[var(--ai-secondary)] to-[var(--ai-highlight)] transform origin-left scale-x-100 group-hover:scale-x-125 transition-transform duration-300"></div>
             
-            <motion.div 
-              className="text-[var(--ai-secondary)] text-sm font-medium opacity-0 group-hover:opacity-100 transition-opacity duration-300"
-              initial={{ x: -10 }}
-              whileHover={{ x: 0 }}
-            >
+            <span className="text-[var(--ai-secondary)] text-sm font-medium opacity-0 transform translate-x-2 group-hover:opacity-100 group-hover:translate-x-0 transition-all duration-300">
               浜嗚В璇︽儏 鈫�
-            </motion.div>
+            </span>
           </div>
         </div>
       </div>

--
Gitblit v1.9.3