/* 基础样式 */
body {
    background-color: #f8f9fa;
    min-height: 100vh;
    color: #333;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

/* 分类区块标题 */
.section-title {
    color: #2c3e50;
    border-left: 4px solid #3498db;
    padding-left: 0.8rem;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    margin-left: 0;
    position: relative;
    font-weight: 600;
}

/* 卡片样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
}

.row {
    --bs-gutter-x: 1.2rem;
    justify-content: flex-start;
    margin-bottom: 1rem;
    margin-left: 0;
    margin-right: 0;
}

.col-md-4 {
    width: calc(25% - 1.2rem);
    min-width: 220px;
    margin-bottom: 1.5rem;
    padding-left: 0.6rem;
    padding-right: 0.6rem;
}

.ai-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    padding: 1.2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid #eaeaea;
}

.ai-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #d0d0d0;
}

/* 调整logo容器样式 */
.ai-logo-wrapper {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    padding: 0 10px;
}

/* 基础logo样式 */
.ai-logo {
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.2s;
}

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

/* 为每个logo单独设置尺寸 */
.logo-deepseek {
    max-width: 60px;
    max-height: 60px;
}

.logo-kimi {
    max-width: 55px;
    max-height: 55px;
}

.logo-qianwen {
    max-width: 58px;
    max-height: 58px;
}

.logo-doubao {
    max-width: 60px;
    max-height: 60px;
}

.logo-wenxin {
    max-width: 113px;
    max-height: 50px;
}

.logo-xinghuo {
    max-width: 105px;
    max-height: 42px;
}

.logo-zhipu {
    max-width: 139px;
    max-height: 85px;
}

.logo-jimeng {
    max-width: 100px;
    max-height: 66px;
}

.logo-keling {
    max-width: 113px;
    max-height: 75px;
}

.logo-hailuo {
    max-width: 113px;
    max-height: 75px;
}

.logo-liblibai {
    max-width: 120px;
    max-height: 80px;
}

.logo-novelai {
    max-width: 135px;
    max-height: 90px;
}

.logo-promlib {
    max-width: 150px;
    max-height: 100px;
}

.logo-kehua {
    max-width: 120px;
    max-height: 80px;
}

.ai-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 600;
}

.ai-card p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex-grow: 1;
    line-height: 1.4;
    color: #666;
}

.ai-card .btn {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    margin-top: auto;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s;
    width: 100%;
}

.ai-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 登录卡片样式 */
.login-card {
    max-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-top: 3rem;
}

.login-card .input-group-text {
    background: #f8f9fa;
    border-right: none;
}

.login-card .form-control:focus {
    box-shadow: none;
    border-color: #3498db;
}

.login-card .btn-primary {
    background: #3498db;
    border: none;
    padding: 0.75rem;
    transition: all 0.3s;
}

/* 导航栏调整 */
.navbar {
    padding: 0.7rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.navbar-brand {
    margin-right: auto;
    margin-left: 1.5rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.navbar-dark {
    background-color: #2c3e50 !important;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    max-width: 100%;
}

.navbar .ms-auto {
    margin-right: 1.5rem;
}

/* 标语区域 */
.slogan-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #dee2e6;
    padding: 1.2rem 0;
    text-align: center;
}

.slogan-section h2 {
    color: #3a3a3a;
    font-size: 1.6rem;
    font-weight: 400;
    margin: 0;
    letter-spacing: 0.5px;
}

/* 响应式布局 */
@media (max-width: 1200px) {
    .col-md-4 {
        width: calc(33.333% - 1.2rem);
    }
}

@media (max-width: 992px) {
    .col-md-4 {
        width: calc(50% - 1.2rem);
    }
}

/* 手机竖屏模式下显示两个卡片 */
@media (max-width: 576px) and (orientation: portrait) {
    .col-md-4 {
        width: calc(50% - 0.8rem);  /* 一行显示两个卡片 */
        min-width: 150px;  /* 减小最小宽度 */
        padding-left: 0.4rem;
        padding-right: 0.4rem;
    }
    
    /* 调整卡片内部元素大小 */
    .ai-card {
        padding: 0.8rem;
    }
    
    .ai-logo-wrapper {
        height: 60px;
        margin-bottom: 0.6rem;
    }
    
    .ai-card h3 {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    
    .ai-card p {
        font-size: 0.75rem;
        margin-bottom: 0.6rem;
        line-height: 1.2;
    }
    
    .ai-card .btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
    }
}

/* 手机横屏模式下显示三个卡片 */
@media (max-width: 767px) and (orientation: landscape) {
    .col-md-4 {
        width: calc(33.333% - 0.8rem);  /* 一行显示三个卡片 */
        min-width: 140px;
    }
    
    /* 调整卡片内部元素大小 */
    .ai-card {
        padding: 0.7rem;
    }
    
    .ai-logo-wrapper {
        height: 55px;
        margin-bottom: 0.5rem;
    }
    
    .ai-card h3 {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }
    
    .ai-card p {
        font-size: 0.7rem;
        margin-bottom: 0.5rem;
        line-height: 1.2;
    }
    
    .ai-card .btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* 修改原有的小屏幕媒体查询，避免冲突 */
@media (max-width: 576px) {
    .section-title {
        margin-left: 0;
        font-size: 1.2rem;
    }
    
    .slogan-section h2 {
        font-size: 1.3rem;
    }
    
    .container {
        padding: 0 0.8rem;
    }
}

/* 调整页面间距 */
.my-5 {
    margin-top: 2rem !important;
    margin-bottom: 2rem !important;
}

.mb-5 {
    margin-bottom: 2rem !important;
}

/* 区块内容调整 */
.category-section {
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
}

/* 为新增的logo设置尺寸 */
.logo-coze {
    max-width: 70px;
    max-height: 70px;
}

.logo-yuanqi {
    max-width: 135px;
    max-height: 90px;
}

/* 为Manus logo设置尺寸 */
.logo-manus {
    max-width: 135px;
    max-height: 115px;
}

/* 为AI代码编辑工具logo设置尺寸 */
.logo-cursor {
    max-width: 120px;
    max-height: 120px;
}

.logo-trae {
    max-width: 101px;
    max-height: 90px;
}

/* 收藏按钮样式 */
#bookmarkBtn {
    font-size: 0.9rem;
    padding: 0.35rem 0.8rem;
    border-radius: 4px;
    transition: all 0.2s;
}

#bookmarkBtn:hover {
    background-color: #f8f9fa;
    color: #2c3e50;
    transform: translateY(-2px);
}

/* 确保在小屏幕上按钮也能正确显示 */
@media (max-width: 576px) {
    #bookmarkBtn {
        font-size: 0.8rem;
        padding: 0.25rem 0.6rem;
    }
}