.dn {
    display: none;
}

.go-top {
    z-index: 1000;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--themecolor);
    color: #fff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s, opacity 0.3s;
}

.go-top:hover {
    background-color: var(--themehovercolor);
}

.go-top a {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.go-top .fas {
    font-size: 20px;
}

/* 短代码模块 */

/* ALERT */
.text-xs.font-semibold {
    margin-top: 0 !important;
    margin-bottom: 0px !important;
    margin-left: 5px;
}

.alert-box {
    border-radius: 0.6rem;
    box-shadow: 0 0 6px #00000008;
    overflow: hidden;
    margin: 20px 0 !important;
    display: flex;
    padding: 10px 20px;
    transition: all 0.15s ease-out;
    transform: scale(1);
    color: white;
    font-weight: bold;
}

.alert-box:hover {
    transform: scale(1.05);
}

.alert-icon {
    margin-right: 10px;
    font-size: 18px;
    line-height: 1;
}

.alert-box.green {
    background-color: #48c774;
}

.alert-box.blue {
    background-color: #3273dc;
}

.alert-box.yellow {
    background-color: #feb272;
}

.alert-box.red {
    background-color: #dc3545;
}

.alert-box.pink {
    background-color: #ea868f;
}

/* WINDOW */
.notifications-container {
    width: auto;
    height: auto;
    font-size: 0.875rem;
    line-height: 1.25rem;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 0 6px #00000008;
}

.flex {
    display: flex;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.window {
    padding: 20px 0px 0px 10px;
    border-radius: 0.5rem;
}

.window.blue {
    background-color: #dbeafe;
}

.window.green {
    background-color: #f0fdf4;
}

.window.yellow {
    background-color: #fef3c7;
}

.window.red {
    background-color: #fee2e2;
}

.window.pink {
    background-color: #ffdde7;
}


.window.blue,
.window.blue .window-prompt-heading {
    color: #2563eb;
    font-size: 17px;
    margin-bottom: 14px;
}

.window.green,
.window.green .window-prompt-heading {
    color: #166534;
    font-size: 17px;
    margin-bottom: 14px;
}

.window.yellow,
.window.yellow .window-prompt-heading {
    color: #d97706;
    font-size: 17px;
    margin-bottom: 14px;
}

.window.red,
.window.red .window-prompt-heading {
    color: #b91c1c;
    font-size: 17px;
    margin-bottom: 14px;
}

.window.pink,
.window.pink .window-prompt-heading {
    color: #be185d;
    font-size: 17px;
    margin-bottom: 14px;
}

.window-prompt-wrap {
    margin: 0 0.75rem;

}

.window-prompt-heading {
    font-weight: bold;
    text-align: left;
}

.window-prompt-prompt {
    color: #333;
    font-size: 14px;
}


/* 确保 .right-sidebar 的样式 */
.right-sidebar {
	top: 0;
	overflow-y: auto;
    overflow-x: hidden;
	padding: 50px 50px 50px 50px;
	position: fixed;
	width: 344px;
}

/* 分类和标签模块样式 */
.category-section,
.tag-section,
.toc-section,
.search-section {
	margin-bottom: 20px;
}

.section-header {
	display: flex;
	align-items: center;
	font-size: 1.2rem;
	font-weight: bold;
	color: #333;
}

.section-header .icon {
	font-size: 1.5rem;
	margin-right: 8px;
}

.section-body {
	padding: 10px 0;
}

.category-cloud,
.tag-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.category-cloud .category,
.tag-cloud .tag {
	display: inline-block;
	padding: 2px 12px;
	color: #333;
	border-radius: 0.4rem;
	text-decoration: none;
	font-size: 0.9em;
	background: #ffffff;
	color: #374043;
	transition: background-color 0.3s, color 0.3s;
	border: 1px solid #ddd; 
    box-shadow: 0 0 6px #00000008;
}

.category-cloud .category:hover,
.tag-cloud .tag:hover {
	background-color: #f8f8f8;
}
.category-cloud .category:active,
.tag-cloud .tag:active {
    background-color: #e0e0e0;
	transform: scale(0.95); 
}


@media screen and (max-width: 1183px) {
	.right-sidebar {
		display: none;
	}
}

@media (min-width: 1183px) {
	.right-sidebar {
		display: inline;
	}
}

/** TOC 目录**/
.toc-section {
    max-height: 380px; 
    overflow-y: auto; 
    overflow-x: hidden; 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
}

.toc-section::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.toc {
    right: 2%;
    top: 80px;
}

.dir {
    position: relative;
    padding-bottom: 8px;
    box-sizing: border-box;
}

#toc {
    margin: 0;
    padding-left: 15px;
    width: 100%;
    box-sizing: border-box;
}

#toc .li {
    border: 1px solid #f6f6f6; 
    border-radius: 5px; 
    transition: background-color 0.3s, transform 0.3s; 
}

#toc .li:hover {
    border: 1px solid #ddd; 
    background-color: #f0f0f0; 
}

#toc .li:active {
    background-color: #e0e0e0; 
    transform: scale(0.95); 
}

#toc .toc-a {
    text-decoration: none; 
    display: block; 
}

.toc-a.li-active {
    color: var(--themehovercolor);
}

