/* General Styling */
:root {
    --primary-color: #4CAF50;
    /* Green */
    --secondary-color: #6a6a6a;
    /* Dark Gray */
    --light-bg: #f8f8f8;
    /* Light Gray Background */
    --white: #ffffff;
    --dark: #333333;
    --border-radius: 8px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background-color: var(--white);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

body.loaded {
    opacity: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1,
h2,
h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 20px;
}

p {
    margin-bottom: 15px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

a:hover {
    color: var(--dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Header */
.main-header {
    /* 使用更具体的 class */
    background-color: var(--white);
    padding: 10px 0;
    /* 减小上下内边距 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    /* 稍微减弱阴影 */
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
    /* 确保最小高度 */
}

.logo-container {
    display: flex;
    align-items: center;
}

.app-logo {
    width: 47px;
    /* 调整尺寸 */
    height: 47px;
    border-radius: 10px;
    /* 调整圆角 */
    margin-right: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    /* 调整阴影 */
    transition: transform 0.3s ease;
}

.app-logo:hover {
    transform: scale(1.05);
}

.app-name {
    font-family: 'Noto Sans SC', 'Noto Sans TC', 'Montserrat', sans-serif;
    /* 确保英文字体也生效 */
    font-size: 23px;
    /* 调整大小 */
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0.5px 0.5px 1px rgba(0, 0, 0, 0.1);
    /* 调整字体阴影 */
}

.language-switcher {
    position: relative;
    cursor: pointer;
    font-weight: 600;
    color: var(--secondary-color);
    padding: 6px 12px;
    /* 调整内边距 */
    border-radius: var(--border-radius);
    transition: background-color 0.3s ease;
    border: 1px solid var(--light-bg);
    display: flex;
    /* 确保图标和文本对齐 */
    align-items: center;
}

.language-switcher:hover {
    background-color: var(--light-bg);
}

.language-switcher .dropdown-arrow {
    /* 为箭头添加样式 */
    width: 16px;
    /* 调整箭头大小 */
    height: 16px;
    margin-left: 5px;
    filter: invert(40%) sepia(0%) saturate(10%) hue-rotate(180deg) brightness(50%) contrast(80%);
    /* 使箭头变灰 */
}


.language-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--white);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    /* 调整阴影 */
    border-radius: var(--border-radius);
    list-style: none;
    min-width: 140px;
    /* 稍窄 */
    padding: 8px 0;
    /* 调整内边距 */
    z-index: 100;
    margin-top: 3px;
    /* 与上边框距离 */
}

.language-dropdown li a {
    display: block;
    padding: 8px 15px;
    /* 调整内边距 */
    color: var(--dark);
    transition: background-color 0.3s ease;
}

.language-dropdown li a:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

.language-switcher.active .language-dropdown {
    display: block;
}


/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--white) 0%, var(--light-bg) 100%);
    padding: 0px 0;
    /* 调整上下间距 */
    text-align: center;
}

.hero-section .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    /* 调整间距 */
}

.hero-content {
    max-width: 700px;
}

.hero-content h1 {
    font-size: 2.8em;
    /* 调整字体大小 */
    line-height: 1.2;
    margin-top: 27px;
    margin-bottom: 15px;
    /* 调整间距 */
    color: var(--primary-color);
}

.hero-content p {
    font-size: 1.1em;
    /* 调整字体大小 */
    color: var(--secondary-color);
    margin-bottom: 25px;
    /* 调整间距 */
}

.key-features {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    /* 调整间距 */
    margin-bottom: 30px;
    /* 调整间距 */
    padding: 0;
}

.key-features li {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 6px 15px;
    /* 调整内边距 */
    border-radius: 50px;
    font-size: 0.9em;
    /* 调整字体大小 */
    font-weight: 600;
}

.download-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    /* 调整间距 */
    margin-top: 15px;
    /* 调整间距 */
}

.download-btn {
    display: flex;
    align-items: center;
    background-color: #6b6b6b;
    color: var(--white);
    padding: 10px 20px;
    /* 调整内边距 */
    border-radius: 50px;
    font-size: 1em;
    /* 调整字体大小 */
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1)
}

/* 下载按钮图片样式 */
.download-btn img {
    height: 22px;
    /* 调整高度 */
    width: auto;
    margin-right: 8px;
    /* 调整间距 */
}

.watch-btn {
    display: flex;
    align-items: center;
    background-color: #6b6b6b;
    color: var(--white);
    padding: 10px 20px;
    /* 调整内边距 */
    border-radius: 50px;
    font-size: 1em;
    /* 调整字体大小 */
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1)
}

.watch-btn img {
    height: 22px;
    /* 调整高度 */
    width: auto;
    margin-right: 8px;
    /* 调整间距 */
}

.download-btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    /* 调整微动效果 */
}

.watch-btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    /* 调整微动效果 */
}

/* App Store 按钮的特定图标颜色调整 */
.app-store-btn img {
    filter: invert(1);
    /* 反转颜色，使黑色图标变白 */
}

