﻿/**
 * 页眉和页脚组件的CSS样式
 * 包含主题切换按钮和用户信息显示的样式
 */

/* 页眉样式 */
.header-wrapper {
    background-color: #2c3e50;
    color: white;
    padding: 8px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
}

/* header-left 样式 */
.header-left {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex: 1;
}

.site-title {
    margin: 0;
    font-size: 16px;
    font-weight: normal;
    color: white;
}

.site-title-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: opacity 0.3s ease;
}

.site-title-link:hover {
    opacity: 0.8;
    text-decoration: none;
}

.site-title-link:hover .site-title {
    color: #ecf0f1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 主题切换按钮样式 */
.theme-switcher {
    display: flex;
    gap: 3px;
}

.theme-btn {
    padding: 1.34px 2.66px;
    border: none;
    border-radius: 2.67px;
    cursor: pointer;
    font-size: 3px;
    transition: all 0.3s ease;
    color: white;
    min-width: 10.66px;
    height: 10.66px;
    line-height: 1;
}

/* 主题按钮颜色 */
.dark-theme {
    background-color: #2c3e50;
}

.light-theme {
    background-color: #f8f9fa;
    color: #333;
}

.colorful-theme {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
}

.theme-btn:hover {
    background-color: #777;
    transform: translateY(-1px);
}

.theme-btn.active {
    background-color: #007bff;
    box-shadow: 0 2px 5px rgba(0,123,255,0.3);
}

.dark-theme .theme-btn.dark-theme {
    background-color: #2c3e50;
}

.light-theme .theme-btn.light-theme {
    background-color: #f8f9fa;
    color: #333;
}

.colorful-theme .theme-btn.colorful-theme {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
}

/* 用户信息样式 */
.user-info {
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 1001;
}

.user-info a {
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 15px;
    background-color: #007bff;
    transition: background-color 0.3s ease;
    font-size: 12px;
}

.user-info a:hover {
    background-color: #0056b3;
}

/* 确保在所有主题下用户昵称按钮文字都是亮色 */
.dark-theme .user-info a,
.light-theme .user-info a,
.colorful-theme .user-info a,
.dark-theme .user-name,
.light-theme .user-name,
.colorful-theme .user-name {
    color: white !important;
}

.user-info .user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 5px;
}

.user-info .user-name {
    font-weight: normal;
    font-size: 12px;
}

/* 页脚样式 */
.footer-wrapper {
    background-color: #2c3e50 !important;
    color: white !important;
    padding: 20px !important;
    margin-top: 30px !important;
    border-radius: 5px !important;
    text-align: left !important;
    width: 100% !important;
    box-sizing: border-box !important;
    clear: both !important;
    display: block !important;
    overflow: hidden !important;
}

.footer-content {
    display: flex !important;
    justify-content: space-between !important;
    gap: 30px !important;
    margin-bottom: 20px !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.footer-section {
    flex: 1 !important;
    min-width: 200px !important;
    display: block !important;
    box-sizing: border-box !important;
    float: left !important;
}

.footer-section h3 {
    margin-bottom: 10px;
    font-size: 16px;
    color: #ecf0f1;
}

.footer-section p {
    margin-bottom: 5px;
    line-height: 1.4;
    font-size: 14px;
    text-align: left;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 5px;
    text-align: left;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #34495e;
    color: #95a5a6;
    font-size: 12px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-wrapper {
        flex-direction: column;
        gap: 10px;
        position: relative;
        padding: 10px 15px;
    }
    
    .header-right {
        flex-direction: column;
        gap: 10px;
    }
    
    .theme-switcher {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .user-info {
        position: static;
        order: 0;
        align-self: auto;
        margin-bottom: 0;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: left;
        gap: 20px;
        flex-wrap: wrap;
        display: flex !important;
    }
    
    .site-title {
        font-size: 14px;
    }
}

/* 主题样式适配 */
/* 暗色主题 */
.dark-theme .header-wrapper {
    background-color: #1a1a1a;
}

.dark-theme .footer-wrapper {
    background-color: #1a1a1a !important;
}

/* 亮色主题 */
.light-theme .header-wrapper {
    background-color: #f8f9fa;
    color: #333;
}

.light-theme .site-title {
    color: #333;
}

.light-theme .user-info a {
    background-color: #007bff;
    color: white;
}

.light-theme .footer-wrapper {
    background-color: #f8f9fa !important;
    color: #333 !important;
}

.light-theme .footer-section h3 {
    color: #333;
}

.light-theme .footer-section ul li a {
    color: #666;
}

.light-theme .footer-section ul li a:hover {
    color: #333;
}

.light-theme .footer-bottom {
    color: #666;
    border-top-color: #ddd;
}

/* 彩色主题 */
.colorful-theme .header-wrapper {
    background: var(--header-bg);
    color: #000000 !important;
}

.colorful-theme .footer-wrapper {
    background: var(--footer-bg) !important;
    color: #000000 !important;
}

.colorful-theme .site-title {
    color: #000000 !important;
}

.colorful-theme .user-info a {
    background-color: rgba(0, 0, 0, 0.8);
    color: #ffffff !important;
}

.colorful-theme .footer-section h3 {
    color: #000000 !important;
}

.colorful-theme .footer-section p {
    color: #333333 !important;
}

.colorful-theme .footer-section ul li a {
    color: #000000 !important;
}

.colorful-theme .footer-section ul li a:hover {
    color: #333333 !important;
}

.colorful-theme .footer-bottom {
    color: #333333 !important;
    border-top-color: rgba(0, 0, 0, 0.2);
}

.colorful-theme .theme-btn {
    background-color: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
}

.colorful-theme .theme-btn:hover {
    background-color: rgba(255,255,255,0.3);
}

/* 彩色主题下暗色和亮色按钮的特定样式 */
.colorful-theme .theme-btn.dark-theme {
    background-color: #2c3e50;
    color: white;
}

.colorful-theme .theme-btn.light-theme {
    background-color: #f8f9fa;
    color: #333;
}
