/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* WeChat Browser Warning */
.wechat-warning {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 123, 255, 0.8);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.3);
    z-index: 9999;
    font-size: 14px;
    font-weight: 500;
    animation: slideInFromRight 0.5s ease-out;
    max-width: 250px;
}

.warning-content {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.warning-arrow {
    font-size: 16px;
    animation: bounce 1s infinite;
}

.warning-close {
    position: absolute;
    bottom: -8px;
    right: -8px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #333;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.warning-close:hover {
    background: white;
    transform: scale(1.1);
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    60% {
        transform: translateY(-1px);
    }
}

@media (max-width: 768px) {
    .wechat-warning {
        top: 5px;
        right: 5px;
        font-size: 13px;
        max-width: 220px;
    }
}

/* 微信浏览器特殊处理 - 使用更准确的检测 */
@media (max-width: 768px) {
    /* 为微信浏览器调整提示框位置 */
    .wechat-warning {
        top: 5px;
        right: 5px;
        position: fixed;
        z-index: 99999;
    }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: #ffffff;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 20px;
    color: #1a1a1a;
}

.logo-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #007AFF;
}

/* Language Selector */
.language-selector {
    position: relative;
    display: inline-block;
}

.lang-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-toggle:hover .globe-icon {
    fill: #007AFF;
}

.globe-icon {
    flex-shrink: 0;
    fill: #666;
    transition: fill 0.3s ease;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e5e5e7;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 80px;
   /* max-height: 300px; */
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 8px;
}

.language-selector.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.lang-option:first-child {
    border-radius: 12px 12px 0 0;
}

.lang-option:last-child {
    border-radius: 0 0 12px 12px;
}

.lang-option:only-child {
    border-radius: 12px;
}

.lang-option:hover {
    background: #f5f5f7;
}

.lang-option.active {
    background: #007AFF;
    color: white;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('hero-devices.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    z-index: 1;
}

.hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    z-index: 2;
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 3;
    text-align: center;
    margin: -80px auto 0;
}

.hero-title {
    margin-bottom: 10px;
}

