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

html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 16% 84%, rgba(201, 238, 255, 0.82), transparent 34%),
        radial-gradient(circle at 88% 18%, rgba(251, 238, 255, 0.88), transparent 40%),
        radial-gradient(circle at 82% 86%, rgba(255, 244, 238, 0.82), transparent 36%),
        linear-gradient(180deg, #fffafa 0%, #fbf6ff 46%, #f7fbff 100%);
    color: #111;
    font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    overflow-x: hidden;
}

#mouseCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
}

.container {
    position: relative;
    z-index: 1;
    width: min(100%, 708px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 74px 6px 24px;
}

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

.avatar {
    width: 96px;
    height: 96px;
    margin: 0 auto 18px;
    border-radius: 50%;
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        conic-gradient(from 18deg, #ff9f6a, #b4d9e7, #17b8c7, #1766d8, #6a23d4, #f300c9, #ff9f6a);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.avatar::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, transparent 0 18%, rgba(255, 255, 255, 0.28) 18% 28%, transparent 28%),
        linear-gradient(45deg, transparent 0 42%, rgba(0, 0, 0, 0.18) 42% 44%, transparent 44%),
        linear-gradient(115deg, transparent 0 55%, rgba(255, 255, 255, 0.18) 55% 68%, transparent 68%);
    opacity: 0.8;
}

.avatar-inner {
    width: 58px;
    height: 58px;
    background: #fff;
    clip-path: polygon(51% 0, 100% 92%, 0 92%);
    filter: drop-shadow(0 4px 2px rgba(97, 48, 118, 0.3));
    transform: rotate(-4deg);
    z-index: 1;
}

.avatar-inner::after {
    content: "";
    position: absolute;
    width: 58px;
    height: 58px;
    clip-path: polygon(51% 0, 100% 92%, 0 92%);
    border: 4px solid rgba(116, 49, 138, 0.58);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 2;
}

.header h1 {
    font-size: 21px;
    line-height: 1.25;
    font-weight: 800;
    color: #0d0d0d;
    margin-bottom: 7px;
}

.tags {
    color: #777;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 500;
}

.link-list {
    display: grid;
    gap: 20px;
}

.empty-nav {
    height: 57px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.72);
    color: #777;
    font-size: 14px;
    box-shadow: 0 8px 19px rgba(84, 91, 125, 0.12);
}

.link-item {
    width: 100%;
    height: 57px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #111;
    display: grid;
    grid-template-columns: 68px 1fr 52px;
    align-items: center;
    cursor: pointer;
    box-shadow:
        0 8px 19px rgba(84, 91, 125, 0.16),
        inset 0 0 0 1px rgba(0, 0, 0, 0.035);
}

.link-item:hover {
    transform: translateY(-1px);
    box-shadow:
        0 12px 26px rgba(84, 91, 125, 0.18),
        inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.icon {
    width: 38px;
    height: 38px;
    margin-left: 14px;
    display: grid;
    place-items: center;
    color: #050505;
    font-size: 30px;
}

.icon img {
    max-width: 34px;
    max-height: 34px;
    object-fit: contain;
}

.link-text {
    min-width: 0;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.more-icon {
    width: 36px;
    height: 40px;
    border: 0;
    background: transparent;
    color: #111;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 17px;
}

.nav-type-2 .more-icon {
    font-size: 18px;
}

.footer {
    display: flex;
    justify-content: center;
    padding: 96px 0 0;
}

.declaration-btn {
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    color: #171717;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(84, 91, 125, 0.16);
}

.declaration-btn i {
    transform: rotate(-22deg);
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    width: min(90vw, 400px);
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    font-size: 18px;
}

.modal-close {
    border: 0;
    background: transparent;
    color: #555;
    cursor: pointer;
    font-size: 18px;
}

.modal-body {
    padding: 22px;
}

.modal-body p {
    color: #555;
    font-size: 14px;
    line-height: 1.8;
}

.nav-popup-content {
    max-width: 460px;
}

.nav-popup-body {
    display: grid;
    gap: 16px;
}

.nav-popup-image {
    width: 100%;
    max-height: 58vh;
    object-fit: contain;
    border-radius: 10px;
    background: #f6f6f6;
}

.nav-popup-text {
    color: #333;
    font-size: 15px;
    line-height: 1.8;
    white-space: normal;
    word-break: break-word;
}

.context-menu {
    display: none;
    position: fixed;
    min-width: 174px;
    padding: 7px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
    z-index: 999;
}

.context-menu.show {
    display: grid;
    gap: 2px;
}

.context-item {
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
}

.context-item:hover {
    background: #f3f3f3;
}

.toast {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(20, 20, 20, 0.86);
    color: #fff;
    padding: 10px 18px;
    font-size: 14px;
    z-index: 2000;
}

.nginx-error-page {
    min-height: 100vh;
    background: #fff;
    color: #000;
    font-family: Arial, sans-serif;
}

.nginx-error-page #mouseCanvas {
    display: none;
}

.nginx-error-page .container {
    width: 100%;
    min-height: 100vh;
    padding: 0;
}

.nginx-error-panel {
    min-height: 100vh;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 18px;
    text-align: center;
}

.nginx-error-panel h1 {
    font-size: 32px;
    font-weight: 700;
}

.nginx-error-panel p {
    color: #000;
    font-size: 16px;
}

@media (max-width: 480px) {
    .container {
        padding: 64px 6px 20px;
    }

    .avatar {
        width: 90px;
        height: 90px;
    }

    .link-list {
        gap: 16px;
    }

    .link-item {
        height: 55px;
        grid-template-columns: 58px 1fr 44px;
    }

    .icon {
        margin-left: 11px;
        font-size: 27px;
    }
}
