/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background: #000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    position: relative;
    overflow: hidden;
}

.header-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    z-index: -1;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    position: relative;
    z-index: 1;
}

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

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
}

.logo-img {
    width: 32px;
    height: 32px;
    margin-right: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    margin-right: 8px;
}

.logo-domain {
    font-size: 12px;
    color: #ccc;
}

.nav-menu {
    flex: 1;
    margin: 0 40px;
}

.nav-list {
    display: flex;
    list-style: none;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.nav-list::-webkit-scrollbar { display: none; }

.nav-link {
    text-decoration: none;
    color: #ccc;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 20px;
    transition: color 0.3s, background-color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: #1890ff;
    background-color: rgba(24, 144, 255, 0.12);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-btn,
.notification-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s;
    position: relative;
    color: #fff;
}

.search-btn:hover,
.notification-btn:hover {
    background-color: rgba(255,255,255,0.1);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ff4d4f;
    color: white;
    font-size: 10px;
    padding: 2px 4px;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
}

.feedback-btn {
    background: none;
    border: 1px solid #666;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    color: #ccc;
}

.feedback-btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.auth-buttons {
    display: flex;
    gap: 8px;
}

.login-btn,
.register-btn {
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.login-btn {
    background: none;
    border: 1px solid #666;
    color: #ccc;
}

.register-btn {
    background: #1890ff;
    border: 1px solid #1890ff;
    color: white;
}

.login-btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.register-btn:hover {
    background: #40a9ff;
    border-color: #40a9ff;
}

/* 搜索区域样式 */
.search-section {
    background: url('../images/search_bg.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 0;
}

.search-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.search-box-wrapper {
    margin-bottom: 24px;
}

.search-box {
    display: inline-flex;
    background: white;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    max-width: 600px;
    width: 100%;
    align-items: center;
}

.search-category-selector {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 4px;
    padding: 0 12px;
    margin-right: 8px;
    min-width: 100px;
    height: 48px;
}
.search-category-selector::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #999;
    pointer-events: none;
}

.search-category {
    background: none;
    border: none;
    padding: 0 28px 0 0;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

.dropdown-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #999;
}

.search-input {
    flex: 1;
    border: none;
    padding: 12px 16px;
    font-size: 16px;
    outline: none;
    border-radius: 4px;
    min-width: 0;
    height: 48px;
    box-sizing: border-box;
}

.search-submit {
    background: #1890ff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.search-submit:hover {
    background: #40a9ff;
}

.hot-tags {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hot-label {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
}

.tags-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.tag:hover {
    background: rgba(255,255,255,0.3);
}

.tag.orange {
    background: #ff7a45;
}

/* 分类导航样式 */
.category-nav {
    background: white;
    border-bottom: 1px solid #f0f0f0;
    padding: 16px 0;
}

.category-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-tabs {
    display: flex;
    gap: 32px;
}

.category-tab {
    background: none;
    border: none;
    padding: 8px 0;
    font-size: 16px;
    cursor: pointer;
    color: #666;
    position: relative;
    transition: color 0.3s;
}

.category-tab:hover,
.category-tab.active {
    color: #1890ff;
}

.category-tab.active::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 0;
    right: 0;
    height: 2px;
    background: #1890ff;
}

.results-info {
    color: #666;
    font-size: 14px;
}

#resultsCount {
    color: #1890ff;
    font-weight: 600;
}

/* 主要内容区域 */
.main-content {
    min-height: calc(100vh - 200px);
}

.content-wrapper {
    padding: 32px 0;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #333;
}

.ai-apps-section,
.ai-tools-section,
.ai-courses-section {
    margin-bottom: 48px;
}

/* 网格布局 */
.apps-grid,
.tools-grid,
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* 底部样式 */
.footer {
    background: #001529;
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: #fff;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #1890ff;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-link {
    padding: 8px 16px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    transition: background-color 0.3s;
}

.social-link:hover {
    background: rgba(255,255,255,0.2);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        height: auto;
        padding: 16px 0;
    }

    .nav-menu {
        margin: 16px 0;
    }

    .nav-list {
        flex-wrap: nowrap;
        gap: 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .search-section {
        padding: 40px 0;
    }

    .search-box {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .search-category-selector {
        margin-right: 0;
        margin-bottom: 8px;
    }

    .category-tabs {
        flex-wrap: wrap;
        gap: 16px;
    }

    .category-nav .container {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .apps-grid,
    .tools-grid,
    .courses-grid {
        grid-template-columns: 1fr;
    }
}
