* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8f9ff;
    color: #333;
}

/* 轮播图样式 */
.carousel-container {
    position: relative;
    width: 100%;
    /* height: 180px; 移除固定高度 */
    overflow: hidden;
    background: #2d67f3;
}

.carousel {
    display: flex;
    width: 300%; /* 默认3张图的宽度，JavaScript会动态调整 */
    height: 100%;
    /* animation: slide 9s infinite; 移除自动动画，改为手动控制 */
    transition: transform 0.3s ease;
    transform: translateX(0%);
}

.carousel-item {
    width: 33.333%; /* 默认值，JavaScript会动态调整 */
    height: 100%;
    min-height: 160px; /* 设置最小高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes slide {
    0%, 30% { transform: translateX(0%); }
    33%, 63% { transform: translateX(-33.333%); }
    66%, 96% { transform: translateX(-66.666%); }
    100% { transform: translateX(0%); }
}

/* 暂时隐藏轮播图指示器圆点 */
.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: none; /* 隐藏指示器 */
    gap: 8px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    animation: indicatorSlide 9s infinite;
}

.indicator:nth-child(1) {
    animation-delay: 0s;
}

.indicator:nth-child(2) {
    animation-delay: -3s;
}

.indicator:nth-child(3) {
    animation-delay: -6s;
}

@keyframes indicatorSlide {
    0%, 30% { background: rgba(255, 255, 255, 1); }
    33%, 100% { background: rgba(255, 255, 255, 0.5); }
}

/* 爱车评估按钮样式 */
.search-button-container {
    padding: 15px;
    background: white;
    /* margin-bottom: 10px; */
    position: relative;
}

.premium-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
    z-index: 10;
    border-radius: 4px;
}

.search-button {
    width: 100%;
    padding: 0;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 70px;
}

.search-button::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.5s;
}

.search-button:hover::before {
    left: 100%;
}

.button-content {
    display: flex;
    align-items: center;
    padding: 16px 20px 16px 20px;
    width: 100%;
    position: relative;
}

.button-icon {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    margin-right: 16px;
}

.button-text {
    flex: 1;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.main-text {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin-right: 8px;
}

.sub-text {
    font-size: 13px;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.9);
}

.button-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    opacity: 0.9;
    transition: transform 0.3s ease;
    color: white;
    z-index: 5;
}

.search-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.search-button:hover .button-arrow {
    transform: translateY(-50%) translateX(3px);
}

.search-button:active {
    transform: translateY(0);
}

/* 车主工具箱样式 */
.toolbox-container {
    background: white;
    margin: 0 10px 20px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.toolbox-header {
    background: #4a90e2;
    color: white;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: #f0f0f0;
    padding: 1px;
}

.tool-item {
    background: white;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tool-item:hover {
    background: #f0f6ff;
}

.tool-item:active {
    transform: scale(0.98);
}

.tool-icon {
    font-size: 28px;
    margin-bottom: 6px;
    color: #4a90e2;
    transition: all 0.3s ease;
}

.tool-item:hover .tool-icon {
    color: #357abd;
}

.tool-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    line-height: 1.2;
}

.tool-desc {
    font-size: 10px;
    color: #666;
    margin-top: 3px;
    line-height: 1.2;
}

/* 底部导航样式 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.nav-item {
    text-align: center;
    color: #666;
    text-decoration: none;
    flex: 1;
    padding: 5px;
    transition: color 0.3s ease;
}

.nav-item.active {
    color: #4a90e2;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
    display: block;
}

.nav-item span {
    font-size: 12px;
    display: block;
}

/* 响应式设计 */
@media (max-width: 360px) {
    .tool-icon {
        font-size: 24px;
    }

    .tool-name {
        font-size: 12px;
    }

    .tool-desc {
        font-size: 9px;
    }

    /* 小屏幕下的按钮优化 */
    .search-button-container {
        padding: 12px;
    }

    .button-content {
        padding: 14px 50px 14px 16px;
    }

    .button-icon {
        width: 38px;
        height: 38px;
        font-size: 18px;
        margin-right: 14px;
    }

    .main-text {
        font-size: 16px;
        margin-right: 6px;
    }

    .sub-text {
        font-size: 12px;
    }

    .button-arrow {
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 16px;
    }

    .premium-badge {
        top: 6px;
        right: 6px;
        font-size: 9px;
        padding: 3px 6px;
    }

    .premium-badge {
        font-size: 10px;
        padding: 2px 8px;
    }
}

/* 内容区域底部间距，避免被底部导航和公众号横条遮挡 */
.content {
    padding-bottom: 150px; /* 70px(底部导航) + 60px(公众号横条预留空间) + 20px(备案号空间) */
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 公众号关注提示横条 */
.wechat-subscribe-banner {
    position: fixed;
    bottom: 70px; /* 在底部导航上方 */
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #07c160, #00d4aa);
    color: white;
    padding: 12px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 400px;
    margin: 0 auto;
}

.banner-icon {
    font-size: 24px;
    color: white;
    flex-shrink: 0;
}

.banner-text {
    flex: 1;
    min-width: 0;
}

.banner-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 2px;
}

.banner-subtitle {
    font-size: 12px;
    opacity: 0.9;
    line-height: 1.2;
}

.banner-action {
    flex-shrink: 0;
}

.subscribe-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.subscribe-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.subscribe-btn:active {
    transform: translateY(0);
}

.subscribe-btn i {
    font-size: 12px;
}

/* 公众号关注悬浮窗 */
.wechat-follow-float {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.wechat-follow-float.show {
    opacity: 1;
    visibility: visible;
}

.float-content {
    padding: 20px;
    text-align: center;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    font-size: 12px;
}

.qr-code {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    background: #f0f0f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-code img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.follow-text .title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.follow-text .desc {
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
}

.follow-btn {
    background: #4a90e2;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.follow-btn:hover {
    background: #357abd;
}

/* 备案号样式 */
.footer-beian {
    padding: 15px 20px;
    text-align: center;
    background: white;
    margin-top: 10px;
    margin-bottom: 80px; /* 为底部导航和横幅留出空间，避免被遮挡 */
}

.beian-link {
    color: #999;
    font-size: 12px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.beian-link:hover {
    color: #4a90e2;
}
