/* 基础样式 */
body {
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.6;
}

/* 颜色变量 */
:root {
    --primary: #165DFF;
    --secondary: #36BFFA;
    --neutral: #F5F7FA;
    --dark: #1D2129;
}

/* 响应式字体大小 */
h1,
.text-2xl {
    font-size: clamp(1.5rem, 1vw, 2.0rem);
}

h2,
.text-xl {
    font-size: clamp(1.0rem, 1vw, 1.5rem);
}

h3,
.text-lg {
    font-size: clamp(1.1rem, 1.5vw, 1.25rem);
}

p,
.text-base {
    font-size: clamp(1rem, 1vw, 1.1rem);
}

/* 动画过渡效果 */
* {
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* 移动端顶部导航栏 */
.mobile-header {
    display: flex;
    align-items: center;
}

/* 侧边栏样式 */
.sidebar {
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex;
    flex-direction: column;
}

.sidebar-nav {
    flex-grow: 1;
}

.sidebar-link {
    transition: all 0.3s ease;
}

/* 顶部区域样式 */
.header {
    position: relative;
    margin: 0 auto;
}

.search-container {
    position: relative;
    max-width: 512px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 1.25rem 1.5rem;
    border-radius: 1rem;
    outline: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.search-input:focus {
    box-shadow: 0 0 0 4px rgba(54, 191, 250, 0.15);
}

.search-button {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    transition: color 0.2s ease;
}

.search-button:hover {
    color: var(--secondary);
}

/* 分类标题样式 */
.category-title {
    position: relative;
}

.category-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.5rem;
    width: 40px;
    height: 2px;
    background-color: var(--primary);
}

/* 网站卡片样式 */
.website-card {
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--card);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.website-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover);
}

.website-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.website-icon {
    --icon-size: 48px; /* 统一尺寸变量 */
    width: var(--icon-size);
    height: var(--icon-size);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    background-color: var(--bg-color, #f3f4f6); /* 可自定义背景色 */
    overflow: hidden;
}

.website-icon img,
.website-icon i {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform: scale(0.8); /* 初始缩放，留出空间感 */
    transition: transform 0.2s;
    background-color: transparent;
}

.website-icon:hover img,
.website-icon:hover i {
    transform: scale(1); /* 悬停时恢复原始大小 */
}

/* 限制名称最多显示两行 */
.website-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

/* 限制介绍最多显示两行 */
.website-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

/* 鼠标悬停时显示完整描述
.website-card:hover .website-description {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #121A28; 背景颜色，可根据需要调整 
    color: #fff; 文字颜色，可根据需要调整 
    padding: 1rem;
    opacity: 1;
    visibility: visible;
    -webkit-line-clamp: unset;
    overflow: auto;
} */

/* 页脚样式 */
.footer {
    padding: 1.5rem 0;
}

.footer a {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.footer a:hover {
    transform: translateY(-2px);
}

/* 侧边栏子菜单样式 */
.submenu {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.submenu.expanded {
    max-height: 1000px;
}
