/* Value Stacking AI - Final Updated Custom Styles with Smooth CTA */
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&display=swap');

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

body.page-template-page-value-stacking {
    font-family: 'Kanit', sans-serif;
    background: #E7243B;
    overflow-x: hidden;
    color: #ffffff;
}

.vs-ai-container {
    width: 100%;
    min-height: 100vh;
    position: relative;
    background: #E7243B;
}

/* Enhanced Header Styles */
.vs-ai-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    z-index: 9999;
    padding: 0;
    transition: all 0.3s ease;
}

.vs-ai-header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vs-ai-logo-img {
    width: 100%;
    max-width: 100%;
    height: 87px;
    object-fit: contain;
    object-position: center center;
    transition: transform 0.3s ease;
}

.vs-ai-logo-img:hover {
    transform: scale(1.05);
}

.vs-ai-brand-text {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

/* Hero Section */
.vs-ai-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 120px; /* Account for fixed header */
}

.vs-ai-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.vs-ai-hero-bg::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 300px;
    height: 300px;
    background: url('https://jnista.com/wp-content/uploads/2025/07/line_art_white_on_transparent.png') no-repeat center;
    background-size: contain;
    opacity: 0.3;
    z-index: 1;
}

.vs-ai-hero-bg::before {
    content: '';
    position: absolute;
    bottom: 0px;
    right: 0px;
    width: 250px;
    height: 250px;
    background: url('https://jnista.com/wp-content/uploads/2025/07/a.png') center center / contain no-repeat;
    opacity: 0.7;
    z-index: 1;
    animation: vs-hero-float 6s ease-in-out infinite;
}

@keyframes vs-hero-float {
    0%, 100% { 
        transform: translateY(0px);
    }
    50% { 
        transform: translateY(-20px);
    }
}

.vs-ai-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.vs-ai-image-container {
    position: relative;
    margin-bottom: 60px;
    animation: vs-ai-float 6s ease-in-out infinite;
}

@keyframes vs-ai-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

.vs-ai-hero-image {
    width: 300px;
    height: auto;
    max-width: 100%;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.vs-ai-hero-image:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.4));
}

.vs-ai-image-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(254, 214, 56, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: vs-ai-pulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes vs-ai-pulse {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.1); }
}

.vs-ai-content-wrapper {
    animation: vs-ai-slide-up 1s ease-out 0.5s both;
    text-align: center;
    width: 100%;
}

@keyframes vs-ai-slide-up {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Updated Main Title - Pure White */
.vs-ai-main-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 30px;
    color: #ffffff;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.vs-ai-highlight {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

/* Updated Subtitle - Pure White */
.vs-ai-subtitle {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 400;
    line-height: 1.6;
    color: #ffffff;
    max-width: 700px;
    margin: 0 auto;
}

.vs-ai-subtitle strong {
    color: #ffffff;
    font-weight: 600;
}

/* Updated Scroll Arrow - Pure White */
.vs-ai-scroll-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: vs-ai-bounce-arrow 2s ease-in-out infinite;
}

.vs-ai-scroll-arrow:hover {
    transform: translateY(-5px);
}

.vs-ai-scroll-arrow svg {
    filter: brightness(0) invert(1); /* Makes SVG white */
}

.vs-ai-scroll-arrow circle,
.vs-ai-scroll-arrow path {
    stroke: #ffffff !important;
    fill: rgba(255, 255, 255, 0.1) !important;
}

.vs-ai-scroll-text {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #ffffff;
    font-weight: 500;
}

@keyframes vs-ai-bounce-arrow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Floating Elements */
.vs-ai-floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.vs-ai-float-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(254, 214, 56, 0.2), rgba(255, 127, 165, 0.2));
    animation: vs-ai-float-random 15s linear infinite;
}

.vs-ai-float-1 {
    width: 100px;
    height: 100px;
    top: 20%;
    left: 10%;
    animation-delay: -2s;
}

.vs-ai-float-2 {
    width: 60px;
    height: 60px;
    top: 60%;
    right: 15%;
    animation-delay: -5s;
}

