diff --git a/src/app/subscription/components/subscription-coins-offer-section.module.css b/src/app/subscription/components/subscription-coins-offer-section.module.css index a1982680..f1b5393a 100644 --- a/src/app/subscription/components/subscription-coins-offer-section.module.css +++ b/src/app/subscription/components/subscription-coins-offer-section.module.css @@ -1,16 +1,23 @@ .section { - margin: 18px -30px 0; + overflow: hidden; + border: 1px solid rgba(17, 17, 17, 0.06); + border-radius: 28px; + background: rgba(255, 255, 255, 0.82); + box-shadow: 0 16px 42px rgba(31, 21, 25, 0.08); + backdrop-filter: blur(18px); } .heading { position: relative; - padding: 14px 16px 18px; - background: #d9d9d9; + padding: 18px 18px 22px; + background: + linear-gradient(135deg, #ffffff 0%, #f5f5f5 58%, #ececec 100%), + #ffffff; } .title { margin: 0; - color: #111111; + color: #181014; font-size: 22px; font-weight: 800; line-height: 1.2; @@ -22,39 +29,37 @@ bottom: -12px; width: 24px; height: 24px; - background: #d9d9d9; + background: #f2f2f2; transform: translateX(-50%) rotate(45deg); } .panel { position: relative; z-index: 1; - margin-top: 12px; - padding: 8px 16px 8px 12px; - border: 1px solid #8d8d8d; - border-radius: 14px; - background: #d9d9d9; + display: flex; + flex-direction: column; + gap: 8px; + padding: 18px 12px 14px; + background: transparent; } .row { display: grid; - grid-template-columns: 50px minmax(0, 1fr) auto; + grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; width: 100%; - min-height: 42px; - padding: 0; - border: 0; - border-bottom: 3px solid #828282; - background: transparent; - color: #4f4f4f; + min-height: 48px; + padding: 8px 12px 8px 6px; + border: 1px solid transparent; + border-radius: 18px; + background: #ffffff; + color: #53484d; cursor: pointer; font: inherit; text-align: left; - transition: background-color 0.15s ease, color 0.15s ease; -} - -.row:last-child { - border-bottom-width: 3px; + box-shadow: 0 7px 18px rgba(31, 21, 25, 0.045); + transition: background-color 0.18s ease, border-color 0.18s ease, + box-shadow 0.18s ease, color 0.18s ease, transform 0.12s ease; } .row:focus-visible { @@ -63,7 +68,10 @@ } .selected { + border-color: rgba(246, 87, 160, 0.45); + background: #fff4f8; color: #111111; + box-shadow: 0 12px 28px rgba(246, 87, 160, 0.15); } .coinIcon { @@ -74,8 +82,8 @@ justify-content: center; justify-self: center; border-radius: 999px; - background: #ffffff; - color: #5f5f5f; + background: linear-gradient(180deg, #fff 0%, #f5f5f5 100%); + color: #6a5960; font-size: 12px; line-height: 1; text-transform: lowercase; @@ -84,13 +92,13 @@ .coins { min-width: 0; font-size: 16px; - font-weight: 600; + font-weight: 700; line-height: 1.2; } .price { font-size: 16px; - font-weight: 600; + font-weight: 800; line-height: 1.2; white-space: nowrap; } diff --git a/src/app/subscription/components/subscription-screen.module.css b/src/app/subscription/components/subscription-screen.module.css index 9caba2b7..80cd6087 100644 --- a/src/app/subscription/components/subscription-screen.module.css +++ b/src/app/subscription/components/subscription-screen.module.css @@ -2,8 +2,11 @@ display: flex; flex-direction: column; min-height: 100dvh; - background: #fcf3f4; - padding: 18px 30px 10px; + background: + radial-gradient(circle at 8% 4%, rgba(255, 255, 255, 0.95) 0 90px, transparent 160px), + linear-gradient(180deg, #fff9fb 0%, #fcf3f4 52%, #fffefe 100%); + padding: 18px 20px 10px; + animation: pageEnter 360ms ease-out both; } .header { @@ -16,6 +19,14 @@ display: inline-flex; } +.offerStack { + display: flex; + flex-direction: column; + gap: 18px; + margin-top: 14px; + animation: stackEnter 420ms ease-out 80ms both; +} + .userSlot { margin-top: var(--spacing-md); padding: 0 var(--spacing-xs); @@ -58,11 +69,13 @@ } .paymentMethodSlot { - margin-top: var(--spacing-lg); + margin-top: 22px; + animation: stackEnter 420ms ease-out 150ms both; } .ctaSlot { - margin-top: var(--spacing-xl); + margin-top: 22px; + animation: stackEnter 420ms ease-out 190ms both; } .agreementSlot { @@ -83,3 +96,27 @@ .agreementLink:hover { text-decoration: underline; } + +@keyframes pageEnter { + from { + opacity: 0; + transform: translateY(8px); + } + + to { + opacity: 1; + transform: translateY(0); + } +} + +@keyframes stackEnter { + from { + opacity: 0; + transform: translateY(14px); + } + + to { + opacity: 1; + transform: translateY(0); + } +} diff --git a/src/app/subscription/components/subscription-vip-offer-section.module.css b/src/app/subscription/components/subscription-vip-offer-section.module.css index 6fba0db5..d5e0527c 100644 --- a/src/app/subscription/components/subscription-vip-offer-section.module.css +++ b/src/app/subscription/components/subscription-vip-offer-section.module.css @@ -1,11 +1,18 @@ .section { - margin: 18px -30px 0; + overflow: hidden; + border: 1px solid rgba(246, 87, 160, 0.12); + border-radius: 28px; + background: rgba(255, 255, 255, 0.78); + box-shadow: 0 18px 45px rgba(246, 87, 160, 0.11); + backdrop-filter: blur(18px); } .summary { position: relative; - padding: 10px 10px 16px; - background: #d9d9d9; + padding: 18px 18px 22px; + background: + linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 235, 243, 0.92) 54%, rgba(246, 87, 160, 0.16) 100%), + #ffffff; } .title { @@ -17,20 +24,20 @@ } .titleText { - color: #111111; + color: #181014; font-size: 20px; font-weight: 800; } .renewText { - color: #7d7d7d; - font-size: 14px; + color: #9a707e; + font-size: 13px; font-weight: 700; } .subtitle { margin: 8px 0 0; - color: #666666; + color: #6f5961; font-size: 15px; font-weight: 700; line-height: 1.3; @@ -42,7 +49,7 @@ bottom: -12px; width: 24px; height: 24px; - background: #d9d9d9; + background: #ffe8f0; transform: translateX(-50%) rotate(45deg); } @@ -51,26 +58,28 @@ z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); - gap: 10px; - padding: 14px 10px 0; + gap: 9px; + padding: 18px 10px 12px; } .planCard { display: flex; min-width: 0; - min-height: 116px; + min-height: 118px; flex-direction: column; align-items: center; justify-content: center; - padding: 12px 6px 10px; - border: 0; - border-radius: 14px; - background: #f4f4f4; - color: #111111; + padding: 12px 6px 11px; + border: 1px solid rgba(246, 87, 160, 0.08); + border-radius: 20px; + background: #ffffff; + color: #181014; cursor: pointer; font: inherit; text-align: center; - transition: background-color 0.15s ease, transform 0.05s ease; + box-shadow: 0 8px 22px rgba(26, 16, 20, 0.05); + transition: background-color 0.18s ease, box-shadow 0.18s ease, + color 0.18s ease, transform 0.12s ease; } .planCard:focus-visible { @@ -79,11 +88,14 @@ } .planCard:active { - transform: scale(0.98); + transform: translateY(1px) scale(0.985); } .selected { - background: #d9d9d9; + border-color: rgba(246, 87, 160, 0.55); + background: linear-gradient(180deg, #fff 0%, #fff2f8 100%); + box-shadow: 0 14px 30px rgba(246, 87, 160, 0.2); + color: #111111; } .planTitle { @@ -109,7 +121,7 @@ .currency { margin-bottom: 3px; - color: #777777; + color: #8b717a; font-size: 12px; font-weight: 700; text-transform: lowercase; @@ -117,7 +129,7 @@ .originalPrice { margin-top: 10px; - color: #7c7c7c; + color: #9c8b91; font-size: 14px; font-weight: 800; line-height: 1; @@ -126,7 +138,9 @@ @media (max-width: 360px) { .planGrid { - gap: 8px; + gap: 7px; + padding-right: 8px; + padding-left: 8px; } .planTitle { diff --git a/src/app/subscription/subscription-screen.tsx b/src/app/subscription/subscription-screen.tsx index 58ff63b3..f9ce5979 100644 --- a/src/app/subscription/subscription-screen.tsx +++ b/src/app/subscription/subscription-screen.tsx @@ -1,17 +1,4 @@ "use client"; -/** - * 订阅页主屏幕 - * - * 布局(顶到底): - * 1. 顶部返回箭头 - * 2. 用户信息行 - * 3. 渐变横幅 - * 4. 三个套餐卡片 - * 5. 自动续费说明 - * 6. 权益列表卡片 - * 7. 主操作按钮 - * 8. 协议复选框 - */ import { useEffect, useMemo, useRef, useState } from "react"; import { useRouter } from "next/navigation"; @@ -334,7 +321,7 @@ export function SubscriptionScreen({ {isVipSubscription ? ( - <> +