* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 60px; /* 为底部导航栏留出空间 */
}

.header {
    background-color: #4a90e2;
    color: white;
    padding: 1rem;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.logo-icon {
    width: 2rem;
    height: 2rem;
}

/* 内容区域 */
.content-container {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 10px;
}

/* 页面部分 */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* 首页样式 */
.hero {
    padding: 1.5rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, #4a90e2 0%, #5ca9fb 100%);
    color: white;
}

.hero h1 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
    opacity: 0.9;
}

.search-container {
    display: flex;
    margin: 0 auto 1rem;
    max-width: 90%;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-input {
    flex: 1;
    padding: 0.7rem 1rem;
    border: none;
    font-size: 0.9rem;
}

.search-button {
    background-color: white;
    border: none;
    padding: 0.7rem 1rem;
    cursor: pointer;
}

.module-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    padding: 1rem;
}

.module-card {
    background-color: white;
    border-radius: 10px;
    padding: 1.2rem 0.8rem;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s;
}

.module-card:active {
    transform: scale(0.98);
}

.module-icon {
    font-size: 2rem;
    margin-bottom: 0.6rem;
}

.module-icon-img {
    width: 40px;
    height: 40px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.module-card h3 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.module-card p {
    color: #666;
    font-size: 0.8rem;
}

/* 我的页面样式 */
.profile-header {
    background: linear-gradient(135deg, #4a90e2 0%, #5ca9fb 100%);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #fff;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.profile-name {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.profile-info {
    font-size: 0.9rem;
    opacity: 0.9;
}

.menu-list {
    background-color: white;
    margin: 1rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: #333;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-icon {
    margin-right: 1rem;
    font-size: 1.2rem;
    color: #4a90e2;
    width: 24px;
    text-align: center;
}

.menu-text {
    flex: 1;
    font-size: 0.9rem;
}

.menu-arrow {
    color: #ccc;
}

/* 消息页面样式 */
.message-list {
    background-color: white;
    margin: 1rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.message-item {
    display: flex;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.message-item:last-child {
    border-bottom: none;
}

.message-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #4a90e2;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.2rem;
}

.message-content {
    flex: 1;
}

.message-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.message-text {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.3rem;
}

.message-time {
    font-size: 0.7rem;
    color: #999;
}

/* 底部导航栏 */
.nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    display: flex;
    height: 60px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    text-decoration: none;
    font-size: 0.7rem;
    transition: color 0.2s;
}

.nav-item.active {
    color: #4a90e2;
}

.nav-icon {
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
}

/* 工具页面样式 */
.tools-header {
    padding: 1rem;
    background-color: white;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tools-title {
    font-size: 1.2rem;
    color: #333;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1rem;
}

.tool-card {
    background-color: white;
    border-radius: 10px;
    padding: 1rem 0.5rem;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: #333;
}

.tool-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #4a90e2;
}

.tool-name {
    font-size: 0.8rem;
}

/* 工具分类样式 */
.tool-categories {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 10px 0;
    margin-bottom: 15px;
    -webkit-overflow-scrolling: touch;
}

.category-btn {
    background-color: #f5f5f5;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    margin-right: 10px;
    white-space: nowrap;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn.active {
    background-color: #4a90e2;
    color: white;
}

/* 空消息样式 */
.empty-message {
    width: 100%;
    text-align: center;
    padding: 30px 0;
    color: #999;
    font-size: 16px;
}

.module-card h3 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.module-card p {
    color: #666;
    font-size: 0.8rem;
}

.menu-list {
    background-color: white;
    margin: 1rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: #333;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-icon {
    margin-right: 1rem;
    font-size: 1.2rem;
    color: #4a90e2;
    width: 24px;
    text-align: center;
}

.menu-text {
    flex: 1;
    font-size: 0.9rem;
}

.menu-arrow {
    color: #ccc;
}

/* 消息页面样式 */
.message-list {
    background-color: white;
    margin: 1rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.message-item {
    display: flex;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.message-item:last-child {
    border-bottom: none;
}

.message-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #4a90e2;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.2rem;
}

.message-content {
    flex: 1;
}

.message-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.message-text {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.3rem;
}

.message-time {
    font-size: 0.7rem;
    color: #999;
}

/* 底部导航栏 */
.nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    display: flex;
    height: 60px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    text-decoration: none;
    font-size: 0.7rem;
    transition: color 0.2s;
}

.nav-item.active {
    color: #4a90e2;
}

.nav-icon {
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
}

/* 工具页面样式 */
.tools-header {
    padding: 1rem;
    background-color: white;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tools-title {
    font-size: 1.2rem;
    color: #333;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1rem;
}

.tool-card {
    background-color: white;
    border-radius: 10px;
    padding: 1rem 0.5rem;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: #333;
}

.tool-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #4a90e2;
}

.tool-name {
    font-size: 0.8rem;
}

/* 分类区域样式 */
.tools-container {
    padding: 0.5rem;
}

.category-section {
    margin-bottom: 1.5rem;
    background-color: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.category-title {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.category-tools {
    margin-top: 0.5rem;
}

.tool-icon-img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 70px;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: rgba(74, 144, 226, 0.8);
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 900;
}

.back-to-top.visible {
    opacity: 1;
}


.login-required-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.login-icon {
    font-size: 3rem;
    color: #4a90e2;
    margin-bottom: 1rem;
}

.login-required-container h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.login-required-container p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.login-btn {
    display: inline-block;
    background-color: #4a90e2;
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.3);
}