.vs-ai-float-3 {
    width: 80px;
    height: 80px;
    bottom: 30%;
    left: 20%;
    animation-delay: -8s;
}

.vs-ai-float-triangle {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 45px solid rgba(37, 26, 247, 0.3);
    top: 40%;
    right: 10%;
    animation: vs-ai-rotate 10s linear infinite;
}

.vs-ai-float-square {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(255, 127, 165, 0.3);
    top: 80%;
    right: 30%;
    animation: vs-ai-bounce 8s ease-in-out infinite;
    transform: rotate(45deg);
}

@keyframes vs-ai-float-random {
    0%, 100% { transform: translateY(0px) translateX(0px) rotate(0deg); }
    25% { transform: translateY(-50px) translateX(30px) rotate(90deg); }
    50% { transform: translateY(-20px) translateX(-20px) rotate(180deg); }
    75% { transform: translateY(-80px) translateX(10px) rotate(270deg); }
}

@keyframes vs-ai-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes vs-ai-bounce {
    0%, 100% { transform: rotate(45deg) translateY(0px); }
    50% { transform: rotate(45deg) translateY(-30px); }
}

/* Updated Tips Section with Background Image */
.vs-ai-tips-section {
    position: relative;
    padding: 120px 0 60px 0;
    background: #E7243B;
    overflow: hidden;
}

.vs-ai-tips-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 200px;
    height: 400px;
    background: url('https://jnista.com/wp-content/uploads/2025/04/Success-Stories-background.svg') no-repeat center;
    background-size: contain;
    opacity: 0.6;
    z-index: 1;
}

.vs-ai-tips-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.vs-ai-tips-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    text-align: center;
    margin-bottom: 80px;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Updated Tips Grid - Back to Original with Background Image */
.vs-ai-tips-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.vs-ai-tip-card {
    position: relative;
    background: url('https://jnista.com/wp-content/uploads/2025/04/user-experience-bg.png') center/contain no-repeat;
    backdrop-filter: blur(20px);
    border: none;
    border-radius: 25px;
    padding: 40px;
    transition: all 0.4s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
}

.vs-ai-tip-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(254, 214, 56, 0.1), transparent);
    transition: left 0.6s ease;
}

/* Updated Tip Number with no background */
.vs-ai-tip-number {
    position: relative;
    width: 40px;
    height: 40px;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    font-weight: 700;
    color: #408aee;
    box-shadow: none;
    flex-shrink: 0;
    z-index: 2;
}

.vs-ai-tip-content {
    flex: 1;
}

/* Updated Tip Heading - Blue Color */
.vs-ai-tip-heading {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #408aee;
    line-height: 1.3;
}

.vs-ai-tip-text {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #000000;
}

/* Desktop-specific styling for tip cards */
@media (min-width: 769px) {
    .vs-ai-tip-card {
        background: url('https://jnista.com/wp-content/uploads/2025/04/user-experience-bg.png') center/contain no-repeat;
        background-size: contain;
        background-repeat: no-repeat;
    }
    
    .vs-ai-tip-card .vs-ai-tip-heading {
        color: #408aee;
    }
    
    .vs-ai-tip-card .vs-ai-tip-text {
        color: #000000;
    }
    
    .vs-ai-tip-number {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
}

/* Updated CTA Section with Smooth Container */
.vs-ai-cta-section {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
    background: #E7243B;
}

.vs-ai-cta-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200px;
    height: 260px;
    background: url('https://jnista.com/wp-content/uploads/2025/04/Success-Stories-background2.svg') no-repeat center;
    background-size: contain;
    opacity: 0.6;
    z-index: 1;
}

.vs-ai-cta-container {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 60px 20px;
}

