/* Clean Blog Theme CSS */
:root {
    --primary-color: #0085A1;
    --text-color: #212529;
    --light-gray: #6c757d;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
    color: var(--text-color);
    background-color: #fff;
    line-height: 1.6;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
}

/* Main Content */
.main-content {
    margin-top: 80px;
    padding-top: 20px;
}

.post-preview {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.post-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.post-subtitle {
    font-size: 1.25rem;
    color: var(--light-gray);
    margin-bottom: 1rem;
}

.post-meta {
    font-size: 0.875rem;
    color: var(--light-gray);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .post-title {
        font-size: 1.5rem;
    }
    
    .post-subtitle {
        font-size: 1.1rem;
    }
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background-color: #006f8a;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Form Styles */
.card {
    border: none;
    border-radius: 10px;
}

.form-control {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 133, 161, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

/* Card Styles */
.card.shadow-sm {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

.card-body {
    padding: 2rem !important;
}

/* Link Styles */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #006f8a;
    text-decoration: underline;
}

/* Footer */
.footer {
    background-color: #f8f9fa;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    text-align: center;
    color: var(--light-gray);
}

/* SwalUtil.loading 加载样式 - 统一样式定义 */
.loading-popup {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
    width: 300px !important;
}

.loading-title-container {
    margin-bottom: 0 !important;
}

.loading-title {
    color: #333333;
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 0.8em;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5em 0 1em;
}

/* 传统加载动画 */
.loading-spinner {
    width: 50px;
    height: 50px;
    margin-bottom: 20px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 14px;
    color: #666666;
    text-align: center;
    line-height: 1.5;
    max-width: 90%;
}

/* 省略号动画 - 修改为固定宽度 */
.loading-dots {
    display: inline-block;
    width: 20px; /* 固定宽度 */
    text-align: left;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(45deg, #2196F3, #00BCD4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    font-family: "Microsoft YaHei", sans-serif;
    letter-spacing: 2px;
    padding: 5px 0;
    transition: transform 0.3s ease;
}

.logo-text:hover {
    transform: scale(1.05);
}

.contact-icon {
    color: #6c757d; /* 使用Bootstrap的次要文本颜色 */
    flex-shrink: 0;
}

.contact-list li {
    overflow: hidden;
}

.contact-list li span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 通用遮罩层样式 */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
    backdrop-filter: blur(5px);
}

.auth-message {
    text-align: center;
    padding: 2rem;
}

.auth-message i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #f8f9fa;
}

.auth-message h3 {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.auth-message p {
    color: #adb5bd;
}

/* 客户端模式下的容器样式 */
.container-fluid {
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
}

/* 用户中心内容区域样式 */
.content-area {
    min-height: 600px;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,.08);
    margin-left: 0;
    margin-right: 0;
}

.content-area .card-body {
    padding: 1.5rem;
}

/* 确保内容区域在小屏幕上也能正常显示 */
@media (max-width: 768px) {
    .content-area {
        margin: 0 15px;
    }
}

.user-sidebar {
    border: none;
    overflow: visible;
}

.sidebar-header {
    border-bottom: 1px solid #eee;
}

.list-group-item {
    border: none;
    padding: 1rem 1.5rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 0;
}

.list-group-item i {
    font-size: 1.2rem;
}

.list-group-item.active {
    background-color: #f8f9fa;
    color: #007bff;
    border-left: 3px solid #007bff;
    position: relative;
    z-index: 0;
}

.list-group-item:hover {
    background-color: #f8f9fa;
    color: #007bff;
    position: relative;
    z-index: 1;
}

/* 子菜单父元素样式 */
.submenu-parent {
    position: relative;
}

.submenu-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.submenu-parent:hover .submenu-arrow {
    transform: rotate(-90deg);
}

/* 子菜单样式 */
.submenu {
    position: absolute;
    left: 60%;
    top: 0;
    min-width: 150px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 6px 0;
    display: none;  /* 默认隐藏 */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateX(-10px);
}

.submenu-parent:hover .submenu {
    display: block;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.submenu-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.submenu-item:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

.submenu-item.active {
    color: #007bff;
    background-color: #f8f9fa;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .submenu {
        position: static;
        left: auto;
        top: auto;
        box-shadow: none;
        padding-left: 1rem;
        border-top: 1px solid #f1f5f9;
        border-radius: 0;
        margin-top: 4px;
        width: 100%;
        display: none;
        transform: none;
    }

    .submenu-parent:hover .submenu {
        display: block;
        opacity: 1;
    }

    .submenu-item {
        padding: 6px 0;
    }
}

/* 桌面版侧边栏基础样式 */
.desktop-sidebar {
    width: 280px;
    height: 100vh;
    background: #fff;
    border-right: 1px solid #edf2f7;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    padding: 12px;
    overflow-y: auto;
}

/* 新设计的用户卡片样式 */
.user-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.6));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.user-card::after {
    content: "";
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
    filter: blur(35px);
    opacity: 0.3;
    border-radius: 50%;
    z-index: 0;
}

