/* 接口市场页面样式 */
.market-container {
    max-width: 100%;
    padding: 0;
}

/* Hero区域样式优化 */
.market-hero {
    position: relative;
    padding: 80px 0 50px;
    text-align: left;
    background: linear-gradient(180deg, #fff 0%, #f8f9fa 100%);
    border-radius: 0;
    margin-top: 20px;
    margin-bottom: 0;
    overflow: hidden;
}

/* 背景效果 */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-shape {
    position: absolute;
    top: -30%;
    right: -10%;
    width: 60%;
    height: 160%;
    background: linear-gradient(45deg, rgba(67, 24, 255, 0.03), rgba(67, 24, 255, 0.08));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morphShape 15s ease-in-out infinite;
}

.hero-dots {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(67, 24, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.5;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40%;
    height: 200px;
    background: radial-gradient(circle, rgba(67, 24, 255, 0.1) 0%, transparent 70%);
    filter: blur(50px);
}

/* 内容样式 */
.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px 0 120px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 60px;
    min-height: 300px;
}

.hero-left {
    flex: 1;
}

.hero-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(67, 24, 255, 0.1);
    border-radius: 50px;
    margin-bottom: 32px;
    color: #4318FF;
    font-weight: 500;
}

.badge-icon {
    font-size: 18px;
}

.hero-content h1 {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    color: #1A1A1A;
}

.gradient-text {
    background: linear-gradient(135deg, #4318FF, #9F53FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content .subtitle {
    font-size: 20px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 48px;
}

/* 数据统计样式 */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin: 40px 0;
    max-width: 600px;
}

.stat-item {
    text-align: center;
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.stat-number {
    display: flex;
    align-items: baseline;
    justify-content: center;
    font-size: 48px;
    font-weight: 800;
    color: #4318FF;
    line-height: 1;
    margin-bottom: 8px;
}

.plus, .percent, .hour {
    font-size: 24px;
    margin-left: 4px;
}

.stat-label {
    font-size: 16px;
    color: #666;
}

/* 品牌展示 */
.hero-brands {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.brand-logo {
    height: 24px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.brand-logo:hover {
    opacity: 1;
}

.brand-more {
    color: #666;
    font-size: 14px;
}

/* 动画效果 */
@keyframes morphShape {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    50% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    }
    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}

/* 接口列表样式 */
.api-list {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 40px 40px 120px; /* 左边距与Hero区域对齐 */
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

/* 搜索框样式 */
.search-box {
    position: relative;
    width: 300px;
}

.search-box input {
    width: 100%;
    padding: 12px 20px 12px 45px; /* 为图标留出空间 */
    background: #f5f5f5;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
}

.search-box input::placeholder {
    color: #999;
}

.search-box input:focus {
    background: #fff;
    border-color: #4318FF;
    outline: none;
    box-shadow: 0 2px 8px rgba(67, 24, 255, 0.1);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #999;
    pointer-events: none; /* 确保图标不会影响输入 */
}

.search-icon svg {
    width: 100%;
    height: 100%;
}

.filter-tabs {
    display: flex;
    gap: 16px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.tab-btn.active {
    background: #4318FF;
    color: #fff;
}

/* 接口卡片样式优化 */
.api-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 30px;
    margin-bottom: 40px;
}

.api-card {
    display: none;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative; /* 为光影效果添加定位上下文 */
    overflow: hidden; /* 确保光影不会溢出卡片 */
}

/* 添加光影背景效果 */
.api-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(67, 24, 255, 0.02) 0%,
        rgba(67, 24, 255, 0.01) 30%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* 确保不会影响交互 */
    z-index: 0; /* 将光影置于内容之下 */
}

.api-card:hover::before {
    opacity: 1;
    animation: rotate 15s linear infinite;
}

/* 确保卡片内容在光影之上 */
.api-header,
.api-info {
    position: relative;
    z-index: 1;
}

/* 添加旋转动画 */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 优化卡片悬浮效果 */
.api-card:hover {
    border-color: rgba(67, 24, 255, 0.2);
    box-shadow: 0 8px 24px rgba(67, 24, 255, 0.06);
    transform: translateY(-2px);
}

.api-card.visible {
    display: block;
}

/* 卡片内容布局优化 */
.api-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.api-info {
    padding: 16px 20px;
    position: relative;
    overflow: hidden;
}

/* 添加默认状态下的背景效果 */
.api-info::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 250px;
    height: 250px;
    background: radial-gradient(
        circle at center,
        rgba(67, 24, 255, 0.035) 0%,
        rgba(67, 24, 255, 0.02) 40%,
        rgba(67, 24, 255, 0.01) 60%,
        transparent 80%
    ),
    linear-gradient(
        45deg,
        rgba(67, 24, 255, 0.02) 0%,
        rgba(159, 83, 255, 0.02) 100%
    );
    border-radius: 50%;
    transform: rotate(-15deg);
    pointer-events: none;
    z-index: 0;
    opacity: 1;
}

/* 添加第二个光影效果增加层次感 */
.api-info::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(
        circle at center,
        rgba(159, 83, 255, 0.02) 0%,
        rgba(159, 83, 255, 0.015) 40%,
        transparent 70%
    );
    border-radius: 50%;
    transform: rotate(30deg);
    pointer-events: none;
    z-index: 0;
}

