/* ============================================================
 * 文件: /static/css/core/layout.css
 * 描述: 全站公共布局（顶栏 / 底栏 / 页面骨架）
 *       由 models/header.php 与 models/footer.php 引入，
 *       原先写在这两个文件里的 <style> 与行内样式都集中到这里。
 * ============================================================ */

html, body { height: 100%; margin: 0; }

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

body > header {
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}

body > .page-content {
    flex: 1;
}

body > footer {
    position: sticky;
    bottom: 0;
    z-index: 100;
    margin-top: auto;
    flex-shrink: 0;
}

/* ---------- 顶栏 ---------- */
.site-header {
    background: #2c3e50;
    color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.site-header-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-brand {
    color: #fff;
    text-decoration: none;
    font-size: 1.5em;
    font-weight: bold;
}

.site-nav a {
    color: #ecf0f1;
    text-decoration: none;
    margin-left: 20px;
}

/* ---------- 底栏 ---------- */
.site-footer {
    background: #2c3e50;
    color: #bdc3c7;
    text-align: center;
    padding: 20px 0;
}

.site-footer-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 底栏一行放得下时：五个 &nbsp; 当间隔（这就是 .footer-sep 里那串空格） */
.site-footer-line {
    line-height: 1.9;
}

.site-footer-line .footer-sep {
    display: inline;
}

/* 放不下时（footer.js 量出来会换行）：分隔符收起，每个片段单独一行 */
.site-footer.is-stacked .footer-sep {
    display: none;
}

.site-footer.is-stacked .footer-seg {
    display: block;
}

/* 量宽度时临时改成不换行，量完由脚本摘掉这个类 */
.site-footer-line.is-measuring {
    white-space: nowrap;
}

/* 兜底：脚本没跑起来时，窄屏直接按「一段一行」显示（那串 &nbsp; 不能断行，
   不这么做会横向溢出） */
@media (max-width: 640px) {
    .site-footer-line .footer-sep {
        display: none;
    }

    .site-footer-line .footer-seg {
        display: block;
    }
}

/* ---------- 人机验证挂载点（全站统一） ---------- */
.captcha-slot {
    margin: 0 0 10px;
    min-height: 0;
}

.captcha-hint {
    font-size: 0.82em;
    color: #95a5a6;
    margin-top: 4px;
}

.captcha-hint.error {
    color: #e74c3c;
}
