/* components.css - 组件样式 */

/* 横幅区域 */
.hero {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    flex-direction: column;
    padding-top: 60px;
}

.hero-content {
    max-width: 800px;
    width: 100%;
    color: #fff;
    animation: fadeInUp 1s ease-out;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 25px;
}

/* 搜索框（横幅区域） */
.hero .search-box {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.hero .search-box input {
    width: 100%;
    padding: 15px 60px 15px 20px;
    border: none;
    border-radius: 50px;
    background-color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    color: #333;
}

.hero .search-box input::placeholder {
    color: #666;
}

.hero .search-box input:focus {
    background-color: #fff;
    outline: none;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.hero .search-box button {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    font-size: 24px;
    color: #ff7e5f;
    cursor: pointer;
}

/* 搜索建议列表 */
#suggestions {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background-color: #fff;
    border-radius: 10px;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 100;
    display: none;
    animation: fadeIn 0.2s ease-in-out;
    text-align: left;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#suggestions li {
    padding: 12px 20px;
    cursor: pointer;
    color: #333;
    transition: background-color 0.3s;
}

#suggestions li.active, #suggestions li:hover {
    background-color: #f0f2f5;
}

/* 搜索引擎选择 */
.search-engines {
    margin-top: 10px;
}

.search-engines label {
    display: inline-block;
    margin-right: 15px;
    font-size: 14px;
    color: #fff;
}

.search-engines input {
    margin-right: 5px;
}

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

.link-card {
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    border: 1px solid #e0e0e0;
}

.link-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.link-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.card-content {
    padding: 20px 15px;
    text-align: center;
}

.card-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
    border-radius: 50%;
    overflow: hidden;
}

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

.card-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.card-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

/* 收藏按钮 */
.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 18px;
    color: #ccc;
    transition: color 0.3s;
}

.favorite-btn:hover, .favorite-btn.active {
    color: #ff7e5f;
}

/* 侧边栏菜单 */
.sidebar-menu li {
    list-style: none;
    position: relative;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: #333;
    transition: background 0.3s;
    border-radius: 8px;
    margin: 5px 10px;
}

.sidebar-menu li a:hover {
    background-color: #f0f2f5;
}

.sidebar-menu li a i {
    font-size: 18px;
    margin-right: 10px;
    color: #ff7e5f;
    min-width: 18px;
    text-align: center;
}

.sidebar-menu .submenu {
    display: none;
    list-style: none;
}

.sidebar-menu .submenu li a {
    padding-left: 40px;
}

.sidebar-menu .has-submenu.open .submenu {
    display: block;
}

/* 移动端菜单 */
.mobile-menu-list li {
    position: relative;
}

.mobile-menu-list li a {
    display: block;
    padding: 12px 20px;
    color: #333;
    font-size: 16px;
    border-bottom: 1px solid #eee;
}

.mobile-menu-list .has-submenu > a {
    position: relative;
}

.mobile-menu-list .has-submenu > a i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s;
}

.mobile-menu-list .has-submenu.open > a i {
    transform: translateY(-50%) rotate(180deg);
}

.mobile-menu-list .submenu {
    display: none;
}

.mobile-menu-list .has-submenu.open .submenu {
    display: block;
}

.mobile-menu-list .submenu li a {
    padding-left: 40px;
}

/* 信息小部件 */
.info-widgets {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    z-index: 998;
}

.info-widgets .widget {
    display: flex;
    align-items: center;
    background-color: rgba(255,255,255,0.8);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.info-widgets .widget i {
    margin-right: 6px;
}

#weatherIcon {
    animation: weatherIconAnimation 2s infinite;
}

@keyframes weatherIconAnimation {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* 回到顶部按钮 */
#backToTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    background-color: #ff7e5f;
    color: #fff;
    padding: 12px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    z-index: 100;
}

#backToTopBtn:hover {
    background-color: #eb5757;
    transform: translateY(-3px);
}

/* 动画效果 */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 我的收藏 */
.favorites-section {
    padding: 40px 0;
}

.favorites-section h2 {
    font-size: 32px;
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.favorites-section h2::after {
    content: '';
    width: 50px;
    height: 3px;
    background-color: #ff7e5f;
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

/* 分类区域 */
.category-section {
    padding: 60px 0;
}

.category-section h2 {
    font-size: 36px;
    color: #333;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.category-section h2::after {
    content: '';
    width: 60px;
    height: 4px;
    background-color: #ff7e5f;
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

/* 筛选标签 */
.filter-tags {
    text-align: center;
    margin-bottom: 30px;
}

.filter-tag {
    display: inline-block;
    padding: 8px 15px;
    background-color: #f1f1f1;
    color: #333;
    border-radius: 20px;
    margin: 0 10px 10px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.filter-tag.active, .filter-tag:hover {
    background-color: #ff7e5f;
    color: #fff;
}



