/*
 * Footer样式
 * 主题底部样式，确保与现有CSS兼容
 */

/* ===== 主题Footer基础样式 ===== */
.main-footer {
    background: #ffffff;
    border-top: 1px solid #e9ecef;
    margin-top: 40px;
    position: relative;
    z-index: 10;
    clear: both;
}

.main-footer.sticky {
    position: relative;
    bottom: auto;
}

/* 返回顶部按钮 */
.go-up {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: none;
}

.go-up a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #6366f1;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
}

.go-up a:hover {
    background: #5855eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.go-up a i {
    font-size: 18px;
    color: white;
}

/* Footer内容区域 */
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.footer-text {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.6;
}

.footer-text a {
    color: #6366f1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-text a:hover {
    color: #5855eb;
    text-decoration: underline;
}

/* ===== 移动端Footer样式 ===== */
@media (max-width: 768px) {
    .main-footer {
        margin-top: 30px;
    }
    
    .footer-inner {
        padding: 15px;
    }
    
    .footer-text {
        font-size: 13px;
    }
    
    .go-up {
        bottom: 20px;
        right: 20px;
    }
    
    .go-up a {
        width: 44px;
        height: 44px;
    }
    
    .go-up a i {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .main-footer {
        margin-top: 20px;
    }
    
    .footer-inner {
        padding: 12px;
    }
    
    .footer-text {
        font-size: 12px;
    }
    
    .go-up {
        bottom: 15px;
        right: 15px;
    }
    
    .go-up a {
        width: 40px;
        height: 40px;
    }
    
    .go-up a i {
        font-size: 14px;
    }
}

/* ===== 与现有备案样式的兼容 ===== */
/* 确保备案样式不与footer冲突 */
.main-footer .footer-beian {
    background: transparent;
    padding: 10px 0;
    margin: 0;
    border-top: none;
}

.main-footer .beian-container {
    padding: 0;
}

.main-footer .beian-link {
    margin-top: 10px;
}

/* ===== 深色模式支持 ===== */
@media (prefers-color-scheme: dark) {
    .main-footer {
        background: #1e293b;
        border-top-color: #334155;
    }
    
    .footer-text {
        color: #94a3b8;
    }
    
    .footer-text a {
        color: #8b5cf6;
    }
    
    .footer-text a:hover {
        color: #a78bfa;
    }
}

/* ===== 确保Footer始终在页面底部 ===== */
.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

.main-footer {
    margin-top: auto;
}

/* ===== 防止Footer与主要内容重叠 ===== */
.main-content {
    padding-bottom: 20px;
}

/* 确保在所有页面类型中Footer正常显示 */
body.home .main-footer,
body.page .main-footer,
body.single .main-footer,
body.archive .main-footer,
body.search .main-footer {
    display: block;
}

/* ===== JavaScript滚动相关样式 ===== */
.go-up.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* ===== 高对比度模式支持 ===== */
@media (prefers-contrast: high) {
    .main-footer {
        border-top: 2px solid #000;
    }
    
    .footer-text {
        color: #000;
    }
    
    .go-up a {
        border: 2px solid #000;
    }
}