/* index.css — 社区首页专属样式(通用主题见 theme.css) */ body { align-items: normal; } @media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } } /* ===== 按钮 ===== */ .btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.55rem 1.3rem; font-size: 0.88rem; font-weight: 600; font-family: inherit; border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer; text-decoration: none; line-height: 1.4; transition: opacity 0.15s, transform 0.1s, background 0.15s, border-color 0.15s; } .btn:active { transform: scale(0.96); } .btn-primary { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(232, 133, 58, 0.28); } .btn-primary:hover { background: var(--accent-dark); opacity: 1; box-shadow: 0 4px 14px rgba(232, 133, 58, 0.36); } .btn-ghost { background: var(--accent-soft); color: var(--accent-dark); } .btn-ghost:hover { border-color: var(--accent); opacity: 1; } .btn-lg { padding: 0.7rem 1.9rem; font-size: 1rem; border-radius: var(--radius-md); } /* ===== 头部:悬浮毛玻璃导航(镜像 minimap/userpanel 风格) ===== */ .header { position: sticky; top: 0.75rem; z-index: 100; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; width: 100%; max-width: 960px; margin: 0 auto; padding: 0.5rem 1rem; border-radius: var(--radius-md); background: rgba(253, 246, 238, 0.72); border: 1px solid var(--border-light); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow-md); transition: background 0.2s, border-color 0.2s; } @media (prefers-color-scheme: dark) { .header { background: rgba(30, 23, 18, 0.72); border-color: var(--border); } } .header h1 { display: flex; align-items: center; font-size: 1.15rem; font-weight: 700; letter-spacing: 0.01em; cursor: pointer; user-select: none; transition: color 0.15s; } .header h1:hover { color: var(--accent); } .right-group { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; } #avatar { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--border); object-fit: cover; } #name { font-size: 0.88rem; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* ===== Hero 首屏 ===== */ .hero { position: relative; text-align: center; padding: 6rem 1rem 5rem; } .hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 50% at 50% 30%, var(--accent-glow), transparent 70%); pointer-events: none; } .hero::after { content: ""; position: absolute; left: 50%; top: 52%; width: 640px; height: 640px; transform: translate(-50%, -50%); background: radial-gradient(circle, var(--accent-glow), transparent 62%); opacity: 0.5; pointer-events: none; } .hero > * { position: relative; z-index: 1; } .hero-title { font-size: clamp(2rem, 6vw, 3rem); font-weight: 800; line-height: 1.28; letter-spacing: 0.02em; margin-bottom: 1rem; } .accent-text { background: linear-gradient(120deg, var(--accent) 20%, var(--accent-dark) 80%); -webkit-background-clip: text; background-clip: text; color: transparent; } .hero-sub { font-size: 1.08rem; color: var(--fg-secondary); max-width: 30rem; margin: 0 auto; line-height: 1.7; } .hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.85rem; margin-top: 2.1rem; } /* ===== 特性卡片 ===== */ .section-title { text-align: center; margin-top: 4rem; font-size: 1.5rem; font-weight: 700; letter-spacing: 0.01em; } .section-title::after { content: ""; display: block; width: 44px; height: 3px; margin: 0.6rem auto 0; border-radius: 2px; background: var(--accent); opacity: 0.85; } .features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.1rem; width: 100%; max-width: 960px; margin: 1.75rem auto 0; } .feature-card { position: relative; background: var(--card); border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 1.7rem 1.4rem; box-shadow: var(--shadow-sm); overflow: hidden; transition: transform 0.18s, box-shadow 0.2s, border-color 0.2s; } .feature-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-dark)); opacity: 0; transition: opacity 0.2s; } .feature-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow-md); } .feature-card:hover::before { opacity: 0.9; } .feature-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-bottom: 0.9rem; border-radius: var(--radius-sm); background: linear-gradient(135deg, var(--accent-soft), rgba(232, 133, 58, 0.16)); color: var(--accent-dark); } .feature-icon svg { width: 22px; height: 22px; } .feature-card h3 { margin-bottom: 0.4rem; font-size: 1.05rem; } .feature-card p { font-size: 0.88rem; line-height: 1.7; color: var(--fg-secondary); } /* ===== 关于本站 ===== */ .about { text-align: center; padding: 1rem 1rem 3rem; max-width: 760px; margin: 0 auto; } .about .site-intro { background: var(--card); border: 1px solid var(--border-light); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 1.75rem 1.9rem; } .site-intro { font-size: 0.96rem; line-height: 1.95; color: var(--fg-secondary); } .quick-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.5rem; margin-top: 1.75rem; } .quick-links a { font-size: 0.86rem; color: var(--muted); text-decoration: none; padding-bottom: 1px; border-bottom: 1px solid transparent; transition: color 0.15s, border-color 0.15s; } .quick-links a:hover { color: var(--accent); border-bottom-color: var(--accent); } /* ===== 入场动画 ===== */ @keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } } @media (prefers-reduced-motion: no-preference) { .hero > *, .feature-card, .about { animation: fade-up 0.5s ease both; } .hero-sub { animation-delay: 0.08s; } .hero-actions { animation-delay: 0.16s; } .feature-card:nth-child(2) { animation-delay: 0.06s; } .feature-card:nth-child(3) { animation-delay: 0.12s; } .feature-card:nth-child(4) { animation-delay: 0.18s; } } /* ===== 响应式 ===== */ /* 触屏设备:加大可点目标 */ @media (hover: none) and (pointer: coarse) { .btn { min-height: 44px; } .quick-links a { padding: 0.5rem 0.25rem; } } /* 平板及以下:收敛首屏光晕与留白 */ @media (max-width: 768px) { body { padding: 1.25rem 0.75rem; } .hero { padding: 4rem 1.25rem 3.5rem; } .hero::after { width: 420px; height: 420px; opacity: 0.4; } .hero-title { letter-spacing: 0.01em; } .features { gap: 0.9rem; } .feature-card { padding: 1.4rem 1.2rem; } } /* 手机:全宽布局、紧凑排版 */ @media (max-width: 480px) { body { padding: 1rem 0.75rem; } .header { top: 0.5rem; padding: 0.45rem 0.85rem; gap: 0.4rem; } .header h1 { font-size: 1rem; } .header h1 svg { display: none; } /* 小屏隐藏 logo 图标,避免挤压 */ .right-group { gap: 0.35rem; } .right-group .btn { padding: 0.5rem 0.95rem; font-size: 0.82rem; } #name { max-width: 72px; } .hero { padding: 3rem 0.75rem 2.5rem; } .hero::after { width: 300px; height: 300px; opacity: 0.32; } .hero-title { margin-bottom: 0.75rem; } .hero-sub { font-size: 0.95rem; } .hero-actions { flex-direction: column; align-items: stretch; gap: 0.65rem; } .hero-actions .btn-lg { width: 100%; padding: 0.85rem 1.5rem; } .section-title { margin-top: 2.5rem; font-size: 1.3rem; } .features { margin-top: 1.25rem; grid-template-columns: 1fr; } .feature-card:hover { transform: none; } /* 触屏取消悬浮位移 */ .about { padding: 0.5rem 0.5rem 2.5rem; } .about .site-intro { padding: 1.4rem 1.3rem; text-align: left; } .quick-links { gap: 1rem 1.5rem; margin-top: 1.5rem; } } /* 超小屏 */ @media (max-width: 360px) { .hero { padding: 2.5rem 0.5rem 2rem; } .header h1 { font-size: 0.95rem; } .right-group .btn { padding: 0.45rem 0.8rem; font-size: 0.8rem; } }