/* 
 * 晟嘉家域精筑匠造 - 样式文件
 * 已优化：使用系统字体 + 紧凑页脚 + 卡片字体调小 + 页脚小字号
 */

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* 使用系统字体栈 */
    font-family: -apple-system, BlinkMacSystemFont, 
                 'Segoe UI', Roboto, Oxygen, Ubuntu, 
                 Cantarell, 'Fira Sans', 'Droid Sans',
                 'Helvetica Neue', 'Microsoft YaHei',
                 'Hiragino Sans GB', 'WenQuanYi Micro Hei',
                 sans-serif;
}

body {
    /* 确保 body 也有完整的字体栈 */
    font-family: -apple-system, BlinkMacSystemFont, 
                 'Segoe UI', Roboto, Oxygen, Ubuntu, 
                 Cantarell, 'Fira Sans', 'Droid Sans',
                 'Helvetica Neue', 'Microsoft YaHei',
                 'Hiragino Sans GB', 'WenQuanYi Micro Hei',
                 sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px 0;
}

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

/* 头部样式 */
.profile-header {
    position: relative;
    text-align: center;
    padding: 30px 0;
    margin-bottom: 30px;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: white;
}

.profile-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    z-index: 1;
    overflow: hidden;
}

.profile-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.85);
}

.profile-avatar {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 6px solid white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
    top: 50px;
    background: white;
}

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

.profile-name {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    margin-top: 70px;
    color: #2c3e50;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(255,255,255,0.5);
    letter-spacing: 1px;
    /* 标题使用更粗的系统字体 */
    font-family: -apple-system, BlinkMacSystemFont,
                 'Segoe UI', Roboto, 'Helvetica Neue',
                 Arial, sans-serif;
}

.profile-subtitle {
    font-size: 16px;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    line-height: 1.8;
    position: relative;
    z-index: 2;
    background: rgba(255,255,255,0.9);
    padding: 15px 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* 导航按钮样式 */
.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    background: white;
    border-radius: 50px;
    padding: 10px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid rgba(0,0,0,0.05);
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    border: none;
    padding: 12px 25px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 40px;
    flex: 1;
    min-width: 100px;
    position: relative;
    overflow: hidden;
}

.nav-btn i {
    font-size: 22px;
    margin-bottom: 6px;
    transition: all 0.3s ease;
}

