/* ============================================
   网址导航 - 左右布局样式
   ============================================ */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 20px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #1890ff;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #40a9ff;
}

/* ========================================
   左右布局容器
   ======================================== */
.layout {
    display: flex;
    flex: 1;
    width: 100%;
}

/* ========================================
   左侧导航 (深色)
   ======================================== */
.sidebar {
    width: 200px;
    flex-shrink: 0;
    background: #1a1a2e;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 50;
    display: flex;
    flex-direction: column;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 2px;
}

/* 侧边栏 Logo */
.sidebar-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 24px 16px 18px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: opacity 0.2s;
}

.sidebar-logo:hover {
    color: #fff;
    opacity: 0.85;
}

.sidebar-logo i {
    font-size: 32px;
}

.sidebar-logo span {
    font-size: 14px;
    letter-spacing: 1px;
}

/* 分类导航 */
.sidebar-inner {
    flex: 1;
    padding: 8px 0;
}

.sidebar-title {
    font-size: 11px;
    color: #555;
    padding: 8px 20px 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-title i {
    font-size: 11px;
}

.side-nav {
    display: flex;
    flex-direction: column;
}

.side-nav-item {
    display: flex;
    align-items: center;
    padding: 9px 20px;
    font-size: 13px;
    color: #aab;
    border-left: 3px solid transparent;
    transition: all 0.15s;
}

.side-nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.side-nav-item.active {
    color: #fff;
    background: rgba(24, 144, 255, 0.15);
    border-left-color: #1890ff;
    font-weight: 500;
}

/* ========================================
   右侧主内容区
   ======================================== */
.site-main {
    flex: 1;
    min-width: 0;
    padding: 0 24px 40px;
}

/* ========================================
   搜索区域 (右侧顶部)
   ======================================== */
.search-area {
    padding: 24px 0 16px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.search-bar {
    display: flex;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 12px 48px 12px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 22px;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: border-color 0.3s;
    background: #fff;
}

.search-input:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.search-input::placeholder {
    color: #bbb;
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: #1890ff;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

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

.search-engines {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.engine-item {
    padding: 4px 14px;
    border-radius: 14px;
    font-size: 12px;
    color: #888;
    background: #f0f0f0;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.engine-item:hover {
    color: #fff;
    background: #1890ff;
}

.engine-item.active {
    color: #fff;
    background: #1890ff;
    font-weight: 500;
}

/* ========================================
   分类区块
   ======================================== */
.category-section {
    margin-bottom: 36px;
}

.category-title {
    font-size: 18px;
    color: #222;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8e8e8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-title i {
    color: #1890ff;
    font-size: 16px;
}

/* ========================================
   链接卡片网格
   ======================================== */
.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #eee;
    text-decoration: none;
    color: #333;
    transition: all 0.25s ease;
    overflow: hidden;
}

.link-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-color: #d0e0f0;
    color: #333;
}

.card-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #f0f5ff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-icon i {
    font-size: 18px;
    color: #1890ff;
}

.card-info {
    flex: 1;
    min-width: 0;
}

.card-title {
    font-size: 15px;
    font-weight: 500;
    color: #222;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-desc {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========================================
   搜索页
   ======================================== */
.search-result-header {
    margin-bottom: 20px;
}

.search-result-header h2 {
    font-size: 20px;
    color: #333;
}

.search-result-header h2 .highlight {
    color: #ff4d4f;
}

.result-count {
    color: #888;
    font-size: 14px;
    margin-top: 4px;
}

/* ========================================
   空状态
   ======================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #bbb;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

.empty-state p {
    font-size: 15px;
}

.empty-hint {
    text-align: center;
    color: #bbb;
    padding: 20px;
    font-size: 14px;
}

/* ========================================
   页脚
   ======================================== */
.site-footer {
    background: #1a1a2e;
    color: #bbb;
    padding: 18px 0;
}

.footer-inner {
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.footer-links {
    margin-bottom: 8px;
}

.footer-links a {
    color: #ccc;
    font-size: 14px;
}

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

.footer-links .sep {
    margin: 0 12px;
    color: #555;
}

.footer-info {
    font-size: 13px;
    color: #888;
}

.footer-info a {
    color: #888;
}

.footer-info a:hover {
    color: #bbb;
}

.footer-credit {
    margin-top: 4px;
    font-size: 12px;
    color: #666;
}

.footer-credit a {
    color: #666;
}
