/* Web3.0 风格管理后台基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.4;
    color: #1a1a1a;
    background: #F9FAFB;
    min-height: 100vh;
    font-size: 14px;
}

.admin-header {
    background: #2748C3;
    color: white;
    padding: 16px 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(112, 152, 254, 0.15);
}

.admin-header h1 {
    font-size: 20px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.admin-nav {
    background: white;
    padding: 12px 0;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid rgba(112, 152, 254, 0.1);
}

.admin-nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    justify-content: center;
    flex-wrap: wrap;
}

.admin-nav li {
    margin: 0 6px;
}

.admin-nav a {
    color: #374151;
    padding: 8px 16px;
    border-radius: 6px;
    display: block;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    font-size: 13px;
}

.admin-nav a:hover, 
.admin-nav a.active {
    background: #2748C3;
    color: white;
    transform: none;
}

.admin-content {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 20px;
    border: 1px solid rgba(112, 152, 254, 0.1);
}

.admin-content h2 {
    color: #374151;
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 18px;
}

.admin-form .form-group {
    margin-bottom: 16px;
}

.admin-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 13px;
}

.admin-form .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #F9FAFB;
}

.admin-form .form-control:focus {
    border-color: #2748C3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(112, 152, 254, 0.1);
    background: white;
}

.admin-actions {
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.admin-actions a:hover {
    color: #fff;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    background: #2748C3;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
}

.btn:hover {
    background: #5a7df8;
    color: white;
    text-decoration: none;
}

.btn-danger {
    background: #ef4444;
}

.btn-danger:hover {
    background: #dc2626;
    color: white;
    text-decoration: none;
}

.btn-success {
    background: #10b981;
}

.btn-success:hover {
    background: #059669;
    color: white;
    text-decoration: none;
}

/* 资源表格样式 */
.resource-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid rgba(112, 152, 254, 0.1);
}

.resource-table th, 
.resource-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    text-align: left;
    font-size: 13px;
}

.resource-table th {
    background: #2748C3;
    color: white;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.resource-table tr:hover {
    background: #F9FAFB;
    transition: all 0.2s ease;
}

.resource-table tr:last-child td {
    border-bottom: none;
}

/* 批量添加区域 */
.bulk-add {
    margin-top: 24px;
    padding: 16px;
    border-top: 1px solid #e5e7eb;
    background: #F9FAFB;
    border-radius: 8px;
}

.bulk-add h3 {
    color: #374151;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 16px;
}

.bulk-add textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 12px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    resize: vertical;
    transition: all 0.2s ease;
    background: white;
}

.bulk-add textarea:focus {
    border-color: #2748C3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(112, 152, 254, 0.1);
}

/* 导入表单样式 */
#import-form {
    background: #F9FAFB;
    border: 1px solid #2748C3;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(112, 152, 254, 0.1);
    padding: 16px;
    margin: 20px 0;
}

#import-form h3 {
    color: #374151;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 16px;
}

#import-form p {
    margin-bottom: 12px;
    color: #6b7280;
    line-height: 1.5;
    font-size: 13px;
}

#import-form small {
    color: #9ca3af;
    font-style: italic;
    font-size: 12px;
}

#import-form a {
    color: #2748C3;
    text-decoration: none;
    font-weight: 500;
}

#import-form a:hover {
    text-decoration: underline;
}

#import-form input[type="file"] {
    padding: 12px;
    border: 1px dashed #2748C3;
    border-radius: 6px;
    background: white;
    margin-bottom: 12px;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
}

#import-form input[type="file"]:hover {
    border-color: #5a7df8;
    background: #F9FAFB;
}

/* 批量操作样式 */
.batch-actions {
    background: #F9FAFB;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 3px solid #2748C3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.batch-actions label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #374151;
    font-size: 13px;
}

.batch-actions input[type="checkbox"] {
    margin-right: 6px;
    transform: scale(1.2);
    accent-color: #2748C3;
}

/* 复选框样式 */
.resource-checkbox,
.category-checkbox {
    transform: scale(1.2);
    cursor: pointer;
    accent-color: #2748C3;
}

/* 按钮禁用状态 */
.btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn:disabled:hover {
    background: #9ca3af;
    transform: none;
    box-shadow: none;
}

/* 搜索表单样式 */
.search-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.search-form input[type="text"] {
    flex: 1;
    min-width: 180px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #F9FAFB;
}

.search-form input[type="text"]:focus {
    border-color: #2748C3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(112, 152, 254, 0.1);
    background: white;
}

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

.pagination li {
    margin: 0;
}

.pagination a {
    display: block;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #2748C3;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 13px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.pagination a:hover, 
.pagination a.active {
    background: #2748C3;
    color: white;
    border-color: #2748C3;
    transform: none;
}

/* 统计卡片样式 */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.stat-card {
    background: #2748C3;
    color: white;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(112, 152, 254, 0.2);
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: none;
}

.stat-card h3 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    opacity: 0.9;
}

.stat-card p {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

/* 警告框样式 */
.alert {
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 8px;
    border-left: 3px solid;
    font-weight: 500;
    font-size: 13px;
}

.alert-success {
    background: #f0f9ff;
    color: #065f46;
    border-left-color: #10b981;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-left-color: #ef4444;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .admin-nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    .admin-nav li {
        margin: 3px 0;
    }
    
    .admin-nav a {
        padding: 10px 20px;
    }
    
    .resource-table th, 
    .resource-table td {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .admin-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .admin-actions .btn {
        margin: 3px 0;
        justify-content: center;
    }
    
    .batch-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-form input[type="text"] {
        min-width: auto;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-content {
    animation: fadeIn 0.3s ease-out;
}

/* 表格行动画 */
.resource-table tr {
    transition: background-color 0.2s ease;
}