:root {
    --primary: #2B5AED;
    --primary-dark: #1E3FA8;
    --primary-light: #4B7BFF;
    --secondary: #00C4B3;
    --dark: #1A1F3D;
    --gray: #6B7280;
    --light: #F3F4F6;
    --white: #FFFFFF;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 主横幅样式 */
.hero {
    padding: 234px 0 171px;
    position: relative;
    color: var(--white);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/recognize/hero-preview.png');
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgb(0 0 0 / 90%), rgb(103 129 211 / 30%));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: left;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-text {
    max-width: 600px;
}

.hero-text h1 {
    font-size: 48px;
    line-height: 1.2;
    margin-bottom: 24px;
    font-weight: 600;
}

.hero-text p {
    font-size: 20px;
    margin-bottom: 32px;
    opacity: 0.9;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

.primary-btn {
    background: var(--white);
    color: var(--primary);
    padding: 16px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.secondary-btn {
    background: transparent;
    color: var(--white);
    padding: 16px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    border: 2px solid var(--white);
    transition: all 0.3s ease;
}

.primary-btn:hover,
.secondary-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.hero-image img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* 核心优势样式 */
.advantages {
    padding: 100px 0;
    background: var(--white);
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 60px;
    color: var(--dark);
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary);
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.advantage-card {
    text-align: center;
    padding: 40px 30px;
    background: var(--white);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.advantage-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.advantage-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: var(--white);
    font-size: 32px;
}

.advantage-card h3 {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--dark);
}

.advantage-card p {
    color: var(--gray);
    line-height: 1.8;
}

/* 识别流程样式 */
.process {
    padding: 100px 0;
    background: var(--light);
}

.process-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.process-step {
    text-align: center;
    flex: 1;
    max-width: 280px;
}

.step-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: var(--white);
    font-size: 40px;
}

.process-step h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--dark);
}

.process-step p {
    color: var(--gray);
}

.process-arrow {
    color: var(--primary);
    font-size: 24px;
}

/* 技术优势样式 */
.tech-advantages {
    padding: 100px 0;
    background: var(--light);
}

.tech-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.tech-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.tech-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.tech-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
    flex-shrink: 0;
}

.tech-text h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--dark);
}

.tech-text p {
    color: var(--gray);
}

.tech-image img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* 人脸识别支付样式 */
.face-pay {
    padding: 100px 0;
    background: var(--white);
    position: relative;
    overflow: hidden;
}

.feature-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-desc {
    font-size: 18px;
    color: var(--gray);
    max-width: 600px;
    margin: 20px auto 0;
}

.face-pay-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 80px;
}

.face-recognition-demo {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.face-recognition-demo img {
    width: 100%;
    display: block;
}

.scan-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(43, 90, 237, 0.1), transparent);
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
    animation: scanAnimation 2s linear infinite;
}

@keyframes scanAnimation {
    0% {
        top: 0;
    }
    100% {
        top: 100%;
    }
}

.payment-interface {
    background: var(--dark);
    padding: 30px;
    border-radius: var(--radius-lg);
    color: var(--white);
}

.interface-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.user-id {
    font-size: 16px;
    opacity: 0.8;
}

.payment-details {
    text-align: center;
    margin-bottom: 30px;
}

.amount {
    margin-bottom: 20px;
}

.amount .label {
    display: block;
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.amount .value {
    font-size: 32px;
    font-weight: 600;
}

.payment-status {
    color: #00C48C;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.payment-time {
    text-align: center;
}

.payment-time span {
    display: block;
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 10px;
}

.time-indicator {
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0;
    animation: progressAnimation 1s linear forwards;
}

@keyframes progressAnimation {
    0% {
        width: 0;
    }
    100% {
        width: 100%;
    }
}

.face-pay-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
}

.feature-item {
    padding: 30px;
    background: var(--light);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-item i {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 20px;
}

.feature-item h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--dark);
}

