* {
    box-sizing: border-box;
}

html,
body,
body * {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

input,
textarea,
select,
[contenteditable="true"],
[contenteditable=""] {
    -webkit-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
}

html {
    min-height: 100%;
    background: var(--app-bg, #f6f8fb);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--app-text, #1f2937);
    background: var(--app-bg, #f6f8fb);
    font-family: "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
    line-height: 1.55;
    overflow-x: hidden;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

.nav-container,
.content-container {
    width: min(1080px, calc(100vw - 28px));
    margin-inline: auto;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
}

.nav-content,
.nav-left,
.nav-right,
.nav-right ul {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-right {
    margin-left: auto;
}

.nav-right ul {
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-right a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 12px;
    color: var(--app-text, #1f2937);
    text-decoration: none;
    background: var(--app-surface-soft, #f8fafc);
    border: 1px solid var(--app-line, #d9e2ec);
    border-radius: 5px;
}

.nav-right a:hover {
    color: var(--app-primary, #3867a8);
    background: var(--app-primary-soft, #e8f1fb);
    border-color: var(--app-primary, #3867a8);
}

.char-icon {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid var(--app-line, #d9e2ec);
}

.user-name {
    max-width: 220px;
    overflow: hidden;
    color: var(--app-text, #1f2937);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-left.hidden {
    display: none;
}

.content-container {
    padding: clamp(18px, 3vw, 30px);
    background: var(--app-surface, #ffffff);
    border: 1px solid var(--app-line, #d9e2ec);
    border-radius: 8px;
    box-shadow: var(--app-shadow, 0 12px 34px rgba(15, 23, 42, 0.08));
}

.content-header {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--app-line, #d9e2ec);
}

.content-header h1 {
    margin: 0;
    font-size: clamp(1.35rem, 3vw, 2rem);
}

@media (max-width: 720px) {
    .nav-container,
    .nav-content,
    .nav-right ul {
        align-items: stretch;
        flex-direction: column;
    }

    .nav-right {
        margin-left: 0;
    }

    .nav-right a {
        width: 100%;
        justify-content: center;
    }
}
