/* 全局样式 */
body {
    font-family: 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    margin: 0;
    padding: 0;
}

/* 页面加载进度条 */
.page-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
    background-size: 200% 100%;
    animation: progressAnimation 1s infinite;
    z-index: 99999;
    transition: width 0.3s ease, opacity 0.3s ease;
}

@keyframes progressAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 头部样式 */
.site-header {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* 导航栏滚动效果 */
.site-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.navbar-brand .site-title {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* 主内容区域 */
.site-main {
    padding: 2rem 0;
}

/* 问候语区域 */
.greeting-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.8s ease-out;
}

.greeting-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 模块卡片 */
.modules-section {
    margin: 3rem 0;
}

.hover-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hover-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.hover-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

.hover-card:hover::before {
    transform: scaleX(1);
}

.module-icon {
    color: #667eea;
    transition: all 0.4s ease;
    margin-bottom: 1rem;
}

.hover-card:hover .module-icon {
    transform: scale(1.2) rotate(10deg);
    color: #764ba2;
}

.hover-card .card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
    transition: color 0.3s ease;
}

.hover-card:hover .card-title {
    color: #667eea;
}

.hover-card .card-text {
    color: #666;
    line-height: 1.6;
    transition: color 0.3s ease;
}

.hover-card:hover .card-text {
    color: #555;
}

.hover-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.hover-card:hover::after {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-primary:hover::before {
    left: 100%;
}

/* 最新内容区域 */
.latest-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.list-group-item {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(102, 126, 234, 0.1);
    border-radius: 10px !important;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    transform: translateX(10px);
    border-color: #667eea;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
}

/* 提示区域 */
.hint-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* 页脚样式 */
.site-footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .greeting-section h1 {
        font-size: 2rem;
    }
    
    .navbar-brand .site-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* 内容详情页样式 */
.content-detail {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.8s ease-out;
}

.content-detail h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #333;
}

.content-detail .meta-info {
    color: #666;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.content-detail .content {
    line-height: 1.8;
    color: #555;
    margin-bottom: 2rem;
}

/* 卡片图片样式 */
.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.card-image:hover {
    transform: scale(1.05);
}

/* 图片匹配样式 */
.content-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.5rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.content-image:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 按钮动画 */
.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 0.3rem rgba(102, 126, 234, 0.3);
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 图片放大查看 */
.image-zoom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fadeIn 0.3s ease;
}

.image-zoom-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.image-zoom-img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 10px;
    animation: zoomIn 0.3s ease;
}

.image-zoom-close {
    position: absolute;
    top: -40px;
    right: -40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.image-zoom-close:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.2);
}

/* 内容卡片展开/折叠 */
.hidden {
    display: none;
}

.toggle-content-btn {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 15px;
    padding: 0.5rem 1rem;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-content-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

/* 表单输入反馈 */
.input-focus {
    animation: inputFocus 0.3s ease;
}

@keyframes inputFocus {
    0% { transform: scale(1); }
    50% { transform: scale(1.01); }
    100% { transform: scale(1); }
}

.form-control.is-valid {
    border-color: #198754;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

/* 淡入动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 放大动画 */
@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* 内容高亮 */
.highlight {
    background: linear-gradient(120deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
}

/* 标签样式 */
.tag {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* 日期样式 */
.date {
    color: #999;
    font-size: 0.9rem;
}

/* 段落样式 */
p {
    margin-bottom: 1.5rem;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

/* 列表样式 */
ul, ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

/* 链接样式 */
a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* 分隔线样式 */
hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.5), transparent);
    margin: 2rem 0;
}

/* 引用样式 */
blockquote {
    border-left: 4px solid #667eea;
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #666;
    font-style: italic;
}

/* 代码样式 */
code {
    background: rgba(102, 126, 234, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

table th, table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

table th {
    background: rgba(102, 126, 234, 0.1);
    font-weight: 600;
}

table tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

/* 表单样式 */
.form-control {
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* 按钮组样式 */
.btn-group .btn {
    border-radius: 10px !important;
    margin: 0 0.25rem;
}

/* 徽章样式 */
.badge {
    border-radius: 20px;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 进度条样式 */
.progress {
    border-radius: 20px;
    height: 10px;
    background: rgba(102, 126, 234, 0.1);
}

.progress-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
}

/* 卡片组样式 */
.card-group .card {
    border-radius: 15px;
    margin: 0.5rem;
    transition: all 0.3s ease;
}

.card-group .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* 轮播样式 */
.carousel {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.carousel-item img {
    height: 400px;
    object-fit: cover;
}

/* 导航指示器样式 */
.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(102, 126, 234, 0.5);
}

.carousel-indicators .active {
    background-color: #667eea;
}

/* 模态框样式 */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    border-radius: 20px 20px 0 0;
}

.modal-footer {
    border-top: 1px solid rgba(102, 126, 234, 0.1);
    border-radius: 0 0 20px 20px;
}

/* 通知样式 */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.alert-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* 工具提示样式 */
.tooltip {
    font-size: 0.8rem;
}

.tooltip-inner {
    background: #333;
    border-radius: 5px;
    padding: 0.5rem;
}

/* 下拉菜单样式 */
.dropdown-menu {
    border-radius: 10px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 5px;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(5px);
}

/* 分页样式 */
.pagination {
    margin-top: 2rem;
}

.page-link {
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 10px !important;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
}

.page-link:hover {
    color: #764ba2;
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
    color: white;
    animation: pulse 1s infinite;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* 脉冲动画 */
@keyframes pulse {
    0% {
        box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
    }
    100% {
        box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    }
}

/* 骨架屏样式 */
.skeleton {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 25%, rgba(102, 126, 234, 0.2) 50%, rgba(102, 126, 234, 0.1) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 5px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        color: #e0e0e0;
    }
    
    .greeting-section, .modules-section .hover-card, .latest-section, .hint-section, .site-footer, .site-header {
        background: rgba(26, 26, 46, 0.95);
        color: #e0e0e0;
    }
    
    .list-group-item, .content-detail {
        background: rgba(30, 30, 50, 0.9);
        border-color: rgba(102, 126, 234, 0.3);
        color: #e0e0e0;
    }
    
    .text-muted {
        color: #aaa !important;
    }
    
    .navbar-light .navbar-nav .nav-link {
        color: #e0e0e0;
    }
    
    .navbar-light .navbar-nav .nav-link:hover, .navbar-light .navbar-nav .nav-link.active {
        color: #667eea;
    }
    
    .navbar-light .navbar-toggler {
        border-color: rgba(102, 126, 234, 0.3);
    }
    
    .navbar-light .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28102, 126, 234, 0.7%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
    
    .form-control {
        background: rgba(30, 30, 50, 0.9);
        border-color: rgba(102, 126, 234, 0.3);
        color: #e0e0e0;
    }
    
    .form-control:focus {
        background: rgba(30, 30, 50, 0.9);
        color: #e0e0e0;
    }
    
    .dropdown-menu {
        background: rgba(30, 30, 50, 0.95);
    }
    
    .dropdown-item {
        color: #e0e0e0;
    }
    
    .dropdown-item:hover {
        background: rgba(102, 126, 234, 0.2);
    }
    
    table th {
        background: rgba(102, 126, 234, 0.2);
    }
    
    table tr:hover {
        background: rgba(102, 126, 234, 0.1);
    }
}