* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; */
}

body {
    background-color: #ffffff;
    color: #000000;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
}

.gray-bg {
    background-color: #e9e9e9;
}

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

section {
    padding: 60px 0;
}

.header {
    display: flex;
    justify-content: space-between;
    padding: 20px 30px;
    align-items: center;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
    color: #373b67; 
}

.logo-icon {
    width: 40px;
    height: 40px;
    border: 2px solid #333;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-selector {
    padding: 8px 16px;
    border-radius: 20px;
    background: #f5f5f5;
    cursor: pointer;
    position: absolute;
    right: 30px;
    top: 20px;
}

.borderless-select {
    border: none;
    outline: none; /* Remove outline when focused */
    background: #f5f5f5;
}

.hero-section {
    /* padding: 20px; */
}

.hero-content {
    display: flex;
    width: 100%;
}
.hero-text {
    width: 50%;
    /* padding: 20px; */
}
.tagline {
    font-size: 2.5rem;
    line-height: 1.5;
    margin-top: 20px;
}
.hero-text-2 {
    font-style: italic;      /* Đặt chữ nghiêng */
    font-weight: bold;       /* Đặt chữ đậm */
    margin-top: 30px;
    font-size: 19px;
}

.hero-text-3 {
    font-size: 1em;
    line-height: 1.2;
    color: gray;
    font-family: 'Montserrat', sans-serif;
    padding-right: 40px;
    margin-top: 10px;
}

.how_it_works {
    margin-top: 60px;
}


.hero-img {
    margin-top: 100px;
    margin-left: 30px;
    width: 60%;
    position: relative;
}

.hero-img-image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s;
    object-fit: contain; /* Đảm bảo giữ tỷ lệ của ảnh */
}

.hero-img-image.active {
    opacity: 1;
}

.download {
    font-weight: bold;
    margin-top: 50px;
    font-size: 19px;

}

.horizontal {
    display: flex;
    gap: 20px;
}

.store-buttons {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    margin-bottom: 50px;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
    position: relative;
}

.store-button {
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
    width: 220px;
    flex: 0 0 220px; /* Fixed width, no grow, no shrink */
    position: relative;
    overflow: hidden;
}

.store-button:hover {
    transform: translateY(-2px);
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.6);
}

.store-button:active {
    transform: translateY(1px);
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.4);
}

.store-button svg {
    flex-shrink: 0;
}

.store-button div {
    line-height: 1.3;
}

.store-button strong {
    font-size: 14px;
}

.store-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.microsoft-store, .mac-store {
    order: 1; /* Items with lower order values appear first */
}

.ios-store {
    order: 2; /* Higher order value means it appears later */
    margin-top: 15px;
    margin-left: 0;
    position: static;
    transform: none;
    left: auto;
    clear: left; /* Ensure it starts on a new line */
}

.strong {
    font-weight: bold;
}

.section-title {
    text-align: center;
    font-size: 2em;
    padding-bottom: 20px;
    padding-top: 40px;
    font-weight: bold;
    text-transform: uppercase;
}

.features-grid {
    display: grid;
    grid-template-columns: 30% 70%;
    gap: 40px;
    text-align: center;
    margin-top: 100px;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
    margin-top: 100px;
}

.feature-img {
    width: 70%;
}

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

.feature-card h3 {
    margin-top: 15px;
    margin-bottom: 15px;
    font-size: 1.3em;
    font-family: 'Open Sans', sans-serif;
}
.feature-card p {
    padding-left: 12%;
    padding-right: 12%;
    text-align: center;
}

.feature-card-img {
    /* width: 140%;
    margin-left: -20%; */
    object-fit: contain; /* Đảm bảo giữ tỷ lệ của ảnh */
}

.advantages {
    margin-top: 30px;
}
.advantages-title {
    /* padding-top: 40px; */
}
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 40px 0;
}

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