/* Single App Screenshot Display (取代 carousel) */
.app-screenshot-display {
    max-width: 350px;
    width: 100%;
    margin-top: 0px;
    /* 调整与上方内容的间距 */
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    /* 使用 flexbox 居中图片 */
    justify-content: center;
    /* 水平居中 */
    align-items: center;
    /* 垂直居中 */
    overflow: hidden;
    /* 确保圆角效果 */
}

.main-app-screenshot {
    width: 100%;
    /* 确保图片充满容器 */
    height: auto;
    object-fit: contain;
    border-radius: var(--border-radius);
    /* 继承容器的圆角 */
}

/* 隐藏标题 */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Features Section */
.features-section {
    background-color: var(--white);
    padding: 40px 0;
    /* 调整上下间距 */
    text-align: center;
}

.features-section h2 {
    font-size: 2.2em;
    /* 调整字体大小 */
    margin-bottom: 40px;
    /* 调整间距 */
    color: var(--primary-color);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    /* 调整最小宽度以更好地适应手机 */
    gap: 20px;
    /* 调整间距 */
}

.feature-item {
    background-color: var(--light-bg);
    padding: 25px;
    /* 调整内边距 */
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    /* 调整阴影 */
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-3px);
    /* 调整微动效果 */
}

.feature-item .feature-icon {
    width: 50px;
    /* 调整图标大小 */
    height: 50px;
    margin: 0 auto 15px;
    /* 调整间距 */
}

.feature-item h3 {
    font-size: 1.3em;
    /* 调整字体大小 */
    margin-bottom: 8px;
    /* 调整间距 */
    color: var(--dark);
}

.feature-item p {
    font-size: 0.9em;
    /* 调整字体大小 */
    color: var(--secondary-color);
    margin-bottom: 0;
    /* 移除底部间距 */
}

/* Call to Action Section */
.call-to-action-section {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 50px 0;
    /* 调整上下间距 */
    text-align: center;
}

.call-to-action-section h2 {
    color: var(--white);
    font-size: 2.2em;
    /* 调整字体大小 */
    margin-bottom: 15px;
    /* 调整间距 */
}

.call-to-action-section p {
    font-size: 1.1em;
    /* 调整字体大小 */
    margin-bottom: 30px;
    /* 调整间距 */
}

.call-to-action-section .download-btn {
    background-color: var(--white);
    color: var(--primary-color);
}

.call-to-action-section .watch-btn {
    background-color: var(--white);
    color: var(--primary-color);
}

.call-to-action-section .download-btn:hover {
    background-color: var(--dark);
    color: var(--white);
}

.call-to-action-section .watch-btn:hover {
    background-color: var(--dark);
    color: var(--white);
}

/* Footer */
footer {
    background-color: var(--dark);
    color: var(--white);
    padding: 15px 0;
    /* 调整内边距 */
    text-align: center;
    font-size: 0.85em;
    /* 调整字体大小 */
}

/* Open in Browser Tip (for WeChat) */
.open-in-browser-tip {
    position: fixed;
    z-index: 11111;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .8);
    overflow: hidden;
    display: none;
}

.open-in-browser-tip img {
    height: 30%;
    width: 92%;
    float: right;
    margin-left: 10px;
    margin-right: 17px;
}


/* Desktop specific adjustments (min-width: 768px) */
@media (min-width: 768px) {
    .hero-section {
        padding: 80px 0;
        /* 桌面端间距恢复 */
    }

    .hero-section .container {
        flex-direction: row;
        text-align: left;
        gap: 60px;
        /* 桌面端更大间距 */
    }

    .hero-content {
        flex: 1;
    }

    .hero-content h1 {
        font-size: 3.8em;
        /* 桌面端字体大小 */
    }

    .key-features {
        justify-content: flex-start;
    }

    .app-screenshot-display {
        flex: 0 0 400px;
        /* 桌面端固定宽度，并防止其缩小 */
        max-width: 400px;
        margin-top: 0;
        /* 桌面端不再需要额外顶部间距 */
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
        /* 桌面端截图阴影 */
    }

    .main-app-screenshot {
        width: 100%;
        height: auto;
    }

    .features-section {
        padding: 80px 0;
        /* 桌面端间距恢复 */
    }

    .features-section h2 {
        font-size: 2.5em;
        /* 桌面端字体大小 */
    }

    .feature-grid {
        gap: 30px;
        /* 桌面端间距恢复 */
    }

    .feature-item {
        padding: 30px;
        /* 桌面端内边距恢复 */
    }

    .feature-item h3 {
        font-size: 1.5em;
        /* 桌面端字体大小 */
    }

    .feature-item p {
        font-size: 1em;
        /* 桌面端字体大小 */
    }

    .call-to-action-section {
        padding: 60px 0;
        /* 桌面端间距恢复 */
    }

    .call-to-action-section h2 {
        font-size: 2.5em;
        /* 桌面端字体大小 */
    }

    .download-buttons {
        gap: 20px;
        /* 桌面端间距恢复 */
    }
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding: 10%;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0, 0, 0, 0.6);
}

.modal-content {
    margin: auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    cursor: pointer;
}

.close:hover {
    color: black;
}