/* Navigation插件前端样式 */

.navigation {
    position: absolute;
    width: 90vw;
    height: 85vh;
    left: 50vw;
    top: 15vh;
}

.nav-header {
    margin-bottom: 15px;
    text-align: center;
}

.nav-header h3 {
    margin: 0;
    color: #333333;
    font-size: 18px;
}

/* 搜索框样式 */
.nav-search {
    margin-bottom: 20px;
    display: block;
}

.nav-search-form {
    display: flex;
    max-width: 80%;
    height: 48px;
    margin: auto;
}

.nav-search-container {
    position: relative;
    display: flex;
    flex: 1;
    align-items: stretch;
}

.nav-search-input {
    flex: 1;
    padding-left: 20px;
    padding-right: 100px;
    border: 1px solid #dddddd;
    border-radius: 30px 0 0 30px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    background: white;
}

.nav-search-engine {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 1px solid #dddddd;
    border-radius: 15px;
    padding: 6px 10px;
    background: #f8f9fa;
    font-size: 12px;
    color: #333333;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
    text-align: center;
}

.nav-search-engine:hover {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 搜索框焦点样式合并 */
.nav-search-input:focus,
.nav-search-engine:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
    outline: none;
}

.nav-search-btn {
    background: #007bff;
    width: 100px;
    color: white;
    border-radius: 0 30px 30px 0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}


/* 常用导航样式 */
.nav-search .nav-common-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
    padding-top: 15px;
}

.nav-common-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    text-decoration: none;
    color: #333333;
    transition: all 0.3s ease;
    padding: 10px 5px;
    border-radius: 8px;
}

.nav-common-link:hover {
    transform: translateY(-2px);
}

/* 统一头像样式 */
.nav-avatar,
.nav-common-avatar,
.nav-link-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f8f9fa;
    flex-shrink: 0;
    object-fit: cover;
    text-align: center;
}

/* 常用导航头像 */
.nav-common-avatar {
    margin-bottom: 8px;
    display: block;
    line-height: 48px;
    font-size: 24px;
}

/* 通用链接头像 */
.nav-link-avatar {
    margin-right: 12px;
}

/* 针对div版本的nav-link-avatar（用于显示占位符） */
.nav-link-avatar:not(img) {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.nav-common-name {
    font-size: 12px;
    font-weight: 500;
    color: #333333;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* 统一容器样式 */
.nav-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px;
    border-radius: 10px;
    background-color: var(--main-background);
    justify-content: space-between;
}

/* 分类样式 */
.nav-categories {
    display: flex;
}

.nav-category {
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: var(--text-color);
}

.nav-category:hover {
    color: var(--green);
}

.nav-category.active {
    color: var(--green);
    font-weight: bold;
}

/* 分页组件样式 */
.nav-pagination {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 8px;
}

/* 内容区域样式 */
.nav-content {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 15px;
    flex-basis: 100%;
}

.nav-pagination-btn {
    padding: 8px;
    background: white;
    border: 1px solid #dddddd;
    border-radius: 4px;
    color: #333333;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    line-height: 1;
}

.nav-pagination-btn:hover:not(:disabled) {
    background: #007bff;
    color: white;
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
}

/* 文本截断样式 */
.nav-common-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-new-badge {
    background: #dc3545;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

/* 新的链接样式 */
.link-item {
    overflow: hidden;
}

.link-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}



.link-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.link-description {
    white-space: initial;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    height: 36px;
}

.link-arrow {
    margin-left: 8px;
    flex-shrink: 0;
}

/* 电脑端样式 */
@media screen and (min-width: 576px) {
    .navigation {
        width: 40vw;
        height: 80vh;
    }
    
    .nav-content {
        grid-template-columns: repeat(2, 1fr);
    }
}