/* 登录页面样式 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

/* 侧边栏样式 */
.sidebar {
    background-color: #f8f9fa;
    min-height: calc(100vh - 56px);
    padding: 20px 0;
    border-right: 1px solid #dee2e6;
}

.sidebar .nav-link {
    color: #495057;
    padding: 12px 20px;
    border-radius: 5px;
    margin: 5px 10px;
    transition: all 0.3s;
}

.sidebar .nav-link:hover {
    background-color: #e9ecef;
    color: #0d6efd;
}

.sidebar .nav-link.active {
    background-color: #0d6efd;
    color: white;
}

.sidebar .nav-link i {
    margin-right: 8px;
}

/* 页面内容 */
.page-content {
    padding: 20px;
}

/* 表格样式 */
.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* 状态标签 */
.badge-status {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.badge-active {
    background-color: #28a745;
    color: white;
}

.badge-suspended {
    background-color: #dc3545;
    color: white;
}

.badge-expired {
    background-color: #ffc107;
    color: #000;
}

/* 操作按钮 */
.btn-action {
    padding: 2px 8px;
    font-size: 12px;
    margin: 0 2px;
}

/* 统计卡片 */
.card {
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-title {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 10px;
}

.card h2 {
    font-size: 32px;
    font-weight: bold;
    margin: 0;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

/* 响应式优化 */

/* Logo样式 */
.navbar-logo {
    height: 32px;
    width: auto;
    margin-right: 8px;
    vertical-align: middle;
    display: inline-block;
}

.navbar-logo-fallback {
    display: none;
    font-size: 24px;
    vertical-align: middle;
    margin-right: 4px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: inline-block;
        background: rgba(255, 255, 255, 0.2);
        color: white;
        border: none;
        padding: 6px 10px;
        border-radius: 4px;
        cursor: pointer;
        margin-right: 10px;
        font-size: 18px;
    }
    
    .mobile-menu-btn:hover {
        background: rgba(255, 255, 255, 0.3);
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-logo {
        height: 24px;
    }
    
    /* 侧边栏在移动端可折叠 */
    .sidebar {
        position: fixed;
        left: -100%;
        top: 56px;
        width: 70%;
        max-width: 280px;
        height: calc(100vh - 56px);
        z-index: 1000;
        transition: left 0.3s ease;
        background: white;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
        overflow-y: auto;
        min-height: auto;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    /* 导航栏在移动端优化 */
    .navbar .container-fluid {
        flex-wrap: nowrap;
    }
    
    .navbar .d-flex:first-child {
        flex: 1;
        min-width: 0;
    }
    
    .navbar-brand {
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: calc(100vw - 200px);
    }
    
    /* 主内容区全宽 */
    .col-md-10 {
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .page-content {
        padding: 10px;
    }
    
    /* 筛选条件在小屏幕上垂直堆叠 */
    #bloggersPage .card-body .row {
        margin: 0;
    }
    
    #bloggersPage .card-body .col-md-2,
    #bloggersPage .card-body .col-md-3 {
        width: 100% !important;
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 15px;
        padding-left: 0;
        padding-right: 0;
    }
    
    /* 筛选按钮在小屏幕上堆叠 */
    #bloggersPage .card-body .col-md-12 {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    #bloggersPage .card-body .col-md-12 .btn {
        width: 100%;
    }
    
    /* 博主列表表格改为卡片式布局 */
    .bloggers-table-card {
        display: block;
    }
    
    .bloggers-table-card thead {
        display: none;
    }
    
    .bloggers-table-card tbody,
    .bloggers-table-card tr,
    .bloggers-table-card td {
        display: block;
        width: 100%;
    }
    
    .bloggers-table-card tr {
        margin-bottom: 15px;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 15px;
        background: white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        position: relative;
    }
    
    .bloggers-table-card td {
        border: none;
        padding: 8px 0;
        text-align: left !important;
        padding-left: 0;
        padding-right: 0;
    }
    
    .bloggers-table-card td::before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: #495057;
        display: inline-block;
        min-width: 100px;
        margin-right: 8px;
    }
    
    /* 操作按钮在小屏幕上堆叠 */
    .bloggers-table-card td[data-label="操作"] {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #e9ecef;
    }
    
    .bloggers-table-card td[data-label="操作"]::before {
        display: none;
    }
    
    .bloggers-table-card td[data-label="操作"] .btn {
        width: 100%;
        margin: 0;
    }
    
    /* 序号列样式优化 */
    .bloggers-table-card td[data-label="序号"] {
        position: absolute;
        top: 10px;
        right: 15px;
        font-weight: 600;
        color: #6c757d;
        font-size: 12px;
    }
    
    .bloggers-table-card td[data-label="序号"]::before {
        display: none;
    }
}

/* 中等屏幕优化 (768px - 1200px) */
@media (min-width: 769px) and (max-width: 1200px) {
    /* 隐藏部分次要列，保留重要信息 */
    .bloggers-table th:nth-child(5),  /* 获赞与收藏 */
    .bloggers-table td:nth-child(5),
    .bloggers-table th:nth-child(7),  /* 性别 */
    .bloggers-table td:nth-child(7),
    .bloggers-table th:nth-child(10), /* 活跃天数 */
    .bloggers-table td:nth-child(10),
    .bloggers-table th:nth-child(11), /* 回复率 */
    .bloggers-table td:nth-child(11) {
        display: none;
    }
    
    /* 筛选条件改为两列 */
    #bloggersPage .card-body .col-md-2 {
        width: 50%;
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    #bloggersPage .card-body .col-md-3 {
        width: 50%;
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* 表格横向滚动优化 */
.table-responsive {
    -webkit-overflow-scrolling: touch;
}

/* 确保表格在小屏幕上有最小宽度 */
@media (min-width: 1201px) {
    .bloggers-table {
        min-width: 1400px;
    }
}

/* 编辑博主字段模态框样式优化 */
#editBloggerFieldsModal .modal-dialog {
    max-width: 600px;
}

#editBloggerFieldsModal .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

#editBloggerFieldsModal .form-label i {
    color: #0d6efd;
}

#editBloggerFieldsModal .form-control,
#editBloggerFieldsModal .form-control:focus {
    border-color: #ced4da;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.1);
}

#editBloggerFieldsModal .form-control:focus {
    border-color: #0d6efd;
}

#editBloggerFieldsModal .form-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 4px;
}

#editBloggerFieldsModal .modal-header {
    border-bottom: 2px solid #ffc107;
}

#editBloggerFieldsModal .modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 12px 20px;
}

#editBloggerFieldsModal .btn {
    padding: 8px 20px;
    font-weight: 500;
}

#editBloggerFieldsModal textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* 响应式优化 */
@media (max-width: 576px) {
    #editBloggerFieldsModal .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
}

/* 修复创建管理员模态框对话框尺寸问题 - 更强制 */
#createAdminModal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 1055 !important;
}

#createAdminModal.show {
    display: block !important;
}

#createAdminModal .modal-dialog {
    position: relative !important;
    width: 500px !important;
    max-width: 500px !important;
    margin: 1.75rem auto !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 1056 !important;
}

#createAdminModal.show .modal-dialog {
    width: 500px !important;
    max-width: 500px !important;
    margin: 1.75rem auto !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