.user-card::before {
    content: "";
    position: absolute;
    top: -25px;
    left: -25px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
    filter: blur(25px);
    opacity: 0.3;
    border-radius: 50%;
    z-index: 0;
}

.user-info-header {
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    text-align: center;
    position: relative;
    z-index: 1;
}

.user-greeting {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    display: inline-block;
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.4);
}

/* 用户中心侧边栏的会员信息样式 */
.user-sidebar .membership-info {
    background: transparent;
    padding: 0;
    border: none;
    text-align: center;
    position: relative;
    z-index: 2;
    margin-bottom: 0;
}

.user-sidebar .user-membership-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.user-sidebar .membership-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    position: relative;
    width: 100%;
}

.user-sidebar .membership-label {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.user-sidebar .membership-level {
    font-size: 13px;
    font-weight: 600;
    color: #2D3748;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    padding: 4px 14px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: inline-block;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.user-sidebar .membership-expiry {
    font-size: 12px;
    font-weight: 500;
    color: #4A5568;
    position: relative;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.5));
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* 导航菜单样式 */
.desktop-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.nav-top {
    flex: 0 0 auto;
}

.nav-bottom {
    margin-top: auto;
    flex: 0 0 auto;
}

.nav-category {
    background: white;
    border-radius: 16px;
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.nav-group {
    margin-bottom: 0;
}

.nav-group:not(:last-child) {
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f1f5f9;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    color: #4a5568;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 3px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-item i {
    font-size: 16px;
    margin-right: 10px;
    color: #718096;
}

.nav-item span {
    flex: 1;
    font-weight: 500;
}

.nav-item .badge {
    background: #f1f5f9;
    color: #4a5568;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #e2e8f0;
}

.nav-item:hover {
    background: #f8fafc;
    color: #3182ce;
    border-color: #e2e8f0;
    text-decoration: none;
}

.nav-item.active {
    background: #f8fafc;
    color: #3182ce;
    border-left: 3px solid #3182ce;
}

.nav-item.active i {
    color: #3182ce;
}

/* 软件信息卡片样式 */
.software-info {
    background: linear-gradient(145deg, #ffffff, #f5f7fa);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.version-details-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.app-version-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px dashed #e2e8f0;
    width: 100%;
}

.software-name {
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.version-wrapper {
    background: #f7fafc;
    border-radius: 30px;
    padding: 4px 12px;
    border: 1px solid #e2e8f0;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.version-text {
    font-weight: 700;
    font-size: 14px;
    background: linear-gradient(90deg, #3182ce, #805ad5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.latest-version {
    font-size: 11px;
    color: #718096;
    font-weight: 500;
}

/* 移除不需要的样式 */
.software-logo {
    display: none;
}

.version-info {
    display: none;
}

.current-version {
    display: none;
}

.latest-version-text {
    display: none;
}

.version-container {
    display: none;
}

.version-details {
    display: none;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 桌面版布局 */
.user-homepage {
    display: flex;
}

.user-homepage .row.no-gutters {
    display: flex;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.sidebar-column {
    width: 280px;
    flex: 0 0 280px;
    position: relative;
}

.content-column {
    flex: 1;
    width: calc(100% - 280px);
    max-width: 100%;
    padding-left: 15px;
}

.non-member-tip {
    text-align: center;
    color: #718096;
    font-size: 0.9rem;
    padding: 0.5rem;
}

/* 退出登录按钮样式 */
.logout-btn {
    width: 100%;
    padding: 10px;
    background: white;
    border: 1px solid #f1f1f1;
    color: #718096;
    border-radius: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-top: 0;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.logout-btn::before {
    display: none;
}

.logout-btn i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.logout-btn span {
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e0;
    color: #2d3748;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.logout-btn:hover i {
    transform: translateX(3px);
}

/* 高度自适应 */
@media screen and (max-height: 600px) {
    /* 当高度不足时先隐藏软件版本信息 */
    .software-info {
        display: none;
    }
    
    /* 导航菜单项紧凑一些 */
    .nav-item {
        padding: 6px 8px;
        margin-bottom: 2px;
    }
    
    /* 减少导航类别的内边距 */
    .nav-category {
        padding: 8px;
        margin-bottom: 8px;
    }
}

@media screen and (max-height: 500px) {
    /* 当高度更小时隐藏会员信息 */
    .user-card .user-sidebar.membership-info {
        display: none;
    }
    
    /* 减小用户卡片间距 */
    .user-card {
        padding: 10px;
        margin-bottom: 8px;
    }
    
    .user-info-header {
        padding-bottom: 4px;
        margin-bottom: 0;
    }
    
    /* 最小化导航项间距 */
    .nav-group:not(:last-child) {
        margin-bottom: 4px;
        padding-bottom: 4px;
    }
    
    /* 调整退出按钮 */
    .logout-btn {
        padding: 8px;
    }
}

@media screen and (max-height: 400px) {
    /* 极小高度时简化用户卡片 */
    .user-card::before, .user-card::after {
        display: none;
    }
    
    .user-card {
        padding: 6px;
        margin-bottom: 6px;
        box-shadow: none;
    }
    
    /* 更极端的缩减 */
    .desktop-sidebar {
        padding: 8px;
    }
    
    /* 极简导航项 */
    .nav-item i {
        font-size: 14px;
        margin-right: 8px;
    }
    
    .logout-btn {
        margin-bottom: 5px;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .sidebar-column {
        width: 100%;
        flex: 0 0 100%;
        margin-bottom: 15px;
    }
    
    .content-column {
        width: 100%;
        flex: 0 0 100%;
        padding-left: 0;
    }
    
    .user-homepage .row.no-gutters {
        flex-direction: column;
    }
    
    .desktop-sidebar {
        position: relative;
        height: auto;
        width: 100%;
    }
}

/* 页头导航项样式 */
.header-nav-item {
    position: relative;
    margin: 0 0.25rem;
}

.header-nav-link {
    display: block;
    padding: 0.5rem 1rem;
    color: #4a5568;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.header-nav-link:hover {
    color: #3182ce;
    text-decoration: none;
}

.header-nav-item.active .header-nav-link {
    color: #3182ce;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .header-nav-item {
        margin: 0;
        width: 100%;
    }

    .header-nav-link {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #edf2f7;
    }

    .header-nav-link:hover {
        background-color: #f8fafc;
    }
}

/* 页头导航按钮容器 */
.header-nav-btn-item {
    margin-right: 0.5rem;
}

/* 页头导航按钮基础样式 */
.header-nav-btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.2s ease;
}

/* 主要按钮样式 */
.header-nav-btn.btn-primary {
    background-color: #3182ce;
    border-color: #3182ce;
    color: white;
}

.header-nav-btn.btn-primary:hover {
    background-color: #2c5282;
    border-color: #2c5282;
}

/* 次要按钮样式 */
.header-nav-btn.btn-outline-primary {
    color: #3182ce;
    border-color: #3182ce;
    background-color: transparent;
}

.header-nav-btn.btn-outline-primary:hover {
    color: white;
    background-color: #3182ce;
    border-color: #3182ce;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .header-nav-btn-item {
        margin: 0.5rem 0;
        width: 100%;
    }

    .header-nav-btn {
        width: 100%;
        text-align: center;
    }
}

/* 页脚链接样式 */
.footer-links {
    margin: 0;
    padding: 0;
    padding-left: 2rem;  /* 添加左内边距，使链接靠右 */
}

.footer-links h5 {
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;  /* 减小标题底部间距 */
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;  /* 减小列表项的底部间距 */
}

.footer-links a {
    color: #718096;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    line-height: 1.4;  /* 添加行高控制 */
}

.footer-links a:hover {
    color: #3182ce;
    text-decoration: none;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .footer-links {
        padding-left: 0;  /* 移动端取消左内边距 */
        margin-bottom: 1.5rem;  /* 减小底部间距 */
    }
}

/* 登录页面导航样式 */
.login-nav-item {
    margin-bottom: -1px;
}

.login-nav-link {
    display: block;
    padding: 0.5rem 1rem;
    color: #6c757d;
    background-color: transparent;
    border: 1px solid transparent;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.login-nav-link:hover {
    border-color: #e9ecef #e9ecef #dee2e6;
    text-decoration: none;
    color: #495057;
    isolation: isolate;
}

.login-nav-link.active {
    color: #495057;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
}

.login-nav-link.active:hover {
    color: #495057;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
}

/* 确保tab内容区域有上边框 */
.tab-content {
    border-top: 0;
    border-radius: 0 0 0.25rem 0.25rem;
    padding: 1rem;
    background-color: #fff;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .login-nav-link {
        text-align: center;
    }
}
