* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-height: 100vh;
    background: #0a0a0a;
    font-family: 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
    color: #ffffff;
}

.bg {
    width: 100%;
    min-height: 100vh;
    background: url('background.jpg') no-repeat center center / cover;
    background-attachment: fixed;
    position: relative;
}

.bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 24px 40px;
}

.doc-header {
    text-align: center;
    margin-bottom: 40px;
}

.doc-header h1 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    margin-bottom: 8px;
}

.subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
}

.doc-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.nav-card {
    display: block;
    padding: 20px 24px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    text-decoration: none;
    color: #ffffff;
    transition: transform 0.2s, background 0.3s, border-color 0.3s;
}

.nav-card:hover {
    transform: translateY(-4px);
    background: rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.3);
}

.nav-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.nav-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.doc-footer {
    text-align: center;
    margin-top: 60px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.25);
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-size: 0.85rem;
}

.back-link:hover {
    color: #a78bfa;
}

.page-title {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 30px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.section {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 22px 26px;
    margin-bottom: 16px;
}

.section h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #c4b5fd;
    margin-bottom: 12px;
}

.section p {
    font-size: 0.95rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 4px;
}

.section code {
    background: rgba(124, 58, 237, 0.2);
    color: #a78bfa;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.note {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.text-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 2px;
    transition: color 0.3s, border-color 0.3s;
}

.text-link:hover {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.5);
}

/* ===== 菜单按钮（absolute，锚定在文档左上角） ===== */
.menu-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 200;
    width: 30px;
    height: 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
}

.menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 2px;
    transition: background 0.3s;
}

.menu-btn:hover span {
    background: #a78bfa;
}

/* ===== 菜单覆盖层（fixed，点击时盖住整个屏幕） ===== */
.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: none;
}

.menu-overlay.show {
    display: block;
}

.menu-panel {
    width: 280px;
    max-width: 80%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px 22px;
    animation: slideIn 0.25s ease;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.menu-close {
    cursor: pointer;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1rem;
    transition: color 0.3s;
}

.menu-close:hover {
    color: #ffffff;
}

.menu-page {
    display: block;
}

.menu-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: background 0.3s;
    margin-bottom: 8px;
}

.menu-entry:hover {
    background: rgba(255, 255, 255, 0.06);
}

.menu-arrow {
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.2rem;
}

.menu-back {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.lang-options {
    display: flex;
    gap: 10px;
    padding-left: 4px;
}

.lang-option {
    padding: 8px 18px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.lang-option.active {
    color: #ffffff;
    background: rgba(124, 58, 237, 0.3);
    border-color: rgba(124, 58, 237, 0.5);
}

.lang-option:hover {
    color: #ffffff;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #7c3aed;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.btn {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: #7c3aed;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    margin-top: 8px;
}

.btn:hover {
    background: #6d28d9;
}

.btn:active {
    transform: scale(0.98);
}

.status {
    text-align: center;
    font-size: 0.85rem;
    min-height: 24px;
    margin-top: 12px;
}

.status.success {
    color: #a78bfa;
}

.status.error {
    color: #f87171;
}

.user-info {
    text-align: center;
    margin-top: 30px;
    padding: 12px 20px;
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 10px;
    color: #c4b5fd;
    font-size: 0.9rem;
}

.login-notice {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 20px;
    padding: 8px 12px;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 8px;
}
