/* ====================================================================
 * Layout Styles - 统一布局样式
 * 
 * 基于 Fate 项目的布局系统
 * ==================================================================== */

/* Top Navigation Bar */
.topnav {
    position: sticky;
    top: 0;
    z-index: 999;
    background: var(--card);
    border-bottom: 1px solid var(--border);
}

.topnav .wrap {
    min-height: var(--topnav-h);
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    box-sizing: border-box;
}

.topnav .brand { 
    display: flex; 
    flex-direction: column; 
    gap: 2px; 
}

.topnav .brand .title { 
    font-weight: 700; 
    font-size: 14px; 
    padding: 0; 
    text-align: left; 
    margin: 0; 
    line-height: 1.2; 
}

.topnav .brand .sub {
    color: var(--muted);
    font-size: 12px;
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

.topnav .leftlinks { 
    display: flex; 
    gap: 10px; 
    align-items: center; 
    flex-wrap: wrap; 
}

.topnav a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    margin-right: 10px;
}

.topnav a.active {
    color: rgba(30, 30, 30, .92);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.topnav .right { 
    display: flex; 
    gap: 10px; 
    align-items: center; 
    justify-content: flex-end; 
    flex-wrap: wrap; 
}

.topnav .user { 
    color: var(--muted); 
    font-size: 12px; 
}

.topnav .user-link {
    text-decoration: none;
    margin-right: 0;
}

.topnav .user-link:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.topnav .points {
    color: #e67e22;
    font-size: 12px;
    font-weight: 600;
    background: #fef3e2;
    padding: 4px 8px;
    border-radius: 12px;
    margin-right: 6px;
}

.topnav button { 
    border: 1px solid var(--border); 
    background: #fff; 
    border-radius: 10px; 
    padding: 6px 10px; 
    font-weight: 700; 
    cursor: pointer; 
}

/* Page Container */
.page {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 12px;
    padding-bottom: 80px;
}

main {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 16px 12px;
}

/* Footer */
footer.site-footer {
    margin-top: 24px;
    padding: 12px 0;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    border-top: 1px solid var(--border);
}
