/* --- China-friendly Fonts & Variables --- */
@import url('https://fonts.loli.net/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap');

:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --bg-light: #f4f7f6;
    --bg-white: #ffffff;
    --text-dark: #333;
    --text-light: #555;
    --border-color: #e0e0e0;
    --header-height: 70px;
}

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

/* html {
    scroll-behavior: smooth;
} */

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

body:not(.homepage) {
    padding-top: var(--header-height);
}

body.sub-page {
    padding-top: 0;
}

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

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

a {
    text-decoration: none;
    color: var(--primary-color);
}

ul {
    list-style: none;
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.section-subtitle {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 50px;
    color: var(--text-light);
}

/* --- Header & Navigation --- */
.header {
    background-color: var(--bg-white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: background-color 0.4s, box-shadow 0.4s;
}

body.sub-page .header {
    position: static;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    flex-shrink: 0;
    transition: color 0.4s;
}

.logo img {
    border-radius: 8px;
}

.nav-menu {
    margin-left: auto;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-link {
    color: var(--text-light);
    font-weight: 500;
    padding: 5px;
    transition: color 0.4s;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active-link {
    color: var(--primary-color);
    font-weight: 700;
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: block;
    position: absolute;
    top: 100%;
    left: 50%;
    background-color: var(--bg-white);
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 10px 0;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    transform: translateX(-50%) translateY(10px);
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.dropdown-content a {
    display: block;
    padding: 10px 20px;
    color: var(--text-dark);
}

.dropdown-content a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--secondary-color);
    margin-left: 20px;
    transition: color 0.4s;
}

/* Dynamic Header Styles for Homepage */
body.homepage .header {
    background-color: transparent;
    box-shadow: none;
    transition: background-color 0.3s ease-out, box-shadow 0.3s ease-out;
}

body.homepage .header .logo,
body.homepage .header .nav-link,
body.homepage .header .nav-toggle {
    color: var(--bg-white);
    transition: color 0.3s ease;
}

body.homepage .header .nav-link:hover {
    color: var(--bg-white);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* 滚动后的 header 样式：背景变白，文字变深 */
body.homepage .header.scrolled {
    background-color: var(--bg-white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

body.homepage .header.scrolled .logo,
body.homepage .header.scrolled .nav-toggle {
    color: var(--secondary-color);
}

body.homepage .header.scrolled .nav-link {
    color: var(--text-light);
}

body.homepage .header.scrolled .nav-link:hover,
body.homepage .header.scrolled .nav-link.active-link {
    color: var(--primary-color);
    text-shadow: none;
}


/* --- Hero Section --- */
.hero {
    position: relative;
    height: 90vh;
    min-height: 600px;
    display: flex;
    padding-top: 90px;
    align-items: center;
    justify-content: center;
    color: var(--bg-white);
    background: url('https://images.unsplash.com/photo-1554224155-8d04cb21cd6c?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w1MDc5M3wwfDF8c2VhcmNofDIyfHx0ZWNobm9sb2d5JTIwYWJzdHJhY3R8ZW58MHx8fHwxNzE4MDk5OTQ5fDA&ixlib=rb-4.0.3&q=80&w=1920') no-repeat center center/cover;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(44, 62, 80, 0.6);
    z-index: 1;
    /* This is the key change for the blur effect */
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.hero-container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 3.2rem;
    line-height: 1.3;
    color: var(--bg-white);
}

.hero-text p {
    font-size: 1.2rem;
    margin: 20px 0 30px;
    opacity: 0.9;
}

.download-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.download-btn {
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    gap: 10px;
    transition: transform 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.download-btn:hover {
    transform: translateY(-3px);
    background-color: rgba(0, 0, 0, 0.9);
}

.download-btn .btn-icon {
    width: 25px;
    height: 25px;
    flex-shrink: 0;
}

.download-btn div {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.2;
}

.download-btn span {
    font-size: 0.75rem;
}

.download-btn strong {
    font-size: 1.1rem;
}

/* --- Download Button Specific Colors --- */
.download-btn.app-store-btn {
    background-color: rgba(10, 10, 10, 0.8); /* Apple's vibrant blue */
}

.download-btn.google-play-btn {
    background-color: rgba(10, 10, 10, 0.8); /* Pure black with opacity */
}

.download-btn.app-gallery-btn {
    background-color: rgba(188, 0, 42, 0.8); /* A deeper, more premium Huawei Red */
}

/* Hover effects for the buttons */
.download-btn.app-store-btn:hover {
    background-color: rgba(10, 10, 10, 1);
}

.download-btn.google-play-btn:hover {
    background-color: rgba(10, 10, 10, 1);
}

.download-btn.app-gallery-btn:hover {
    background-color: rgba(188, 0, 42, 1);
}

/* Changed: Stacked Phone Mockup Styles */
.hero-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}
.phone-stack {
    position: relative;
    width: 420px; /* Increased width to contain both phones comfortably */
    height: 570px;
    transition: transform 0.4s ease;
}
.phone-stack:hover {
    transform: scale(1.02);
}
.phone-mockup {
    position: absolute;
    width: 280px;
    height: 570px;
    background: #111;
    border-radius: 35px; /* Adjusted border radius */
    padding: 10px;      /* Thinner border */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    transition: transform 0.4s ease;
    will-change: transform;
}
.app-screenshot {
    width: 100%;
    height: 100%;
    border-radius: 25px; /* Adjusted inner radius */
    object-fit: cover;
}
.phone-main {
    z-index: 2;
    top: 0;
    left: 0;
}
.phone-secondary {
    z-index: 1;
    top: 0;
    left: 185px; /* Adjusted left position for 1/3 overlap */
    transform: scale(0.85) translateY(20px); /* Adjusted scale and rotation */
}
.phone-stack:hover .phone-main {
    transform: translateX(-10px) rotate(-2deg);
}
.phone-stack:hover .phone-secondary {
    transform: translateX(10px) rotate(6deg) scale(0.85) translateY(20px);
}

/* --- Features Section --- */
.features {
    background-color: var(--bg-light);
}

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

.feature-card {
    text-align: center;
    padding: 20px;
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* --- UI Showcase Section --- */
.showcase {
    background-color: var(--bg-white);
}

.showcase-container {
    position: relative;
    overflow: hidden;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 12px;
}

.showcase-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.showcase-slide {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    gap: 40px;
    background-color: var(--bg-light);
}

.showcase-image {
    flex: 1;
}

.showcase-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.showcase-text {
    flex: 1;
    padding: 40px;
}

.showcase-text h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.showcase-text p {
    color: var(--text-light);
}

.showcase-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    color: var(--secondary-color);
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    z-index: 10;
}

.showcase-nav:hover {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

.showcase-nav.prev {
    left: 20px;
}

.showcase-nav.next {
    right: 20px;
}

/* --- Testimonials Section --- */
.testimonials {
    background: var(--bg-light);
}

.testimonials-wrapper {
    position: relative;
    padding: 0 40px;
}

.testimonials-container {
    display: flex;
    overflow-x: auto;
    gap: 30px;
    padding: 20px;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.testimonials-container::-webkit-scrollbar {
    display: none;
}

.testimonial-card {
    flex: 0 0 320px;
    background-color: var(--bg-white);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 3px solid var(--primary-color);
}

.comment {
    font-style: italic;
    color: var(--text-light);
}

.rating {
    color: #f39c12;
    margin: 15px 0;
    font-size: 1.2rem;
}

.author {
    font-weight: 500;
}

.testimonial-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

.testimonial-nav:hover {
    background-color: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

.testimonial-nav.prev {
    left: 0;
}

.testimonial-nav.next {
    right: 0;
}

/* --- Pricing Section --- */
.pricing {
    background-color: var(--bg-white);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: center;
}

.pricing-card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.pricing-card.popular {
    transform: scale(1.05);
    border: 2px solid var(--primary-color);
    background: var(--bg-white);
}

.price {
    font-size: 2rem;
    margin: 20px 0;
}

.price span {
    font-weight: bold;
}

.pricing-card ul {
    text-align: left;
    margin: 30px 0;
}

.pricing-card ul li {
    margin-bottom: 10px;
}

.pricing-card ul li i {
    color: var(--primary-color);
    margin-right: 10px;
}

.pricing-card ul li i.fa-times {
    color: #ccc;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 5px;
    font-weight: 500;
}

.btn:hover {
    background: #2980b9;
}

/* --- FAQ Section --- */
.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 25px;
}

.faq-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background-color: var(--bg-white);
    border-radius: 8px;
    margin-bottom: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 18px 20px;
    background: none;
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--secondary-color);
}

.faq-question i {
    transition: transform 0.3s;
    flex-shrink: 0;
    margin-left: 15px;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.faq-answer p {
    padding: 0 20px 20px 20px;
    color: var(--text-light);
    border-top: 1px solid var(--bg-light);
    padding-top: 15px;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

/* --- Policy & Contact Page Specific Styles --- */
.policy-container {
    max-width: 960px;
    background-color: var(--bg-white);
    padding: 50px 60px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    margin: 0 auto;
}

.policy-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-align: left;
}

.policy-update-date {
    color: var(--text-light);
    margin-bottom: 30px;
    font-style: italic;
}

.policy-container h2 {
    font-size: 1.8rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--secondary-color);
    text-align: left;
    border-bottom: 2px solid var(--bg-light);
    padding-bottom: 5px;
}

.policy-container h3 {
    font-size: 1.3rem;
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.policy-container p,
.policy-container li {
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 10px;
}

.policy-container ul {
    list-style: disc;
    padding-left: 20px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.contact-card {
    background-color: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s;
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.contact-card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.contact-card p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.qr-code {
    margin: 10px auto 0;
    display: block;
}

.contact-link {
    font-weight: 500;
    font-size: 1.1rem;
}

.capabilities-section {
    background-color: var(--bg-white);
}

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.capability-card {
    text-align: center;
    padding: 30px;
}

.capability-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.capability-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.capability-card p {
    color: var(--text-light);
}

/* --- Footer --- */
.footer {
    background: var(--secondary-color);
    color: #ccc;
    padding: 60px 0 20px;
}

.footer-container {
    display: flex;
    flex-direction: column;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    width: 100%;
}

.footer-column .logo {
    margin-bottom: 15px;
}

.footer-tagline {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #aaa;
}

.footer-title {
    font-size: 1.2rem;
    color: var(--bg-white);
    margin-bottom: 20px;
    font-weight: 500;
}

.footer-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-link {
    color: #ccc;
    transition: color 0.3s, padding-left 0.3s;
}

.footer-link:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 40px;
    margin-top: 40px;
    border-top: 1px solid #4a4a4a;
}

.copyright {
    font-size: 0.9rem;
}

.icp-link {
    color: #ccc;
    margin-left: 10px;
    text-decoration: none;
}

.icp-link:hover {
    color: var(--primary-color);
}

.footer-social a {
    color: #ccc;
    font-size: 1.5rem;
    margin-left: 20px;
    transition: color 0.3s;
}

.footer-social a:hover {
    color: var(--primary-color);
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .nav-list {
        gap: 25px;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 60%;
        max-width: 300px;
        height: 100%;
        background-color: var(--bg-white);
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
        padding: 40px;
        transition: right 0.4s ease-in-out;
    }

    .nav-menu.show-menu {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
        justify-content: flex-start;
        width: auto;
    }

    .dropdown {
        padding-bottom: 0;
        margin-bottom: 0;
        width: 100%;
    }

    .dropdown:hover .dropdown-content {
        display: none;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        padding-left: 15px;
        background-color: transparent;
        display: none;
    }

    .dropdown.mobile-active .dropdown-content {
        display: block;
    }

    .nav-toggle {
        display: block;
    }

    .showcase-slide {
        flex-direction: column;
        text-align: center;
    }

    .hero-text { max-width: 100%; text-align: center; }
    .download-buttons { justify-content: center; }
    .hero-image-wrapper { display: none; }

    /* --- ADD THESE NEW LINES HERE --- */
    body.homepage .nav-menu.show-menu .nav-link {
        color: var(--text-light);
    }

    body.homepage .nav-menu.show-menu .nav-link:hover,
    body.homepage .nav-menu.show-menu .nav-link.active-link {
        color: var(--primary-color);
    }
    
    body.homepage .header .nav-toggle.active {
        color: var(--secondary-color);
    }
    /* --- END OF NEW LINES --- */
}

@media (max-width: 820px) {
    body.homepage {
        padding-top: 0;
    }

    .hero {
        height: auto;
        padding-top: calc(var(--header-height) + 40px);
        padding-bottom: 60px;
    }

    .hero-container {
        flex-direction: column;
    }

    .hero-text {
        order: 1;
        margin-bottom: 40px;
    }

    .hero-image {
        order: 2;
    }

    /* Changed: This is the key change for mobile view */
    .hero-image-wrapper {
        order: 2;
        height: 410px; /* Reduced height for mobile */
        width: 100%;
        display: flex;
        margin-top: 40px;
    }
    .phone-stack {
        width: 300px; /* Reduced container width */
        height: 410px; /* Match wrapper height */
    }
    .phone-mockup {
        width: 200px; /* Smaller phone width */
        height: 410px; /* Smaller phone height */
        border-radius: 25px;
        padding: 8px;
    }
    .app-screenshot {
        border-radius: 17px;
    }
    .phone-secondary {
        left: 130px; /* Adjust overlap position */
        transform: scale(0.85) translateY(15px) rotate(4deg);
    }

    .download-buttons {
        justify-content: center;
    }

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

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        text-align: center;
    }

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

    .footer-bottom {
        flex-direction: column-reverse;
        gap: 20px;
    }

    .testimonial-nav {
        display: none;
    }

    .testimonials-wrapper {
        padding: 0;
    }

    .showcase-text {
        padding: 20px;
    }

    .showcase-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .showcase-nav.prev {
        left: 10px;
    }

    .showcase-nav.next {
        right: 10px;
    }

    .policy-container {
        padding: 30px 20px;
    }
}