/* ===== 全局样式重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 大屏幕优化 */
@media (min-width: 1441px) {
    .banner-content {
        max-width: 1200px;
        width: 100%;
        padding: 60px;
    }

    .app-subtitle {
        font-size: 2rem;
    }

    .app-description {
        font-size: 1.3rem;
    }
}

:root {
    --color-primary: #28C840;
    --color-primary-dark: #20A033;
    --color-primary-light: rgba(40, 200, 64, 0.1);
    --color-dark: #000000;
    --color-white: #FFFFFF;
    --color-gray: #414242;
    --color-light-gray: #F5F5F5;
    --transition: all 0.3s ease;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-primary: 0 4px 20px rgba(40, 200, 64, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, 'Varela Round', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--color-gray);
    background: var(--color-dark);
    overflow-x: hidden;
}

/* 为不支持 SF Pro Rounded 的系统添加备用字体 */
@supports not (font-family: 'SF Pro Rounded') {
    body {
        font-family: 'Poppins', 'Varela Round', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ===== 返回顶部按钮 ===== */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #20A033;
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ===== Banner 区域 ===== */
.banner {
    position: relative;
    min-height: 100vh;
    background: url('../img/banner.jpg?v=20241209') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    text-align: center;
    overflow: hidden;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.35) 100%);
    z-index: 1;
}

