/* AIWorkflowNews 主样式文件 */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-radius: 0.375rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --transition: all 0.15s ease-in-out;
}

/* 全局样式 */
body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #ffffff;
}

/* 导航栏样式 */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar .form-control {
    border-radius: var(--border-radius);
}

/* 新闻卡片样式 */
.news-card {
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    transition: var(--transition);
    background: #fff;
    box-shadow: var(--box-shadow);
}

.news-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.news-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--dark-color);
    text-decoration: none;
}

.news-card .card-title:hover {
    color: var(--primary-color);
}

.news-card .card-text {
    color: var(--secondary-color);
    font-size: 0.9rem;
    line-height: 1.5;
}

.news-meta {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.news-meta .badge {
    font-size: 0.7rem;
}

/* 新闻操作按钮 */
.news-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f3f4;
}

.news-actions .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.news-actions .btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 加载状态 */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

/* 筛选工具栏 */
.filter-toolbar {
    background-color: var(--light-color);
    border-bottom: 1px solid #dee2e6;
}

.filter-toolbar .form-select {
    font-size: 0.9rem;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.back-to-top:hover {
    transform: translateY(-2px);
}

/* Toast 消息提示 */
.toast {
    min-width: 300px;
}

.toast-success {
    border-left: 4px solid var(--success-color);
}

.toast-error {
    border-left: 4px solid var(--danger-color);
}

.toast-warning {
    border-left: 4px solid var(--warning-color);
}

.toast-info {
    border-left: 4px solid var(--info-color);
}

/* 模态框样式 */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    background-color: var(--light-color);
}

.modal-footer {
    border-top: 1px solid #dee2e6;
}

/* 表单样式 */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* 按钮样式 */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* 用户头像 */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

/* 评论区样式 */
.comment-item {
    border-bottom: 1px solid #f1f3f4;
    padding: 1rem 0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-author {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark-color);
}

.comment-time {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.comment-content {
    margin-top: 0.5rem;
    line-height: 1.6;
}

/* 标签样式 */
.badge-source {
    background-color: var(--info-color);
    color: white;
}

.badge-hot {
    background-color: var(--danger-color);
    color: white;
}

.badge-new {
    background-color: var(--success-color);
    color: white;
}

/* 网站底部 */
footer {
    margin-top: 3rem;
    padding: 2rem 0;
    background-color: var(--dark-color);
    color: var(--light-color);
}

footer a {
    color: #adb5bd;
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: var(--light-color);
}

/* 无数据状态 */
.no-data {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--secondary-color);
}

.no-data i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* 加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* 工具提示 */
.tooltip {
    font-size: 0.8rem;
}

/* 面包屑导航 */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: var(--secondary-color);
}

/* 响应式设计辅助类 */
@media (max-width: 768px) {
    .news-card {
        margin-bottom: 1rem;
    }
    
    .news-actions {
        flex-wrap: wrap;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
}

/* 可访问性改进 */
.visually-hidden {
    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;
}

/* 打印样式 */
@media print {
    .navbar,
    .filter-toolbar,
    .news-actions,
    .back-to-top,
    footer {
        display: none !important;
    }
    
    .news-card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
        margin-bottom: 1rem;
    }
} 