* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Hiragino Sans GB', 'Microsoft YaHei', 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f1f4f9;
    color: #444;
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ===== Header ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 9998;
    background: #fff;
    box-shadow: 0 1px 8px rgba(0,0,0,0.1);
}
.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    height: 52px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 20px;
}
.logo {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
    gap: 8px;
}
.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #1a90ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #1a90ff;
    letter-spacing: -0.5px;
}
.header-search {
    flex: 1;
    max-width: 480px;
}
.header-search .el-input__wrapper {
    border-radius: 10px !important;
    box-shadow: 0 0 0 1px #e0e0e0 inset !important;
}
.header-search .el-input__wrapper.is-focus {
    box-shadow: 0 0 0 2px rgba(26,144,255,0.35) inset !important;
}
.header-search .el-input__inner {
    height: 38px !important;
    font-size: 14px !important;
}
.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-shrink: 0;
}
.nav-link {
    color: #555;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 0;
    transition: color 0.2s ease;
    position: relative;
}
.nav-link:hover { color: #1a90ff; }
.nav-link.active { color: #1a90ff; font-weight: 600; }
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2.5px;
    background: #1a90ff;
    border-radius: 10px;
}

/* Language Switcher */
.lang-switcher { flex-shrink: 0; cursor: pointer; }
.lang-trigger {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}
.lang-trigger:hover { border-color: #1a90ff; color: #1a90ff; }
.lang-flag { font-size: 15px; line-height: 1; }
.lang-arrow { font-size: 10px; color: #999; transition: transform 0.2s; }
.lang-switcher:hover .lang-arrow { transform: rotate(180deg); }
.lang-switcher .el-dropdown-menu__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    min-width: 140px;
    font-size: 13px;
}
.lang-switcher .el-dropdown-menu__item:hover { background: #f0f7ff; color: #1a90ff; }
.lang-switcher .el-dropdown-menu__item.active { color: #1a90ff; font-weight: 600; background: #f0f7ff; }
.lang-check { margin-left: auto; color: #1a90ff; }

.admin-link {
    color: #666;
    font-size: 13px;
    padding: 5px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.admin-link:hover { color: #1a90ff; border-color: #1a90ff; }

/* ===== Hot Search Bar ===== */
.hot-search-bar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.hot-label {
    color: #999;
    font-size: 13px;
    flex-shrink: 0;
}
.hot-search-bar .el-tag {
    background: #fff !important;
    border-color: #e8e8e8 !important;
    color: #666 !important;
    border-radius: 6px !important;
    height: 28px !important;
    line-height: 26px !important;
    padding: 0 12px !important;
    font-size: 12px !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
}
.hot-search-bar .el-tag:hover {
    color: #1a90ff !important;
    border-color: #1a90ff !important;
    background: #f0f7ff !important;
}

/* ===== Quick Categories ===== */
.quick-categories {
    max-width: 1400px;
    margin: 16px auto 0;
    padding: 0 20px;
}
.quick-categories-inner {
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
    display: flex;
    gap: 12px;
    overflow-x: auto;
}
.quick-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    min-width: 80px;
}
.quick-cat-item:hover {
    background: #f0f7ff;
    transform: translateY(-2px);
}
.quick-cat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: #f1f4f9;
    transition: all 0.2s ease;
}
.quick-cat-item:hover .quick-cat-icon {
    background: #e0efff;
}
.quick-cat-name {
    font-size: 13px;
    font-weight: 600;
    color: #444;
    white-space: nowrap;
}
.quick-cat-count {
    font-size: 11px;
    color: #999;
}

/* ===== Ad Banner ===== */
.ad-banner-container {
    max-width: 1400px;
    margin: 16px auto 0;
    padding: 0 20px;
}
.ad-banner {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s ease;
}
.ad-banner:hover { transform: translateY(-2px); }
.ad-banner img { width: 100%; }
.ad-banner-text {
    background: linear-gradient(135deg, #1a90ff 0%, #0066cc 100%);
    color: #fff;
    text-align: center;
    padding: 20px;
    font-size: 16px;
    font-weight: 600;
}

/* ===== Main Content ===== */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}
.content-wrapper {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

/* ===== Category Sidebar ===== */
.category-sidebar {
    width: 160px;
    flex-shrink: 0;
    position: sticky;
    top: 64px;
    background: #fff;
    border-radius: 12px;
    padding: 8px 0;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}
.category-sidebar::-webkit-scrollbar { width: 4px; }
.category-sidebar::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }
.cat-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 14px;
    color: #5e5d5b;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    line-height: 24px;
}
.cat-nav-item:hover {
    background: #f7f9fa;
    color: #1a90ff;
}
.cat-nav-item.active {
    color: #1a90ff;
    font-weight: 600;
    background: #f0f7ff;
    border-left-color: #1a90ff;
}
.cat-nav-item .cat-count {
    font-size: 12px;
    color: #999;
    background: #f1f4f9;
    padding: 0 8px;
    border-radius: 10px;
    min-width: 24px;
    text-align: center;
}
.cat-nav-item.active .cat-count {
    background: #1a90ff;
    color: #fff;
}

/* ===== Content Main ===== */
.content-main {
    flex: 1;
    min-width: 0;
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}
.section-count {
    font-size: 13px;
    color: #999;
}

/* ===== Tools Grid (Icon Style) ===== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    text-align: center;
    position: relative;
}
.tool-card:hover {
    background: #f0f7ff;
    border-color: #d0e8ff;
}
.tool-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f1f4f9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    margin-bottom: 8px;
}
.tool-logo img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.tool-logo-text {
    font-size: 18px;
    font-weight: 700;
    color: #1a90ff;
}
.tool-name {
    font-size: 13px;
    font-weight: 500;
    color: #555;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
.tool-card:hover .tool-name { color: #1a90ff; }
.tool-desc {
    font-size: 11px;
    color: #aaa;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
.tool-card .el-tag--danger,
.tool-card .el-tag--warning {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 9px !important;
    height: 16px !important;
    padding: 0 5px !important;
    line-height: 16px !important;
    border: none !important;
    color: #fff !important;
    border-radius: 4px !important;
}
.tool-card .el-tag--danger { background: #ff4500 !important; }
.tool-card .el-tag--warning { background: #ff9800 !important; }

/* ===== Articles ===== */
.articles-section { margin-top: 24px; }
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}
.article-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.article-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.article-cover {
    width: 100%;
    height: 130px;
    background: linear-gradient(135deg, #e0efff 0%, #f0f7ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-content { padding: 14px 16px; }
.article-content .el-tag {
    background: #f0f7ff !important;
    border-color: #d0e8ff !important;
    color: #1a90ff !important;
    font-size: 11px !important;
    height: 22px !important;
    line-height: 20px !important;
}
.article-title {
    font-size: 15px;
    font-weight: 600;
    margin: 8px 0 6px;
    color: #333;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.article-summary {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.article-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #bbb;
}

/* ===== Content Sidebar ===== */
.content-sidebar {
    width: 260px;
    flex-shrink: 0;
}
.sidebar-ad {
    margin-bottom: 12px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}
.sidebar-ad:hover { transform: translateY(-2px); }
.sidebar-ad img { width: 100%; }
.sidebar-ad-text {
    background: linear-gradient(135deg, #1a90ff 0%, #0066cc 100%);
    padding: 18px;
    text-align: center;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}
.sidebar-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.sidebar-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
    color: #333;
}

/* Hot Tools */
.hot-tools { display: flex; flex-direction: column; gap: 8px; }
.hot-tool-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.hot-tool-item:hover { background: #f7f9fa; }
.hot-rank {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #999;
    background: #f1f4f9;
    flex-shrink: 0;
}
.rank-1 { background: #ff4500; color: #fff; }
.rank-2 { background: #ff9800; color: #fff; }
.rank-3 { background: #bbb; color: #fff; }
.hot-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #f1f4f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.hot-logo img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.hot-logo-text { font-size: 12px; font-weight: 700; color: #1a90ff; }
.hot-info { flex: 1; min-width: 0; }
.hot-name {
    font-size: 13px;
    font-weight: 500;
    color: #444;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hot-tool-item:hover .hot-name { color: #1a90ff; }
.hot-clicks { font-size: 11px; color: #bbb; }

/* Featured Tools */
.featured-tools { display: flex; flex-direction: column; gap: 10px; }
.featured-item {
    display: flex;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.featured-item:hover { background: #f7f9fa; }
.featured-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f1f4f9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.featured-logo img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.featured-logo-text { font-size: 14px; font-weight: 700; color: #1a90ff; }
.featured-name { font-size: 13px; font-weight: 600; color: #333; }
.featured-desc {
    font-size: 11px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
    margin-top: 2px;
}

/* ===== Friend Links ===== */
.friend-links {
    background: #fff;
    padding: 28px 0;
    margin-top: 24px;
}
.links-inner { max-width: 1400px; margin: 0 auto; padding: 0 20px; }
.links-inner h3 {
    font-size: 16px;
    margin-bottom: 14px;
    color: #333;
    font-weight: 700;
}
.links-list { display: flex; flex-wrap: wrap; gap: 8px; }
.friend-link {
    color: #666;
    font-size: 13px;
    padding: 6px 14px;
    background: #f7f9fa;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.friend-link:hover {
    background: #f0f7ff;
    color: #1a90ff;
}

/* ===== Footer ===== */
.site-footer {
    background: #fff;
    color: #999;
    padding: 28px 0 20px;
    border-top: 1px solid #eee;
}
.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}
.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}
.footer-info p { font-size: 13px; margin: 4px 0; color: #999; }
.footer-icp a { color: #999; text-decoration: none; }
.footer-icp a:hover { color: #1a90ff; }
.footer-disclaimer {
    max-width: 1000px;
    margin: 14px auto 0;
    padding: 12px 20px;
    background: #f7f9fa;
    border-radius: 8px;
    font-size: 12px;
    color: #aaa;
    line-height: 1.8;
    text-align: left;
}

/* ===== Empty State ===== */
.empty-state { padding: 60px 0; }

/* ===== Backtop ===== */
.el-backtop {
    box-shadow: 0 2px 12px rgba(0,0,0,0.12) !important;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .category-sidebar { width: 140px; }
    .content-sidebar { width: 220px; }
}
@media (max-width: 991px) {
    .category-sidebar { display: none; }
    .content-wrapper { flex-direction: column; }
    .content-sidebar { width: 100%; }
    .main-nav { display: none; }
}
@media (max-width: 768px) {
    .header-inner { height: 48px; padding: 0 12px; gap: 10px; }
    .logo-text { font-size: 16px; }
    .header-search { max-width: none; }
    .header-search .el-input__inner { height: 34px !important; font-size: 13px !important; }
    .lang-label { display: none; }
    .lang-trigger { padding: 4px 8px; }
    .admin-link { padding: 4px 8px; font-size: 12px; }
    .hot-search-bar { padding: 8px 12px; }
    .quick-categories { padding: 0 12px; }
    .quick-categories-inner { padding: 12px; }
    .main-content { padding: 12px; }
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 6px;
        padding: 8px;
    }
    .tool-card { padding: 10px 6px 8px; }
    .tool-logo { width: 36px; height: 36px; }
    .articles-grid { grid-template-columns: 1fr; }
}
