/* Custom CSS for 猫十柒文章分发系统 */
body {
    padding-top: 0px; /* Adjust if navbar is fixed, currently not */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    flex: 1;
}

/* =========================
   移动端优化样式
   ========================= */

/* 移动端响应式设计 */
@media (max-width: 768px) {
    /* 减少容器的左右边距 */
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* 表格横向滚动 */
    .table-responsive {
        border: none;
        margin-bottom: 0;
    }
    
    /* 表格字体调整 */
    .table {
        font-size: 12px;
    }
    
    .table th,
    .table td {
        padding: 8px 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px;
    }
    
    /* 按钮组优化 */
    .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .btn {
        flex: 1;
        min-width: 80px;
        margin-bottom: 5px;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    /* 表单优化 */
    .form-control,
    .form-select {
        font-size: 14px;
        padding: 10px;
        margin-bottom: 10px;
    }
    
    /* 卡片优化 */
    .card {
        margin-bottom: 15px;
        border-radius: 8px;
    }
    
    .card-header {
        padding: 10px 15px;
        font-size: 14px;
        font-weight: bold;
    }
    
    .card-body {
        padding: 15px;
    }
    
    /* 侧边栏导航优化 */
    .sidebar {
        position: fixed;
        top: 0;
        left: -250px;
        width: 250px;
        height: 100vh;
        background: #f8f9fa;
        transition: left 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    /* 遮罩层 */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    /* 汉堡菜单按钮 */
    .mobile-menu-btn {
        display: block;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1001;
        background: #007bff;
        color: white;
        border: none;
        padding: 10px;
        border-radius: 5px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }
    
    /* 页面内容左边距调整 */
    .main-content {
        margin-left: 0;
        padding-top: 60px;
    }
    
    /* 分页优化 */
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .pagination .page-item .page-link {
        padding: 6px 10px;
        font-size: 12px;
        margin: 2px;
    }
    
    /* 筛选表单优化 */
    .filter-form {
        background: #f8f9fa;
        padding: 15px;
        border-radius: 8px;
        margin-bottom: 20px;
    }
    
    .filter-form .row {
        margin: 0;
    }
    
    .filter-form .col-md-3,
    .filter-form .col-md-2 {
        width: 100%;
        padding: 5px 0;
    }
    
    /* 状态徽章优化 */
    .badge {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    /* 消息提示优化 */
    .alert {
        font-size: 13px;
        padding: 10px;
        margin-bottom: 15px;
        border-radius: 6px;
    }
    
    /* 模态框优化 */
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .modal-content {
        border-radius: 8px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
    }
}

/* 大屏幕桌面端隐藏移动菜单按钮 */
@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* =========================
   通用移动端友好样式
   ========================= */

/* 触控友好的按钮 */
.btn {
    min-height: 44px; /* iOS推荐的最小触控区域 */
    touch-action: manipulation; /* 防止双击缩放 */
}

/* 触控友好的链接 */
a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    touch-action: manipulation;
}

/* 表格滚动优化 */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 输入框优化 */
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    border-color: #80bdff;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

.loading::after {
    content: "⏳ 加载中...";
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* 成功/错误状态颜色 */
.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-warning {
    color: #ffc107 !important;
}

/* 紧凑模式 */
.compact-mode .table th,
.compact-mode .table td {
    padding: 4px 6px;
    font-size: 11px;
}

.compact-mode .btn {
    padding: 4px 8px;
    font-size: 11px;
    min-height: 32px;
}

/* Add more custom styles here */ 

/* =========================
   密集型宫格布局系统
   ========================= */

/* 宫格容器基础样式 */
.mobile-grid-container {
    display: grid;
    gap: 12px;
    padding: 16px;
    width: 100%;
    box-sizing: border-box;
}

/* 3宫格布局 (1行3列) */
.mobile-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* 4宫格布局 (2行2列) */
.mobile-grid-4 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* 5宫格布局 (特殊布局: 上排2个，下排3个) */
.mobile-grid-5 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.mobile-grid-5 .mobile-grid-item:nth-child(1) {
    grid-column: span 3;
}

.mobile-grid-5 .mobile-grid-item:nth-child(2) {
    grid-column: span 3;
}

.mobile-grid-5 .mobile-grid-item:nth-child(3) {
    grid-column: span 2;
}

.mobile-grid-5 .mobile-grid-item:nth-child(4) {
    grid-column: span 2;
}

.mobile-grid-5 .mobile-grid-item:nth-child(5) {
    grid-column: span 2;
}

/* 6宫格布局 (3行2列 或 2行3列) */
.mobile-grid-6 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* 6宫格变体 - 2行3列 */
.mobile-grid-6.row-style {
    grid-template-columns: repeat(2, 1fr);
}

/* 9宫格布局 (3行3列) */
.mobile-grid-9 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* 宫格项目基础样式 */
.mobile-grid-item {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
}

.mobile-grid-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.mobile-grid-item:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* 宫格链接样式 */
.mobile-grid-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    text-decoration: none;
    color: inherit;
    height: 100%;
    min-height: 80px;
}

.mobile-grid-link:hover {
    text-decoration: none;
    color: inherit;
}

/* 宫格图标样式 */
.mobile-grid-icon {
    font-size: 28px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0,0,0,0.05);
}

.mobile-grid-item:hover .mobile-grid-icon {
    transform: scale(1.1);
}

/* 大图标变体 */
.mobile-grid-item.large-icon .mobile-grid-icon {
    font-size: 32px;
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
}

/* 宫格标题样式 */
.mobile-grid-title {
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
    color: #333;
    margin: 0;
}

.mobile-grid-item.large-icon .mobile-grid-title {
    font-size: 14px;
    font-weight: 600;
}

/* 宫格徽章样式 */
.mobile-grid-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ff4757;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.mobile-grid-badge.new {
    background: #00b894;
}

.mobile-grid-badge.hot {
    background: #fd79a8;
}

.mobile-grid-badge.important {
    background: #e17055;
}

/* =========================
   密集型信息卡片系统
   ========================= */

/* 紧凑卡片样式 */
.mobile-card-compact {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
}

.mobile-card-compact .mobile-card-body {
    padding: 12px 16px;
}

.mobile-card-compact .mobile-card-header {
    padding: 10px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* 信息密集型列表样式 */
.mobile-info-list {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.mobile-info-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-info-item:last-child {
    border-bottom: none;
}

.mobile-info-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.mobile-info-value {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

/* 统计数据密集型布局 */
.mobile-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 12px;
}

.mobile-stat-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
}

.mobile-stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
    line-height: 1;
}

.mobile-stat-label {
    font-size: 11px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =========================
   紧凑型按钮和组件系统
   ========================= */

/* 紧凑型按钮基础样式 */
.mobile-btn-compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 28px;
    white-space: nowrap;
}

.mobile-btn-compact.primary {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.mobile-btn-compact.primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
}

.mobile-btn-compact.success {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.mobile-btn-compact.success:hover {
    background-color: #1e7e34;
    border-color: #1e7e34;
}

.mobile-btn-compact.danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.mobile-btn-compact.danger:hover {
    background-color: #c82333;
    border-color: #c82333;
}

.mobile-btn-compact.outline {
    background-color: transparent;
    border-color: #ddd;
    color: #666;
}

.mobile-btn-compact.outline:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 16px;
}

.empty-state h6 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.empty-state p {
    font-size: 13px;
    margin-bottom: 16px;
}

/* 信息列表样式 */
.mobile-info-list {
    display: flex;
    flex-direction: column;
}

.mobile-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-size: 13px;
}

