421 lines
8.9 KiB
CSS
421 lines
8.9 KiB
CSS
/* ===== Hero 区域 ===== */
|
|
#hero {
|
|
min-height: 100vh;
|
|
display: flex;
|
|
align-items: center;
|
|
position: relative;
|
|
z-index: 1;
|
|
padding-top: 64px;
|
|
}
|
|
|
|
.hero-container {
|
|
max-width: 1400px;
|
|
margin: 0 auto;
|
|
padding: 60px 24px;
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 80px;
|
|
align-items: center;
|
|
}
|
|
|
|
.badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 8px 20px;
|
|
border-radius: 999px;
|
|
background: rgba(6, 182, 212, 0.1);
|
|
border: 1px solid rgba(6, 182, 212, 0.2);
|
|
margin-bottom: 32px;
|
|
font-size: 14px;
|
|
color: rgba(34, 211, 238, 0.9);
|
|
}
|
|
|
|
.badge-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background: var(--cyan);
|
|
animation: pulse 2s ease-in-out infinite;
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0%, 100% { opacity: 1; }
|
|
50% { opacity: 0.4; }
|
|
}
|
|
|
|
.hero-title {
|
|
font-size: clamp(48px, 8vw, 80px);
|
|
font-weight: 900;
|
|
line-height: 0.95;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.title-line { display: block; }
|
|
|
|
.hero-subtitle {
|
|
font-size: clamp(20px, 3vw, 28px);
|
|
color: var(--text-secondary);
|
|
font-weight: 300;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.hero-desc {
|
|
font-size: 16px;
|
|
color: var(--text-muted);
|
|
max-width: 520px;
|
|
margin-bottom: 48px;
|
|
line-height: 1.8;
|
|
}
|
|
|
|
.hero-actions {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 16px;
|
|
margin-bottom: 64px;
|
|
}
|
|
|
|
.hero-stats {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 24px;
|
|
}
|
|
|
|
.stat { text-align: left; }
|
|
|
|
.stat-num {
|
|
display: block;
|
|
font-size: 28px;
|
|
font-weight: 800;
|
|
color: #fff;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.stat-num .stat-suffix {
|
|
font-size: 20px;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.stat-label {
|
|
font-size: 13px;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
/* 右侧代码区域 */
|
|
.hero-visual {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.orbit {
|
|
position: absolute;
|
|
border-radius: 50%;
|
|
border: 1px solid rgba(6, 182, 212, 0.1);
|
|
}
|
|
|
|
.orbit-1 {
|
|
inset: 15%;
|
|
animation: spin 40s linear infinite;
|
|
}
|
|
|
|
.orbit-2 {
|
|
inset: 25%;
|
|
animation: spin 30s linear infinite reverse;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
.orbit-dot {
|
|
position: absolute;
|
|
top: -6px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
width: 12px;
|
|
height: 12px;
|
|
border-radius: 50%;
|
|
background: var(--cyan);
|
|
box-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
|
|
}
|
|
|
|
.orbit-dot-lg {
|
|
width: 16px;
|
|
height: 16px;
|
|
background: var(--blue);
|
|
box-shadow: 0 0 24px rgba(59, 130, 246, 0.5);
|
|
}
|
|
|
|
/* 涟漪动画区域 */
|
|
.ripple-container {
|
|
position: relative;
|
|
width: 320px;
|
|
height: 320px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.ripple {
|
|
position: absolute;
|
|
border-radius: 50%;
|
|
border: 2px solid rgba(6, 182, 212, 0.3);
|
|
animation: ripple-expand 3s ease-out infinite;
|
|
}
|
|
|
|
.ripple-1 { animation-delay: 0s; }
|
|
.ripple-2 { animation-delay: 0.6s; }
|
|
.ripple-3 { animation-delay: 1.2s; }
|
|
.ripple-4 { animation-delay: 1.8s; }
|
|
.ripple-5 { animation-delay: 2.4s; }
|
|
|
|
@keyframes ripple-expand {
|
|
0% {
|
|
width: 40px;
|
|
height: 40px;
|
|
opacity: 1;
|
|
border-width: 3px;
|
|
border-color: rgba(6, 182, 212, 0.6);
|
|
}
|
|
50% {
|
|
opacity: 0.5;
|
|
border-width: 2px;
|
|
border-color: rgba(6, 182, 212, 0.3);
|
|
}
|
|
100% {
|
|
width: 320px;
|
|
height: 320px;
|
|
opacity: 0;
|
|
border-width: 1px;
|
|
border-color: rgba(6, 182, 212, 0);
|
|
}
|
|
}
|
|
|
|
/* ===== 3D 交互立方体 ===== */
|
|
.cube-scene {
|
|
position: relative;
|
|
width: 200px;
|
|
height: 200px;
|
|
perspective: 800px;
|
|
z-index: 1;
|
|
}
|
|
|
|
.cube {
|
|
width: 100%;
|
|
height: 100%;
|
|
position: relative;
|
|
transform-style: preserve-3d;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.cube-face {
|
|
position: absolute;
|
|
width: 200px;
|
|
height: 200px;
|
|
background: #ffffff;
|
|
border: 2px solid rgba(6, 182, 212, 0.6);
|
|
box-shadow:
|
|
inset 0 0 30px rgba(0, 0, 0, 0.03),
|
|
0 0 15px rgba(6, 182, 212, 0.3),
|
|
0 0 30px rgba(6, 182, 212, 0.15);
|
|
user-select: none;
|
|
}
|
|
|
|
/* 立方体六个面 */
|
|
.cube-face-front { transform: rotateY(0deg) translateZ(100px); }
|
|
.cube-face-back { transform: rotateY(180deg) translateZ(100px); }
|
|
.cube-face-right { transform: rotateY(90deg) translateZ(100px); }
|
|
.cube-face-left { transform: rotateY(-90deg) translateZ(100px); }
|
|
.cube-face-top { transform: rotateX(90deg) translateZ(100px); }
|
|
.cube-face-bottom { transform: rotateX(-90deg) translateZ(100px); }
|
|
|
|
/* 特性对话框 */
|
|
.cube-tooltip {
|
|
position: absolute;
|
|
left: 50%;
|
|
top: 50%;
|
|
transform: translate(-50%, -50%) scale(0.8);
|
|
background: rgba(3, 7, 18, 0.95);
|
|
border: 1px solid rgba(6, 182, 212, 0.4);
|
|
border-radius: 12px;
|
|
padding: 16px 24px;
|
|
min-width: 220px;
|
|
max-width: 280px;
|
|
text-align: center;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: opacity 0.3s ease, transform 0.3s ease;
|
|
z-index: 10;
|
|
backdrop-filter: blur(10px);
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(6, 182, 212, 0.15);
|
|
}
|
|
|
|
.cube-tooltip.is-visible {
|
|
opacity: 1;
|
|
transform: translate(-50%, -50%) scale(1);
|
|
}
|
|
|
|
.cube-tooltip-icon {
|
|
font-size: 28px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.cube-tooltip-title {
|
|
font-size: 15px;
|
|
font-weight: 700;
|
|
color: #fff;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.cube-tooltip-desc {
|
|
font-size: 12px;
|
|
color: var(--text-muted);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
/* 小三角箭头 */
|
|
.cube-tooltip::after {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: -8px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
width: 0;
|
|
height: 0;
|
|
border-left: 8px solid transparent;
|
|
border-right: 8px solid transparent;
|
|
border-top: 8px solid rgba(6, 182, 212, 0.4);
|
|
}
|
|
|
|
/* 滚动指示器 */
|
|
.scroll-indicator {
|
|
position: absolute;
|
|
bottom: 40px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 8px;
|
|
color: var(--text-muted);
|
|
font-size: 13px;
|
|
animation: bounce 2s ease-in-out infinite;
|
|
}
|
|
|
|
@keyframes bounce {
|
|
0%, 100% { transform: translateX(-50%) translateY(0); }
|
|
50% { transform: translateX(-50%) translateY(8px); }
|
|
}
|
|
|
|
.scroll-mouse {
|
|
width: 24px;
|
|
height: 36px;
|
|
border: 2px solid rgba(255, 255, 255, 0.2);
|
|
border-radius: 12px;
|
|
position: relative;
|
|
}
|
|
|
|
.scroll-mouse::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 6px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
width: 4px;
|
|
height: 8px;
|
|
background: var(--cyan);
|
|
border-radius: 2px;
|
|
animation: scroll-dot 2s ease-in-out infinite;
|
|
}
|
|
|
|
@keyframes scroll-dot {
|
|
0%, 100% { opacity: 1; top: 6px; }
|
|
50% { opacity: 0.3; top: 16px; }
|
|
}
|
|
|
|
/* 响应式 */
|
|
@media (max-width: 1024px) {
|
|
.hero-container {
|
|
grid-template-columns: 1fr;
|
|
gap: 48px;
|
|
text-align: center;
|
|
}
|
|
.hero-desc, .hero-actions, .hero-stats {
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
}
|
|
.hero-stats { max-width: 400px; }
|
|
.stat { text-align: center; }
|
|
.ripple-container {
|
|
margin: 0 auto;
|
|
width: 280px;
|
|
height: 280px;
|
|
}
|
|
.cube-scene {
|
|
width: 160px;
|
|
height: 160px;
|
|
margin: 0 auto;
|
|
}
|
|
.cube-face {
|
|
width: 160px;
|
|
height: 160px;
|
|
}
|
|
.cube-face-front { transform: rotateY(0deg) translateZ(80px); }
|
|
.cube-face-back { transform: rotateY(180deg) translateZ(80px); }
|
|
.cube-face-right { transform: rotateY(90deg) translateZ(80px); }
|
|
.cube-face-left { transform: rotateY(-90deg) translateZ(80px); }
|
|
.cube-face-top { transform: rotateX(90deg) translateZ(80px); }
|
|
.cube-face-bottom { transform: rotateX(-90deg) translateZ(80px); }
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.hero-container {
|
|
padding: 40px 16px;
|
|
}
|
|
.hero-stats { grid-template-columns: 1fr; gap: 16px; }
|
|
.hero-actions {
|
|
justify-content: center;
|
|
}
|
|
.btn {
|
|
width: 100%;
|
|
max-width: 280px;
|
|
justify-content: center;
|
|
}
|
|
.ripple-container {
|
|
width: 240px;
|
|
height: 240px;
|
|
}
|
|
.cube-scene {
|
|
width: 140px;
|
|
height: 140px;
|
|
margin: 0 auto;
|
|
}
|
|
.cube-face {
|
|
width: 140px;
|
|
height: 140px;
|
|
}
|
|
.cube-face-front { transform: rotateY(0deg) translateZ(70px); }
|
|
.cube-face-back { transform: rotateY(180deg) translateZ(70px); }
|
|
.cube-face-right { transform: rotateY(90deg) translateZ(70px); }
|
|
.cube-face-left { transform: rotateY(-90deg) translateZ(70px); }
|
|
.cube-face-top { transform: rotateX(90deg) translateZ(70px); }
|
|
.cube-face-bottom { transform: rotateX(-90deg) translateZ(70px); }
|
|
|
|
.hero-title {
|
|
font-size: 40px;
|
|
}
|
|
.hero-subtitle {
|
|
font-size: 18px;
|
|
}
|
|
.hero-desc {
|
|
font-size: 14px;
|
|
padding: 0 8px;
|
|
}
|
|
.badge {
|
|
font-size: 12px;
|
|
padding: 6px 14px;
|
|
}
|
|
}
|