﻿/* 根元素高度填充屏幕 */
html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: verdana, arial, helvetica, sans-serif;
    font-size: 14px;
    color: #333;
    background-color: #fff;
}

/* 页面主容器布局，使用 body flex 替代原来的 #rootForm */
body {
    display: flex;
    flex-direction: column;
    align-items: stretch; /* 子元素宽度遵循自身 */
    min-height: 100vh;
}

/* header、content 宽度控制 */
#header,
#menu,
#content {
    width: 100%; /* 默认填满屏幕 */
    max-width: 1024px; /* 大屏最大宽度 */
    margin: 0 auto; /* 居中 */
}

/* 移动端小屏幕最多占屏幕 99% */
@media only screen and (max-width: 1024px) {
    #header,
    #menu,
    #content {
        width: 99%;
    }
}

/* header 布局 */
/* 设置min-height，解决Google AdSense广告占位高度跳动问题，在未加载广告时，高度不会变 */
#header {
    display: flex;
    padding: 5px 0 8px 0;
    min-height: 90px;
}


#logo {
    /* 可在这里加 logo 样式 */
}

#ad {
    flex: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
}

/* 导航栏 */
#nav {
    height: 50px;
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    background: #F0F6F0;
}

#menu {
    display: flex;   
}

.mainMenu {
    font-size: 20px;
    margin-right: 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#menu a.mainMenuSelected {
    font-size: 20px;
    color: blue;
    margin-right: 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-decoration: none;
}

/* like 按钮 */
#likeBtn {
    flex: 2;
    display: flex;
    padding-top: 10px;
    justify-content: flex-end;
}

/* content 主区域 */
#content {
    flex: 1; /* 占满剩余高度 */
    padding: 15px 0;
    display: flex;
    flex-direction: column;
}

/* copyright */
#copyright {
    height: 55px;
    width: 100%;
    font-size: 12px;
    background: #F0F6F0;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

/* 链接样式 */
a:link {
    color: #2955A0;
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}
