/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #1a2332 0%, #121a25 100%);
    color: #fff;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航栏 */
header {
    background: rgba(26, 35, 50, 0.95);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

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

.logo-image {
    height: 48px;
    /* 32px * 1.5 */
    margin-right: 15px;
    /* 10px * 1.5 */
}

.logo h1 {
    font-size: 36px;
    /* 24px * 1.5 */
    font-weight: bold;
    color: #fff;
}

nav ul {
    display: none;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #fff;
}

/* 搜索栏区域 */
.search-section {
    padding: 30px 0;
    text-align: center;
    background: linear-gradient(135deg, #1a2332, #2d3748);
    background-blend-mode: overlay;
}

.search-box {
    max-width: 600px;
    margin: 0 auto 20px;
    display: flex;
}

#search-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

#search-input::placeholder {
    color: #aaa;
}

#search-btn {
    padding: 12px 24px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background 0.3s ease;
}

#search-btn:hover {
    background: #2980b9;
}

.search-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.search-tags a {
    color: #ccc;
    text-decoration: none;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.search-tags a:hover {
    background: rgba(52, 152, 219, 0.3);
    color: #fff;
}

/* 主要内容区域 */
main {
    padding: 30px 0;
}

section {
    margin-bottom: 40px;
}

h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #fff;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(52, 152, 219, 0.3);
}

/* 每日推荐 */
.daily-recommendations .tabs {
    display: flex;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 8px 16px;
    margin-right: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: #3498db;
    color: #fff;
}

.tab-btn:hover {
    background: rgba(52, 152, 219, 0.3);
    color: #fff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.recommendation-cards,
.categories-grid,
.tools-grid,
.scans-grid,
.mosts-grid,
.drivers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 120px;
}

.card-icon {
    font-size: 36px;
    margin-bottom: 15px;
    color: #3498db;
    text-align: center;
}

.card-content {
    flex: 1;
    min-width: 0;
    text-align: center;
    width: 100%;
}

.card h3 {
    font-size: 16px;
    margin: 0 0 5px 0;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.card p {
    font-size: 14px;
    margin: 0;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease;
    max-width: 100%;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border-color: rgba(52, 152, 219, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.card:hover p {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
    }

    nav ul li {
        margin-left: 0;
        margin-right: 15px;
        margin-bottom: 10px;
    }

    .search-box {
        flex-direction: column;
    }

    #search-input {
        border-radius: 4px 4px 0 0;
    }

    #search-btn {
        border-radius: 0 0 4px 4px;
    }

    .recommendation-cards,
    .categories-grid,
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .card {
        padding: 15px;
    }

    .card-icon {
        font-size: 28px;
    }

    .card h3 {
        font-size: 14px;
    }

    .card p {
        font-size: 12px;
    }
}

@media (max-width: 480px) {

    .recommendation-cards,
    .categories-grid,
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .daily-recommendations .tabs {
        flex-direction: column;
    }

    .tab-btn {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* 页脚 */
footer {
    background: rgba(18, 26, 37, 0.95);
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer p {
    color: #aaa;
    font-size: 14px;
}