/* Modern App Landing Page Styles */

:root {
    --primary-color: #007AFF;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --bg-secondary: #f5f5f7;
    --card-bg: #ffffff;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.15);
}

body {
    background-color: #fff;
    color: var(--text-primary);
}

/* Enhanced Header */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

nav {
    padding: 1rem 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.logo img {
    height: 32px !important;
    width: 32px;
    border-radius: 8px;
}

/* Modern Hero Section */
.app-hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    background: transparent; /* Override old gradient */
    color: var(--text-primary); /* Override old white text */
    text-align: left; /* Override old center */
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.app-icon-large {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    margin-bottom: 0.5rem;
}

.app-hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 700;
    background: linear-gradient(135deg, #1d1d1f 0%, #434344 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.hero-badges {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.hero-badges a {
    display: inline-block;
    transition: transform 0.2s;
}

.hero-badges a:hover {
    transform: translateY(-2px);
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-mockup {
    width: 280px;
    border-radius: 40px;
    border: 8px solid #1d1d1f;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
    background: #000;
    transform: rotate(-5deg);
    transition: transform 0.3s ease;
}

.phone-mockup:hover {
    transform: rotate(0deg) scale(1.02);
}

.phone-mockup img {
    width: 100%;
    height: auto;
    display: block;
}

/* Scrollable Screenshots */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 600;
}

.screenshots-container {
    padding: 4rem 0;
    background: var(--bg-secondary);
    overflow: hidden;
}

.screenshot-scroll {
    display: flex;
    overflow-x: auto;
    gap: 2rem;
    padding: 2rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    justify-content: center; /* Center when few items */
}

.screenshot-scroll::-webkit-scrollbar {
    display: none;
}

/* Handle overflow for many items or small screens */
@media (max-width: 1200px) {
    .screenshot-scroll {
        justify-content: flex-start;
    }
}

/* Special case for recorder page which always has many items */
.recorder-page .screenshot-scroll {
    justify-content: flex-start;
    padding-left: max(2rem, calc((100% - 1200px) / 2));
}

/* For other pages, if they have few items, they stay centered on desktop */

.screenshot-scroll::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.screenshot-card {
    flex: 0 0 auto;
    width: 280px;
    scroll-snap-align: center;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.screenshot-card:hover {
    transform: translateY(-10px);
}

.screenshot-card img {
    width: 100%;
    height: auto;
    display: block;
}

/* Modern Grid Features */
.features-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.features-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-box {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(0,0,0,0.1);
}

.feature-icon-box {
    width: 56px;
    height: 56px;
    background: var(--bg-secondary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 1.5rem;
}

.feature-box h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

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

/* Download Section Redesign */
.download-section-modern {
    background: #000;
    color: white;
    padding: 6rem 2rem;
    text-align: center;
    margin-top: 4rem;
}

.download-grid {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.download-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.1);
    max-width: 320px;
}

.qr-code-box {
    background: white;
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

.qr-code-box img {
    width: 100%;
    display: block;
}

.version-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
}

/* Responsive Adjustments */
@media (max-width: 900px) {
    .app-hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
        padding-top: 2rem;
    }
    
    .hero-content {
        align-items: center;
    }
    
    .hero-badges {
        justify-content: center;
    }
    
    .phone-mockup {
        transform: rotate(0deg);
        width: 240px;
    }
    
    .app-hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 1rem;
        gap: 10px;
    }

    .logo {
        flex: 1;
        min-width: 0; /* 允许 flex 项目缩小 */
        gap: 8px;
    }

    .logo span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 1.1rem;
    }

    .download-btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 0.5rem 1rem;
    }

    .screenshot-scroll {
        padding: 2rem 20px;
    }
    
    .download-grid {
        gap: 2rem;
    }
}