/* 免费代理服务器网站 - 优化版样式 */

/* CSS变量定义 */
:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --border-color: #dee2e6;
    --border-radius: 0.375rem;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* 全局样式 */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: var(--light-color);
}

/* 导航栏 */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--warning-color) !important;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

/* 表格样式 */
.table-responsive {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table > :not(caption) > * > * {
    padding: 0.75rem 0.5rem;
    vertical-align: middle;
}

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

.table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.table code {
    background-color: transparent;
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* 徽章样式 */
.badge {
    font-size: 0.75em;
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 0.25rem;
}

/* 按钮样式 */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

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

.page-link {
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin: 0 0.125rem;
    transition: var(--transition);
}

.page-link:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 加载动画 */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

.spin {
    animation: spin 1s linear infinite;
}

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

/* 模态框样式 */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.modal-header,
.modal-footer {
    background-color: var(--light-color);
    border-color: var(--border-color);
}

/* Toast 通知 */
.toast {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.toast-header {
    background-color: var(--light-color);
    border-bottom: 1px solid var(--border-color);
}

/* 表单控件 */
.form-control,
.form-select {
    border-radius: var(--border-radius);
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    outline: none;
}

.input-group-text {
    border-radius: var(--border-radius);
    background-color: #e9ecef;
    border: 1px solid #ced4da;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .card-body {
        padding: 1rem 0.75rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .table-responsive table {
        font-size: 0.75rem;
    }
    
    .card-body {
        padding: 0.75rem 0.5rem;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 选择文本样式 */
::selection {
    background-color: rgba(13, 110, 253, 0.2);
    color: inherit;
}

/* 图标动画 */
.bi {
    transition: transform 0.2s ease;
}

.btn:hover .bi {
    transform: scale(1.1);
}

/* 工具类 */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.shadow-hover {
    transition: box-shadow 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: var(--shadow-lg) !important;
}

/* 页脚样式 */
footer.bg-dark {
    background-color: var(--dark-color) !important;
}

footer .text-light-emphasis {
    color: rgba(255, 255, 255, 0.75) !important;
}

footer .text-light-emphasis:hover {
    color: rgba(255, 255, 255, 0.9) !important;
}

footer h5, 
footer h6 {
    color: #ffffff !important;
}

footer a.text-light:hover {
    color: var(--warning-color) !important;
    transition: color 0.3s ease;
}

/* 打印样式 */
@media print {
    .navbar,
    footer,
    .btn,
    .pagination {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000;
        box-shadow: none;
    }
    
    .table {
        font-size: 0.8rem;
    }
    
    body {
        background-color: white;
        color: black;
    }
}

/* 性能优化 */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* 辅助功能 */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}