/* Paper Format Helper - Main Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #333;
    line-height: 1.6;
    background: #f5f5f5;
}

/* ── 顶部导航 ── */
.site-header {
    background: #1a73e8;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-header-left {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.site-brand {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-logo {
    height: 32px;
    width: auto;
    display: block;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-nav-primary {
    gap: 20px;
    margin-left: 24px;
}

.nav-menu-item {
    color: rgba(255,255,255,.8);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color .2s;
    position: relative;
    padding: 6px 0;
}

.nav-menu-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: #fff;
    transition: width .3s ease;
    border-radius: 1px;
}

.nav-menu-item:hover {
    color: #fff;
}

.nav-menu-item:hover::after {
    width: 100%;
}

.site-nav-user {
    margin-left: 16px;
}

.nav-username {
    color: rgba(255,255,255,.85);
    font-size: 14px;
    margin-right: 4px;
}

.nav-link {
    color: rgba(255,255,255,.9);
    text-decoration: none;
    font-size: 14px;
    padding: 5px 14px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,.4);
    transition: background .2s;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(255,255,255,.15);
    color: #fff;
}

.nav-link-register {
    background: #fff;
    color: #1a73e8;
    border-color: #fff;
}

.nav-link-register:hover {
    background: #e8f0fe;
    color: #1a73e8;
}

.nav-link-logout {
    border-color: rgba(255,255,255,.4);
}

/* ── 主体 ── */
.site-main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* ── 底部 ── */
.site-footer {
    text-align: center;
    padding: 2rem;
    color: #aaa;
    font-size: 0.875rem;
}

.site-footer-record {
    margin-top: 6px;
}

.site-footer-record a {
    color: #8c8c8c;
    text-decoration: none;
}

.site-footer-record a:hover {
    color: #1a73e8;
    text-decoration: underline;
}

/* ── 消息提示 ── */
.message {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.message.error {
    background: #fdecea;
    border-left-color: #f44336;
}

@media (max-width: 900px) {
    .site-header {
        height: auto;
    }

    .site-header-inner {
        padding-top: 10px;
        padding-bottom: 10px;
        align-items: flex-start;
        gap: 10px;
        flex-direction: column;
    }

    .site-header-left {
        width: 100%;
        flex-wrap: wrap;
        gap: 10px;
    }

    .site-nav-user {
        margin-left: 0;
        width: 100%;
    }
}
