/* AI Agent News 主样式文件 */

: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: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8f9fa;
  line-height: 1.6;
}

/* 导航栏样式 */
.navbar-brand {
  font-weight: bold;
  font-size: 1.5rem;
}

.navbar-nav .nav-link {
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: #fff !important;
}

/* 卡片样式 */
.card {
  border: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border-radius: 8px;
  transition: box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.card-header {
  background-color: #fff;
  border-bottom: 1px solid #e9ecef;
  font-weight: 600;
}

/* 表格样式 */
.table {
  margin-bottom: 0;
}

.table th {
  background-color: #f8f9fa;
  border-top: none;
  font-weight: 600;
  color: #495057;
}

.table td {
  border-top: 1px solid #e9ecef;
  vertical-align: middle;
}

.table-hover tbody tr:hover {
  background-color: #f8f9fa;
}

/* 新闻标题样式 */
.news-title {
  color: #343a40;
  text-decoration: none;
  font-weight: 500;
  display: block;
  transition: color 0.3s ease;
}

.news-title:hover {
  color: var(--primary-color);
  text-decoration: none;
}

/* 新闻摘要样式 */
.news-summary {
  color: #6c757d;
  font-size: 0.9rem;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 来源标签样式 */
.source-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background-color: #e9ecef;
  color: #495057;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* 时间样式 */
.time-text {
  color: #6c757d;
  font-size: 0.85rem;
}

/* 统计数字样式 */
.stat-number {
  font-weight: 600;
  color: #495057;
}

/* 操作按钮样式 */
.action-btn {
  border: none;
  background: none;
  color: #6c757d;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  font-size: 0.875rem;
}

.action-btn:hover {
  background-color: #e9ecef;
  color: #495057;
}

.action-btn.liked {
  color: #dc3545;
}

.action-btn.favorited {
  color: #ffc107;
}

/* 分页样式 */
.pagination .page-link {
  color: var(--primary-color);
  border-color: #dee2e6;
}

.pagination .page-link:hover {
  color: #0056b3;
  background-color: #e9ecef;
}

.pagination .page-item.active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* 加载动画 */
.loading-spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 0.25rem solid #f3f3f3;
  border-top: 0.25rem solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 空状态样式 */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #6c757d;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #dee2e6;
}

/* 筛选栏样式 */
.filter-section {
  background-color: #fff;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-section .form-label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .table-responsive {
    font-size: 0.875rem;
  }
  
  .news-title {
    font-size: 0.9rem;
  }
  
  .news-summary {
    font-size: 0.8rem;
  }
}

@media (max-width: 576px) {
  .navbar-brand {
    font-size: 1.25rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .table {
    font-size: 0.8rem;
  }
}

/* 用户头像样式 */
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* 通知样式 */
.toast {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 1050;
  min-width: 300px;
}

/* 表单样式增强 */
.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 按钮样式增强 */
.btn {
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: #0056b3;
  border-color: #0056b3;
}

/* 底部样式 */
footer {
  margin-top: auto;
}

footer a {
  color: #adb5bd;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #fff;
}

/* 搜索框样式 */
.search-form {
  position: relative;
}

.search-form .form-control {
  padding-right: 2.5rem;
}

.search-form .btn {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* 标签样式 */
.news-tags {
  margin-top: 0.5rem;
}

.news-tag {
  display: inline-block;
  padding: 0.125rem 0.375rem;
  background-color: #e9ecef;
  color: #495057;
  border-radius: 3px;
  font-size: 0.7rem;
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
}

/* 评论样式 */
.comment-item {
  border-bottom: 1px solid #e9ecef;
  padding: 1rem 0;
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-author {
  font-weight: 600;
  color: #495057;
  font-size: 0.9rem;
}

.comment-time {
  color: #6c757d;
  font-size: 0.8rem;
  margin-left: 0.5rem;
}

.comment-content {
  margin-top: 0.5rem;
  color: #495057;
  line-height: 1.5;
}

/* 个人中心样式 */
.profile-section {
  background-color: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.profile-section h5 {
  color: #495057;
  margin-bottom: 1rem;
  font-weight: 600;
}

/* 状态指示器 */
.status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.status-indicator.online {
  background-color: var(--success-color);
}

.status-indicator.offline {
  background-color: var(--secondary-color);
}

/* 加载骨架屏 */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-line {
  height: 1rem;
  margin-bottom: 0.5rem;
  border-radius: 4px;
}

.skeleton-line.short {
  width: 60%;
}

.skeleton-line.long {
  width: 90%;
} 