.mobile-info-item:last-child {
    border-bottom: none;
}

.mobile-info-label {
    font-weight: 500;
    color: #666;
    display: flex;
    align-items: center;
}

.mobile-info-value {
    font-weight: 500;
    color: #333;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

/* 统计网格样式 */
.mobile-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.mobile-stat-item {
    text-align: center;
    padding: 8px 4px;
    background: rgba(0,0,0,0.02);
    border-radius: 6px;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mobile-stat-value {
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 4px;
}

.mobile-stat-label {
    font-size: 10px;
    color: #666;
    line-height: 1;
}

/* 卡片紧凑变体 */
.mobile-card-compact {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
}

.mobile-card-compact .mobile-card-header {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    background: rgba(0,0,0,0.01);
}

.mobile-card-compact .mobile-card-title {
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
}

.mobile-card-compact .mobile-card-body {
    padding: 16px;
}

/* 颜色变量 */
.text-purple {
    color: #6f42c1 !important;
}

.text-orange {
    color: #fd7e14 !important;
}

/* 徽章样式增强 */
.mobile-grid-badge.new {
    background-color: #ff6b6b;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* 流体容器 */
.mobile-container-fluid {
    width: 100%;
    padding: 0 12px;
    margin: 0 auto;
    max-width: 100%;
}

/* 提醒框样式 */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 13px;
}

.alert-info {
    background-color: #e7f3ff;
    border-color: #b3d9ff;
    color: #0066cc;
}

.alert-success {
    background-color: #e8f5e8;
    border-color: #c3e6c3;
    color: #155724;
}

.alert-danger {
    background-color: #ffeaea;
    border-color: #ffcccc;
    color: #721c24;
}

.alert-warning {
    background-color: #fff8e6;
    border-color: #ffe066;
    color: #856404;
}

/* 响应式优化 */
@media (max-width: 576px) {
    .mobile-container-fluid {
        padding: 0 8px;
    }
    
    .mobile-grid-5 .mobile-grid-item,
    .mobile-grid-6 .mobile-grid-item,
    .mobile-grid-4 .mobile-grid-item,
    .mobile-grid-3 .mobile-grid-item {
        min-height: 70px;
    }
    
    .mobile-card-compact .mobile-card-body {
        padding: 12px;
    }
    
    .mobile-info-item {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .mobile-stats-grid {
        gap: 6px;
    }
    
    .mobile-stat-item {
        min-height: 40px;
        padding: 6px 2px;
    }
    
    .mobile-stat-value {
        font-size: 12px;
    }
    
    .mobile-stat-label {
        font-size: 9px;
    }
}

/* 更小屏幕优化 */
@media (max-width: 480px) {
    .mobile-grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mobile-grid-5 .mobile-grid-item:nth-child(1),
    .mobile-grid-5 .mobile-grid-item:nth-child(2),
    .mobile-grid-5 .mobile-grid-item:nth-child(3),
    .mobile-grid-5 .mobile-grid-item:nth-child(4),
    .mobile-grid-5 .mobile-grid-item:nth-child(5) {
        grid-column: span 1;
    }
    
    .mobile-grid-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mobile-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 超小屏幕优化 */
@media (max-width: 360px) {
    .mobile-grid-3,
    .mobile-grid-4,
    .mobile-grid-5,
    .mobile-grid-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mobile-grid-title {
        font-size: 10px;
    }
    
    .mobile-grid-icon {
        font-size: 16px;
    }
    
    .mobile-btn-compact {
        padding: 4px 6px;
        font-size: 10px;
        min-height: 24px;
    }
}

/* =========================
   特殊主题色彩
   ========================= */

/* 宫格图标颜色主题 */
.mobile-grid-icon.text-primary {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

.mobile-grid-icon.text-success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.mobile-grid-icon.text-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.mobile-grid-icon.text-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.mobile-grid-icon.text-info {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

.mobile-grid-icon.text-secondary {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

.mobile-grid-icon.text-purple {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.mobile-grid-icon.text-pink {
    background: rgba(232, 62, 140, 0.1);
    color: #e83e8c;
}

.mobile-grid-icon.text-orange {
    background: rgba(253, 126, 20, 0.1);
    color: #fd7e14;
}

.mobile-grid-icon.text-teal {
    background: rgba(32, 201, 151, 0.1);
    color: #20c997;
}

/* =========================
   动画效果增强
   ========================= */

/* 宫格项目加载动画 */
@keyframes gridItemFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-grid-item {
    animation: gridItemFadeIn 0.3s ease forwards;
}

.mobile-grid-item:nth-child(1) { animation-delay: 0ms; }
.mobile-grid-item:nth-child(2) { animation-delay: 50ms; }
.mobile-grid-item:nth-child(3) { animation-delay: 100ms; }
.mobile-grid-item:nth-child(4) { animation-delay: 150ms; }
.mobile-grid-item:nth-child(5) { animation-delay: 200ms; }
.mobile-grid-item:nth-child(6) { animation-delay: 250ms; }
.mobile-grid-item:nth-child(7) { animation-delay: 300ms; }
.mobile-grid-item:nth-child(8) { animation-delay: 350ms; }
.mobile-grid-item:nth-child(9) { animation-delay: 400ms; }

/* 徽章脉冲动画 */
@keyframes badgePulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.mobile-grid-badge.new {
    animation: badgePulse 2s infinite;
} 