/*
Theme Name: BT搜索引擎
Theme URI: https://baidu.com
Author: BT
Description: 一个专注于资源搜索的BT搜索引擎主题，首页仅保留搜索功能，不显示文章列表。
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: btsearch
*/

/* ============ 基础重置 ============ */
* {
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --bg: #f5f7fa;
    --card: #ffffff;
    --text: #1f2933;
    --muted: #6b7280;
    --border: #e5e7eb;
    --danger: #e11d48;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img.logo {
    height: 38px;
    width: auto;
    display: block;
}

/* ============ 布局容器 ============ */
.bt-container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ============ 顶部导航 ============ */
.bt-header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.bt-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    gap: 16px;
}

.bt-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.bt-brand:hover {
    text-decoration: none;
}

.bt-brand .bt-brand-text {
    background: linear-gradient(90deg, var(--primary), #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 顶部内联搜索框 */
.bt-header-search {
    flex: 1;
    max-width: 420px;
}

.bt-header-search form {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
}

.bt-header-search input {
    flex: 1;
    border: 0;
    outline: none;
    padding: 8px 14px;
    font-size: 14px;
    min-width: 0;
}

.bt-header-search button {
    border: 0;
    background: var(--primary);
    color: #fff;
    padding: 0 18px;
    cursor: pointer;
    font-size: 14px;
}

.bt-header-search button:hover {
    background: var(--primary-dark);
}

/* ============ 首页搜索引擎 ============ */
.bt-hero {
    min-height: calc(100vh - 60px - 70px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 16px;
}

.bt-hero-logo {
    margin-bottom: 28px;
}

.bt-hero-logo img {
    height: 72px;
    width: auto;
}

.bt-hero-title {
    font-size: 40px;
    font-weight: 800;
    margin: 0 0 8px;
    background: linear-gradient(90deg, var(--primary), #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bt-hero-sub {
    color: var(--muted);
    margin: 0 0 32px;
    font-size: 15px;
}

.bt-search-box {
    width: 100%;
    max-width: 640px;
}

.bt-search-box form {
    display: flex;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #fff;
}

.bt-search-box input {
    flex: 1;
    border: 0;
    outline: none;
    padding: 16px 24px;
    font-size: 16px;
    min-width: 0;
}

.bt-search-box button {
    border: 0;
    background: var(--primary);
    color: #fff;
    padding: 0 34px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.2s;
}

.bt-search-box button:hover {
    background: var(--primary-dark);
}

.bt-hot {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 640px;
}

.bt-hot-label {
    color: var(--muted);
    font-size: 13px;
    align-self: center;
}

.bt-hot a {
    display: inline-block;
    padding: 5px 14px;
    background: #eef2ff;
    color: var(--primary);
    border-radius: 16px;
    font-size: 13px;
}

.bt-hot a:hover {
    background: var(--primary);
    color: #fff;
    text-decoration: none;
}

.bt-stats {
    margin-top: 40px;
    color: var(--muted);
    font-size: 13px;
}

.bt-stats strong {
    color: var(--text);
}

/* ============ 搜索结果页 ============ */
.bt-main {
    padding: 24px 0 40px;
}

.bt-result-head {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.bt-result-head strong {
    color: var(--danger);
}

.bt-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.bt-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bt-list > li {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.bt-list > li:last-child {
    border-bottom: 0;
}

.bt-list > li:hover {
    background: #fafbfc;
}

.bt-item-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--primary);
    display: inline-block;
    margin-bottom: 6px;
    word-break: break-all;
}

.bt-item-title:hover {
    text-decoration: underline;
}

.bt-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    font-size: 12px;
    color: var(--muted);
}

.bt-cat {
    color: var(--muted);
}

.bt-tag {
    display: inline-block;
    padding: 1px 9px;
    background: #f1f5f9;
    border-radius: 10px;
    color: var(--muted);
    font-size: 12px;
}

.bt-tag:hover {
    background: #e2e8f0;
    text-decoration: none;
}

.bt-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

.bt-empty h3 {
    color: var(--text);
    margin: 0 0 8px;
}

/* ============ 分页 ============ */
.bt-paging {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 28px 0 0;
}

.bt-paging li a,
.bt-paging li span {
    display: inline-block;
    min-width: 38px;
    padding: 7px 12px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font-size: 14px;
}

.bt-paging li a:hover {
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
}

.bt-paging li.active span {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ============ 详情页 ============ */
.bt-breadcrumb {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0;
    margin: 0 0 18px;
    font-size: 13px;
    color: var(--muted);
}

.bt-breadcrumb li + li::before {
    content: "/";
    margin-right: 6px;
    color: var(--border);
}

.bt-detail {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px 28px;
}

.bt-detail h1 {
    font-size: 24px;
    margin: 0 0 12px;
    word-break: break-all;
}

.bt-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    color: var(--muted);
    font-size: 13px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.bt-content {
    font-size: 15px;
    word-break: break-all;
}

.bt-content img {
    max-width: 100%;
    height: auto;
}

.bt-content a {
    word-break: break-all;
}

.bt-content ul,
.bt-content ol {
    padding-left: 22px;
}

/* 磁力/下载链接列表 */
.bt-content ul.attachlist {
    list-style: none;
    padding: 0;
}

.bt-content ul.attachlist li {
    margin-bottom: 8px;
}

.bt-content ul.attachlist li a {
    display: inline-block;
    padding: 8px 16px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    border-radius: 6px;
}

.bt-content ul.attachlist li a:hover {
    background: #047857;
    color: #fff;
    text-decoration: none;
}

/* ============ 页脚 ============ */
.bt-footer {
    background: var(--card);
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    padding: 22px 16px;
}

/* ============ 回到顶部 ============ */
.bt-totop {
    position: fixed;
    right: 24px;
    bottom: 32px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--muted);
    font-size: 18px;
    z-index: 200;
}

.bt-totop:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* ============ 响应式 ============ */
@media (max-width: 640px) {
    .bt-header-search {
        display: none;
    }

    .bt-hero-title {
        font-size: 30px;
    }

    .bt-search-box button {
        padding: 0 20px;
    }

    .bt-detail {
        padding: 18px 16px;
    }

    .bt-detail h1 {
        font-size: 20px;
    }
}
