/* {模板路径}/static/css/style.css */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards 0.2s;
}

a {
    text-decoration: none;
    color: #ff6b6b;
    transition: all 0.3s ease;
}

a:hover {
    color: #ff5252;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 主题配色 */
:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --accent-color: #ffbe76;
    --dark-color: #2d3436;
    --light-color: #f9f9f9;
    --gray-color: #95a5a6;
    --success-color: #6ab04c;
    --warning-color: #f0932b;
    --error-color: #eb4d4b;
}

/* 头部样式 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.logo-icon {
    margin-right: 10px;
    animation: pulse 2s infinite;
}

.main-nav ul {
    display: flex;
}

.main-nav li {
    margin: 0 15px;
}

.main-nav a {
    color: #333;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.main-nav a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.main-nav a:hover:after {
    width: 100%;
}

.search-box {
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    width: 200px;
    outline: none;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(255, 107, 107, 0.3);
}

.search-box button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    margin-left: -36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-box button:hover {
    background-color: var(--dark-color);
}

.search-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-radius: 50%;
    position: relative;
}

.search-icon:after {
    content: '';
    position: absolute;
    width: 2px;
    height: 8px;
    background-color: #fff;
    bottom: -6px;
    right: -2px;
    transform: rotate(45deg);
}

/* 轮播图样式 */
.banner {
    padding: 30px 0;
    background-color: #fff;
    position: relative;
}

.banner:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('{模板路径}/static/picture/q30.jpg') no-repeat center center;
    background-size: cover;
    opacity: 0.05;
    z-index: -1;
}

.slider {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    height: 400px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: #fff;
}

.slide-content h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.slider-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
    z-index: 10;
}

.slider-controls span {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
}

.slider-controls span:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: #fff;
}

/* 主标题样式 */
.main-title {
    text-align: center;
    margin: 30px 0;
    color: var(--dark-color);
    font-size: 32px;
    position: relative;
    padding-bottom: 15px;
}

.main-title:after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* 模块通用样式 */
.module {
    padding: 50px 0;
    background-color: #fff;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    animation: fadeIn 0.5s ease-out forwards;
}

.module:nth-child(even) {
    background-color: #f9f9f9;
}

.module:nth-child(odd):before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: url('{模板路径}/static/picture/q31.jpg') no-repeat center center;
    background-size: cover;
    opacity: 0.03;
    z-index: -1;
    border-radius: 50%;
}

.module:nth-child(even):before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 250px;
    height: 250px;
    background: url('{模板路径}/static/picture/q32.jpg') no-repeat center center;
    background-size: cover;
    opacity: 0.03;
    z-index: -1;
    border-radius: 50%;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.module-header h2 {
    font-size: 24px;
    color: var(--dark-color);
    position: relative;
    padding-left: 15px;
}

.module-header h2:before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    height: 20px;
    width: 5px;
    background-color: var(--primary-color);
}

.more {
    color: var(--gray-color);
    font-size: 14px;
    display: flex;
    align-items: center;
}

.more:hover {
    color: var(--primary-color);
}

.more:after {
    content: '→';
    margin-left: 5px;
    transition: all 0.3s ease;
}

.more:hover:after {
    margin-left: 8px;
}

/* 卡片容器样式 */
.card-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    top: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    top: -10px;
}

.card-img {
    height: 180px;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.card:hover .card-img img {
    transform: scale(1.1);
}

.card-content {
    padding: 15px;
}

.card-content h3 {
    margin-bottom: 10px;
    font-size: 18px;
    color: var(--dark-color);
}

.card-content p {
    color: var(--gray-color);
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.read-more {
    display: inline-block;
    font-size: 14px;
    color: var(--primary-color);
}

.read-more:hover {
    text-decoration: underline;
}

/* 文章样式 */
.article-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.featured-article {
    display: flex;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease-out forwards;
}

.article-img {
    flex: 0 0 300px;
    overflow: hidden;
}

.article-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.featured-article:hover .article-img img {
    transform: scale(1.1);
}

.article-content {
    flex: 1;
    padding: 20px;
}

.article-content h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.article-meta {
    color: var(--gray-color);
    font-size: 12px;
    margin-bottom: 15px;
}

.article-excerpt {
    margin-bottom: 20px;
}

/* 视频样式 */
.video-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.video-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    top: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    top: -10px;
}

.video-thumb {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.video-card:hover .video-thumb img {
    transform: scale(1.1);
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255, 107, 107, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-icon:before {
    content: '';
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-left: 15px solid #fff;
    border-bottom: 10px solid transparent;
    margin-left: 5px;
}

.video-info {
    padding: 15px;
}

.video-info h3 {
    margin-bottom: 10px;
    font-size: 18px;
    color: var(--dark-color);
}

.video-info p {
    color: var(--gray-color);
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--gray-color);
}

/* 图片画廊样式 */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 200px;
    animation: fadeIn 0.5s ease-out forwards;
    position: relative;
    top: 0;
    transition: top 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    top: -10px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
    cursor: pointer;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: #fff;
    font-size: 14px;
}

/* 段子样式 */
.jokes-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.joke-card {
    display: flex;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    animation: fadeIn 0.5s ease-out forwards;
}

.joke-avatar {
    flex: 0 0 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
}

.joke-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.joke-content {
    flex: 1;
}

.joke-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.joke-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: var(--gray-color);
    margin-top: 15px;
}

