/* static/css/index.css */

/* 基础样式 */
html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

main {
    flex: 1;
}

/* 页脚样式 */
.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.footer-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section {
    margin-bottom: 20px;
}

.footer-section h4 {
    color: #f8f9fa;
    margin-bottom: 25px;
    font-size: 20px;
    padding-bottom: 10px;
    display: inline-block;
    position: relative;
}

.footer-section h4:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 2px;
    background: #0d6efd;
}

/* 联系信息样式 */
.contact-info {
    margin-top: 10px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 18px;
    color: #adb5bd;
    line-height: 1.6;
}

.contact-icon {
    font-size: 18px;
    margin-right: 12px;
    min-width: 24px;
    margin-top: 2px;
}

.contact-details {
    flex: 1;
}

.contact-label {
    color: #f8f9fa;
    font-weight: 500;
    margin-bottom: 4px;
    font-size: 15px;
}

.contact-value {
    color: #adb5bd;
    font-size: 14px;
    word-break: break-all;
}

/* 图标颜色 */
.wechat { color: #07C160; }
.qq { color: #12B7F5; }
.douyin { color: #FF0050; }
.kuaishou { color: #FF6600; }
.zhihu { color: #0566FF; }
.weibo { color: #E6162D; }
.bilibili { color: #FB7299; }
.taobao { color: #FF5500; }
.tmall { color: #FF0033; }
.jd { color: #E33333; }
.pdd { color: #EE2C2C; }
.video_account { color: #07C160; }
.xiaohongshu { color: #FF2442; }
.email { color: #0d6efd; }
.address { color: #6f42c1; }

/* 二维码展示区域 */
.qr-code-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 25px;
    margin-top: 15px;
}

.qr-code-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.qr-code-title {
    color: #f8f9fa;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.qr-code-icon {
    font-size: 16px;
}

.qr-code-image {
    width: 110px;
    height: 110px;
    background: white;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.qr-code-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.qr-code-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.qr-code-id {
    margin-top: 8px;
    color: #adb5bd;
    font-size: 12px;
    max-width: 110px;
    word-break: break-all;
}

/* 链接区域 */
.link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.platform-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    color: #f8f9fa;
    transition: all 0.3s ease;
    font-size: 14px;
}

.platform-link:hover {
    background-color: rgba(13, 110, 253, 0.2);
    border-color: #0d6efd;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
}

.platform-icon {
    margin-right: 8px;
    font-size: 16px;
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.4);
    padding: 25px 20px;
    text-align: center;
    color: #adb5bd;
    font-size: 14px;
    border-top: 1px solid #495057;
}

.footer-bottom-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-bottom p {
    margin: 8px 0;
}

.icp-link {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.icp-link:hover {
    color: #0d6efd;
    text-decoration: underline;
}

.copyright {
    color: #f8f9fa;
    font-size: 15px;
    margin-bottom: 10px;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .footer-sections {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .qr-code-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .footer-sections {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .qr-code-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .qr-code-image {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 576px) {
    .qr-code-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .link-list {
        justify-content: center;
    }
}

/* 卡片悬停效果增强 */
.card.bg-dark {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card.bg-dark:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    border-color: rgba(13, 110, 253, 0.3);
}

.btn-primary, .btn-success {
    transition: all 0.3s ease;
}

.btn-primary:hover, .btn-success:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 二维码模态框 */
.qr-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.qr-modal-content {
    background: #343a40;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    max-width: 300px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.qr-modal-img {
    width: 200px;
    height: 200px;
    background: white;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.qr-modal-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-modal-title {
    color: #f8f9fa;
    font-size: 18px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.qr-modal-id {
    color: #adb5bd;
    font-size: 14px;
    margin-top: 5px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
}

/* 课程卡片样式 */
.course-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    border-color: #0d6efd;
}

.course-card .card-img-top {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    transition: transform 0.3s ease;
}

.course-card:hover .card-img-top {
    transform: scale(1.05);
}

/* 轮播样式 */
.carousel-item {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

/* 按钮组换行 */
.btn-group.flex-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* 导航菜单图标 */
.nav-link .bi {
    margin-right: 5px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .btn-group.flex-wrap {
        justify-content: center;
    }

    .btn-group.flex-wrap .btn {
        margin-bottom: 5px;
    }

    .carousel-item .row {
        flex-direction: column;
        text-align: center;
    }

    .carousel-item .col-md-4 {
        margin-bottom: 15px;
    }
}