:root {
    --primary-color: #FFD700;
    --secondary-color: #fbec98;
    --dark-text: #000000;
    --dropdown-menu:  #ffdf29;
}

body {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    background-color: #fff5d5;
}

/* 导航栏样式 */
.navbar {
    background-color: var(--primary-color);
    padding: 0.5rem 5%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    z-index: 99;
    top: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: rgb(0, 0, 0);
    text-decoration: none;
}

.menu-items {
    gap: 1rem;  /* 控制图标和文字间距 */
    direction: rtl;
    cursor: pointer; /* 添加鼠标指针 */
}

.menu-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: rgb(0, 0, 0);
    text-decoration: none; /* 移除下划线 */
    order: 1;  /* 控制文字和图标顺序 */
    vertical-align: middle; /* 垂直居中 */
    text-align: center; /* 居中文字 */
}

.menu-icon {
    width: 2rem;
    height: 2rem;
    filter: brightness(0) saturate(100%); /* 强制显示为黑色 */
    object-fit: contain; /* 保持原图比例 */
    transition: transform 0.3s ease; /* 添加动画效果 */
    order: 2; /* 控制文字和图标顺序 */
    text-align: center; /* 居中图标 */
    vertical-align: middle; /* 垂直居中 */
}

/* 介绍区域 */
.intro {
    text-align: center;
    padding-top: 5rem;
    color: var(--dark-text);
    padding-bottom: auto;
}

/* 每日推荐区块 */
.daily-recommend {
    display: flex;
    margin: auto 5%;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

.recommend-image {
    flex: 1;
    background: url('your-image-url.jpg') center/cover;
    min-height: 200px;
    cursor: pointer;
    text-align: center;
    margin: auto;
}

.recommend-text {
    flex: 1;
    padding: 2rem;
    background-color: var(--secondary-color);
}

/* 工具分类 */
.category-section {
    padding: 2rem 5%;
}

.category-title {
    font-size: 1.2rem;
    color: rgb(59, 59, 59);
    background-color: var(--primary-color);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    display: inline-block;
    margin: 1rem 0;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr)); /* 每个网格大小的调整 */
    gap: 1.5rem;
}

.tool-card {
    background: #ffffff;
    padding: 1.25rem;
    border-radius: 1rem;
    transition: transform 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--dark-text);
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.tool-icon {
    width: 40px;
    height: 40px;
    background-color: var(--secondary-color);
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* 响应式设计 设备范围为700px 可修改*/
@media (max-width: 700px) {
    .tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(7.1rem, 1fr)); /* 网格大小在手机端的显示 */
    }
    .navbar {
        padding: 0.1rem 5%;
        position: fixed;
    }
    .intro {
        padding-top: 17.5%; /* 调整文字大小 */
        padding-bottom: 2%;
    }
    .intro h1 {
        font-size: 1.15rem;
        margin: 0;
        font-weight: bold;
    }
    .daily-recommend {
        flex-direction: column; /* 竖排 */
    }
    .recommend-image {
        min-height: 7rem; /* 图片高度 */
    }
    .recommend-text {
        flex: 1;
        padding: 0rem 1.25rem; /* 调整文字区域的内边距 */
    }
    .menu-items {
        gap: 0; /* 小屏幕移除间距 */
    }
    
}

.icp {
    position: bottom;
	bottom: 0;
	right: 0;
	margin: 10px 0;
	width: 100%;
	height: 36px;
	white-space: pre;
	text-align: center;
	color: gray;
	z-index: 1000;
}

.icp > a {
    color: gray;
    text-decoration: none;
}

.icp > a:hover {
    color: rgb(0, 0, 0);
    text-decoration: none;
}

/*----------------navbar-----------------------------------*/

/* 新增CSS样式 */
.menu-trigger {
    position: relative; /* 为下拉菜单提供定位上下文 */
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.menu-trigger:hover {
    background-color: var(--secondary-color);
}

.dropdown-menu {
    display: none; /* 默认隐藏下拉菜单 */
    position: absolute; /* 定位下拉菜单 */
    top: 100%; /* 距离顶部的距离 */
    right: 0; /* 右对齐 */
    background: var(--dropdown-menu); /* 背景色 */
    border-radius: 8px;  /* 圆角 */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); /* 阴影 */
    padding: 1rem; /* 内边距 */
    margin-top: 0.5%; /* 距离顶部的距离 */
    min-width: 200px; /* 最小宽度 */
    z-index: 100; /* 层级 */
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    color: var(--dark-text);
    text-decoration: none; /* 移除下划线 */
    padding: 0.5rem 1rem;
    border-radius: 6px;
    display: block;
    transition: all 0.3s ease;
}

.dropdown-menu a:hover {
    background-color: var(--secondary-color);
    transform: translateX(5px);
}

/* 移动端适配 */
@media (max-width: 700px) {
    .dropdown-menu {
        position: right; /* 右侧弹出 */
        width: 100%;
        right: 0; /* 右对齐 */
        left: 0; /* 左对齐 */
        top: 4rem; /* 根据导航栏高度调整 */
        border-radius: 1rem; 
        box-shadow: 0; /* 移除阴影 */
        border-bottom: 0.5rem rgba(0, 0, 0, 0);
        min-width: 130%; /* 最小宽度 */
    }
    
    .dropdown-menu li {
        text-align: right; /* 右对齐 */
    }
    
    .dropdown-menu a {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    .icp {
        font-size: 0.75rem; /* 调整版权信息的字体大小 */
    }
}