/* Main Styles */
body,
html {
    padding: 0;
    margin: 0;
    background: linear-gradient(-45deg, #1a2332, #2c3e50, #34495e, #3e5a7a, #4a6b8a);
    background-size: 300% 300%;
    animation: premiumBlueShift 12s ease-in-out infinite;
    position: relative;
    overflow-x: hidden;
}

/* 粒子容器 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 120%;
    height: 120%;
    background-image: 
        radial-gradient(3px 3px at 20px 30px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.4), transparent),
        radial-gradient(4px 4px at 90px 40px, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(255,255,255,0.3), transparent),
        radial-gradient(3px 3px at 160px 30px, rgba(255,255,255,0.25), transparent),
        radial-gradient(1px 1px at 180px 60px, rgba(255,255,255,0.35), transparent),
        radial-gradient(2px 2px at 220px 90px, rgba(255,255,255,0.3), transparent);
    background-repeat: repeat;
    background-size: 300px 200px;
    animation: floatingParticles 25s linear infinite;
    pointer-events: none;
    z-index: 1;
}

/* 添加第二层粒子效果 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 110%;
    height: 110%;
    background-image: 
        radial-gradient(1px 1px at 50px 20px, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 100px 60px, rgba(255,255,255,0.15), transparent),
        radial-gradient(1px 1px at 150px 90px, rgba(255,255,255,0.25), transparent);
    background-repeat: repeat;
    background-size: 250px 150px;
    animation: floatingParticles2 18s linear infinite reverse;
    pointer-events: none;
    z-index: 1;
}

/* 动态粒子效果 */
@keyframes floatingParticles {
    0% { transform: translateY(0px) translateX(0px); opacity: 0.8; }
    33% { transform: translateY(-120px) translateX(60px); opacity: 1; }
    66% { transform: translateY(90px) translateX(-40px); opacity: 0.7; }
    100% { transform: translateY(0px) translateX(0px); opacity: 0.8; }
}

@keyframes floatingParticles2 {
    0% { transform: translateY(0px) translateX(0px); opacity: 0.6; }
    50% { transform: translateY(-60px) translateX(30px); opacity: 0.9; }
    100% { transform: translateY(0px) translateX(0px); opacity: 0.6; }
}

/* 背景渐变动画（仅背景位移，不再使用滤镜影响内容） */
@keyframes premiumBlueShift {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 0%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}

.relative {
    position: relative;
    z-index: 2;
}

.img-max {
    width: 100%;
}

.img-max2 {
    width: 95%;
}

.absolute {
    position: absolute;
    left: 0;
    top: 0;
}

/* Animations */
@keyframes slide-top {
    0% {
        transform: translateY(20px);
    }
    100% {
        transform: translateY(0);
    }
}

.slide-top {
    animation: slide-top 1s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}

.p4 {
    animation: slide-top 1s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}

.slide-tops {
    margin-top: 74%;
    margin-left: 18%;
    width: 65%;
    animation: rotate 1s infinite linear;
}

.aa {
    margin-top: 39.5%;
    margin-left: 1%;
    width: 100%;
    animation: rotatea 7s infinite linear;
}

.sz {
    margin-left: 46%;
    width: 55%;
    animation: slideIn 2s forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes rotatea {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes scale-up-center {
    0% {
        transform: scale(0.8);
    }
    100% {
        transform: scale(1);
    }
}

.scale-up-center {
    animation: scale-up-center 0.5s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
}

@keyframes buttonAnimation {
    0% {
        -webkit-transform: scale(0.9, 0.9);
        transform: scale(0.9, 0.9);
    }
    60% {
        -webkit-transform: scale(1, 1);
        transform: scale(1, 1);
    }
}

/* Privacy and Footer Styles */
.yinsi, .yinsi2 {
    background-color: #070707;
    color: #fcfcfc;
    font-family: "Microsoft YaHei", sans-serif;
    font-size: 18px;
    line-height: 23px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.yinsi a, .yinsi2 a {
    color: #fcfcfc;
    text-decoration: none;
}

.left {
    margin-left: 5%;
    text-align: left;
    margin-top: 20px;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Button Focus Styles */
button:focus {
    outline: 2px solid #4caf50;
    outline-offset: 2px;
}

/* Button Fix Styles */
button.img-max.absolute {
    width: 100%;
    height: auto;
    min-height: 60px;
    aspect-ratio: auto;
    object-fit: contain;
    display: block;
    border: none;
    cursor: pointer;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    padding: 0;
    margin: 0;
}

/* Ensure button container maintains proper sizing */
.relative {
    position: relative;
    width: 100%;
    display: block;
}

/* Layout Styles */
body {
    max-width: 600px;
    margin: auto;
}

/* Popup Styles */
.popup {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    left: 50%;
    transform: translate(-50%, 0%);
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    max-width: 600px;
    border-radius: 10px;
}

.content {
    width: 80%;
    background-color: #34495e;
    text-align: center;
    position: relative;
    padding: 20px;
    border-radius: 15px;
}

.img1 {
    width: 80%;
    position: absolute;
    bottom: 10vw;
    left: 0;
    left: 10%;
}

.img {
    width: 100%;
}

.desc {
    width: 100%;
    color: #ffffffab;
    font-size: 16px;
    margin: 10% 0 auto;
    justify-content: center;
    text-align: center;
}

.desc a {
    color: #ffffffab;
}

/* Disabled Button Styles */
:disabled {
    background-color: gray;
    cursor: not-allowed;
}

/* Progress Bar Styles */
.progress-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 13px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-bar {
    height: 20px;
    width: 0;
    background-color: #4caf50;
    text-align: center;
    line-height: 20px;
    color: white;
    transition: width 1s;
}

/* CTA Styles */
.cta {
    background-color: #1e88e5;
    color: #fff;
    text-align: center;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

.cta a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

/* Features Styles */
.features {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.feature {
    background: #ffffff;
    padding: 20px;
    flex: 1 1 calc(100% - 40px);
    max-width: calc(33.333% - 40px);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.feature img {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
}

/* Testimonials Styles */
#testimonials {
    padding: 20px;
    border-radius: 8px;
    max-width: 1200px;
    margin: 20px auto;
    position: relative;
}

.testimonial-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding: 10px;
}

.testimonial {
    flex: 0 0 auto;
    scroll-snap-align: center;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-sizing: border-box;
    min-width: 300px;
    max-width: 400px;
}

.testimonial img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.testimonial-content {
    flex: 1;
}

.testimonial strong {
    color: #1e88e5;
}

/* Carousel Styles */
.carousel {
    position: relative;
    width: 50%;
    max-width: 600px;
    margin: auto;
    overflow: hidden;
}

.carousel-images {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-images img {
    width: 100%;
}

/* Inline Style Replacements */
.section-full-width {
    width: 100%;
    text-align: center;
}

.partners-title {
    color: #fff;
    font-size: 24px;
    padding: 20px;
    margin: auto;
    text-align: center;
}

.input-section {
    width: 100%;
    height: 70px;
    text-align: center;
}

.stock-input {
    width: 80%;
    height: 50px;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
}

.analysis-button {
    background: url('static/img/an.png') no-repeat center;
    background-size: cover;
    border: none;
    cursor: pointer;
}

.whatsapp-title {
    color: #fff;
    font-size: 30px;
    text-align: center;
}

.whatsapp-qr {
    width: 100%;
}

.fixed-bottom-button {
    position: fixed;
    width: 100%;
    bottom: 20px;
    left: 0;
    right: 0;
    z-index: 1111;
    display: flex;
    justify-content: center;
    align-items: center;
    /* background: linear-gradient(180deg, transparent, rgba(26, 35, 50, 0.7), rgba(26, 35, 50, 0.95)); */
}

.cta-link {
    width: 80%;
    max-width: 400px;
    background: linear-gradient(135deg, #2196F3, #1976D2, #0D47A1);
    background-size: 200% 200%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(33, 150, 243, 0.4),
        0 4px 16px rgba(33, 150, 243, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    letter-spacing: 1.5px;
    line-height: 1.6rem;
    text-align: center;
    color: #fff;
    display: block;
    margin: auto;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: ctaPulse 2s ease-in-out infinite;
    cursor: pointer;
}

.cta-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.cta-link:hover {
    transform: translateY(-3px) scale(1.02);
    background-position: 100% 0;
    box-shadow: 
        0 12px 48px rgba(33, 150, 243, 0.6),
        0 6px 24px rgba(33, 150, 243, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.4);
}

.cta-link:hover::before {
    left: 100%;
}

.cta-link:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 
        0 6px 24px rgba(33, 150, 243, 0.5),
        0 3px 12px rgba(33, 150, 243, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

@keyframes ctaPulse {
    0% {
        box-shadow: 
            0 8px 32px rgba(33, 150, 243, 0.4),
            0 4px 16px rgba(33, 150, 243, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.3),
            0 0 0 0 rgba(33, 150, 243, 0.7);
    }
    50% {
        box-shadow: 
            0 8px 32px rgba(33, 150, 243, 0.4),
            0 4px 16px rgba(33, 150, 243, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.3),
            0 0 0 10px rgba(33, 150, 243, 0);
    }
    100% {
        box-shadow: 
            0 8px 32px rgba(33, 150, 243, 0.4),
            0 4px 16px rgba(33, 150, 243, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.3),
            0 0 0 0 rgba(33, 150, 243, 0);
    }
}

.footer-desc {
    padding-bottom: 100px;
}

/* Media Queries */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    nav a {
        padding: 8px 10px;
        font-size: 0.9rem;
    }

    .feature {
        max-width: calc(50% - 20px);
    }
}

@media (max-width: 480px) {
    .feature {
        max-width: 85%;
    }

    .testimonial {
        flex: 0 0 auto;
        max-width: 100%;
    }

    button {
        width: 100%;
        padding: 12px;
    }
}