:root {
    --primary-color: #007AFF;
    --secondary-color: #5856D6;
    --text-color: #1D1D1F;
    --text-secondary: #86868B;
    --background-color: #FFFFFF;
    --secondary-background: #F5F5F7;
    --border-color: #D2D2D7;
    --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    --hover-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    --transition-standard: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --vh: 1vh;
    --vw: 1vw;
}

/* 修复iOS Safari 100vh问题 */
@supports (-webkit-touch-callout: none) {
    :root {
        --vh: calc(var(--vh, 1vh));
    }
}

/* 基础样式优化 */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--background-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 确保所有容器不会溢出 */
.nav-container,
.hero,
.features,
.updates,
.footer-content,
.privacy-content {
    width: 100%;
    box-sizing: border-box;
}

/* 修复移动端菜单溢出问题 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: saturate(180%) blur(20px);
    padding: 6rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    transition: right 0.3s ease;
    z-index: 1001;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* 确保图片不会导致溢出 */
img {
    max-width: 100%;
    height: auto;
    display: block;
    box-sizing: border-box;
}

/* 修复移动端布局问题 */
@media (max-width: 768px) {

    .nav-container,
    .hero,
    .features,
    .updates,
    .footer-content,
    .privacy-content {
        padding-left: 1rem;
        padding-right: 1rem;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Header & Navigation */
header {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.2rem;
    z-index: 1002;
}

.logo img {
    margin-right: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
    transition: color 0.3s ease;
    position: relative;
    display: inline-block;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
    transform-origin: left;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* 移除隐私政策按钮的下划线 */
.footer-section a[href="privacy.html"]::after {
    display: none;
}

/* 移除问题反馈按钮的下划线 */
.footer-section a[href="mailto:evendipper@163.com"]::after {
    display: none;
}

/* Language Switch */
.lang-switch {
    display: flex;
    gap: 0.6rem;
    margin-left: 2rem;
}

.lang-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 980px;
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition-standard);
    position: relative;
    overflow: hidden;
}

.lang-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    opacity: 0;
    transition: var(--transition-standard);
}

.lang-btn:hover::before {
    opacity: 1;
}

.lang-btn:hover {
    background-color: var(--secondary-background);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.lang-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
}

.lang-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background-color: white;
    border-radius: 1px;
}

/* Hero Section */
.hero {
    padding: 8rem 2rem 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 85vh;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(0, 122, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: -1;
}

.hero-content {
    flex: 1;
    padding-right: 4rem;
    animation: fadeInUp 1s ease-out;
}

.hero h1 {
    font-size: 3.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    background: linear-gradient(90deg, var(--text-color), var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 1s ease-out;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    transition: var(--transition-standard);
}

.hero-image img:hover {
    transform: translateY(-8px);
    box-shadow: var(--hover-shadow);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    gap: 1.2rem;
}

.cta-button {
    padding: 1rem 2.2rem;
    border-radius: 980px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: var(--transition-standard);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    opacity: 0;
    transition: var(--transition-standard);
}

.cta-button:hover::before {
    opacity: 1;
}

.cta-button.primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

.cta-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 122, 255, 0.3);
}

.cta-button.secondary {
    background-color: var(--secondary-background);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.cta-button.secondary:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.1);
}

/* Features Section */
.features {
    padding: 6rem 2rem;
    background-color: var(--secondary-background);
    position: relative;
    overflow: hidden;
}

.features::before {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(88, 86, 214, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: 0;
}

.features h2 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 4rem;
    font-weight: 600;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 1;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.feature-card {
    background-color: var(--background-color);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    transition: var(--transition-standard);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: var(--transition-standard);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--hover-shadow);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1.1rem;
}

/* Updates Section */
.updates {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--background-color);
}

.updates h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 600;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.update-card {
    background-color: var(--secondary-background);
    padding: 2.5rem;
    border-radius: 24px;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.update-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.update-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.update-card h3::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.update-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.update-card li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
    color: #515154;
}

.update-card li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Privacy Policy Page */
.privacy-content {
    max-width: 800px;
    margin: 8rem auto 2rem;
    padding: 0 2rem;
    position: relative;
}

.privacy-text {
    background-color: var(--background-color);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

.privacy-text h2 {
    font-size: 1.8rem;
    margin: 2.5rem 0 1.2rem;
    color: var(--text-color);
    font-weight: 600;
    position: relative;
    padding-left: 1.5rem;
}

.privacy-text h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

.privacy-text h2:first-child {
    margin-top: 0;
}

.privacy-text p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.1rem;
}

