/* 自定义顶部圆角样式（警告公告头部） */
.card-header.bg-danger {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* 标题背景容器样式 */
body .blackhouse-banner-container {
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    background: none;
}

body .blackhouse-banner-container .blackhouse-banner {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #212529;
    border-bottom: 5px solid #dc3545;
    background-image: url(/images/prison-bg.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    body .blackhouse-banner-container .blackhouse-banner {
        min-height: 300px;
    }
}

body .blackhouse-banner-container .blackhouse-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.5) 100%);
    z-index: 1;
}

body .blackhouse-banner-container .blackhouse-banner .blackhouse-banner-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    text-align: center;
    color: #fff;
}

body .blackhouse-banner-container .blackhouse-banner-inner .blackhouse-title {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 30px 0;
    padding: 0;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    color: #fff;
}

@media (max-width: 768px) {
    body .blackhouse-banner-container .blackhouse-banner-inner .blackhouse-title {
        font-size: 2.5rem;
        margin-bottom: 25px;
    }
}

/* 统计数据样式 */
body .blackhouse-banner-container .blackhouse-banner-inner .blackhouse-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    padding: 15px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.2);
    margin: 0 auto;
    max-width: 600px;
    width: 100%;
}

.blackhouse-stats .stat-item {
    text-align: center;
    padding: 0 15px;
    margin: 0;
    flex: 1;
}

.blackhouse-stats .stat-item .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin: 0;
    padding: 0;
}

.blackhouse-stats .stat-item .stat-label {
    font-size: 1rem;
    opacity: 0.8;
    margin: 5px 0 0 0;
    padding: 0;
}

.blackhouse-stats .stat-divider {
    width: 2px;
    height: 50px;
    background: rgba(255,255,255,0.3);
    margin: 0 5px;
}

@media (max-width: 768px) {
    .blackhouse-stats {
        padding: 12px 15px !important;
    }
    
    .blackhouse-stats .stat-item {
        padding: 0 10px;
    }
    
    .blackhouse-stats .stat-item .stat-number {
        font-size: 2rem;
    }
    
    .blackhouse-stats .stat-item .stat-label {
        font-size: 0.9rem;
    }
    
    .blackhouse-stats .stat-divider {
        height: 40px;
    }
}

/* 主内容区样式 */
.prison-main {
    margin-top: 0;
    padding-top: 0;
}

.prison-container .prison-notice {
    border-width: 2px;
    border-radius: 10px;
    overflow: hidden;
}

.prison-notice .card-header {
    padding: 20px 20px;
}

.prison-notice .card-body .notice-content p {
    font-size: 1.05rem;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 3px solid #dc3545;
    margin-top: 10px;
}

/* 名单列表样式 */
.prison-container .prison-list {
    border-radius: 10px;
    overflow: hidden;
    list-style: none;
    position: relative;
    z-index: 1;
}

.prison-list .card-header.list-header {
    padding: 12px 15px;
    font-size: 1.1rem;
    cursor: pointer;
    width: 100%;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.list-header .list-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    white-space: nowrap;
}

.list-header-content .list-title-left {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    flex-shrink: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-header-content .list-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.list-actions .badge.bg-mute {
    background-color: #20c997;
    color: #ffffff;
    padding: 0.25em 0.4em;
    font-size: 0.8rem;
    margin-right: 0.5rem;
}

.list-actions .collapse-btn {
    padding: 2px 8px;
    border-radius: 4px;
    background-color: rgba(255,255,255,0.1);
    font-size: 0.9rem;
    transition: all 0.2s;
    color: #fff;
}

.list-actions .collapse-btn:hover {
    background-color: rgba(255,255,255,0.2);
}

.prison-list summary {
    list-style: none;
}

.prison-list summary::-webkit-details-marker {
    display: none;
}

.prison-list summary::before {
    display: none;
}

.prison-list[open] .collapse-btn::after { content: "收起"; }
.prison-list:not([open]) .collapse-btn::after { content: "展开"; }

/* 表格样式（核心优化） */
.prison-list .card-body .table-responsive .prison-table {
    table-layout: fixed;
    width: 100%;
    margin-bottom: 0;
}

.prison-table thead th {
    background: #f8f9fa;
    font-weight: 600;
    border-bottom-width: 2px;
    padding: 12px 10px;
    white-space: nowrap;
    text-align: center;
}

.prison-table thead .col原因 {
    text-align: center;
}

.prison-table tbody tr {
    transition: all 0.2s;
}

.prison-table tbody tr:hover {
    background-color: rgba(220, 53, 69, 0.05);
}

/* 电脑端列宽 */
.prison-table .col序号 {
    width: 8%;
    white-space: nowrap;
    text-align: center;
}

.prison-table .col用户名 {
    width: 22%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.prison-table .col原因 {
    width: 60%;
    padding: 8px 10px;
    text-align: center;
}

.prison-table .col状态 {
    width: 10%;
    white-space: nowrap;
    text-align: center;
}

/* 禁言状态样式 */
.prison-list .badge.bg-mute-status {
    background-color: #20c997;
    color: #ffffff;
    padding: 0.35em 0.65em;
    font-size: 0.85rem;
    display: inline-block;
    min-width: 60px;
}

/* 分页样式 */
.prison-pagination .pagination {
    margin: 0;
}

.prison-pagination .pagination .page-link {
    color: #dc3545;
}

.prison-pagination .pagination .page-item.active .page-link {
    background-color: #dc3545;
    border-color: #dc3545;
}

/* 暗色模式适配 */
[data-bs-theme=dark] .blackhouse-banner {
    border-bottom-color: #ff6b6b;
}

[data-bs-theme=dark] .prison-notice {
    border-color: #ff6b6b;
}

[data-bs-theme=dark] .prison-notice .card-header {
     /*background-color: #dc3545;*/
}

[data-bs-theme=dark] .prison-list .card-header {
    background-color: #343a40;
}

[data-bs-theme=dark] .prison-table thead th {
    background-color: #161616;
    color: #eee;
}

[data-bs-theme=dark] .prison-table tbody tr {
    background-color: #2a2a2a;
    color: #eee;
}

[data-bs-theme=dark] .prison-table tbody tr:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

[data-bs-theme=dark] .notice-content p {
    color: #eee;
}

[data-bs-theme=dark] .badge.bg-mute {
    background-color: #17a2b8;
    color: #ffffff;
}

[data-bs-theme=dark] .collapse-btn {
    color: #eee;
}

/* 手机端适配（核心：16字符+2行双重限制） */
@media (max-width: 768px) {
    /* 列宽调整，确保原因列足够显示16字符 */
    .prison-table .col序号 {
        width: 10%;
    }

    .prison-table .col用户名 {
        width: 20%;
    }

    .prison-table .col原因 {
        width: 50%; /* 保持足够宽度显示16字符 */
        padding: 8px 10px;
        text-align: left;
    }

    .prison-table .col状态 {
        width: 20%;
        padding: 0 5px;
    }

    .avatar-32 {
        width: 22px;
        height: 22px;
        margin-right: 5px;
    }

    /* 基础样式：保持2行显示，适配16字符 */
    .prison-table tbody tr .col原因 .reason-text-mobile {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal;
        word-break: break-word;
        max-height: 60px; /* 略微增加高度，适配16字符 */
        line-height: 1.5;
        font-size: 14px; /* 固定字体大小，确保16字符适配2行 */
    }
}