/* Global Reset & Base Styles */
:root {
    --tesla-red: #E82127;
    --tesla-dark: #111111;
    --tesla-black: #000000;
    --text-primary: #FFFFFF;
    --text-secondary: #8E8E93;
    --font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Noto Sans SC", sans-serif;
    --max-width: 1200px;
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--tesla-black);
    color: var(--text-primary);
    font-family: var(--font-stack);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.8;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

p {
    color: var(--text-secondary);
}

/* Layout Utilities */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 120px 0;
}

/* Header */
header {
    padding: 24px 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.logo {
    height: 48px;
    width: auto;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-text {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}


/* Hero Section */
.hero {
    padding-top: 180px;
    padding-bottom: 80px;
    text-align: center;
    background: radial-gradient(circle at 50% 20%, #1a1a1a 0%, #000000 70%);
}

.hero h1 {
    font-size: 56px;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(180deg, #FFFFFF 0%, #E0E0E0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p.subtitle {
    font-size: 20px;
    max-width: 600px;
    margin: 0 auto 40px;
    color: var(--text-secondary);
}

.app-store-button {
    display: inline-block;
    background: #FFFFFF;
    color: #000;
    padding: 12px 24px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease;
}

.app-store-button:hover {
    transform: scale(1.05);
    opacity: 1;
}


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

.nav-links a {
    margin-left: 32px;
    font-size: 14px;
    font-weight: 500;
}

.app-store-button-small {
    background: #FFFFFF;
    color: #000;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.app-store-button-small:hover {
    transform: scale(1.05);
    opacity: 1;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.app-store-button svg {
    width: 20px;
    height: 20px;
}

.hero-image-container {
    margin-top: 60px;
    position: relative;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.hero-image-container img {
    border-radius: 32px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 80px rgba(232, 33, 39, 0.15);
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 40px rgba(232, 33, 39, 0.2));
}

/* Features Grid */
.feature-visual {
    flex: 1;
}

.feature-img {
    width: 100%;
    height: auto;
    border-radius: 24px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(255, 255, 255, 0.05);
    display: block;
}

/* Portrait phone screenshot styling */
.feature-img-phone {
    max-height: 600px;
    width: auto;
    max-width: 100%;
    border-radius: 24px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 255, 255, 0.05);
    display: block;
    margin: 0 auto;
}

.feature-visual-phone {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
    align-items: center;
}

.feature-item {
    padding: 40px 0;
}

.feature-item img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-text h3 {
    font-size: 32px;
    margin-bottom: 16px;
    color: #fff;
}

.feature-text p {
    font-size: 18px;
    line-height: 1.6;
}

.reverse .feature-text {
    order: 2;
}

.reverse .feature-visual {
    order: 1;
}

/* FAQ Section */
.faq-grid {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.faq-item:hover {
    border-color: #555;
}

.faq-item summary {
    padding: 24px;
    cursor: pointer;
    font-weight: 600;
    font-size: 18px;
    list-style: none;
    position: relative;
    padding-right: 50px;
}

/* Custom indicator */
.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    font-weight: 300;
    transition: transform 0.2s;
}

.faq-item[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-item p {
    padding: 0 24px 24px;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer */
footer {
    padding: 80px 0 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: var(--text-secondary);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
}

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

.copyright {
    margin-top: 40px;
    opacity: 0.6;
}

.beian-info {
    margin-top: 24px;
}

.beian-info a {
    color: var(--text-secondary);
    font-size: 12px;
}

.beian-info a:hover {
    color: var(--text-primary);
}

/* Fixed mobile download button */
.mobile-download-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.mobile-download-bar .app-store-button {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
}

/* Legal Pages */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 160px 24px 80px;
}

.legal-content h1 {
    color: #fff;
    margin-bottom: 24px;
}

.legal-content h2 {
    color: #fff;
    margin-top: 40px;
    margin-bottom: 16px;
}

.legal-content p,
.legal-content ul {
    color: #ccc;
    margin-bottom: 16px;
}

.legal-content ul {
    padding-left: 24px;
}

.legal-content li {
    margin-bottom: 8px;
}

/* Support Page */
.support-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
}

.support-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.support-card h1 {
    font-size: 32px;
    margin-bottom: 16px;
    background: linear-gradient(180deg, #FFFFFF 0%, #E0E0E0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.support-card p {
    font-size: 16px;
    color: #8E8E93;
    margin-bottom: 32px;
}

.email-box {
    background: #000;
    border: 1px solid #333;
    padding: 16px;
    border-radius: 12px;
    font-family: monospace;
    font-size: 16px;
    color: #fff;
    margin-bottom: 24px;
    user-select: all;
    cursor: pointer;
    transition: border-color 0.2s;
}

.email-box:hover {
    border-color: #555;
}

.note {
    font-size: 13px;
    color: #555;
}

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

    /* Show mobile download bar */
    .mobile-download-bar {
        display: block;
    }

    /* Hide download button in header on mobile */
    .nav-links .app-store-button-small {
        display: none;
    }

    /* Compact header */
    header {
        padding: 16px 0;
    }

    .logo {
        height: 40px;
    }

    .brand-text {
        font-size: 18px;
    }

    .nav-links a {
        margin-left: 20px;
        font-size: 13px;
    }

    /* Hero section adjustments */
    .hero {
        padding-top: 120px;
        padding-bottom: 60px;
    }

    .hero h1 {
        font-size: 32px;
        margin-bottom: 16px;
    }

    .hero p.subtitle {
        font-size: 16px;
        margin-bottom: 30px;
    }

    /* Hide hero download button (use sticky bar instead) */
    .hero .app-store-button {
        display: none;
    }

    /* Features section */
    .section {
        padding: 80px 0;
    }

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

    .feature-text h3 {
        font-size: 26px;
        margin-bottom: 12px;
    }

    .feature-text p {
        font-size: 16px;
    }

    .reverse .feature-text {
        order: 1;
    }

    .reverse .feature-visual,
    .reverse .feature-visual-phone {
        order: 2;
    }

    .feature-img-phone {
        max-height: 450px;
    }

    .feature-grid+.feature-grid,
    .feature-grid[style*="margin-top"] {
        margin-top: 80px !important;
    }

    /* FAQ section */
    .faq h2 {
        font-size: 32px !important;
        margin-bottom: 40px !important;
    }

    .faq-item summary {
        padding: 18px;
        font-size: 16px;
        padding-right: 45px;
    }

    .faq-item p {
        padding: 0 18px 18px;
        font-size: 14px;
    }

    /* Footer */
    footer {
        padding: 60px 0 100px;
        /* Extra bottom padding for sticky bar */
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-links {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }

    .feature-img-phone {
        max-height: 380px;
        border-radius: 16px;
        border-width: 1.5px;
    }

    .feature-text h3 {
        font-size: 22px;
    }

    .container {
        padding: 0 16px;
    }
}