/* 语言切换按钮 */
.language-switcher {
    position: absolute;
    top: 30px;
    right: 40px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Poppins', 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, sans-serif;
    cursor: pointer;
    padding: 4px 8px;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.lang-btn:hover {
    color: var(--color-white);
}

.lang-btn.active {
    color: var(--color-primary);
}

.lang-separator {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
}

.banner-content {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    width: 90%;
    padding: 40px;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.app-icon {
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 七彩流光动画 */
@keyframes rainbow-flow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.app-title {
    font-size: 4rem;
    font-weight: 700;
    font-family: 'Poppins', 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    letter-spacing: -0.02em;
    background: linear-gradient(
        90deg,
        #ff6b6b 0%,
        #feca57 16.67%,
        #48dbfb 33.33%,
        #1dd1a1 50%,
        #ee5a6f 66.67%,
        #c44569 83.33%,
        #ff6b6b 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbow-flow 3s linear infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    display: inline-block;
}

.app-subtitle {
    font-size: 1.8rem;
    font-weight: 500;
    font-family: 'Poppins', 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, sans-serif;
    margin-bottom: 20px;
    color: var(--color-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    overflow: visible;
}

.app-description {
    font-size: 1.2rem;
    line-height: 1.8;
    font-family: 'Varela Round', 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, sans-serif;
    margin-bottom: 40px;
    opacity: 0.95;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    overflow: visible;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Poppins', 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, sans-serif;
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-primary);
}

.btn-secondary {
    background: var(--color-white);
    color: var(--color-gray);
}

.btn-secondary:hover {
    background: var(--color-light-gray);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Button text container for vertical alignment */
.btn-text-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.btn-main-text {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-sub-text {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.9;
    line-height: 1.2;
    text-align: center;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.8;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--color-white);
    border-radius: 15px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 10px;
    background: var(--color-white);
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s ease-in-out infinite;
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(15px);
    }
}

.scroll-indicator p {
    font-size: 0.9rem;
    font-family: 'Varela Round', 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ===== 功能特色区域 ===== */
.feature {
    padding: 120px 0;
    position: relative;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: var(--color-white);
}

.feature:nth-child(even) {
    background: linear-gradient(135deg, #0f0f0f 0%, #1f1f1f 100%);
}

/* 第一个功能板块 - 包含标题 */
.feature-first {
    padding-top: 100px;
}

.features-header-inline {
    text-align: center;
    margin-bottom: 80px;
}

.features-header-inline .section-title {
    color: var(--color-white);
    font-family: 'Poppins', 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, sans-serif;
}

.features-header-inline .section-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.feature-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.feature-left .feature-content {
    grid-template-areas: "image text";
}

.feature-right .feature-content {
    grid-template-areas: "text image";
}

.feature-left .feature-image {
    grid-area: image;
}

.feature-left .feature-text {
    grid-area: text;
}

.feature-right .feature-image {
    grid-area: image;
}

.feature-right .feature-text {
    grid-area: text;
}

.feature-image {
    position: relative;
}

.feature-image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.feature-image:hover img {
    transform: scale(1.03);
}

.feature-tag {
    display: inline-block;
    padding: 8px 20px;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Poppins', 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, sans-serif;
    margin-bottom: 20px;
}

.feature-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Poppins', 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--color-white);
    margin-bottom: 20px;
    line-height: 1.2;
}

.feature-description {
    font-size: 1.1rem;
    line-height: 1.8;
    font-family: 'Varela Round', 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, sans-serif;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 30px;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.05rem;
    font-family: 'Varela Round', 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, sans-serif;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.feature-list svg {
    flex-shrink: 0;
}

/* ===== 用户评价区域 ===== */
.testimonials {
    padding: 120px 0;
    background: var(--color-dark);
    color: var(--color-white);
    overflow: hidden;
    width: 100%;
}

.testimonials .container {
    max-width: none;
    width: 100%;
    padding: 0;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    font-family: 'Poppins', 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, sans-serif;
    text-align: center;
    margin-bottom: 20px;
    padding: 0 40px;
}

.section-subtitle {
    font-size: 1.2rem;
    font-family: 'Varela Round', 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, sans-serif;
    text-align: center;
    margin-bottom: 60px;
    opacity: 0.8;
    padding: 0 40px;
}

.testimonials-slider {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 20px 0;
}

/* 左右两侧渐变遮罩 */
.testimonials-slider::before,
.testimonials-slider::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 300px;
    z-index: 5;
    pointer-events: none;
}

.testimonials-slider::before {
    left: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.7) 30%, rgba(0, 0, 0, 0) 100%);
}

.testimonials-slider::after {
    right: 0;
    background: linear-gradient(to left, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.7) 30%, rgba(0, 0, 0, 0) 100%);
}

/* 滚动按钮 */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: var(--color-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.slider-btn:hover {
    background: var(--color-primary);
    transform: translateY(-50%) scale(1.1);
}

.slider-btn-left {
    left: 40px;
    z-index: 10;
}

.slider-btn-right {
    right: 40px;
    z-index: 10;
}

.testimonials-track {
    display: flex;
    gap: 30px;
    animation: scroll-testimonials 30s linear infinite;
    width: fit-content;
}

@keyframes scroll-testimonials {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.testimonials-track:hover {
    animation-play-state: paused;
}

.testimonial-card {
    flex: 0 0 400px;
    background: var(--color-gray);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.stars {
    color: #FFD700;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.testimonial-text {
    font-size: 1.05rem;
    line-height: 1.8;
    font-family: 'Varela Round', 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, sans-serif;
    margin-bottom: 30px;
    color: var(--color-white);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Force containment for Safari */
    isolation: isolate;
    /* Create new stacking context */
    transform: translateZ(0);
}

.author-avatar img {
    width: 48px !important;
    height: 48px !important;
    display: block;
    /* Force exact dimensions for SVGs */
    min-width: 48px !important;
    min-height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    object-fit: contain;
    /* Reset any inherited styles */
    margin: 0;
    padding: 0;
    border: none;
    /* Ensure consistent rendering across browsers */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Prevent inheritance issues */
    font-size: 0;
    line-height: 0;
    /* Box sizing */
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

.author-name {
    font-weight: 600;
    font-family: 'Poppins', 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, sans-serif;
    margin-bottom: 5px;
}

.author-title {
    font-size: 0.9rem;
    font-family: 'Poppins', 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, sans-serif;
    opacity: 0.8;
}

/* ===== Footer ===== */
.footer {
    background: var(--color-gray);
    color: var(--color-white);
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-info h3 {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Poppins', 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, sans-serif;
    margin-bottom: 15px;
    color: var(--color-primary);
    letter-spacing: -0.01em;
}

.footer-info p {
    opacity: 0.8;
    max-width: 400px;
    font-family: 'Varela Round', 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, sans-serif;
}

.footer-links {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--color-white);
    text-decoration: none;
    font-size: 1.05rem;
    font-family: 'Varela Round', 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, sans-serif;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-links a svg {
    flex-shrink: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    opacity: 0.7;
    font-size: 0.95rem;
    font-family: 'Varela Round', 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== 飞入动画 ===== */
.fade-in-up,
.fade-in-left,
.fade-in-right {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up {
    transform: translateY(40px);
}

.fade-in-left {
    transform: translateX(-40px);
}

.fade-in-right {
    transform: translateX(40px);
}

.fade-in-up.visible,
.fade-in-left.visible,
.fade-in-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

.delay-3 {
    transition-delay: 0.6s;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .feature-content {
        gap: 50px;
    }

    .app-title {
        font-size: 3rem;
    }

    .banner-content {
        max-width: 900px;
    }

    .feature-text h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .language-switcher {
        top: 20px;
        right: 20px;
        padding: 6px 12px;
    }

    .banner-content {
        width: 95%;
        padding: 30px 20px;
    }

    .app-subtitle {
        white-space: normal;
    }

    .app-description {
        white-space: normal;
    }

    .lang-btn {
        font-size: 0.85rem;
        padding: 3px 6px;
    }

    .app-title {
        font-size: 2.5rem;
    }

    .app-subtitle {
        font-size: 1.4rem;
    }

    .app-description {
        font-size: 1rem;
    }

    .feature-first {
        padding-top: 80px;
    }

    .features-header-inline {
        margin-bottom: 60px;
    }

    .feature {
        padding: 80px 0;
    }

    .feature-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .feature-left .feature-content,
    .feature-right .feature-content {
        grid-template-areas:
            "image"
            "text";
    }

    .feature-text h2 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .testimonial-card {
        flex: 0 0 350px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        justify-content: center;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-info p {
        max-width: 100%;
    }

    .footer-bottom {
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    .app-title {
        font-size: 2rem;
    }

    .app-subtitle {
        font-size: 1.2rem;
    }

    .app-description {
        font-size: 0.95rem;
    }

    .btn {
        padding: 12px 25px;
        font-size: 1rem;
    }

    .feature-first {
        padding-top: 60px;
    }

    .features-header-inline {
        margin-bottom: 40px;
    }

    .feature {
        padding: 60px 0;
    }

    .feature-text h2 {
        font-size: 1.5rem;
    }

    .feature-description {
        font-size: 1rem;
    }

    .testimonials {
        padding: 60px 0;
    }

    .testimonials-slider::before,
    .testimonials-slider::after {
        width: 150px;
    }

    .slider-btn {
        width: 50px;
        height: 50px;
    }

    .slider-btn-left {
        left: 10px;
    }

    .slider-btn-right {
        right: 10px;
    }

    .testimonials {
        padding: 60px 0;
    }

    .testimonials .section-title,
    .testimonials .section-subtitle {
        padding: 0 20px;
    }

    .slider-btn-left {
        left: 20px;
    }

    .slider-btn-right {
        right: 20px;
    }

    .testimonial-card {
        flex: 0 0 300px;
        padding: 30px;
    }

    .testimonial-text {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }
}

/* ===== Safari 特定修复 ===== */
/* Safari 特有的 SVG 缩放问题修复 */
@supports (-webkit-appearance: none) {
    .author-avatar img {
        /* Safari 特定修复 */
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        /* 强制 Safari 遵守尺寸 - 统一为48px */
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
        /* 防止 SVG 自动缩放 */
        -webkit-transform: translateZ(0) scale(1);
        transform: translateZ(0) scale(1);
        /* 确保固定的宽高比 */
        aspect-ratio: 1/1;
        /* 强制尺寸 - 48px */
        width: 48px !important;
        height: 48px !important;
        max-width: 48px !important;
        max-height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;
    }
}

/* 仅针对 Safari 的更严格修复 - 统一为48px */
_::-webkit-full-page-media, _:future, :root .author-avatar img {
    width: 48px !important;
    height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    -webkit-transform: scale(1) !important;
    transform: scale(1) !important;
    object-fit: contain !important;
}

/* ===== 性能优化 ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
