/* 
* VIEWS2模板 - 自定义样式 
* 特点：暗色系主题、材料设计风格、紫色与青色的对比色方案
*/

:root {
    --primary-color: #6200ee;
    --primary-dark: #3700b3;
    --primary-light: #bb86fc;
    --secondary-color: #03dac6;
    --secondary-dark: #018786;
    --background-color: #121212;
    --surface-color: #1e1e1e;
    --error-color: #cf6679;
    --on-primary: #ffffff;
    --on-secondary: #000000;
    --on-background: #ffffff;
    --on-surface: #ffffff;
    --on-error: #000000;
    --text-primary: rgba(255, 255, 255, 0.87);
    --text-secondary: rgba(255, 255, 255, 0.60);
    --text-hint: rgba(255, 255, 255, 0.38);
    --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    --border-radius: 8px;
}

/* ===== 全局样式 ===== */
body {
    font-family: 'Roboto', 'Noto Serif SC', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.7;
    transition: all 0.3s ease;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    margin-bottom: 1rem;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

/* ===== 自定义滚动条 ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ===== 卡片样式 ===== */
.card {
    background-color: var(--surface-color);
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===== 按钮样式 ===== */
.btn {
    border-radius: 20px;
    padding: 0.5rem 1.5rem;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--on-secondary);
}

.btn-secondary:hover, .btn-secondary:focus {
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* ===== 导航样式 ===== */
.navbar {
    padding: 0.75rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    letter-spacing: 0.5px;
}

/* ===== 表单元素 ===== */
.form-control {
    border-radius: 4px;
    padding: 0.75rem 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-light);
    color: var(--text-primary);
    box-shadow: 0 0 0 2px rgba(187, 134, 252, 0.25);
}

/* ===== 新闻卡片 ===== */
.news-card {
    position: relative;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.news-card .card-body {
    padding: 1.5rem;
}

.news-card .news-image {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.news-card .card-title a {
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.news-card .card-title a:hover {
    color: var(--primary-light);
}

.news-card .news-meta {
    color: var(--text-hint);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.news-card .news-category {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 0.25rem 0.75rem;
    background-color: var(--primary-color);
    color: var(--on-primary);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    z-index: 1;
}

/* ===== 分类页面样式 ===== */
.category-card {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    height: 100%;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-light), var(--secondary-color));
    opacity: 0.8;
}

.category-card .category-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.category-card .category-count {
    color: var(--primary-light);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.category-card .category-summary {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* ===== 详情页样式 ===== */
.news-detail {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
}

.news-detail .news-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.news-detail .news-meta {
    color: var(--text-hint);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.news-detail .news-meta i {
    color: var(--primary-light);
    margin-right: 0.25rem;
}

.news-detail .news-content {
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.8;
}

.news-detail .news-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
}

.news-detail .news-content p {
    margin-bottom: 1.5rem;
}

.news-detail .news-tags {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== 侧边栏样式 ===== */
.sidebar-widget {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--card-shadow);
}

.sidebar-widget .widget-title {
    position: relative;
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    color: var(--text-primary);
}

.sidebar-widget .widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-light), var(--secondary-color));
}

/* ===== 动画效果 ===== */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

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

/* ===== 响应式调整 ===== */
@media (max-width: 992px) {
    .news-card .news-image {
        height: 180px;
    }
    
    .news-detail {
        padding: 1.5rem;
    }
    
    .news-detail .news-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .news-detail {
        padding: 1.25rem;
    }
    
    .news-detail .news-title {
        font-size: 1.5rem;
    }
    
    .news-detail .news-content {
        font-size: 1rem;
    }
}

/* ===== 高亮效果 ===== */
.highlight {
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 8px;
    background-color: var(--primary-light);
    opacity: 0.3;
    z-index: -1;
}

/* ===== 特殊效果 ===== */
.text-gradient {
    background: linear-gradient(90deg, var(--primary-light), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.btn-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: var(--on-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.btn-float:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    background-color: var(--primary-dark);
    color: var(--on-primary);
} 