.feature-item p {
    color: var(--gray);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .hero {
        padding: 180px 0 120px;
    }

    .hero-content {
        text-align: center;
    }

    .hero-text {
        margin: 0 auto;
    }

    .hero-btns {
        justify-content: center;
    }

    .tech-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .tech-info {
        order: 1;
    }

    .process-flow {
        flex-direction: column;
    }

    .process-arrow {
        transform: rotate(90deg);
    }

    .face-pay-showcase {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .face-pay-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .advantages-grid,
    .scenarios-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-text h1 {
        font-size: 36px;
    }

    .section-title {
        font-size: 30px;
    }

    .tech-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .face-pay-features {
        grid-template-columns: 1fr;
    }

    .section-desc {
        font-size: 16px;
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .advantages-grid,
    .scenarios-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 150px 0 100px;
    }

    .hero-text h1 {
        font-size: 32px;
    }

    .hero-text p {
        font-size: 16px;
    }

    .hero-btns {
        flex-direction: column;
    }
}

/* 性能优化 */
@media print {
    .hero-bg {
        -webkit-print-color-adjust: exact;
    }
}

/* 图片懒加载占位样式 */
.lazy {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.lazy.loaded {
    opacity: 1;
}

/* 移动端性能优化 */
@media (max-width: 768px) {
    * {
        -webkit-tap-highlight-color: transparent;
    }

    /* 优化滚动性能 */
    .advantages-grid,
    .process-flow,
    .face-pay-showcase,
    .tech-content {
        will-change: transform;
    }

    /* 减少移动端动画复杂度 */
    .advantage-card:hover,
    .feature-item:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }

    /* 优化触摸目标大小 */
    .primary-btn,
    .secondary-btn,
    .feature-item,
    .tech-item {
        min-height: 44px;
        padding: 12px 24px;
    }

    /* 优化字体大小 */
    :root {
        font-size: 16px;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text p {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }
}

/* 优化移动端间距 */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 120px 0 80px;
    }

    .section-title {
        margin-bottom: 40px;
    }

    .advantages-grid,
    .face-pay-features {
        gap: 20px;
    }

    .process-flow {
        gap: 24px;
    }

    /* 优化移动端卡片样式 */
    .advantage-card,
    .feature-item {
        padding: 24px 16px;
    }

    /* 优化移动端按钮 */
    .hero-btns {
        flex-direction: column;
        gap: 16px;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
        text-align: center;
    }
}

/* 添加暗色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --dark: #F3F4F6;
        --light: #1A1F3D;
        --gray: #9CA3AF;
        --white: #111827;
    }

    .hero-bg::after {
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(43, 90, 237, 0.4));
    }
}

/* 优化加载性能 */
.hero-bg {
    background-image: url('../images/recognize/hero-preview.png');
    background-size: cover;
    background-position: center;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* 优化动画性能 */
.advantage-card,
.feature-item,
.process-step {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* 添加焦点样式 */
.primary-btn:focus,
.secondary-btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* 优化可访问性 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 人脸识别扫描动画 */
.face-scan-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
}

.face-scan-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* 扫描线 */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        rgba(0,219,255,0) 0%,
        rgba(0,219,255,0.8) 50%,
        rgba(0,219,255,0) 100%);
    box-shadow: 0 0 8px rgba(0,219,255,0.6);
    animation: scanning 2s linear infinite;
    z-index: 2;
}

/* 扫描框 */
.scan-box {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    z-index: 1;
}

/* 扫描框四角 */
.corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #00dbff;
}

.top-left {
    top: 20px;
    left: 20px;
    border-right: none;
    border-bottom: none;
}

.top-right {
    top: 20px;
    right: 20px;
    border-left: none;
    border-bottom: none;
}

.bottom-left {
    bottom: 20px;
    left: 20px;
    border-right: none;
    border-top: none;
}

.bottom-right {
    bottom: 20px;
    right: 20px;
    border-left: none;
    border-top: none;
}

/* 扫描动画 */
@keyframes scanning {
    0% {
        top: 0;
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        top: 100%;
        opacity: 1;
    }
}

/* 扫描框闪烁动画 */
.scan-box .corner {
    animation: cornerFlash 2s linear infinite;
}

@keyframes cornerFlash {
    0%, 100% {
        border-color: rgba(0,219,255,1);
        box-shadow: 0 0 8px rgba(0,219,255,0.6);
    }
    50% {
        border-color: rgba(0,219,255,0.5);
        box-shadow: 0 0 4px rgba(0,219,255,0.3);
    }
}

/* 图片加载优化 */
.lazy {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.lazy.loaded {
    opacity: 1;
} 