/* 用户中心页面专用样式 - 深色主题 */
/* 从内联CSS移到外部文件以优化text-HTML比率 */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: #0a0e27;
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(59, 130, 246, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
    color: #e2e8f0;
}

/* 背景网格装饰 - 更精致 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* 主内容区域 - 限制宽度，居中显示 */
.main-content {
    padding: 40px 20px;
    min-height: calc(100vh - 120px);
    position: relative;
    z-index: 1;
}

.content-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* 卡片样式 - 现代深色玻璃态效果 */
.card {
    border: none;
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(148, 163, 184, 0.1);
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.3),
        0 2px 4px -1px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

.card:hover {
    transform: translateY(-2px);
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.4),
        0 10px 10px -5px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
}

.card-header {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.6) 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    font-weight: 600;
    padding: 24px 28px;
    border-radius: 20px 20px 0 0;
    color: #f1f5f9;
}

.card-body {
    color: #cbd5e1;
}

.stats-card {
    text-align: center;
    padding: 20px 16px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.9) 100%);
    border: 1px solid rgba(148, 163, 184, 0.1);
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stats-card:hover::before {
    opacity: 1;
}

.stats-number {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.stats-label {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* 输入框样式 */
.form-control, .form-select {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    color: #f1f5f9;
}

.form-control::placeholder {
    color: #64748b;
}

/* 表格样式 */
.table {
    color: #cbd5e1;
}

.table thead th {
    background: rgba(30, 41, 59, 0.6);
    border-bottom: 2px solid rgba(148, 163, 184, 0.2);
    color: #f1f5f9;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: rgba(30, 41, 59, 0.4);
}

/* Alert样式 */
.alert {
    border-radius: 12px;
    border: 1px solid;
    backdrop-filter: blur(10px);
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

/* 按钮样式 - 现代渐变按钮 */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.5);
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-success::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-success:hover::before {
    left: 100%;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-outline-primary {
    border: 2px solid rgba(59, 130, 246, 0.5);
    color: #60a5fa;
    background: transparent;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.8);
    color: #93c5fd;
    transform: translateY(-1px);
}

.btn-outline-danger {
    border: 2px solid rgba(239, 68, 68, 0.5);
    color: #f87171;
    background: transparent;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.btn-outline-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.8);
    color: #fca5a5;
    transform: translateY(-1px);
}

/* 导航栏链接样式 */
.nav-link-backend {
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 12px;
    margin: 0 2px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
    font-size: 0.875rem;
    white-space: nowrap;
}

.nav-link-backend:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link-backend.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%);
    font-weight: 600;
}

.nav-link-backend.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 2px;
}

/* Badge样式 */
.badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.bg-success {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #6ee7b7 !important;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.bg-warning {
    background: rgba(245, 158, 11, 0.2) !important;
    color: #fcd34d !important;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.bg-danger {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #fca5a5 !important;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.bg-info {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #93c5fd !important;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* 文本颜色 */
.text-muted {
    color: #94a3b8 !important;
}

h1, h2, h3, h4, h5, h6 {
    color: #f1f5f9;
}

/* 覆盖Bootstrap颜色类 - 适配深色主题 */
.text-primary, .text-success, .text-warning, .text-danger, .text-info {
    color: inherit !important;
}

.border-primary, .border-success, .border-warning, .border-danger, .border-info {
    border-color: rgba(148, 163, 184, 0.2) !important;
}

/* 移除所有白色背景 */
.bg-white {
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(20px) saturate(180%);
}

/* 覆盖内联样式中的白色背景 */
[style*="background: #ffffff"],
[style*="background:#ffffff"],
[style*="background: #fff"],
[style*="background:#fff"] {
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(20px) saturate(180%);
}

/* 覆盖浅色渐变背景 */
[style*="background: linear-gradient"][style*="#d1ecf1"],
[style*="background:linear-gradient"][style*="#d1ecf1"] {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%) !important;
    color: #93c5fd !important;
}

/* 模态框样式 */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.6) !important;
    z-index: 1040 !important;
    pointer-events: auto !important;
}

.modal {
    z-index: 1050 !important;
}

.modal.show {
    display: block !important;
}

.modal-dialog {
    z-index: 1051 !important;
    position: relative;
}

.modal-content {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #e2e8f0;
    z-index: 1052 !important;
    position: relative;
    pointer-events: auto !important;
}

.modal-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    pointer-events: auto !important;
}

.modal-body {
    pointer-events: auto !important;
}

.modal-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    pointer-events: auto !important;
}

.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* 确保模态框内的所有元素可以交互 */
.modal input,
.modal textarea,
.modal select,
.modal button,
.modal .btn-close {
    position: relative;
    z-index: 1053 !important;
    pointer-events: auto !important;
}

/* 确保模态框内容不被遮挡 */
.modal.show .modal-dialog {
    pointer-events: none;
}

.modal.show .modal-content {
    pointer-events: auto;
}

/* HR分隔线 */
hr {
    border-color: rgba(148, 163, 184, 0.2);
    opacity: 0.5;
}

/* 链接颜色 */
a {
    color: #60a5fa;
    transition: color 0.2s ease;
}

a:hover {
    color: #93c5fd;
}

/* 禁用状态 */
.btn:disabled, .btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 进度条样式 */
.progress {
    background: rgba(30, 41, 59, 0.6);
    border-radius: 8px;
    height: 8px;
}

.progress-bar {
    border-radius: 8px;
}

.progress-bar.bg-success {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%) !important;
}

.progress-bar.bg-warning {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%) !important;
}

.progress-bar.bg-danger {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%) !important;
}

/* 代码块样式 */
code {
    background: rgba(30, 41, 59, 0.6);
    color: #60a5fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.875em;
}

/* 输入组样式 */
.input-group-text {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
}

/* Spinner样式 */
.spinner-border {
    border-color: currentColor;
    border-right-color: transparent;
}

/* 空状态样式 */
.text-center.text-muted {
    color: #94a3b8 !important;
}

/* 列表样式 */
ul, ol {
    color: #cbd5e1;
}

li {
    color: #cbd5e1;
}

/* 表单文本 */
.form-text {
    color: #94a3b8 !important;
}

/* 只读输入框 */
input[readonly], textarea[readonly], select[readonly] {
    background: rgba(15, 23, 42, 0.4) !important;
    cursor: not-allowed;
}

/* 响应式 */
@media (max-width: 1024px) {
    .content-container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 24px 16px;
    }
    
    .stats-number {
        font-size: 2rem;
    }
    
    .card {
        border-radius: 16px;
    }
    
    .card-header {
        padding: 20px;
    }
    
    .stats-card {
        padding: 24px 20px;
    }
}

@media (max-width: 640px) {
    .main-content {
        padding: 20px 12px;
    }
    
    .card-header {
        padding: 16px;
    }
}

