/* 投诉功能样式 */

/* 投诉按钮样式 */
.complaint-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-left: 10px;
}

/* 标题区域投诉按钮样式 - 与评分信息大小一致 */
.server-title-extra .complaint-button {
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: normal;
    margin-left: 10px;
    vertical-align: middle;
}

.server-title-extra .complaint-button .complaint-icon {
    font-size: 14px;
}

.complaint-button:hover {
    background-color: #ff5252;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.complaint-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(255, 107, 107, 0.3);
}

/* 投诉弹窗样式 */
.complaint-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.complaint-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.complaint-modal-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9); 
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1); 
    }
}

/* 模态框头部 */
.complaint-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.complaint-modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.complaint-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s ease;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.complaint-modal-close:hover {
    color: #333;
    background-color: #f5f5f5;
}

/* 模态框内容 */
.complaint-modal-body {
    padding: 20px;
}

/* 服务器信息展示 */
.server-info-display {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.server-info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.server-info-item:last-child {
    margin-bottom: 0;
}

.server-info-label {
    font-weight: 600;
    color: #555;
}

.server-info-value {
    color: #333;
}

/* 表单样式 */
.complaint-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-weight: 500;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.form-control {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-control:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    color: #666;
}

/* 下拉选择框样式 */
.form-select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* 文本域样式 */
.form-textarea {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* 字符计数样式 */
.char-count {
    font-size: 12px;
    color: #666;
    text-align: right;
    margin-top: 4px;
}

.char-count.error {
    color: #dc3545;
}

/* 表单按钮区域 */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* 投诉表单按钮样式 - 使用更具体的选择器，避免影响全局 */
.complaint-form .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.complaint-form .btn-primary {
    background-color: #007bff;
    color: white;
}

.complaint-form .btn-primary:hover:not(:disabled) {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.complaint-form .btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 123, 255, 0.3);
}

.complaint-form .btn-primary:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.complaint-form .btn-secondary {
    background-color: #6c757d;
    color: white;
}

.complaint-form .btn-secondary:hover {
    background-color: #5a6268;
}

/* 管理员后台按钮样式 */
.complaint-admin-container .btn,
.complaint-type-container .btn,
.process-complaint-section .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.complaint-admin-container .btn-primary,
.complaint-type-container .btn-primary,
.process-complaint-section .btn-primary {
    background-color: #007bff;
    color: white;
}

.complaint-admin-container .btn-primary:hover:not(:disabled),
.complaint-type-container .btn-primary:hover:not(:disabled),
.process-complaint-section .btn-primary:hover:not(:disabled) {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.complaint-admin-container .btn-primary:active:not(:disabled),
.complaint-type-container .btn-primary:active:not(:disabled),
.process-complaint-section .btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 123, 255, 0.3);
}

.complaint-admin-container .btn-primary:disabled,
.complaint-type-container .btn-primary:disabled,
.process-complaint-section .btn-primary:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.complaint-admin-container .btn-secondary,
.complaint-type-container .btn-secondary,
.process-complaint-section .btn-secondary {
    background-color: #6c757d;
    color: white;
}

.complaint-admin-container .btn-secondary:hover,
.complaint-type-container .btn-secondary:hover,
.process-complaint-section .btn-secondary:hover {
    background-color: #5a6268;
}

.complaint-admin-container .btn-success,
.complaint-type-container .btn-success {
    background-color: #28a745;
    color: white;
}

.complaint-admin-container .btn-success:hover,
.complaint-type-container .btn-success:hover {
    background-color: #218838;
}

.complaint-admin-container .btn-danger,
.complaint-type-container .btn-danger {
    background-color: #dc3545;
    color: white;
    padding: 6px 12px;
    font-size: 12px;
}

.complaint-admin-container .btn-danger:hover,
.complaint-type-container .btn-danger:hover {
    background-color: #c82333;
}

/* 错误提示样式 */
.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
}

/* 加载状态样式 */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .complaint-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* 自定义提示弹窗样式 */
.custom-alert-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.custom-alert-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-alert-modal-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    position: relative;
    animation: slideIn 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.custom-alert-modal-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.custom-alert-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.custom-alert-modal-body {
    padding: 20px;
    text-align: center;
}

.custom-alert-message {
    margin: 0;
    font-size: 16px;
    color: #555;
    line-height: 1.6;
}

.custom-alert-modal-footer {
    display: flex;
    justify-content: center;
    padding: 0 20px 20px;
}

.custom-alert-modal-footer .btn {
    min-width: 100px;
}

/* 管理员后台样式 */
.complaint-admin-container {
    padding: 20px;
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 1200px;
    margin: 0 auto;
}

.complaint-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.complaint-admin-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
}

/* 筛选表单样式 */
.filter-form {
    background-color: #fff;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-color);
}

/* 投诉列表样式 */
.complaint-list {
    overflow-x: auto;
    margin-bottom: 20px;
}

.complaint-list table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.complaint-list th,
.complaint-list td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.complaint-list th {
    background-color: var(--light-color);
    font-weight: 500;
    color: var(--text-color);
}

.complaint-list tr:hover {
    background-color: rgba(76, 175, 80, 0.05);
}

.complaint-list tr:last-child td {
    border-bottom: none;
}

.complaint-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

.complaint-status.pending {
    background-color: #fff3cd;
    color: #856404;
}

.complaint-status.processing {
    background-color: #cce5ff;
    color: #004085;
}

.complaint-status.resolved {
    background-color: #d4edda;
    color: #155724;
}

.complaint-status.rejected {
    background-color: #f8d7da;
    color: #721c24;
}

/* 投诉详情样式 */
.complaint-detail-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 20px;
}

.complaint-detail-header {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.complaint-detail-title {
    margin: 0 0 16px 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.complaint-detail-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.complaint-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.complaint-detail-label {
    font-weight: 500;
    font-size: 14px;
    color: #555;
}

.complaint-detail-value {
    font-size: 14px;
    color: #333;
}

/* 处理投诉样式 */
.process-complaint-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.process-complaint-title {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.process-complaint-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 投诉类型管理样式 */
.complaint-type-container {
    padding: 20px;
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 1200px;
    margin: 0 auto;
}

.complaint-type-list {
    overflow-x: auto;
    margin-top: 20px;
}

.complaint-type-list table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.complaint-type-list th,
.complaint-type-list td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.complaint-type-list th {
    background-color: var(--light-color);
    font-weight: 500;
    color: var(--text-color);
}

.complaint-type-list tr:hover {
    background-color: rgba(76, 175, 80, 0.05);
}

.complaint-type-list tr:last-child td {
    border-bottom: none;
}

.complaint-type-actions {
    display: flex;
    gap: 8px;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    padding: 6px 12px;
    font-size: 12px;
}

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

/* 添加投诉类型样式 */
.add-type-form {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.add-type-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.add-type-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

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

.btn-success:hover {
    background-color: #218838;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background-color: white;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #f5f5f5;
    border-color: #007bff;
    color: #007bff;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

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

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

.empty-state-text {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-state-subtext {
    font-size: 14px;
    opacity: 0.7;
}