.privacy-text p:last-child {
    margin-bottom: 0;
}

/* Footer */
footer {
    background-color: var(--secondary-background);
    padding: 3rem 2rem;
    position: relative;
    overflow: visible;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg,
            rgba(0, 122, 255, 0) 0%,
            rgba(0, 122, 255, 0.2) 50%,
            rgba(0, 122, 255, 0) 100%);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    min-width: 200px;
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
    transition: var(--transition-standard);
}

.footer-section a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition-standard);
    position: relative;
}

.footer-section a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--primary-color);
    transition: var(--transition-standard);
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.footer-section a:hover::after {
    width: 100%;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1002;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: var(--transition-standard);
    border-radius: 2px;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu */
.mobile-menu.active {
    right: 0;
}

.mobile-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    transition: var(--transition-standard);
    width: 100%;
    text-align: center;
}

.mobile-menu a:hover {
    background-color: var(--secondary-background);
    color: var(--primary-color);
}

.mobile-lang-switch {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    width: 100%;
    justify-content: center;
    padding: 1rem;
    background-color: var(--secondary-background);
    border-radius: 16px;
}

.mobile-lang-switch .lang-btn {
    flex: 1;
    max-width: 140px;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
    border: 2px solid var(--border-color);
    background-color: var(--background-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.mobile-lang-switch .lang-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

.mobile-lang-switch .lang-btn:not(.active):hover {
    background-color: var(--secondary-background);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 修复iOS Safari滚动问题 */
@supports (-webkit-touch-callout: none) {
    body {
        min-height: -webkit-fill-available;
    }

    .privacy-content {
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .privacy-content {
        margin-top: 6rem;
        margin-bottom: 1rem;
        padding: 0 1.5rem;
    }

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

    .footer-section {
        align-items: center;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .mobile-menu {
        display: flex;
    }
}

/* 修复动画性能问题 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 修复暗色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #F5F5F7;
        --text-secondary: #86868B;
        --background-color: #000000;
        --secondary-background: #1C1C1E;
        --border-color: #38383A;
    }

    header {
        background-color: rgba(0, 0, 0, 0.8);
    }

    .mobile-menu {
        background-color: rgba(0, 0, 0, 0.98);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {

    .nav-container,
    .hero,
    .features,
    .updates,
    .footer-content,
    .privacy-content {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding: 6rem 1.5rem 3rem;
        min-height: auto;
    }

    .hero-content {
        padding-right: 0;
        margin-bottom: 3rem;
    }

    .hero h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 1.2rem;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-image {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }

    .hero-image img {
        max-width: 100%;
        border-radius: 20px;
    }

    .cta-buttons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .features {
        padding: 4rem 1.5rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 2rem;
    }

    .updates {
        padding: 4rem 1.5rem;
    }

    .update-card {
        padding: 2rem;
    }

    .privacy-content {
        margin-top: 6rem;
        margin-bottom: 1rem;
        padding: 0 1.5rem;
    }

    .privacy-text {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0.8rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .logo img {
        width: 32px;
        height: 32px;
    }

    .hero {
        padding: 5rem 1rem 2rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .cta-button {
        width: 100%;
        text-align: center;
        padding: 0.8rem 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .feature-card h3 {
        font-size: 1.3rem;
    }

    .update-card {
        padding: 1.5rem;
    }

    .update-card h3 {
        font-size: 1.3rem;
    }

    .privacy-content h1 {
        font-size: 1.8rem;
    }

    .privacy-text {
        padding: 1.5rem;
    }

    .privacy-text h2 {
        font-size: 1.3rem;
    }

    .footer-content {
        padding: 1.5rem;
    }

    .mobile-lang-switch {
        padding: 0.8rem;
        gap: 0.8rem;
    }

    .mobile-lang-switch .lang-btn {
        padding: 0.8rem;
        font-size: 1rem;
    }
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* Release Notes Page Styles */
.release-notes {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.release-notes h1 {
    text-align: center;
    margin-bottom: 2rem;
}

.version-date {
    font-size: 0.9em;
    color: #666;
    margin-left: 0.5rem;
}

.view-all-updates {
    text-align: center;
    margin-top: 2rem;
}

.view-all-updates .cta-button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
}

/* Update card styles for both pages */
.update-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.update-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #333;
}

.update-card ul {
    margin: 0;
    padding-left: 1.5rem;
}

.update-card li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}