.why-it-works {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.features-list {
    list-style: none;
}

.features-list li {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.feature-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
    margin: 40px 0;
    margin-bottom:80px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.step-icon {
    width: 64px;
    height: 64px;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.experience-description {

}

.footer {
    background: #f5f5f5;
    padding: 60px 0 40px;
    margin-top: 10px;
    color: #333;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

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

.footer-brand-text h3 {
    margin: 0 0 5px;
    color: #373b67;
    font-size: 18px;
}

.footer-brand-text p {
    margin: 0 0 10px;
    color: #666;
    font-size: 14px;
}

.copyright {
    font-size: 12px;
    color: #888;
}

.footer-links h4 {
    margin-bottom: 15px;
    color: #373b67;
    font-size: 16px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
    display: inline-block;
}

.footer-links a:hover {
    color: #373b67;
}

.social-link, .support-link {
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-link svg, .support-link svg {
    flex-shrink: 0;
}

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

.footer-bottom p {
    color: #666;
    font-size: 14px;
    max-width: 800px;
    margin: 0 auto 20px;
    line-height: 1.5;
}

.footer-bottom-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}

.footer-bottom-links a {
    color: #666;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-bottom-links a:hover {
    color: #373b67;
}

.separator {
    color: #ccc;
}

.footer-logo {
    width: 40px;
}

.placeholder-image {
    /* background: #f5f5f5; */
    border-radius: 8px;
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* color: #666; */
}

.placeholder-view {
    background: #f5f5f5;
    border-radius: 8px;
    width: 100%;
    height: 300px;
    align-items: center;
    justify-content: center;
    color: #666;
    padding: 16px;
    padding-top: 80px;
}

.footer-img {
    position: relative;
}

.footer-img-image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 80px;
    opacity: 0;
    transition: opacity 1s;
    object-fit: contain; /* Đảm bảo giữ tỷ lệ của ảnh */
}

.footer-img-image.active {
    opacity: 1;
}

@media (max-width: 768px) {
    .container {
        padding: 16px 20px;
    }
    
    .hero-content {
        flex-direction: column;
    }
    
    .hero-text {
        width: 100%;
    }
    
    .hero-img {
        width: 100%;
        margin-left: 0;
        margin-top: 40px;
    }
    
    .store-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: center;
    }
    
    .store-button {
        padding: 8px 15px;
        gap: 8px;
        width: 170px;
        flex: 0 0 170px;
        font-size: 12px;
        justify-content: flex-start;
    }
    
    .store-button svg {
        width: 20px;
        height: 20px;
    }
    
    .store-button div {
        font-size: 12px;
        white-space: nowrap;
    }
    
    .store-button strong {
        font-size: 11px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        text-align: center;
        margin-top: 60px;
        gap: 20px;
    }
    
    .feature-card-img {
        width: 100%;
        margin: 0 auto;
    }
    
    .section-title {
        font-size: 1.5em;
    }
    
    .tagline {
        font-size: 1.8rem;
    }
    
    .advantages-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .feature-card h3 {
        font-size: 1.2em;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .steps {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .why-it-works {
        grid-template-columns: 1fr;
    }
    
    .store-button, 
    .feature-card,
    .footer-links a,
    .language-selector,
    .premium-button {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }
    
    /* Fix potential text overflow issues */
    p, h1, h2, h3, h4, h5, h6 {
        overflow-wrap: break-word;
        word-wrap: break-word;
        -ms-word-break: break-all;
        word-break: break-word;
        -ms-hyphens: auto;
        -moz-hyphens: auto;
        -webkit-hyphens: auto;
        hyphens: auto;
    }
    
    /* Improve font rendering on mobile */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
    }
    
    /* Smoother scrolling for iOS */
    html {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Mobile-specific touch effects */
    .store-button:active {
        opacity: 0.8;
        transform: scale(0.98);
    }
    
    /* More visible focus for accessibility */
    .store-button:focus {
        outline: 2px solid rgba(255, 255, 255, 0.3);
        outline-offset: 2px;
    }
}

@media (max-width: 480px) {
    .store-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        gap: 10px;
    }
    
    .microsoft-store, .mac-store {
        margin-bottom: 15px;
        width: 45%;
        max-width: 160px;
        flex: 0 0 auto;
        gap: 10px;
        padding: 10px 15px;
        justify-content: flex-start;
        min-height: 54px;
        display: flex;
        align-items: center;
        border-radius: 12px;
        position: relative;
        order: 1;
    }
    
    .ios-store {
        margin-bottom: 15px;
        width: 60%;
        max-width: 200px;
        flex: 0 0 auto;
        gap: 15px;
        padding: 10px 15px;
        justify-content: flex-start;
        min-height: 54px;
        display: flex;
        align-items: center;
        border-radius: 12px;
        position: relative;
        order: 2;
        clear: both;
    }
    
    .store-button div {
        line-height: 1.2;
        flex: 1;
        text-align: left;
    }
    
    .store-button strong {
        display: block;
        margin-top: 1px;
    }
    
    .store-button svg {
        margin-right: 5px;
    }
    
    .store-button:active {
        opacity: 0.8;
        transform: scale(0.98);
    }
    
    .store-button:focus {
        outline: 2px solid rgba(255, 255, 255, 0.3);
        outline-offset: 2px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-brand {
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }
    
    .logo-icon {
        margin-bottom: 0 !important;
    }
    
    .footer-bottom-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .separator {
        display: none;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .store-buttons {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 10px;
    }
    
    .store-button {
        padding: 10px 15px;
        gap: 10px;
        width: 180px;
        flex: 0 0 180px;
    }
    
    .store-button.ios-store {
        margin-top: 15px;
        margin-left: 0;
        position: static;
        transform: none;
        left: auto;
    }
    
    .horizontal {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (min-width: 1025px) {
    .store-button {
        width: 220px;
        flex: 0 0 220px;
        padding: 12px 20px;
    }
}

.premium-button {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #000;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: absolute;
    right: 180px;
    top: 20px;
}

.premium-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.vi-only {
    display: none;
}

.mac-store {
    background: #f5f5f5;
    color: #333;
}

.ios-store {
    background: #000000;
    color: white;
}

.microsoft-store {
    background: #5C2D91;
    color: white;
}

/* iPhone 16 specific (390px width) */
@media (max-width: 430px) {
    .header {
        padding: 15px;
    }
    
    .language-selector {
        right: 15px;
        top: 15px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .tagline {
        font-size: 1.5rem;
        margin-top: 15px;
        line-height: 1.3;
    }
    
    .hero-text-2 {
        font-size: 16px;
        margin-top: 20px;
    }
    
    .hero-text-3 {
        font-size: 14px;
        padding-right: 0;
    }
    
    .download {
        margin-top: 30px;
    }
    
    .store-button {
        width: 160px;
        flex: 0 0 160px;
        padding: 8px 12px;
    }
    
    .store-buttons {
        gap: 10px;
    }
    
    .why-it-works {
        grid-template-columns: 1fr;
    }

    .footer-img-image {
        position: relative;
        left: 0;
    }
    
    .features-list li {
        gap: 10px;
    }

    .horizontal {
        flex-direction: column;
        align-items: center;
    }
    
    section {
        padding: 40px 0;
    }
    
    .microsoft-store, .mac-store {
        padding: 8px 12px;
        min-height: 50px;
        width: 42%;
        /* max-width: 150px; */
    }
    
    .ios-store {
        padding: 8px 15px;
        min-height: 50px;
        width: 60%;
        max-width: 180px;
        margin-top: 10px;
    }
    
    .store-button svg {
        width: 20px;
        height: 20px;
    }
    
    .store-button div {
        font-size: 12px;
        line-height: 1.2;
    }
    
    .store-button strong {
        font-size: 13px;
        margin-top: 0;
    }
    
    .microsoft-store svg, .mac-store svg {
        width: 18px;
        height: 18px;
    }
    
    .ios-store svg {
        width: 20px;
        height: 20px;
    }
    
    .microsoft-store div, .mac-store div {
        font-size: 12px;
        line-height: 1.2;
    }
    
    .ios-store div {
        font-size: 13px;
        line-height: 1.2;
    }
    
    .microsoft-store strong, .mac-store strong {
        font-size: 11px;
        margin-top: 0;
    }
    
    .ios-store strong {
        font-size: 12px;
        margin-top: 0;
    }
}

/* iPhone 16 Pro Max specific (430px width) */
@media (min-width: 431px) and (max-width: 480px) {
    .header {
        padding: 15px;
    }
    
    .language-selector {
        right: 15px;
        top: 15px;
    }
    
    .tagline {
        font-size: 1.7rem;
    }
    
    .store-button {
        width: 185px;
        flex: 0 0 185px;
    }
    
    .download {
        margin-top: 35px;
    }
    
    .why-it-works {
        grid-template-columns: 1fr;
    }

    .footer-img-image {
        position: relative;
        left: 0;
    }
}

/* Extra small device fixes */
@media (max-width: 360px) {
    .store-button {
        width: 140px;
        flex: 0 0 140px;
        padding: 6px 10px;
        gap: 6px;
    }
    
    .tagline {
        font-size: 1.4rem;
    }
    
    .hero-text-2 {
        font-size: 14px;
    }
    
    .section-title {
        font-size: 1.3em;
    }
    
    .microsoft-store, .mac-store {
        min-height: 45px;
        width: 45%;
        max-width: 140px;
        padding: 7px 10px;
        gap: 8px;
    }
    
    .ios-store {
        min-height: 45px;
        width: 70%;
        max-width: 160px;
        padding: 7px 12px;
        margin-top: 10px;
    }
    
    .store-button svg {
        width: 18px;
        height: 18px;
    }
    
    .store-button div {
        font-size: 13px;
        line-height: 1.1;
    }
    
    .store-button strong {
        font-size: 12px;
    }
    
    .microsoft-store svg, .mac-store svg {
        width: 16px;
        height: 16px;
    }
    
    .ios-store svg {
        width: 18px;
        height: 18px;
    }
    
    .microsoft-store div, .mac-store div {
        font-size: 11px;
        line-height: 1.1;
    }
    
    .ios-store div {
        font-size: 12px;
        line-height: 1.1;
    }
    
    .microsoft-store strong, .mac-store strong {
        font-size: 10px;
    }
    
    .ios-store strong {
        font-size: 11px;
    }
}

/* Fix meta viewport for better mobile display */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
    }
}

/* Fix iOS specific issues */
@supports (-webkit-touch-callout: none) {
    .store-buttons {
        /* Fix for Safari padding/margin issues */
        display: -webkit-box;
        display: -webkit-flex;
        display: flex;
        -webkit-flex-wrap: wrap;
        flex-wrap: wrap;
    }
    
    /* Fix button appearance on iOS */
    .store-button {
        -webkit-appearance: none;
        appearance: none;
    }
    
    /* iOS-specific button tweaks for better appearance */
    @media (max-width: 480px) {
        .microsoft-store, .mac-store, .ios-store {
            /* Slightly more pronounced shadow for iOS */
            box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.6);
        }
    }
}