.nav-btn span {
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover {
    color: #3498db;
    transform: translateY(-2px);
}

.nav-btn:hover i {
    transform: scale(1.1);
}

.nav-btn.active {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* 内容区域样式 */
main {
    background: white;
    border-radius: 25px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

main:hover {
    transform: translateY(-5px);
}

.content-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.content-section.active {
    display: block;
}

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

/* 功能卡片样式 */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.feature-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::after {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    color: #3498db;
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 15px; /* 减少图标和文字间距 */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.feature-card span {
    font-size: 15px; /* 已优化为15px */
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    line-height: 1.3; /* 添加行高控制 */
}

.feature-card:hover span {
    color: #3498db;
}

/* 联系信息样式 */
.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

.qr-code {
    margin-top: 20px;
    text-align: center;
    padding: 30px;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.qr-code:hover {
    transform: translateY(-5px);
}

.qr-code img {
    max-width: 250px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border: 5px solid white;
}

.qr-code h3 p {
    color: #2c3e50;
    margin: 15px 0;
    font-size: 16px; /* 联系信息字体也适当调小 */
    font-weight: 500;
}

/* 动态内容样式 */
.moments-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.moment-item {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 25px;
    transition: all 0.3s ease;
}

.moment-item:hover {
    border-color: #3498db;
    padding-left: 10px;
}

.moment-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.moment-header img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 15px;
    border: 3px solid #3498db;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.moment-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    /* 标题字体 */
    font-family: -apple-system, BlinkMacSystemFont,
                 'Segoe UI', Roboto, 'Helvetica Neue',
                 Arial, sans-serif;
}

.moment-info h5 {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 400;
}

.moment-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    border-left: 5px solid #3498db;
    font-size: 16px;
    line-height: 1.8;
    color: #555;
}

.moment-content p {
    margin-bottom: 10px;
}

.moment-content p:last-child {
    margin-bottom: 0;
}

/* ======================= */
/* 页脚样式 - 紧凑版 + 13px小字号 */
/* ======================= */
footer {
    text-align: center;
    padding: 12px 0; /* 减少上下内边距 */
    color: #666;
    font-size: 13px; /* 页脚整体字体设置为13px */
    background: white;
    border-radius: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0,0,0,0.05);
    line-height: 1.3; /* 减小行高 */
}

footer p {
    margin: 4px 0; /* 减小段落间距 */
    color: #555;
    line-height: 1.3;
    font-size: 13px; /* 确保p标签也是13px */
}

.copyright {
    margin-top: 10px; /* 减小上边距 */
    padding-top: 10px; /* 减小上内边距 */
    border-top: 1px solid #eee;
    color: #777; /* 调整为稍深颜色，13px需要更高对比度 */
    font-size: 13px; /* 版权信息也设为13px */
    line-height: 1.3;
}

.day {
    font-size: 13px; /* 天数显示也设为13px */
    color: #e74c3c;
    margin: 6px 0; /* 减小边距 */
    line-height: 1.3;
    font-weight: normal; /* 减小粗细保持可读性 */
}

.day a {
    color: #e74c3c;
    font-weight: 500; /* 使用中等粗细而非bold */
    text-decoration: none;
    font-size: 13px;
}

.center {
    text-align: center;
}

/* 备案信息特别样式 */
footer p:contains("域名备案信息"),
footer p:contains("粤ICP备") {
    font-size: 13px !important;
    color: #666;
}

/* 底部版权声明 */
footer p:contains("版权所有"),
footer p:contains("本网站") {
    font-size: 13px !important;
    color: #777;
}

/* ======================= */
/* 响应式设计 */
/* ======================= */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .profile-bg {
        height: 160px;
    }
    
    .profile-avatar {
        width: 120px;
        height: 120px;
        top: 30px;
    }
    
    .profile-name {
        font-size: 22px;
        margin-top: 50px;
    }
    
    .profile-subtitle {
        font-size: 14px;
        padding: 12px 15px;
    }
    
    .nav-buttons {
        max-width: 100%;
        padding: 8px;
    }
    
    .nav-btn {
        padding: 10px 15px;
        min-width: auto;
    }
    
    .nav-btn i {
        font-size: 18px;
    }
    
    .nav-btn span {
        font-size: 12px;
    }
    
    main {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .feature-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .feature-card {
        padding: 20px 15px;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 12px;
    }
    
    /* 移动端卡片字体更小 */
    .feature-card span {
        font-size: 14px; /* 移动端 14px */
        line-height: 1.2;
    }
    
    .qr-code img {
        max-width: 200px;
    }
    
    .qr-code h3 p {
        font-size: 15px;
    }
    
    /* 移动端页脚更紧凑 - 保持13px但更紧凑布局 */
    footer {
        padding: 10px 0;
        font-size: 13px; /* 移动端保持13px */
    }
    
    footer p {
        margin: 3px 0;
        font-size: 13px;
    }
    
    .copyright {
        margin-top: 8px;
        padding-top: 8px;
        font-size: 13px; /* 保持13px */
    }
    
    .day {
        font-size: 13px; /* 保持13px */
        margin: 5px 0;
    }
}

@media (max-width: 480px) {
    .profile-header {
        padding: 20px 0;
        margin-bottom: 20px;
    }
    
    .profile-name {
        font-size: 20px;
    }
    
    .profile-subtitle {
        font-size: 13px;
        padding: 10px;
    }
    
    .nav-buttons {
        gap: 5px;
    }
    
    .nav-btn {
        padding: 8px 10px;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card {
        padding: 18px 12px;
    }
    
    .feature-icon {
        width: 55px;
        height: 55px;
        margin-bottom: 10px;
    }
    
    /* 小屏幕卡片字体最小 */
    .feature-card span {
        font-size: 13px; /* 小屏幕 13px */
        line-height: 1.2;
    }
    
    .qr-code {
        padding: 20px;
    }
    
    .qr-code img {
        max-width: 180px;
    }
    
    .qr-code h3 p {
        font-size: 14px;
    }
    
    /* 小屏幕页脚超级紧凑 - 13px但更紧密 */
    footer {
        padding: 8px 0;
        font-size: 13px; /* 保持13px */
        line-height: 1.2;
    }
    
    footer p {
        margin: 2px 0;
        line-height: 1.2;
        font-size: 13px;
    }
    
    .copyright {
        margin-top: 6px;
        padding-top: 6px;
        font-size: 13px; /* 保持13px */
        line-height: 1.1;
    }
    
    .day {
        font-size: 13px; /* 保持13px */
        margin: 4px 0;
        line-height: 1.1;
    }
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2980b9, #1c2833);
}

/* 微信按钮样式 */
.wechat-button {
    text-decoration: none;
    color: white !important;
    background-color: #07c160;
    border-radius: 25px;
    padding: 8px 20px;
    display: inline-block;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(7, 193, 96, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.wechat-button:hover {
    background-color: #06ad56;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.4);
}

.wechat-button i {
    margin-right: 8px;
}

/* 图标字体样式 - 确保正确显示 */
.fas, .fa {
    font-family: 'FontAwesome', -apple-system, 
                 BlinkMacSystemFont, 'Segoe UI', 
                 Roboto, sans-serif;
    font-weight: normal;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 图标回退方案（如果字体加载失败） */
.fa-compass.fallback:before { content: '🧭'; }
.fa-address-book.fallback:before { content: '📇'; }
.fa-rss.fallback:before { content: '📡'; }
.fa-comment.fallback:before { content: '💬'; }

/* 加载动画 */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.5s ease;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    margin-top: 15px;
    color: #3498db;
    font-size: 16px;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 弹窗公告 */
.announcement-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9998;
    justify-content: center;
    align-items: center;
}

.announcement-content {
    background: white;
    border-radius: 15px;
    padding: 25px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
}

.announcement-content h2 {
    color: #e74c3c;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
    font-family: -apple-system, BlinkMacSystemFont,
                 'Segoe UI', Roboto, 'Helvetica Neue',
                 Arial, sans-serif;
}

.announcement-close {
    background: #4a90e2;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
    transition: background 0.3s;
}

.announcement-close:hover {
    background: #357ae8;
}