/* 确保内容在背景之上 */
.api-features,
.api-action {
    position: relative;
    z-index: 1;
}

.api-features {
    margin-bottom: 20px;
}

/* 卡片头部 */
.api-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.api-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.api-logo img {
    height: 24px;
    width: auto;
}

.api-name {
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.api-tag {
    padding: 3px 8px;
    background: rgba(67, 24, 255, 0.08);
    border-radius: 4px;
    color: #4318FF;
    font-size: 12px;
}

/* 卡片内容 */
.api-info {
    flex: 1; /* 让内容区域自适应填充剩余空间 */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.api-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature {
    padding: 4px 10px;
    background: #f5f5f5;
    border-radius: 4px;
    color: #666;
    font-size: 12px;
}

.api-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.price-box {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.price {
    font-size: 20px;
    font-weight: 600;
    color: #4318FF;
}

.period {
    color: #999;
    font-size: 13px;
}

.buy-btn {
    padding: 6px 16px;
    background: #4318FF;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buy-btn:hover {
    background: #3612CC;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .api-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .api-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-bar {
        flex-direction: column;
        gap: 20px;
    }
    
    .search-box {
        width: 100%;
    }

    .market-hero {
        padding: 20px 0 40px;
        margin-top: 10px;
    }

    .hero-content {
        padding: 0 20px;
        flex-direction: column;
        gap: 30px;
        min-height: auto;
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .hero-content .subtitle {
        font-size: 18px;
    }

    .hero-stats {
        gap: 40px;
    }

    .stat-number {
        font-size: 36px;
    }

    .hero-brands {
        flex-wrap: wrap;
        gap: 20px;
    }

    .api-list {
        padding: 30px 20px; /* 移动端使用更小的内边距 */
    }
}

/* 分页控制器样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    padding-bottom: 60px;
}

.page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover {
    border-color: #4318FF;
    color: #4318FF;
}

.page-btn.active {
    background: #4318FF;
    border-color: #4318FF;
    color: #fff;
}

.page-btn.prev,
.page-btn.next {
    width: auto;
    padding: 0 16px;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 修改提示框样式 */
.tip-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    text-align: center;
    display: none;
    width: 320px; /* 设定固定宽度 */
}

.tip-modal.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.tip-content {
    font-size: 15px;
    color: #333;
    margin-bottom: 24px;
    line-height: 1.5;
}

.tip-qrcode {
    width: 140px; /* 二维码尺寸 */
    height: 140px;
    margin: 0 auto 24px;
    border-radius: 8px;
    padding: 8px;
    background: #f5f5f5;
}

.tip-qrcode img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tip-desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 24px;
}

.tip-btn {
    padding: 8px 24px;
    background: #4318FF;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.tip-btn:hover {
    background: #3612CC;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.modal-overlay.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
} 