/* ===== 全局重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;               /* ✅ 关键：撑满视口 */
}

body {
    display: flex;              /* ✅ 关键：flex 列布局 */
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
    background: #faf8f5;
    color: #2d2a24;
    line-height: 1.6;
}

.container {
    flex: 1;                    /* ✅ 关键：把 footer 顶到底部 */
    max-width: 820px;
    margin: 0 auto;
    padding: 40px 24px 0;       /* 底部由 footer 控制 */
}

/* ===== Header ===== */
.site-header {
    text-align: center;
    padding: 40px 0 32px;
    border-bottom: 2px solid #f0e8e0;
}
.site-header h1 {
    font-size: 2.2rem;
    color: #c0392b;
    letter-spacing: 2px;
}
.site-header .subtitle {
    color: #8a7a6a;
    font-size: 1rem;
    margin-top: 6px;
}
.admin-link {
    display: inline-block;
    margin-top: 12px;
    padding: 4px 16px;
    background: #e8e0d8;
    color: #5a4a3a;
    border-radius: 20px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: 0.2s;
}
.admin-link:hover {
    background: #d5c8bc;
}

/* ===== Timeline ===== */
.timeline {
    padding: 32px 0;
}

.timeline-item {
    display: flex;
    gap: 28px;
    padding: 20px 0;
    border-bottom: 1px dashed #e8e0d8;
    position: relative;
}
.timeline-item:last-child {
    border-bottom: none;
}

.timeline-marker {
    flex: 0 0 120px;
    text-align: right;
    position: relative;
    padding-top: 4px;
}
.marker-date {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #8a7a6a;
    letter-spacing: 0.5px;
}
.marker-dot {
    display: none;
}

.timeline-content {
    flex: 1;
    padding-left: 28px;
    border-left: 3px solid #e8ddd0;
    padding-bottom: 4px;
}
.timeline-content h3 {
    font-size: 1.2rem;
    color: #c0392b;
    margin-bottom: 6px;
}
.timeline-content p {
    color: #4a4038;
    font-size: 0.95rem;
}

/* ===== Role Badge ===== */
.role-badge {
    display: inline-block;
    margin-bottom: 8px;
}
.role-badge .male {
    background: #d4e6f1;
    color: #1a5276;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}
.role-badge .female {
    background: #fadbd8;
    color: #922b21;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ===== Media Gallery ===== */
.media-gallery {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.media-item {
    max-width: 100%;
}
.media-item img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    object-fit: cover;
}
.media-item video {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 80px 0;
    color: #b0a090;
    font-size: 1.1rem;
}

/* ===== Footer ===== */
.site-footer {
    text-align: center;
    padding: 32px 0 16px;
    border-top: 2px solid #f0e8e0;
    color: #b0a090;
    font-size: 0.9rem;
    margin-top: 20px;
}

/* ===== 备案信息（永远贴底 + 与 container 同宽） ===== */
.footer {
    max-width: 820px;
    margin: 0 auto;
    padding: 20px 24px 40px;
    text-align: center;
    font-size: 0.8rem;
    color: #8a7a6a;
}

.beian-line {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.beian-line a {
    color: #8a7a6a;
    text-decoration: none;
    transition: color 0.2s;
}

.beian-line a:hover {
    color: #c0392b;
    text-decoration: underline;
}

.beian-icon {
    height: 14px;
    vertical-align: middle;
    margin-right: 4px;
}

.beian-separator {
    color: #d5c8bc;
}

/* ===== Login Page ===== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #faf8f5;
}
.login-box {
    background: #fff;
    padding: 48px 40px 40px;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.06);
    width: 380px;
    max-width: 94%;
}
.login-box h2 {
    text-align: center;
    color: #2d2a24;
    font-size: 1.5rem;
    margin-bottom: 24px;
}
.login-error {
    background: #fde8e8;
    color: #c0392b;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 16px;
}
.login-logout {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 16px;
}
.form-group {
    margin-bottom: 18px;
}
.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #4a4038;
    margin-bottom: 4px;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e8e0d8;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: 0.2s;
    font-family: inherit;
    background: #fcfaf8;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}
.btn-login {
    width: 100%;
    padding: 12px;
    background: #c0392b;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.btn-login:hover {
    background: #a93226;
}
.login-hint {
    text-align: center;
    color: #b0a090;
    font-size: 0.8rem;
    margin-top: 16px;
}
.back-link {
    display: block;
    text-align: center;
    margin-top: 12px;
    color: #8a7a6a;
    text-decoration: none;
    font-size: 0.9rem;
}
.back-link:hover {
    text-decoration: underline;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .timeline-item {
        flex-direction: column;
        gap: 6px;
        padding: 16px 0;
    }
    .timeline-marker {
        flex: none;
        text-align: left;
    }
    .timeline-content {
        padding-left: 0;
        border-left: none;
    }
    .site-header h1 {
        font-size: 1.6rem;
    }
    .media-gallery {
        flex-direction: column;
        align-items: flex-start;
    }
}