/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* 导航栏 */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #4dabf7 !important;
}

/* 首页横幅 */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
    background: #000;
}

/* 背景媒体（视频或图片） */
.hero-bg-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 背景图片层 */
.hero-bg-image {
    z-index: 0;
    transition: opacity 1s ease;
}

/* 背景视频层 */
.hero-bg-video {
    z-index: 1;
    opacity: 1;
    transition: opacity 1s ease;
}

/* 遮罩层 */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

/* 内容层 */
.hero-section .container {
    position: relative;
    z-index: 3;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero-section h1 {
    animation: fadeInUp 1s ease-out;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* 底部打字效果容器 */
.intro-text-bottom {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    z-index: 10;
}

.intro-text {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 18px 35px;
    border-radius: 0 0 25px 25px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
    min-height: 60px;
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-top: none;
    animation: slideUp 0.6s ease-out;
    max-width: 90%;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.6;
    text-align: center;
    transition: all 0.3s ease;
}

.intro-text:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

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

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

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

/* 关于我们 */
.about-content {
    font-size: 1.1rem;
    text-align: justify;
}

.about-content h1, .about-content h2, .about-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.about-content p {
    margin-bottom: 1rem;
}

/* 团队卡片 */
.team-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.team-card img {
    height: 250px;
    object-fit: cover;
}

.member-desc {
    font-size: 0.9rem;
    color: #666;
}

/* 博客卡片 */
.blog-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 12px;
    overflow: hidden;
}

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

/* 博客文章页 */
.blog-post {
    max-width: 800px;
    margin: 0 auto;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content h1, .post-content h2, .post-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

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

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: 8px;
}

.post-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.post-content pre {
    background: #f4f4f4;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
}

.post-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #666;
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 0 8px 8px 0;
}