/* APP下载样式 */
.app-download {
    background: linear-gradient(135deg, #ff6b6b, #5f27cd);
    color: #fff;
}

.app-content {
    display: flex;
    align-items: center;
}

.app-info {
    flex: 1;
    padding-right: 30px;
}

.app-info h2 {
    font-size: 28px;
    margin-bottom: 15px;
    color: #fff;
}

.app-info p {
    margin-bottom: 20px;
    font-size: 16px;
    opacity: 0.9;
}

.app-features {
    margin-bottom: 30px;
}

.app-features li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.feature-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #fff;
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
}

.feature-icon:before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-color);
    font-size: 12px;
}

.app-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.btn-download {
    display: flex;
    align-items: center;
    background-color: #fff;
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 500;
}

.btn-download:hover {
    background-color: var(--dark-color);
    color: #fff;
}

.android-icon, .ios-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.qr-code {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-code img {
    width: 100px;
    height: 100px;
    background-color: #fff;
    padding: 5px;
    border-radius: 5px;
    margin-bottom: 5px;
}

.qr-code p {
    font-size: 12px;
    opacity: 0.8;
}

.app-preview {
    flex: 0 0 300px;
}

.app-preview img {
    max-width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* 页脚样式 */
.footer {
    background-color: var(--dark-color);
    color: #fff;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3:after {
    content: '';
    position: absolute;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 0;
}

.footer-column p {
    font-size: 14px;
    opacity: 0.8;
    line-height: 1.6;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #fff;
    opacity: 0.8;
    font-size: 14px;
}

.footer-column ul li a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.contact-info li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
    opacity: 0.8;
}

.contact-info li i {
    margin-right: 10px;
    opacity: 0.6;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--primary-color);
}

.subscribe h4 {
    margin-bottom: 10px;
    font-size: 16px;
}

.subscribe-form {
    display: flex;
}

.subscribe-form input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.subscribe-form button {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.subscribe-form button:hover {
    background-color: #ff5252;
}

.footer-links {
    margin-bottom: 30px;
}

.footer-links h3 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h3:after {
    content: '';
    position: absolute;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 0;
}

.footer-links ul {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-links ul li a, .footer-links ul a {
    color: #fff;
    opacity: 0.7;
    font-size: 14px;
}

.footer-links ul li a:hover, .footer-links ul a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    opacity: 0.7;
}

.copyright p {
    margin-bottom: 5px;
}

.footer-nav {
    display: flex;
    gap: 20px;
}

.footer-nav a {
    color: #fff;
}

.footer-nav a:hover {
    color: var(--primary-color);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 25px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 25px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--dark-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* 特效样式 */
.highlight {
    position: relative;
    display: inline-block;
}

.highlight:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 8px;
    background-color: rgba(255, 107, 107, 0.3);
    bottom: 0;
    left: 0;
    z-index: -1;
}

/* 自定义图标样式 */
.icon-email:before {
    content: '✉';
}

.icon-phone:before {
    content: '☏';
}

.icon-address:before {
    content: '⌂';
}

.icon-weibo:before {
    content: 'W';
}

.icon-wechat:before {
    content: 'C';
}

.icon-douyin:before {
    content: 'D';
}

.icon-bilibili:before {
    content: 'B';
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

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

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* 返回顶部按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: #fff;
    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;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

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

.back-to-top:hover {
    background-color: var(--dark-color);
    transform: translateY(-5px);
}

/* 图片模态框样式 */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* 移动端导航样式 */
@media (max-width: 768px) {
    .main-nav {
        display: none;
        width: 100%;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    .main-nav li {
        margin: 10px 0;
    }
    
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 20px;
        cursor: pointer;
    }
    
    .hamburger span {
        display: block;
        height: 3px;
        width: 100%;
        background-color: var(--dark-color);
        transition: all 0.3s ease;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

@media (min-width: 769px) {
    .hamburger {
        display: none;
    }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .card-container, .video-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .image-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        height: auto;
        padding: 15px;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: 15px;
    }
    
    .main-nav li {
        margin: 5px 10px;
    }
    
    .card-container, .video-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .image-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .featured-article {
        flex-direction: column;
    }
    
    .article-img {
        flex: 0 0 200px;
    }
    
    .app-content {
        flex-direction: column;
    }
    
    .app-info {
        padding-right: 0;
        margin-bottom: 30px;
    }
}

@media (max-width: 576px) {
    .card-container, .video-container {
        grid-template-columns: 1fr;
    }
    
    .image-gallery {
        grid-template-columns: 1fr;
    }
    
    .slider {
        height: 250px;
    }
    
    .slide-content h2 {
        font-size: 22px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .app-buttons {
        flex-direction: column;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-nav {
        margin-top: 15px;
        justify-content: center;
    }
}