.title-main {
    display: block;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.title-sub {
    display: block;
    font-size: 20px;
    font-weight: 500;
    color: #007AFF;
    letter-spacing: 1px;
}

.hero-description {
    font-size: 18px;
    color: #666;
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.app-store-link {
    display: inline-block;
    transition: all 0.3s ease;
}

.app-store-link:hover {
    transform: translateY(-2px);
}

.app-store-badge {
    height: 50px;
    width: auto;
    display: block;
}

.btn-primary, .btn-secondary {
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary {
    background: transparent;
    color: #007AFF;
    border: 2px solid #007AFF;
    width: 160px;
    text-align: center;
}

.btn-secondary:hover {
    background: #007AFF;
    color: white;
    transform: translateY(-2px);
}

.hero-image {
    display: none;
}

.device-showcase {
    display: none;
}

.hero-devices {
    display: none;
}

/* Features & Screenshots Showcase Section */
.features-showcase {
    padding: 60px 0 60px;
    background: #ffffff;
}

.section-title {
    text-align: center;
    font-size: 40px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 60px;
}

.showcase-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

.screenshots-carousel {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 20px;
    background: transparent;
    margin-bottom: 60px;
}

.screenshot-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screenshot-slide.active {
    opacity: 1;
}

.screenshot-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 20px;
    display: block;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 1000;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    outline: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.25);
}

.indicator.active {
    background: #007AFF;
    transform: scale(1.5);
}

.features-content {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 500px;
}

.feature-group {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.feature-group.active {
    opacity: 1;
    transform: translateY(0);
    position: relative;
}

.feature-item {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.feature-item:last-child {
    margin-bottom: 0;
}

.feature-item:hover {
    background: #f0f0f0;
    transform: translateX(8px);
}

.feature-icon {
    font-size: 32px;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-text {
    flex: 1;
}

.feature-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.feature-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Demo Section */
.demo {
    padding: 10px 0 100px;
    background: #ffffff;
}

.demo-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
}

.demo-tab {
    padding: 12px 24px;
    border: none;
    background: #f5f5f7;
    color: #666;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.demo-tab.active,
.demo-tab:hover {
    background: #007AFF;
    color: white;
}

.demo-content {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.demo-video {
    display: none;
    width: 100%;
}

.demo-video.active {
    display: block;
}

.demo-video video {
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* How to Use Section */
.how-to-use {
    padding: 100px 0;
    background: #f8f9fa;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.step-number {
    width: 48px;
    height: 48px;
    background: #007AFF;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.step-description {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

/* Download Section */
.download {
    padding: 100px 0;
    background: linear-gradient(135deg, #007AFF 0%, #0056CC 100%);
    color: white;
    text-align: center;
}

.download-title {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
}

.download-description {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.download-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.store-badge {
    height: 60px;
    width: auto;
}

.download-note {
    font-size: 14px;
    opacity: 0.8;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 16px;
}

.footer-description {
    color: #999;
    font-size: 16px;
}

.footer-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #007AFF;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 30px;
    text-align: center;
}

.footer-copyright {
    color: #666;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
    }
    
    .nav-links {
        gap: 20px;
    }
    
    .hero {
        min-height: 50vh;
        padding: 90px 0 10px;
    }
    
    .hero-background {
        width: 100%;
        height: 100%;
        opacity: 1;
        background-position: center top;
        background-size: cover;
    }
    
    .hero-container {
        text-align: center;
        padding: 0 16px;
    }
    
    .title-main {
        font-size: 36px;
    }
    
    .title-sub {
        font-size: 16px;
			margin-bottom: 2px;
    }
    
    .hero-description {
        font-size: 16px;
			margin-bottom: 8px;
    }
    
    .hero-content {
        text-align: center;
        margin: -75px auto 0;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: flex-start; /* 按钮左对齐 */
			 
    padding-left: 20px;       /* 向右微调，避免贴边 */
        gap: 12px;                /* 两按钮上下间距 */
    }
	    .app-store-badge {
        height: 40px;
    }
    
    .hero-buttons .btn-secondary {
        width: 120px;         /* 与App Store徽章宽度匹配 */
        max-width: 80%;       /* 再小屏时不会超出屏幕 */
        text-align: center;   /* 文字居中 */
        padding: 5px 0;      /* 上下略收一点，显得精致 */
        font-size: 12px;      /* 字体略缩小 */
    }
    
    
    .section-title {
        font-size: 32px;
    }
    
    .features-showcase {
        padding: 20px 0 60px;
    }
    
    .showcase-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .screenshots-carousel {
        height: 400px;
        order: 2;
    }
    
    .features-content {
        order: 1;
    }
    
    .feature-item {
        margin-bottom: 24px;
        padding: 20px;
    }
    
    .feature-icon {
        font-size: 28px;
        width: 40px;
        height: 40px;
    }
    
    .feature-title {
        font-size: 18px;
    }
    
    .feature-description {
        font-size: 14px;
    }
    
    .demo-tabs {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .steps {
        grid-template-columns: 1fr;
        gap: 32px;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        align-items: center;
    }
    
    .download-title {
        font-size: 32px;
    }
    
    .download-description {
        font-size: 18px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .container {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .nav-links {
        gap: 16px;
    }
    
    .nav-link {
        font-size: 14px;
    }
    
    .hero-background {
        width: 100%;
        opacity: 1;
        background-position: center center;
        background-size: contain;
    }
    
    .title-main {
        font-size: 28px;
    }
    
    .hero-description {
        font-size: 14px;
    }
    
    .btn-primary, .btn-secondary {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .feature-title {
        font-size: 20px;
    }
    
    .feature-description {
        font-size: 14px;
    }
    
    .demo-tab {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .step-title {
        font-size: 20px;
    }
    
    .step-description {
        font-size: 14px;
    }
    
    .download-title {
        font-size: 28px;
    }
    
    .download-description {
        font-size: 16px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content,
.hero-image,
.feature-card,
.screenshot-item {
    animation: fadeInUp 0.6s ease-out;
}

/* Smooth scrolling for Safari */
@supports (-webkit-appearance: none) {
    html {
        scroll-behavior: smooth;
    }
}

/* RTL Support for Arabic */
html[lang="ar"] {
    direction: rtl;
}

html[lang="ar"] .nav-container,
html[lang="ar"] .hero-container,
html[lang="ar"] .container {
    direction: rtl;
}

html[lang="ar"] .nav-links {
    flex-direction: row-reverse;
}

html[lang="ar"] .hero-buttons {
    flex-direction: row-reverse;
}

html[lang="ar"] .feature-item {
    flex-direction: row-reverse;
}

html[lang="ar"] .step {
    flex-direction: row-reverse;
}

html[lang="ar"] .footer-content {
    direction: rtl;
}

html[lang="ar"] .lang-dropdown {
    right: auto;
    left: 0;
}