.post-content ul {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

/* 页脚备案信息样式 */
footer {
    margin-top: 4rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer .container {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

/* 版权信息样式 */
footer > .container > p:first-child {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 备案信息分隔线 */
footer .container > div:nth-child(2) {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1.5rem;
    margin-top: 1rem;
}

/* 备案信息链接样式 */
footer a.text-white {
    color: #ffffff !important;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
    display: inline-block;
}

footer a.text-white:hover {
    color: #4dabf7 !important;
    text-decoration: underline;
    transform: translateY(-2px);
}

/* 备案信息图标样式 */
footer .bi-file-earmark-text,
footer .bi-shield-check,
footer .bi-envelope {
    margin-right: 8px;
    vertical-align: middle;
    font-size: 1.1rem;
    color: #4dabf7;
}

/* 备案信息行间距 */
footer p.mb-1 {
    margin-bottom: 0.5rem !important;
    line-height: 1.6;
}

/* 底部链接样式 */
footer .text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    text-decoration: none;
}

footer .text-white-50:hover {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: underline;
}

/* 备案信息高亮效果 */
footer .beian-item {
    padding: 8px 15px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease;
}

footer .beian-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 后台侧边栏 */
.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar .nav-link {
    color: #333;
    padding: 0.75rem 1rem;
}

.sidebar .nav-link:hover {
    background-color: #f8f9fa;
    color: #667eea;
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
}

/* 响应式 */
@media (max-width: 768px) {
    .hero-section {
        min-height: 70vh;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .intro-text-bottom {
        bottom: 20px;
    }
    
    .intro-text {
        font-size: 0.95rem;
        padding: 15px 25px;
        border-radius: 0 0 20px 20px;
        min-height: 50px;
    }
    
    .sidebar {
        position: relative;
        top: 0;
    }
    
    /* 备案信息响应式 */
    footer .text-white-50 {
        display: block;
        margin: 0.5rem 0;
    }
    
    footer .text-white-50.me-3 {
        margin-right: 0 !important;
    }
    
    footer p.mb-1 {
        font-size: 0.9rem;
    }
    
    footer .bi-file-earmark-text,
    footer .bi-shield-check,
    footer .bi-envelope {
        font-size: 1rem;
        margin-right: 5px;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .intro-text {
        font-size: 0.85rem;
        padding: 12px 20px;
        min-width: 150px;
    }
    
    footer > .container > p:first-child {
        font-size: 1rem;
    }
}

/* 友情链接浮窗 */
.friend-links-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.friend-links-modal.show {
    opacity: 1;
    visibility: visible;
}

.friend-links-container {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.friend-links-modal.show .friend-links-container {
    transform: scale(1);
}

.friend-links-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 30px;
    border-bottom: 1px solid #e0e0e0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.friend-links-header h4 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.friend-links-header i {
    font-size: 1.8rem;
}

.friend-links-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 32px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.2s ease;
    line-height: 1;
    padding: 0;
}

.friend-links-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.friend-links-body {
    padding: 30px;
    overflow-y: auto;
    max-height: calc(85vh - 90px);
}

.friend-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.friend-link-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.friend-link-item:hover {
    background: white;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-3px);
}

.friend-link-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background: white;
    padding: 5px;
    flex-shrink: 0;
}

.friend-link-logo-placeholder {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    flex-shrink: 0;
}

.friend-link-info {
    flex: 1;
    min-width: 0;
}

.friend-link-info h5 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-link-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 滚动条美化 */
.friend-links-body::-webkit-scrollbar {
    width: 8px;
}

.friend-links-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.friend-links-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.friend-links-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* 置顶和精选文章样式 */
.list-group-item-action {
    transition: all 0.3s ease;
}

.list-group-item-action:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

.card-header.bg-danger,
.card-header.bg-warning {
    font-weight: 600;
    font-size: 1.1rem;
}

.card-header i {
    margin-right: 5px;
}

/* 博客列表中的置顶和精选图标 */
.card-title i.bi-pin-angle-fill,
.card-title i.bi-star-fill {
    font-size: 1.2rem;
    margin-right: 5px;
}

/* 右侧栏卡片样式 */
.col-lg-4 .card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.col-lg-4 .list-group-item {
    border-left: none;
    border-right: none;
    transition: background 0.3s ease;
}

.col-lg-4 .list-group-item:first-child {
    border-top: none;
}

.col-lg-4 .list-group-item:last-child {
    border-bottom: none;
}

.col-lg-4 .list-group-item:hover {
    background: #f8f9fa;
}

/* 响应式调整 */
@media (max-width: 991px) {
    .col-lg-4 {
        margin-top: 2rem;
    }
}

/* 博客侧边栏样式 */
.blog-sidebar .card {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.blog-sidebar .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.blog-sidebar .card-header {
    font-weight: 600;
    border: none;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.blog-sidebar .list-group-item {
    border-left: none;
    border-right: none;
    padding: 12px 20px;
    transition: background-color 0.2s ease, padding-left 0.2s ease;
}

.blog-sidebar .list-group-item:first-child {
    border-top: none;
}

.blog-sidebar .list-group-item:last-child {
    border-bottom: none;
}

.blog-sidebar .list-group-item:hover {
    background-color: #f8f9fa;
    padding-left: 25px;
}

.blog-sidebar .list-group-item h6 {
    font-size: 0.95rem;
    margin-bottom: 5px;
    color: #333;
    line-height: 1.4;
}

.blog-sidebar .list-group-item small {
    font-size: 0.8rem;
    color: #666;
}

/* 博客列表卡片 */
.blog-list-card {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.blog-list-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.blog-list-card .card-title {
    color: #333;
    font-weight: 600;
    margin-bottom: 10px;
}

.blog-list-card .card-title i {
    font-size: 1.1rem;
}

/* 置顶和精选标签动画 */
.bi-pin-angle-fill {
    animation: pinBounce 2s ease-in-out infinite;
    color: #dc3545;
}

@keyframes pinBounce {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

.bi-star-fill {
    animation: starPulse 2s ease-in-out infinite;
    color: #ffc107;
}

@keyframes starPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* 音乐播放器样式（如果使用） */
.music-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 10px;
    color: white;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 工具提示样式 */
.tooltip-inner {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    font-size: 0.9rem;
    padding: 5px 10px;
}

/* 按钮样式增强 */
.btn {
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

/* 卡片通用样式 */
.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

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

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 表单样式 */
.form-control {
    border-radius: 6px;
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* 表格样式 */
.table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    border: none;
}

.table td, .table th {
    padding: 1rem;
    vertical-align: middle;
}

/* 标签样式 */
.badge {
    padding: 0.5em 1em;
    font-weight: 500;
    border-radius: 20px;
}

/* 分页样式 */
.pagination .page-link {
    border: none;
    color: #667eea;
    margin: 0 2px;
    border-radius: 6px;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
}

.pagination .page-link:hover {
    background: rgba(102, 126, 234, 0.1);
}

