/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

/* 顶部导航样式 */
header {
    background-color: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    padding: 0.75rem 0;
    height: 3.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    border-radius: 4px;
}

.logo span {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.9rem;
}

.avatar {
    border-radius: 50%;
}

.username {
    color: #666;
}

.logout {
    color: #999;
    cursor: pointer;
}

.logout:hover {
    color: #666;
}

/* 主要内容区域 */
main {
    display: flex;
    /* flex-direction: row-reverse; */
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 1rem;
    gap: 1.5rem;
}

/* 内容区域 */
.content-wrapper {
    flex: 1;
}

/* 标题区 */
.title-section {
    margin-top: .5rem;
    margin-bottom: 1rem;
}

.title-section h2 {
    font-size: 1.2rem;
    font-weight: 500;
    color: #333;
}

/* 应用卡片网格 */
.app-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.app-card {
    background-color: #fff;
    border: 1px solid #e0e4ea;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}
.app-card,
.app-card:link,
.app-card:visited,
.app-card:hover,
.app-card:active,
.app-card:focus {
  text-decoration: none;
  color: inherit; /* 继承父元素颜色 */
  /* 或指定固定颜色：color: #333; */
}

.app-card:not(.disabled):hover{
    border-color: #4a70ff;
    background-color: #f1f6ff;
}

.app-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.app-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background-color: #f1f6ff;
    border-radius: 4px;
    width: 60px;
    height: 60px;
}

.app-icon img {
    width: 24px;
    height: 24px;
}

.app-info {
    flex: 1;
    position: relative;
}

.app-name {
    font-size: 1rem;
    font-weight: 600;
    color: #212731;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-desc {
    font-size: 0.75rem;
    color: #212731;
}

.entry-btn{
    right: 0;
    top:0;
    width: 18px;
    height: 18px;
    position: absolute;
    justify-content: flex-end;
    overflow: hidden;
    visibility: hidden;
    background: #fff;
    border-radius: 50%;
    color: #fff;
}
.app-card:not(.disabled):hover .entry-btn {
     visibility: visible;
     background: url(../img/arrow-right-white.png) no-repeat 3px center / 14px, 
    #4a70ff;

}

/* 常用导航区域 */
.favorite-section {
    background: #fff;
    border-radius: 6px;
    padding: 1.2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.favorite-section h2 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #333;
}

.favorite-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.favorite-link {
    color: #666;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.favorite-link:hover {
    color: #4285f4;
}

/* 侧边栏 */
.sidebar {
    margin-top: 3rem;
    width: 220px;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.user-profile {
    padding: 1.5rem;
    text-align: center;
}

.profile-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-bottom: 12px;
}

.profile-name {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
}

.sidebar-divider {
    height: 1px;
    background-color: #eee;
    margin: 0.5rem 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    color: #666;
    cursor: pointer;
    transition: background-color 0.2s;
}

.sidebar-nav li:hover {
    background-color: #f8f9fa;
}

.sidebar-nav li.active {
    color: #4285f4;
    background-color: #f0f5ff;
    font-weight: 500;
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #4285f4;
    border: none;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
    z-index: 999;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: white;
    transition: transform 0.3s;
}

/* 响应式设计 - 平板 */
@media (max-width: 1024px) {
    .app-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 响应式设计 - 小平板 */
@media (max-width: 768px) {
    .app-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .favorite-links {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        width: 200px;
    }
}

/* 响应式设计 - 移动设备 */
@media (max-width: 680px) {
    main {
        flex-direction: column;
    }
    
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        transform: translateX(-100%);
        z-index: 990;
        border-radius: 0;
        transition: transform 0.3s ease;
    }
    
    .sidebar.show-mobile {
        transform: translateX(0);
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* 添加暗色背景遮罩 */
    .sidebar.show-mobile::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
}

/* 超小屏幕 */
@media (max-width: 480px) {
    .app-grid {
        grid-template-columns: 1fr;
    }
    
    .logout {
        display: none;
    }
}
