/* 
 * 激活码管理平台 - 自定义样式
 */

/* 全局样式 */
:root {
    --sidebar-width: 280px;
    --navbar-height: 56px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f7fb;
}

/* 导航栏 */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.navbar-brand {
    font-weight: 600;
}

/* 主内容区域 */
.main-content {
    padding-top: calc(var(--navbar-height) + 24px);
    padding-bottom: 24px;
    min-height: 100vh;
}

/* 登录页面 */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-page .card {
    border: none;
    border-radius: 12px;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

/* 表格样式 */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    color: #495057;
    border-top: none;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.04);
}

/* 代码样式 */
code {
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    color: #e83e8c;
    font-size: 0.875em;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* 按钮样式 */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 徽章样式 */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
}

/* 输入框样式 */
.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #dee2e6;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* 分页样式 */
.pagination .page-link {
    border-radius: 6px;
    margin: 0 2px;
    border: none;
    color: #495057;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 警告框样式 */
.alert {
    border: none;
    border-radius: 8px;
}

/* 进度条样式 */
.progress {
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

/* 统计卡片 */
.card.bg-primary,
.card.bg-success,
.card.bg-info,
.card.bg-danger {
    border: none;
}

.card.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.card.bg-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
}

.card.bg-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
}

.card.bg-danger {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
}

/* 下拉菜单 */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
}

.dropdown-item {
    padding: 8px 16px;
    transition: background-color 0.15s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

/* 复制按钮动画 */
.copy-btn {
    transition: all 0.2s ease;
}

.copy-btn:hover {
    transform: scale(1.1);
}

/* 响应式布局 */
@media (max-width: 992px) {
    .main-content {
        padding-top: calc(var(--navbar-height) + 16px);
    }
    
    .navbar-collapse {
        background: #0d6efd;
        margin: 0 -12px;
        padding: 12px;
        border-radius: 0 0 8px 8px;
    }
}

@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    h4 {
        font-size: 1.25rem;
    }
    
    .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    .card {
        border-radius: 6px;
    }
    
    .display-4 {
        font-size: 2rem;
    }
}

/* 加载动画 */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
    /* 可以在这里添加暗色主题样式 */
}
