/* style.css - 方孝孺网响应式样式表 */

* {
    box-sizing: border-box;
}

body {
    color: #000000;
    background-color: #FFFFFF;
    background-image: url("./fangxiaoru_cn_index/Gray.jpg");
    background-repeat: repeat;
    text-align: center;
    font-family: "Times New Roman", SimSun, "宋体", serif;
    margin: 0;
    padding: 16px 12px;
    line-height: 1.6;
    word-wrap: break-word;
}

a {
    color: #0000EE;
    text-decoration: underline;
    word-break: break-all;
}
a:visited {
    color: #551A8B;
}
a:active {
    color: #FF0000;
}

/* 主容器：限制最大宽度，居中，移动端友好 */
.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 4px;
}

/* 图片全局响应式 */
img {
    max-width: 100%;
    height: auto;
    display: inline-block;
    vertical-align: middle;
}

/* banner 区域 */
.banner {
    margin: 10px 0 20px;
    text-align: center;
}
.banner img {
    width: 100%;
    max-width: 702px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* 主文字块 */
.main-text {
    color: #800000;
    font-size: 16px;
    margin: 10px 0;
    text-align: center;
    padding: 0 4px;
}

/* 手机字号略微调整 */
@media (max-width: 480px) {
    body {
        padding: 10px 8px;
        font-size: 15px;
    }
    .main-text {
        font-size: 15px;
        margin: 8px 0;
        line-height: 1.55;
        text-align: justify;
        text-justify: inter-ideograph;
        padding: 0 2px;
    }
    .banner img {
        max-width: 100%;
    }
}

/* 二维码图片单独处理 */
.qrcode-wrap {
    margin: 16px 0 8px;
    text-align: center;
}
.qrcode-wrap img {
    max-width: 100%;
    width: 702px;
    height: auto;
    display: block;
    margin: 0 auto;
}
@media (max-width: 480px) {
    .qrcode-wrap img {
        max-width: 90%;
        width: auto;
    }
}

hr {
    margin: 20px auto;
    width: 80%;
    border: 0;
    border-top: 1px solid #ccc;
}

.footer {
    font-weight: bold;
    line-height: 1.8;
    font-size: 15px;
    text-align: center;
    padding: 0 4px;
    word-break: break-word;
}
.footer img {
    vertical-align: middle;
    width: 15px;
    height: 15px;
    margin-right: 2px;
}
.footer a {
    white-space: normal;
    display: inline;
}

/* 手机端底部备案信息自动换行，保证可读 */
@media (max-width: 600px) {
    .footer {
        font-size: 14px;
        line-height: 2;
        text-align: center;
    }
    .footer br {
        display: block;
        content: "";
        margin: 4px 0;
    }
    .footer span.sep {
        display: inline;
        margin: 0 2px;
    }
    .footer .footer-line {
        display: block;
        margin: 6px 0;
    }
}

/* 桌面端保持紧凑 */
@media (min-width: 601px) {
    .footer .footer-line {
        display: inline;
        margin: 0;
    }
}

/* 超小屏优化 */
@media (max-width: 380px) {
    .main-text {
        font-size: 14px;
        line-height: 1.5;
    }
    .footer {
        font-size: 13px;
    }
}

/* 去除 h1 h2 默认大边距，适配布局 */
h1 {
    margin: 0;
    font-size: 0; /* 让内部图片撑开 */
}
h2 {
    margin: 0;
    font-weight: normal;
}
p {
    margin: 10px 0;
}

/* 居中容器让内容整洁 */
.content-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 链接和文本断行 */
.footer .footer-line a {
    display: inline;
}

/* 针对备案图标与文字对齐 */
.footer-line img {
    vertical-align: middle;
    position: relative;
    top: -1px;
    width: 15px;
    height: 15px;
}

/* 避免长链接溢出 */
.footer a {
    overflow-wrap: break-word;
    word-wrap: break-word;
}