/* Smooth CTA Container */
.vs-ai-polygon-container {
    position: relative;
    background-color: transparent;
    backdrop-filter: blur(25px);
    border: none;
    padding: 80px 60px;
    margin-bottom: 0;
    border-radius: 25px;
    
    /* Updated layout properties */
    display: flex;
    box-shadow: none !important;
    width: 100%;
    height: 610px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    
    /* Background image */
    background-image: url('https://jnista.com/wp-content/uploads/2025/07/2.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    
    transition: all 0.3s ease;
}

.vs-ai-polygon-container:hover {
    transform: translateY(-3px);
}

/* Remove animated border gradient since we're using background image */
.vs-ai-polygon-container::before {
    display: none;
}

.vs-ai-breathing-text {
    width: 100%;
    margin-bottom: -150px;
}

.vs-ai-ready-text {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 600;
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.vs-ai-breath-text {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-weight: 400;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Enhanced Button Styles */
.vs-ai-start-button,
.vs-matching-start-btn,
.vs-matching-restart-btn,
.vs-view-results-btn,
.vs-save-screenshot-btn {
    position: relative;
    background: #E7243B;
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 8px;
    padding: 16px 80px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 5px 5px 0px 0px #FED638;
    font-family: inherit;
    text-transform: none;
    text-decoration: none;
    display: inline-block;
}

/* Gray Close Button */
.vs-close-results-btn {
    position: relative;
    background: #6b7280;
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 8px;
    padding: 12px 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 5px 5px 0px 0px #FED638;
    font-family: inherit;
    margin: 8px 5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.vs-close-results-btn:hover {
    background: #4b5563;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 7px 7px 0px 0px #FED638;
}

.vs-ai-start-button:hover,
.vs-matching-start-btn:hover,
.vs-matching-restart-btn:hover,
.vs-view-results-btn:hover,
.vs-save-screenshot-btn:hover {
    background: #408aee;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 7px 7px 0px 0px #FED638;
}

/* Special styling for save screenshot button */
.vs-save-screenshot-btn {
    background: #408aee;
    padding: 12px 25px;
    font-size: 1.1rem;
    margin: 8px 5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.vs-save-screenshot-btn:hover {
    background: #FED638;
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 7px 7px 0px 0px #408aee;
}

.vs-ai-start-button:active,
.vs-matching-start-btn:active,
.vs-matching-restart-btn:active,
.vs-close-results-btn:active,
.vs-save-screenshot-btn:active {
    transform: translateY(0px);
    box-shadow: 3px 3px 0px 0px #FED638;
}

.vs-ai-btn-text {
    position: relative;
    z-index: 2;
}

/* CTA Floating Elements */
.vs-ai-cta-floating {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.vs-ai-cta-float-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(254, 214, 56, 0.1), rgba(255, 127, 165, 0.1));
    animation: vs-ai-cta-float 20s linear infinite;
}

.vs-ai-cta-float-1 {
    width: 60px;
    height: 60px;
    top: 10%;
    left: 5%;
    animation-delay: -3s;
}

.vs-ai-cta-float-2 {
    width: 40px;
    height: 40px;
    top: 70%;
    right: 10%;
    animation-delay: -8s;
}

.vs-ai-cta-float-3 {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 15%;
    animation-delay: -15s;
}

.vs-ai-cta-triangle {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 25px solid rgba(37, 26, 247, 0.15);
    top: 30%;
    right: 5%;
    animation: vs-ai-cta-triangle-rotate 15s linear infinite;
}

.vs-ai-cta-square {
    position: absolute;
    width: 25px;
    height: 25px;
    background: rgba(255, 127, 165, 0.15);
    top: 60%;
    right: 25%;
    animation: vs-ai-cta-square-bounce 12s ease-in-out infinite;
    transform: rotate(45deg);
}

@keyframes vs-ai-cta-float {
    0%, 100% { transform: translateY(0px) translateX(0px) rotate(0deg); }
    25% { transform: translateY(-30px) translateX(20px) rotate(90deg); }
    50% { transform: translateY(-10px) translateX(-15px) rotate(180deg); }
    75% { transform: translateY(-40px) translateX(10px) rotate(270deg); }
}

@keyframes vs-ai-cta-triangle-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes vs-ai-cta-square-bounce {
    0%, 100% { transform: rotate(45deg) translateY(0px); }
    50% { transform: rotate(45deg) translateY(-20px); }
}

/* Back to Top Button */
#vs-ai-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #E7243B;
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 3px 3px 0px 0px #FED638;
    z-index: 1000;
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.3s ease;
}

#vs-ai-back-to-top:hover {
    background: #251af7;
    transform: translateY(-3px);
    box-shadow: 5px 5px 0px 0px #FED638;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .vs-ai-header-container {
        padding: 15px;
    }
    
    .vs-ai-brand-text {
        font-size: 1.0rem;
    }
    
    .vs-ai-logo-img {
        height: 37px;
    }
    
    .vs-ai-hero {
        padding: 80px 0 60px 0;
    }
    
    .vs-ai-hero-image {
        width: 200px;
    }
    
    /* Mobile Hero Background */
    .vs-ai-hero-bg::after {
        width: 150px;
        height: 150px;
        opacity: 0.2;
    }
    
    .vs-ai-hero-bg::before {
        width: 120px;
        height: 120px;
        opacity: 0.5;
        animation: vs-hero-float-mobile 4s ease-in-out infinite;
    }
    
    @keyframes vs-hero-float-mobile {
        0%, 100% { 
            transform: translateY(0px);
        }
        50% { 
            transform: translateY(-15px);
        }
    }
    
    /* Mobile Tips Section Background */
    .vs-ai-tips-section::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 130px;
        height: 140px;
        background: url('https://jnista.com/wp-content/uploads/2025/04/Success-Stories-background.svg') no-repeat center;
        background-size: contain;
        opacity: 0.6;
        z-index: 1;
    }
    
    /* Mobile CTA Section Background */
    .vs-ai-cta-section::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 70px;
        height: 130px;
        background: url('https://jnista.com/wp-content/uploads/2025/04/Success-Stories-background2.svg') no-repeat center;
        background-size: contain;
        opacity: 0.6;
        z-index: 1;
    }
    
    /* Mobile Tips Grid - Stack vertically */
    .vs-ai-tips-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .vs-ai-tip-card {
        padding: 60px !important;
        background: url('https://jnista.com/wp-content/uploads/2025/04/user-experience-bg.png') center/contain no-repeat;
        border: none;
        backdrop-filter: none;
    }
    
    .vs-ai-tip-number {
        width: 40px;
        height: 40px;
        font-size: 3.5rem;
        background: transparent;
        border: none;
        color: #408aee;
    }
    
    .vs-ai-tips-section,
    .vs-ai-cta-section {
        padding: 80px 0;
    }
    
    .vs-ai-start-button {
        padding: 15px 40px;
        font-size: 1.1rem;
    }
    
    /* Mobile Polygon Container */
    .vs-ai-polygon-container {
        border-radius: 20px;
        padding: 50px 30px;
        background-size: cover;
        background-position: center;
        width: 400px;
        height: auto;
        min-height: 410px;
        margin: 0 auto;
    }
    
    .vs-ai-breathing-text {
        margin-bottom: -80px;
    }
    
    #vs-ai-back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .vs-ai-hero-image {
        width: 150px;
    }
    
    .vs-ai-tips-container,
    .vs-ai-cta-container {
        padding: 0 15px;
    }
    
    .vs-ai-start-button {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .vs-ai-tip-card {
        padding: 25px 15px;
    }
}

/* Hide on mobile - only show on screens 800px and above for game section */
@media (max-width: 799px) {
    .vs-matching-game-section {
        display: none !important;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1c1b1c;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #FED638, #ff7fa5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ff7fa5, #251af7);
}

/* ซ่อน Back to Top Button เมื่อเล่นเกม */
.vs-game-section #vs-ai-back-to-top {
    display: none !important;
}

/* ป้องกัน text selection และ zoom ใน game section */
.vs-game-section,
.vs-game-section * {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.vs-game-section {
    touch-action: manipulation !important;
}