/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* Sidebar styles */
.sidebar {
    position: fixed;
    width: 240px;
    height: 100%;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    z-index: 99;
    top: 70px;
}

.sidebar .logo {
    padding: 20px;
    text-align: center;
}

.category-nav {
    margin-top: 20px;
}

.category-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none;
    color: #555;
    transition: all 0.3s;
}

.category-item i {
    margin-right: 12px;
    font-size: 1rem;
    width: 20px;
    text-align: center;
    color: #666;
}

.category-item:hover {
    background-color: #f5f5f5;
    color: #007bff;
}

.category-item:hover i {
    color: #007bff;
}

.category-item .fa-chevron-right {
    margin-left: auto;
    font-size: 0.8rem;
    opacity: 0.5;
}

/* Main content styles */
.main-content {
    margin-left: 240px;
    padding-top: 70px;
}

/* Adjust existing styles */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header styles */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.search-bar {
    display: flex;
    background-color: #f5f5f5;
    border-radius: 30px;
    padding: 8px 15px;
    width: 400px;
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    padding: 0 10px;
    font-size: 0.9rem;
}

.search-bar button {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #666;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #007bff;
}

/* Hero section */
.banner {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
    margin-bottom: 30px;
}

.banner h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.banner p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* 搜索容器样式 */
.search-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 搜索栏样式 */
.search-bar {
    display: flex;
    background-color: #fff;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 600px;
}

.search-bar input {
    flex: 1;
    border: none;
    padding: 15px 20px;
    font-size: 1rem;
    outline: none;
}

.search-bar button {
    background: #fff;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    color: #6a11cb;
    font-size: 1.2rem;
    transition: background 0.3s;
}

.search-bar button:hover {
    background: #f0f0f0;
}

/* 搜索选项样式 */
.search-options {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    width: 100%;
}

.search-option {
    color: rgba(255, 255, 255, 0.8);
    padding: 5px 10px;
    margin: 0 5px;
    cursor: pointer;
    font-size: 0.9rem;
    border-radius: 15px;
    transition: all 0.3s;
}

.search-option:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
}

.search-option.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

.banner-search {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    background-color: #fff;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.banner-search input {
    flex: 1;
    border: none;
    padding: 15px 20px;
    font-size: 1rem;
    outline: none;
}

/* Featured tools section */
.featured-tools {
    padding: 40px 0;
    background-color: #fff;
    margin-bottom: 30px;
}

.featured-tools h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
    color: #333;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-gap: 20px;
}

.featured-item {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.featured-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.featured-image {
    height: 160px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.featured-item:hover .featured-image img {
    transform: scale(1.05);
}

.featured-info {
    padding: 20px;
}

.featured-info h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
}

.featured-info p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

.featured-info .tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.featured-info .tool-tag {
    font-size: 0.8rem;
    background-color: #f1f1f1;
    color: #555;
    padding: 3px 8px;
    border-radius: 3px;
}

/* Categories section */
.categories {
    padding: 40px 0;
    background-color: #fff;
    margin-bottom: 30px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    grid-gap: 20px;
}

.category-card {
    padding: 30px 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.category-card:hover {
    background-color: #007bff;
    color: #fff;
    transform: translateY(-5px);
}

.category-card i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #007bff;
    transition: color 0.3s;
}

.category-card:hover i {
    color: #fff;
}

.category-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.category-card p {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Tools list section */
.tools-list {
    padding: 40px 0;
    margin-bottom: 30px;
    background-color: #fff;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.category-header h2 {
    font-size: 1.5rem;
    color: #333;
}

.view-all {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.view-all i {
    margin-left: 5px;
    font-size: 0.8rem;
}

/* 工具网格布局 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px;
}

.tool-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.tools-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
    padding: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tool-item {
    flex: 0 0 200px;
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    min-width: 200px;
}

.tool-item:hover {
    transform: translateY(-5px);
}

.tool-item img {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
}

.tool-item h3 {
    margin: 10px 0;
    color: #333;
    font-size: 1.1em;
}

.tool-item p {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.tool-item .btn {
    display: inline-block;
    padding: 8px 20px;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.tool-item .btn:hover {
    background: #0056b3;
}

/* Footer styles */
footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-gap: 30px;
}

.footer-column h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #fff;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #fff;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.footer-social a {
    color: #bbb;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.footer-social a:hover {
    color: #fff;
}

.footer-bottom {
    margin-top: 30px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 0.9rem;
    color: #aaa;
}

/* Responsive design */
@media (max-width: 1024px) {
    .sidebar {
        width: 200px;
    }
    .main-content {
        margin-left: 200px;
    }
}

@media (max-width: 768px) {
    .search-bar {
        width: 300px;
    }
    .sidebar {
        width: 0;
        transform: translateX(-100%);
        transition: all 0.3s;
    }
    .sidebar.active {
        width: 240px;
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .header-container {
        flex-direction: column;
        padding: 10px 0;
    }
    .search-bar {
        width: 100%;
        margin-top: 10px;
    }
    .nav-links {
        margin-top: 10px;
    }
    .banner h1 {
        font-size: 1.8rem;
    }
    .banner p {
        font-size: 1rem;
    }
    .tools-grid {
        grid-template-columns: 1fr;
    }
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* 具体AI工具展示 */
.tool-listings {
    padding: 30px 0;
    background-color: #fff;
    margin-bottom: 30px;
}

.tool-list-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 100%;
}

.tool-card {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid #eee;
    cursor: pointer;
    height: 70px;
    box-sizing: border-box;
}

.tool-logo {
    width: 50px;
    height: 50px;
    overflow: hidden;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tool-content {
    flex: 1;
}

.tool-content h3 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 5px;
}

.tool-content p {
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    visibility: visible;
    height: auto;
    max-height: none;
    opacity: 1;
}

@media (min-width: 1800px) {
    .tool-list-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1400px) {
    .tool-list-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .tool-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .tool-list-grid {
        grid-template-columns: 1fr;
    }
}

/* 添加工具链接的样式 */
.tool-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
    width: 100%;
}

.tool-card {
    transition: transform 0.3s, box-shadow 0.3s;
}

.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

/* 调整logo和内容的布局 */
.tool-logo {
    min-width: 50px;
    height: 50px;
    margin-right: 12px;
}

.tool-content h3 {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-content p {
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    visibility: visible;
    height: auto;
    max-height: none;
    opacity: 1;
}

/* 优化工具列表布局 */
.tool-listings .container {
    padding: 0 25px;
}

/* 调整标题和分割线 */
.tool-listings h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: #333;
    position: relative;
    padding-bottom: 10px;
}

.tool-listings h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #007bff;
}

/* AI学习网站卡片样式 */
.tool-logo.learning {
    background-color: #4db6ac;
    color: white;
}

.tool-card:hover .tool-logo.learning {
    background-color: #26a69a;
}

/* 搜索结果样式 */
#search-results {
    margin-top: 30px;
}

#search-results h2 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

#search-results h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #6a11cb, #2575fc);
}

.search-highlight {
    box-shadow: 0 5px 15px rgba(106, 17, 203, 0.1);
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background-color: #f8f9fa;
    border-radius: 10px;
    color: #666;
    font-size: 1.1rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .search-container {
        width: 90%;
    }
    
    .search-options {
        flex-wrap: wrap;
    }
    
    .search-option {
        margin-bottom: 5px;
    }
}

@media (max-width: 576px) {
    .banner {
        padding: 40px 0;
    }
    
    .banner h1 {
        font-size: 2rem;
    }
    
    .search-bar input {
        padding: 12px 15px;
    }
}
