/* 封禁列表样式 */
.bans-controls {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.search-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
    min-width: 300px;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    color: #333;
}

.search-input:focus {
    outline: none;
    border-color: #6a5acd;
    box-shadow: 0 0 0 3px rgba(106, 90, 205, 0.2);
}

.filter-select {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
    color: #333;
}

.filter-select:hover, .filter-select:focus {
    border-color: #6a5acd;
    box-shadow: 0 0 0 3px rgba(106, 90, 205, 0.1);
    outline: none;
}

.bans-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.bans-table th,
.bans-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.bans-table th {
    background: linear-gradient(135deg, #6a5acd, #8ec5fc);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.bans-table tbody tr {
    transition: background-color 0.3s ease;
}

.bans-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.bans-table tbody tr:hover {
    background-color: #f0f4ff;
    transform: scale(1.01);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.status-active {
    color: #e74c3c;
    font-weight: bold;
}

.status-expired {
    color: #7f8c8d;
    font-style: italic;
}

.status-revoked {
    color: #27ae60;
    font-weight: bold;
}

.status-unknown {
    color: #f39c12;
}

.table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9ff, #eef2ff);
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.pagination-info {
    font-size: 15px;
    color: #6a5acd;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.pagination-controls .btn {
    padding: 10px 16px;
    font-size: 14px;
    min-width: auto;
    background: linear-gradient(135deg, #ffffff, #f8f9ff);
    border: 1px solid #6a5acd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6a5acd;
    font-weight: 500;
}

.pagination-controls .btn:hover {
    background: linear-gradient(135deg, #6a5acd, #8ec5fc);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(106, 90, 205, 0.3);
}

.pagination-controls .btn.active {
    background: linear-gradient(135deg, #6a5acd, #8ec5fc);
    color: white;
    border-color: #6a5acd;
    box-shadow: 0 4px 12px rgba(106, 90, 205, 0.3);
}

.pagination-controls input[type="number"] {
    width: 70px;
    padding: 10px;
    text-align: center;
    border: 1px solid #6a5acd;
    border-radius: 8px;
    font-weight: 500;
    color: #6a5acd;
}

/* 封禁列表项样式 */
.bans-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px 0; /* 添加内边距 */
    overflow: visible; /* 移除滚动，改为可见 */
}

.ban-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid #6a5acd;
    border: 1px solid rgba(106, 90, 205, 0.1);
}

.ban-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(106, 90, 205, 0.15);
    border-color: rgba(106, 90, 205, 0.3);
}

.ban-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.ban-player {
    font-weight: bold;
    font-size: 1.2em;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
    font-style: normal;
}

.player-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    vertical-align: middle;
    object-fit: cover;
    border: 2px solid #ddd;
}

.ban-server {
    background: linear-gradient(135deg, #f0f4ff, #e6eeff);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    color: #6a5acd;
    font-weight: 500;
}

.ban-status-server {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
}

.ban-status-badge {
    background: linear-gradient(135deg, #f0f4ff, #e6eeff);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    color: #6a5acd;
    font-weight: 500;
}

.ban-server-name {
    background: linear-gradient(135deg, #e8f4f8, #d1ecf1);
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.8em;
    color: #1a73e8;
    font-weight: 500;
    font-style: normal;
    white-space: nowrap;
}

.ban-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    font-size: 0.95em;
    color: #555;
}

.ban-reason {
    grid-column: 1 / -1; /* 占据整行 */
    padding: 15px;
    background: linear-gradient(135deg, #fff9f9, #ffeaea);
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
    margin-bottom: 5px;
    font-weight: 500;
}

.ban-ip {
    grid-column: 1 / -1; /* 占据整行 */
    padding: 12px;
    background: linear-gradient(135deg, #f0f9ff, #e6f7ff);
    border-radius: 8px;
    border-left: 4px solid #3498db;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2980b9;
}

.ban-admin {
    font-weight: 600;
    color: #6a5acd;
}

.ban-dates, .ban-unban {
    color: #666;
}

.ban-type {
    font-weight: 600;
    color: #6a5acd;
}

/* 修复页面滚动问题 */
#bans {
    min-height: 100vh;
    overflow-x: hidden; /* 防止水平滚动 */
}

.bans-content {
    padding: 15px 0;
    overflow: visible; /* 移除滚动 */
}

.bans-list-container {
    overflow: visible; /* 移除滚动 */
}

/* 封禁列表加载动画样式 */
.bans-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9ff, #eef2ff);
    border-radius: 12px;
    margin: 20px 0;
}

.bans-loading .loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(106, 90, 205, 0.1);
    border-top: 4px solid #6a5acd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(106, 90, 205, 0.2);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.bans-loading .loading-text {
    font-size: 18px;
    color: #6a5acd;
    font-weight: 500;
}

/* 封禁列表信息部分 */
.bans-info-section {
    margin-top: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
}

.bans-info-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.bans-info-section h4 {
    color: #34495e;
    margin: 20px 0 10px 0;
    font-size: 1.2em;
}

.bans-info-section p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #555;
}

.bans-info-section ul {
    margin: 15px 0;
    padding-left: 20px;
}

.bans-info-section li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .bans-table th,
    .bans-table td {
        padding: 8px 6px;
        font-size: 12px;
    }
    
    .bans-table {
        font-size: 12px;
    }
    
    .ban-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .ban-details {
        grid-template-columns: 1fr;
    }
    
    .bans-content {
        max-height: calc(100vh - 350px);
    }
    
    .bans-list {
        max-height: calc(100vh - 380px);
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .bans-controls {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .search-input, .filter-select {
        min-width: auto;
        width: 100%;
    }
    
    .pagination-container {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
        gap: 12px;
    }
    
    .bans-table {
        font-size: 11px;
    }
    
    .bans-table th,
    .bans-table td {
        padding: 6px 4px;
        font-size: 11px;
    }
    
    .ban-item {
        padding: 16px;
    }
    
    .ban-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .bans-content {
        max-height: calc(100vh - 400px);
        padding: 10px 0;
    }
    
    .bans-list {
        max-height: calc(100vh - 420px);
        padding-right: 5px;
        gap: 12px;
    }
    
    .ban-header {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .bans-table th,
    .bans-table td {
        padding: 4px 2px;
        font-size: 10px;
    }
    
    .pagination-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .pagination-controls .btn {
        padding: 8px 12px;
        font-size: 14px;
        margin: 2px;
    }
    
    .pagination-controls input[type="number"] {
        width: 60px;
        padding: 8px;
        margin: 0 5px;
    }
    
    .ban-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ban-details {
        grid-template-columns: 1fr;
        font-size: 0.85em;
        gap: 8px;
    }
    
    .bans-content {
        max-height: calc(100vh - 450px);
        padding: 8px 0;
    }
    
    .bans-list {
        max-height: calc(100vh - 470px);
        padding-right: 3px;
        padding: 8px 0;
        gap: 10px;
    }
    
    .ban-item {
        padding: 14px;
    }
    
    .bans-loading {
        padding: 40px 15px;
    }
    
    .bans-loading .loading-spinner {
        width: 40px;
        height: 40px;
    }
    
    .bans-loading .loading-text {
        font-size: 16px;
    }
}

/* 封禁状态水印 */
.ban-item {
    position: relative;
}

.ban-item.status-active::before {
    content: "NAC";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 10rem;
    font-weight: 900;
    font-style: normal;
    color: rgba(231, 76, 60, 0.15); /* 红色，透明度增加到0.15 */
    z-index: 1;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 0.5rem;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.ban-item.status-permanent::before {
    content: "NAC";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 10rem;
    font-weight: 900;
    font-style: normal;
    color: rgba(231, 76, 60, 0.15); /* 红色，透明度增加到0.15 */
    z-index: 1;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 0.5rem;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.ban-item.status-expired::before {
    content: "NAC";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 10rem;
    font-weight: 900;
    font-style: normal;
    color: rgba(127, 140, 141, 0.18); /* 灰色，透明度增加到0.18 */
    z-index: 1;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 0.5rem;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.ban-item.status-revoked::before {
    content: "NAC";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 10rem;
    font-weight: 900;
    font-style: normal;
    color: rgba(39, 174, 96, 0.15); /* 绿色，透明度增加到0.15 */
    z-index: 1;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 0.5rem;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* 边框颜色根据状态变化 */
.ban-item.status-active,
.ban-item.status-permanent {
    border-left: 4px solid #e74c3c; /* 红色边框 */
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.ban-item.status-expired {
    border-left: 4px solid #7f8c8d; /* 灰色边框 */
    border: 1px solid rgba(127, 140, 141, 0.3);
}

.ban-item.status-revoked {
    border-left: 4px solid #27ae60; /* 绿色边框 */
    border: 1px solid rgba(39, 174, 96, 0.3);
}