.sider {
    width: 2px;
    height: 100%;
    background: #eee;
    position: absolute;
    left: 0;
    top: 0;
    border-radius: 10px;
    margin: auto;
    bottom: 0;
}

.siderbar {
    display: flex;
    width: 100%;
    height: 20px;
    line-height: 2;
    background: var(--themecolor);
    transition: transform 0.1s ease;
}

.toc-a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.li-1 .toc-a {
    padding-left: 0px;
}

.li-2 .toc-a {
    padding-left: 8px;
}

.li-3 .toc-a {
    padding-left: 16px;
}

.li-4 .toc-a {
    padding-left: 24px;
}

.li-5 .toc-a {
    padding-left: 32px;
}

.li-6 .toc-a {
    padding-left: 40px;
}


/**友链卡片**/

.friendsboard-list {
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-start;
    margin-top: 1em;
    width: calc(100% + 15px);
    margin-left: -15px;
}

.friendsboard-list,
.friendsboard-list * {
    box-sizing: border-box;
}

.friendsboard-item {
    position: relative;
    cursor: pointer;
    box-shadow: 1px 1px 3px 0 rgba(0, 0, 0, .05);
    transition: ease all 0.3s;
    overflow: hidden;
    background: #f8fafc;
    border-radius: 0.45rem;
    display: flex;
    flex-flow: column nowrap;
    justify-content: flex-start;
    border: none !important;
    display: block;
    margin-left: 15px;
    margin-bottom: 25px;
    width: calc(33.3333% - 15px);
    padding: 20px;
}

.friendsboard-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 1px 6px 1px rgba(0, 0, 0, .06);
}

.friends-card-header {
    display: flex;
    align-items: center;
    position: relative;
}

.friends-card-username {
    font-size: 1.2rem;
    font-weight: bold;
    margin-right: 0.5rem;
}

.friends-card-dot {
    width: 10px;
    height: 10px;
    background-image: linear-gradient(var(--themecolor), transparent);
    border-radius: 50%;
    opacity: .45;
    position: absolute;
    left: -3px;
    top: 20px;
}

.friends-card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.friends-card-text {
    display: flex;
    font-size: 0.85rem;
    flex-direction: column;
    flex-grow: 1;
}

.friends-card-text p {
    font-size: 0.85rem;
    margin: 0;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.friends-card-avatar {
    width: 70px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    transition: visibility 0s, opacity 0.5s linear;
}

.friends-card-avatar.hidden {
    visibility: hidden;
    opacity: 0;
}

/* media query for responsive design */
@media screen and (max-width: 767.5px) {
    .friendsboard-item {
        width: calc(50% - 15px);
    }
}

@media screen and (max-width: 450px) {
    .friendsboard-item {
        width: calc(100% - 15px);
    }
}


/* 折叠面板 */
.collapsible-panel {
    margin-bottom: 20px;
    border: 1px solid #f7f7f7;
    border-radius: 0.75rem;
    overflow: hidden;
}

.collapsible-header {
    background-color: #f7f7f7;
    cursor: pointer;
    padding: 16px;
    text-align: left;
    outline: none;
    border: none;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.collapsible-header .icon {
    transition: transform 0.3s;
}

.collapsible-header.active .icon {
    transform: rotate(180deg);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
}

.collapsible-details {
    padding: 16px;
    background-color: white;
}

/* 时间线 */
#timeline {
    position: relative;
    padding: 20px 0;
    margin: 20px 0 !important;

}

.timeline-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    position: relative;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    background-color: var(--themecolor);
    border-radius: 50%;
    position: absolute;
    left: 25px;
    top: 0;
}

.timeline-content {
    margin-left: 50px;
    position: relative;
    flex-grow: 1;
}

.timeline-date {
    font-weight: bold;
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.timeline-title {
    font-size: 18px;
    margin: 0 0 10px;
    color: #000;
}

.timeline-description {
    font-size: 14px;
    margin: 0;
    color: #666;
}

#timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--themecolor);
    top: 0;
    bottom: 0;
    left: 30px;
}

.timeline-dot::before {
    content: '\e810';
    font-family: 'fontello';
    position: absolute;
    left: -20px;
    top: -8px;
    color: var(--themehovercolor);
}


/* tabs */
.tab-header {
    display: flex;
    position: relative;
    border-bottom: 1px solid #e0e0e0;
}

.tab-link {
    padding: 10px 20px;
    cursor: pointer;
    color: #888;
    transition: color 0.3s;
    position: relative;
}

.tab-link.active {
    color: #333;
    background-color: #fff;
}

.tab-indicator {
    position: absolute;
    bottom: 0;
    height: 2px;
    background-color: var(--themecolor);
    transition: left 0.3s ease, width 0.3s ease;
}

.tab-content {
    padding: 20px 0;
    background-color: #fff;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/*sidebar 搜索*/
.search-container {
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 0.65rem;
    border: 1px solid #ddd; 
    box-shadow: 0 0 6px #00000008;
}

.search-input {
    border: none;
    outline: none;
    font-size: 16px;
    padding: 10px 10px 10px 12px;
    border-radius: 0.75rem;
    width: 225px;
}

.search-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 10px 10px 0px;
    display: flex;
    align-items: center;
    justify-content: center;
}